:root {
  --ops-bg: #f5f7fa;
  --ops-primary: #2563eb;
  --ops-primary-dark: #1d4ed8;
  --ops-text: #1f2937;
  --ops-muted: #6b7280;
  --ops-border: #e5e7eb;
  --ops-danger: #dc2626;
  --ops-white: #ffffff;
  --ops-radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--ops-bg);
  color: var(--ops-text);
}

.ops-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

.ops-card {
  background: var(--ops-white);
  border-radius: var(--ops-radius);
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.ops-brand {
  text-align: center;
  margin-bottom: 24px;
}

.ops-brand h1 {
  font-size: 20px;
  margin: 8px 0 0;
}

.ops-brand span {
  color: var(--ops-muted);
  font-size: 13px;
}

.ops-field {
  margin-bottom: 16px;
}

.ops-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.ops-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  font-size: 14px;
}

.ops-field input:focus {
  outline: none;
  border-color: var(--ops-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ops-btn {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: var(--ops-primary);
  color: var(--ops-white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ops-btn:hover { background: var(--ops-primary-dark); }

.ops-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--ops-danger);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.ops-shell { display: flex; min-height: 100vh; }

.ops-sidebar {
  width: 244px;
  background: #0f172a;
  color: #cbd5e1;
  padding: 16px 14px;
}

/* Marca — logo do cliente numa caixa branca (o logo tem texto preto que
   não se veria no fundo escuro), com o nome do sistema discreto por baixo. */
.ops-brand {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 6px;
  text-align: center;
}
.ops-brand img { width: 100%; max-width: 168px; height: auto; display: block; margin: 0 auto; }
.ops-brand-name {
  display: block;
  text-align: center;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #64748b;
  margin: 6px 0 14px;
}

/* Títulos de secção — com evidência real (maiores, mais claros, separador) */
.ops-nav-section {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #cbd5e1;
  padding: 6px 8px 4px;
  margin-top: 14px;
  border-top: 1px solid #1e293b;
}
.ops-nav-section:first-of-type { margin-top: 4px; border-top: none; }

/* Itens do menu — mesmo formato para <a> e <button>, ícones alinhados */
.ops-sidebar a.ops-nav,
.ops-sidebar button.ops-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  margin: 1px 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ops-sidebar a.ops-nav:hover,
.ops-sidebar button.ops-nav:hover { background: #1e293b; color: #fff; }
.ops-sidebar a.ops-nav.is-active,
.ops-sidebar button.ops-nav.is-active { background: #1d4ed8; color: #fff; font-weight: 600; }
.ops-nav-ico { width: 22px; flex-shrink: 0; text-align: center; font-size: 15px; }
.ops-nav-badge { margin-left: auto; }

.ops-main { flex: 1; padding: 32px; }

.ops-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 20px; }

.ops-kpi {
  background: var(--ops-white);
  border-radius: var(--ops-radius);
  padding: 20px;
  border: 1px solid var(--ops-border);
}

.ops-kpi .value { font-size: 28px; font-weight: 700; }
.ops-kpi .label { color: var(--ops-muted); font-size: 13px; }

.ops-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ops-white);
  border-radius: var(--ops-radius);
  overflow: hidden;
  margin-top: 16px;
}

.ops-table th, .ops-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ops-border);
  text-align: left;
  font-size: 14px;
}

.ops-table th { background: #f9fafb; color: var(--ops-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.ops-table a { color: var(--ops-primary); text-decoration: none; font-weight: 600; }
/* Botões que são links dentro de tabelas mantêm o texto branco (senão ficava
   azul sobre fundo azul, ilegível). A cor de fundo inline de cada botão prevalece. */
.ops-table a.ops-btn { color: var(--ops-white); }

.ops-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.ops-btn-sm { width: auto; padding: 6px 14px; font-size: 13px; }

.ops-alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.ops-alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.ops-alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

.ops-panel {
  background: var(--ops-white);
  border-radius: var(--ops-radius);
  padding: 24px;
  margin-top: 16px;
  max-width: 640px;
  border: 1px solid var(--ops-border);
}

.ops-form-row { margin-bottom: 14px; }
.ops-form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ops-form-row input, .ops-form-row select, .ops-form-row textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.ops-timeline { list-style: none; margin: 16px 0 0; padding: 0; }
.ops-timeline li {
  border-left: 3px solid var(--ops-primary);
  padding: 4px 0 16px 16px;
  margin-left: 6px;
}
.ops-timeline .time { font-size: 12px; color: var(--ops-muted); }
.ops-timeline .title { font-weight: 600; }

/* Operations Replay™ */
.ops-replay {
  background: var(--ops-white);
  border-radius: var(--ops-radius);
  border: 1px solid var(--ops-border);
  padding: 24px;
  max-width: 720px;
  margin-top: 16px;
}

.ops-replay-stage { display: flex; gap: 20px; align-items: flex-start; }

.ops-replay-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  transition: background 0.2s ease;
}

.ops-replay-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--ops-muted);
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.ops-replay-title { font-size: 20px; font-weight: 700; }
.ops-replay-description { color: var(--ops-text); margin-top: 4px; }
.ops-replay-actor { color: var(--ops-muted); font-size: 13px; margin-top: 6px; font-style: italic; }

.ops-replay-track {
  display: flex;
  gap: 6px;
  margin: 24px 0;
  overflow-x: auto;
  padding: 4px 0;
}

.ops-replay-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.ops-replay-dot.is-active {
  border-color: var(--ops-text);
  transform: scale(1.4);
}

.ops-replay-controls { display: flex; gap: 10px; align-items: ce