/* ============================================================================
   Área do Gestor — Grupo Reis | Tecnologia & Gestão
   Folha de estilo compartilhada pelas telas do painel.
   Mesma linguagem visual da landing page pública: Navy #0F172A,
   dourado #D97706 e esmeralda #10B981 sobre off-white #F8FAFC.
   ========================================================================== */

/* ─── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:        #F8FAFC;
  --surface:   #FFFFFF;
  --surface-2: #F1F5F9;
  --fg:        #0F172A;
  --muted:     #55607A;
  --border:    #E4E9F2;
  --accent:    #D97706;   /* dourado — destaques, badges */
  --action:    #10B981;   /* esmeralda — ações e estados positivos */
  --navy:      #0B1220;   /* moldura escura (sidebar) */
  --navy-2:    #131E33;

  --ok:     #10B981;
  --warn:   #D97706;
  --danger: #DC2626;
  --info:   #2563EB;
  --violet: #7C3AED;

  --accent-ink:  color-mix(in oklch, var(--accent) 74%, black);
  --accent-soft: color-mix(in oklch, var(--accent) 15%, transparent);
  --action-soft: color-mix(in oklch, var(--action) 16%, transparent);
  --ok-soft:     color-mix(in oklch, var(--ok) 16%, transparent);
  --warn-soft:   color-mix(in oklch, var(--warn) 16%, transparent);
  --danger-soft: color-mix(in oklch, var(--danger) 13%, transparent);
  --info-soft:   color-mix(in oklch, var(--info) 12%, transparent);
  --violet-soft: color-mix(in oklch, var(--violet) 13%, transparent);
  --fg-soft:     color-mix(in oklch, var(--fg) 6%, transparent);

  --on-navy:     color-mix(in oklch, var(--surface) 84%, transparent);
  --on-navy-dim: color-mix(in oklch, var(--surface) 56%, transparent);
  --line-navy:   color-mix(in oklch, var(--surface) 13%, transparent);

  --shadow-sm: 0 1px 2px color-mix(in oklch, var(--fg) 9%, transparent);
  --shadow-md: 0 14px 32px -16px color-mix(in oklch, var(--fg) 34%, transparent);
  --shadow-lg: 0 34px 66px -30px color-mix(in oklch, var(--fg) 48%, transparent);

  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --sidebar-w: 268px;
}

/* ─── base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

/* ─── tipografia ─────────────────────────────────────────────────────────── */
.t-h1 { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.t-h2 { font-family: var(--font-display); font-size: clamp(19px, 2vw, 23px); font-weight: 700; letter-spacing: -0.015em; }
.t-h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.t-lead { color: var(--muted); font-size: 15.5px; max-width: 68ch; }
.t-muted { color: var(--muted); }
.t-mono { font-family: var(--font-mono); }
.t-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.t-xs { font-size: 12.5px; }
.t-sm { font-size: 13.5px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.kpi-val.num { font-family: var(--font-display); }
.nowrap { white-space: nowrap; }
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }

/* ─── shell ──────────────────────────────────────────────────────────────── */
.view[hidden] { display: none !important; }
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-content { padding: clamp(20px, 2.6vw, 34px); width: 100%; max-width: 1440px; margin-inline: auto; }
.app-foot { padding: 16px clamp(20px, 2.6vw, 34px) 28px; color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* sidebar */
.app-side {
  background: var(--navy);
  color: var(--on-navy);
  display: flex; flex-direction: column;
  padding: 16px 14px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 4px 18px; }
.brand-plate { background: var(--surface); border-radius: 11px; padding: 7px 11px; display: inline-flex; box-shadow: var(--shadow-sm); }
.brand-plate img { height: 30px; width: auto; }
.side-sys { display: flex; flex-direction: column; gap: 2px; padding: 0 4px 14px; }
.side-sys b { font-family: var(--font-display); font-size: 15px; letter-spacing: -0.01em; color: var(--surface); }
.side-sys span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-navy-dim); }

.side-group { margin-top: 10px; }
.side-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-navy-dim); padding: 6px 12px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500;
  color: var(--on-navy);
  transition: background 0.15s ease, color 0.15s ease;
}
.side-link svg { width: 18px; height: 18px; flex: 0 0 auto; }
.side-link:hover { background: color-mix(in oklch, var(--surface) 9%, transparent); color: var(--surface); }
.side-link.is-active { background: var(--action-soft); color: var(--surface); font-weight: 600; }
.side-link.is-active svg { color: color-mix(in oklch, var(--action) 68%, white); }
.side-tag { margin-left: auto; font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: color-mix(in oklch, var(--accent) 74%, white); }
.side-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line-navy); }
.side-user b { display: block; font-size: 13.5px; color: var(--surface); font-weight: 600; }
.side-user span { display: block; font-size: 11.5px; color: var(--on-navy-dim); }

/* topbar */
.app-top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.app-top-inner { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 11px clamp(20px, 2.6vw, 34px); }
.top-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.top-title b { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.top-title span { font-size: 12.5px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hide-sm { display: inline-flex; }
.icon-btn {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); color: var(--fg);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--surface-2); border-color: color-mix(in oklch, var(--fg) 22%, transparent); }
.icon-btn svg { width: 18px; height: 18px; }
.side-toggle { display: none; }

/* ─── botões ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.06s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.btn-primary { background: var(--action); color: var(--fg); border-color: var(--action); }
.btn-primary:hover { background: color-mix(in oklch, var(--action) 86%, black); border-color: color-mix(in oklch, var(--action) 86%, black); }
.btn-dark { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.btn-dark:hover { background: var(--navy-2); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: color-mix(in oklch, var(--fg) 26%, transparent); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--fg); background: var(--fg-soft); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in oklch, var(--danger) 34%, transparent); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 22px; font-size: 15.5px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ─── superfícies ────────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.panel-head h3 { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; }
.panel-head p { font-size: 12.5px; color: var(--muted); }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.card-flat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

/* ─── grids utilitários ──────────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-2-1 { grid-template-columns: 1.6fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 1.6fr; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.spacer { flex: 1 1 auto; }

/* ─── badges / pills ─────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge-ok     { background: var(--ok-soft);     color: color-mix(in oklch, var(--ok) 60%, black); }
.badge-warn   { background: var(--warn-soft);   color: var(--accent-ink); }
.badge-danger { background: var(--danger-soft); color: color-mix(in oklch, var(--danger) 78%, black); }
.badge-info   { background: var(--info-soft);   color: color-mix(in oklch, var(--info) 74%, black); }
.badge-neutral{ background: var(--surface-2);   color: var(--muted); }
.badge-gold   { background: var(--accent);      color: var(--fg); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in oklch, var(--ok) 60%, transparent); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ─── KPI ────────────────────────────────────────────────────────────────── */
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.kpi-mark svg { width: 20px; height: 20px; }
.kpi-mark.is-action { background: var(--action-soft); color: color-mix(in oklch, var(--action) 60%, black); }
.kpi-mark.is-info { background: var(--info-soft); color: color-mix(in oklch, var(--info) 74%, black); }
.kpi-mark.is-violet { background: var(--violet-soft); color: color-mix(in oklch, var(--violet) 74%, black); }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-val { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.kpi-val small { font-size: 0.5em; color: var(--muted); font-weight: 600; }
.kpi-delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.kpi-delta.up { color: color-mix(in oklch, var(--ok) 60%, black); }
.kpi-delta.down { color: color-mix(in oklch, var(--danger) 78%, black); }

/* ─── gráfico de linha (SVG) ─────────────────────────────────────────────── */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
.chart .series-line { fill: none; stroke: var(--action); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .series-area { fill: color-mix(in oklch, var(--action) 16%, transparent); }
.chart .series-line-2 { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-dasharray: 5 5; stroke-linecap: round; }
.chart .point { fill: var(--surface); stroke: var(--action); stroke-width: 2.6; }
.chart-foot { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--action); }
.legend-swatch.gold { background: var(--accent); }
.legend-swatch.navy { background: var(--fg); }

/* ─── barras ─────────────────────────────────────────────────────────────── */
.bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 168px) 1fr 54px; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-row .bar-label { color: var(--fg); font-weight: 500; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--action); }
.bar > i.gold { background: var(--accent); }
.bar > i.navy { background: var(--fg); }
.bar > i.info { background: var(--info); }
.bar > i.violet { background: var(--violet); }
.bar-val { text-align: right; color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; }

/* ─── donut ──────────────────────────────────────────────────────────────── */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 148px; height: 148px; flex: 0 0 auto; }
.donut circle { fill: none; stroke-width: 16; }
.donut .track { stroke: var(--surface-2); }
.donut .seg-a { stroke: var(--action); }
.donut .seg-b { stroke: var(--accent); }
.donut .seg-c { stroke: var(--fg); }
.donut .seg-d { stroke: var(--info); }
.donut-center { font-family: var(--font-display); font-weight: 800; font-size: 22px; fill: var(--fg); }
.donut-center-sub { font-family: var(--font-mono); font-size: 9.5px; fill: var(--muted); letter-spacing: 0.08em; }

/* ─── tabela ─────────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 500; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--bg); }
.table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* ─── formulários ────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 13px; font-weight: 600; color: var(--fg); }
.hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--fg); font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder, .textarea::placeholder { color: color-mix(in oklch, var(--muted) 78%, transparent); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--action);
  box-shadow: 0 0 0 3px var(--action-soft);
}
.textarea { min-height: 92px; resize: vertical; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1 1 auto; }
.input-affix { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px; background: var(--surface); }
.input-affix:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.input-affix svg { width: 17px; height: 17px; color: var(--muted); flex: 0 0 auto; }
.input-affix input { border: 0; outline: none; background: transparent; padding: 10px 0; width: 100%; font-size: 14px; color: var(--fg); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--fg); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--action); }

/* força de senha */
.strength { display: flex; flex-direction: column; gap: 7px; }
.strength-bars { display: flex; gap: 6px; }
.strength-bars i { height: 6px; flex: 1 1 0; border-radius: 999px; background: var(--surface-2); transition: background 0.2s ease; }
.strength-bars i.on-1 { background: var(--danger); }
.strength-bars i.on-2 { background: var(--warn); }
.strength-bars i.on-3 { background: var(--info); }
.strength-bars i.on-4 { background: var(--ok); }
.strength-text { font-size: 12.5px; color: var(--muted); }
.req-list { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); }
.req-list li { display: inline-flex; align-items: center; gap: 6px; }
.req-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.req-list li.ok { color: color-mix(in oklch, var(--ok) 58%, black); }
.req-list li.ok::before { background: var(--ok); }

/* código 2FA */
.code-row { display: flex; gap: 10px; }
.code-row input {
  width: 52px; height: 58px; text-align: center;
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--fg);
}
.code-row input:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }

/* ─── switch ─────────────────────────────────────────────────────────────── */
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 46px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: color-mix(in oklch, var(--muted) 34%, var(--surface)); border: 1px solid var(--border); transition: background 0.18s ease; pointer-events: none; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform 0.18s ease; pointer-events: none; }
.switch input:checked ~ .track { background: var(--action); border-color: var(--action); }
.switch input:checked ~ .thumb { transform: translateX(20px); }
.switch input:focus-visible ~ .track { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ─── abas ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; background: transparent; border-inline: 0; border-top: 0; }
.tab:hover { color: var(--fg); }
.tab.is-active { color: var(--fg); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ─── lista de atividades / log ──────────────────────────────────────────── */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-mark { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.feed-mark svg { width: 17px; height: 17px; }
.feed-item b { font-size: 13.5px; font-weight: 600; }
.feed-item p { font-size: 13px; color: var(--muted); }
.feed-time { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.log { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.log-line { display: grid; grid-template-columns: 66px 132px minmax(0, 1fr); gap: 10px; padding: 7px 9px; border-radius: 8px; }
.log-line:hover { background: var(--surface-2); }
.log-line .log-time { color: var(--muted); }
.log-line .log-who { font-weight: 600; }
.log-line .log-who.a { color: color-mix(in oklch, var(--action) 60%, black); }
.log-line .log-who.v { color: var(--accent-ink); }
.log-line .log-who.o { color: color-mix(in oklch, var(--info) 74%, black); }

/* ─── calendário ─────────────────────────────────────────────────────────── */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-dow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal-day { min-height: 92px; border: 1px solid var(--border); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 5px; background: var(--surface); }
.cal-day.is-muted { opacity: 0.45; }
.cal-day.is-today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cal-num { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.cal-ev { font-size: 10.5px; padding: 3px 7px; border-radius: 7px; line-height: 1.35; }
.cal-ev.ig { background: var(--accent-soft); color: var(--accent-ink); }
.cal-ev.yt { background: var(--danger-soft); color: color-mix(in oklch, var(--danger) 78%, black); }
.cal-ev.wa { background: var(--ok-soft); color: color-mix(in oklch, var(--ok) 60%, black); }
.cal-ev.bi { background: var(--info-soft); color: color-mix(in oklch, var(--info) 74%, black); }

/* ─── lista de fila ──────────────────────────────────────────────────────── */
.queue-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.queue-item:last-child { border-bottom: 0; }
.queue-id { font-family: var(--font-mono); font-size: 12px; color: var(--muted); width: 82px; flex: 0 0 auto; }

/* ─── avatar ─────────────────────────────────────────────────────────────── */
.avatar { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }

/* ─── status card (integrações) ──────────────────────────────────────────── */
.integration { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; }
.integration-head { display: flex; align-items: flex-start; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.integration-mark { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--fg); }
.integration-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.integration-foot { padding: 13px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* aviso / callout neutro */
.note { display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font-size: 13px; border: 1px solid var(--border); }
.note svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent-ink); }
.note.warn { background: var(--warn-soft); border-color: color-mix(in oklch, var(--warn) 26%, transparent); color: var(--accent-ink); }

/* ─── toast ──────────────────────────────────────────────────────────────── */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--navy); color: var(--surface);
  padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; font-weight: 500;
  animation: toast-in 0.2s ease;
}
.toast svg { width: 18px; height: 18px; color: var(--action); flex: 0 0 auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ─── modal ──────────────────────────────────────────────────────────────── */
.modal-scrim { position: fixed; inset: 0; z-index: 70; background: color-mix(in oklch, var(--navy) 62%, transparent); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-scrim.is-open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: min(460px, 100%); overflow: hidden; }
.modal-head { padding: 20px 22px 0; }
.modal-body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; }
.modal-close { position: absolute; top: 14px; right: 14px; }

/* ─── auth (Tela 0) ──────────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.auth-aside { background: var(--navy); color: var(--on-navy); padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; }
.auth-main { display: grid; place-items: center; padding: clamp(28px, 5vw, 56px); }
.auth-card { width: min(420px, 100%); }
.auth-aside .brand-plate { align-self: flex-start; }
.auth-points { display: flex; flex-direction: column; gap: 16px; margin-top: 34px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; }
.auth-point svg { width: 20px; height: 20px; color: color-mix(in oklch, var(--action) 66%, white); flex: 0 0 auto; margin-top: 2px; }
.auth-point b { display: block; color: var(--surface); font-size: 14.5px; }
.auth-point span { color: var(--on-navy-dim); font-size: 13px; }
.auth-legal { font-size: 12px; color: var(--on-navy-dim); }

/* ─── responsivo ─────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-3 { grid-template-columns: repeat(2, 1fr); }
  .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .app-side {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    z-index: 60; transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
  }
  .app-side.is-open { transform: none; }
  .side-toggle { display: grid; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: color-mix(in oklch, var(--navy) 55%, transparent); display: none; }
  .scrim.is-open { display: block; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}
@media (max-width: 760px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .bar-row { grid-template-columns: 1fr 46px; }
  .bar-row .bar-label { grid-column: 1 / -1; }
  .bar { grid-column: 1; }
  .cal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-dow { display: none; }
  .log-line { grid-template-columns: 60px 1fr; }
  .log-line .log-msg { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .input-group { flex-direction: column; }
  .code-row { gap: 7px; }
  .code-row input { width: 100%; height: 52px; }
  .toast-wrap { left: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
