/* SLGS — tema de console operacional: fundo escuro, baixo brilho, leitura rápida de dados */

:root {
  --bg: #12151a;
  --surface: #1a1f27;
  --surface-2: #212733;
  --border: #2a3140;
  --border-strong: #3a4356;
  --text: #e6e9ef;
  --text-muted: #8b93a3;
  --accent: #4a9eff;
  --accent-bg: #14243a;
  --success: #3ecf8e;
  --success-bg: #123527;
  --warning: #e8a33d;
  --warning-bg: #3a2c12;
  --danger: #e8544a;
  --danger-bg: #3a1a17;
  --radius: 8px;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-brand { font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.04em; }
.topbar-sub { color: var(--text-muted); font-weight: 400; margin-left: 8px; font-size: 12px; }
.topbar-user { display: flex; align-items: center; gap: 12px; color: var(--text-muted); }

/* --- login --- */
.tela-login { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 52px); }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-card h1 { margin: 0 0 4px; font-size: 18px; font-weight: 500; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); }
.erro { color: var(--danger); font-size: 13px; margin: 0; }

/* --- form controls --- */
input, select, textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

button { font-family: inherit; cursor: pointer; }
.btn-primario, .login-card button[type="submit"] {
  background: var(--accent);
  color: #06121f;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-weight: 600;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 14px;
}

/* --- painel --- */
.tela-painel { padding: 16px 20px; }
.painel-toolbar { margin-bottom: 18px; }

.fila-bloco { margin-bottom: 28px; }
.fila-titulo {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.fila-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 10px;
}

/* --- cartão de strip --- */
.strip-card {
  position: relative;
  flex: 0 0 112px;
  height: 112px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: flex-basis 0.15s ease, height 0.15s ease;
  font-family: var(--font-mono);
}
.strip-card.expandida { border-color: var(--border-strong); overflow: visible; }

.strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px 6px;
}
.strip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.strip-dot.warning { background: var(--warning); }
.strip-dot.success { background: var(--success); }
.strip-dot.accent { background: var(--accent); }
.strip-indicativo { font-weight: 600; font-size: 14px; }
.strip-pista { font-size: 11px; color: var(--text-muted); }

.strip-body-colapsado { padding: 0 10px; display: flex; flex-direction: column; gap: 6px; }
.crow { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }

.strip-expandido { display: none; padding: 10px 12px; }
.strip-card.expandida .strip-body-colapsado { display: none; }
.strip-card.expandida .strip-expandido { display: block; }

.badge-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-status.warning { background: var(--warning-bg); color: var(--warning); }
.badge-status.success { background: var(--success-bg); color: var(--success); }
.badge-status.accent { background: var(--accent-bg); color: var(--accent); }

.exp-fields { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.exp-field { flex: 0 0 auto; }
.exp-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; margin: 0 0 2px; }
.exp-value { font-size: 12px; margin: 0; }

.exp-acao {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.exp-acao select { font-size: 12px; padding: 5px 8px; }
.exp-acao button { font-size: 12px; padding: 6px 10px; border-radius: 5px; }

.close-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px;
  z-index: 2;
}

/* --- dialog nova strip --- */
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  width: 520px;
  max-width: 92vw;
}
dialog::backdrop { background: rgba(0,0,0,0.55); }
dialog h2 { margin: 0 0 14px; font-size: 16px; font-weight: 500; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.grid-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.dialog-acoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
