/* ============================================================
   INTRANET MAYER — Design Editorial · Navy + Dourado
   Versão: 1.0 — Abril 2026
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --navy-900: #0E1F33;
  --navy-800: #14293F;
  --navy-700: #1B334A;
  --navy-600: #294667;
  --navy-500: #385776;
  --navy-400: #5B7693;

  --gold-700: #7A5F2A;
  --gold-600: #96753A;
  --gold-500: #B5904F;
  --gold-400: #C8AA74;
  --gold-300: #DBC499;
  --gold-100: #EFE5CC;
  --gold-50:  #F8F2E2;

  --paper:    #F7F5F0;
  --paper-2:  #EFEBE2;
  --cream:    #E8E2D4;
  --ink:      #1B334A;
  --ink-2:    #385776;
  --ink-3:    #6B7B8E;
  --ink-4:    #98A3B3;
  --rule:     #E0DAC9;
  --rule-2:   #CEC6B0;

  --ok:       #3D7A5E;
  --warn:     #C37A2A;
  --bad:      #B3422F;

  --surface:  #FFFFFF;
  --surface-2:#F7F5F0;

  --sans:  'Montserrat', system-ui, -apple-system, sans-serif;
  --serif: 'Montserrat', system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20,41,63,.04), 0 2px 8px rgba(20,41,63,.04);
  --shadow-md: 0 4px 20px rgba(20,41,63,.06), 0 1px 3px rgba(20,41,63,.04);
  --shadow-lg: 0 20px 60px rgba(20,41,63,.10), 0 2px 8px rgba(20,41,63,.05);
}

/* Dark mode */
[data-theme="dark"] {
  --paper: #0B1724;
  --paper-2: #0F1D2E;
  --cream: #142233;
  --ink: #EFE4CC;
  --ink-2: #C9BDA0;
  --ink-3: #8C8672;
  --ink-4: #5F5A4D;
  --rule: #1E2E43;
  --rule-2: #2A3C55;
  --surface: #10202F;
  --surface-2: #0B1724;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.45);
}

/* ---------- Base ---------- */
body {
  font-family: var(--sans) !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(201,163,91,.08), transparent 55%),
    radial-gradient(900px 700px at -10% 110%, rgba(27,51,74,.05), transparent 60%);
  z-index: 0;
}

.min-h-screen { background: transparent !important; }

/* ---------- App Shell ---------- */
.flex.min-h-screen {
  position: relative;
  z-index: 1;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar.sidebar {
  background: linear-gradient(180deg, #0A1826 0%, #1B334A 100%) !important;
  border-right: 1px solid rgba(201,163,91,.18) !important;
  box-shadow: 4px 0 24px rgba(10,24,38,.18);
  transition: width .35s var(--ease) !important;
}

/* Logo section — keep as-is, just update wrapper */
.sidebar-logo {
  border-bottom: 1px solid rgba(201,163,91,.15) !important;
  background: transparent !important;
  padding: 18px 20px !important;
  min-height: 74px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
}
.sidebar-logo::after {
  content: "";
  position: absolute; left: 20px; right: 20px; bottom: -1px; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-500) 20%, var(--gold-500) 80%, transparent);
  opacity: .3;
}
.sidebar-logo img {
  filter: drop-shadow(0 2px 6px rgba(201,163,91,.25)) !important;
}

/* Toggle button */
#sidebar-toggle-btn {
  border-bottom: 1px solid rgba(255,255,255,.05) !important;
  color: rgba(201,163,91,.45) !important;
  transition: color .2s var(--ease) !important;
  background: transparent !important;
}
#sidebar-toggle-btn:hover {
  color: rgba(201,163,91,.85) !important;
  background: rgba(201,163,91,.04) !important;
}

/* Nav container */
#sidebar .flex-1.p-4 {
  padding: 10px 0 20px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,163,91,.2) transparent;
}

/* Section dividers / group labels */
#sidebar hr {
  border-color: rgba(201,163,91,.12) !important;
  margin: 10px 14px !important;
}
#sidebar .pt-4.pb-2 {
  padding-top: 8px !important;
  padding-bottom: 2px !important;
}
#sidebar p.text-xs.font-semibold.text-gray-500 {
  color: var(--gold-400) !important;
  letter-spacing: .18em;
  font-size: 9.5px !important;
  padding: 4px 14px 6px !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
#sidebar p.text-xs.font-semibold.text-gray-500::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(201,163,91,.3), transparent);
}

/* Nav items */
#sidebar .nav-link {
  color: rgba(245,235,211,.72) !important;
  padding: 9px 14px !important;
  margin: 1px 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  transition: background .18s var(--ease), color .18s var(--ease) !important;
  width: auto !important;
  gap: 12px;
  position: relative;
}
#sidebar .nav-link:hover {
  background: rgba(255,255,255,.045) !important;
  color: var(--paper) !important;
}
#sidebar .nav-link-active,
#sidebar .nav-link.nav-link-active {
  background: linear-gradient(90deg, rgba(201,163,91,.14), rgba(201,163,91,.02)) !important;
  color: var(--paper) !important;
  font-weight: 500 !important;
}
#sidebar .nav-link-active::before,
#sidebar .nav-link.nav-link-active::before {
  content: "";
  position: absolute; left: -4px; top: 7px; bottom: 7px; width: 2px;
  background: var(--gold-500);
  border-radius: 2px;
}
#sidebar .nav-link svg,
#sidebar .nav-sublink svg {
  color: var(--gold-400) !important;
  opacity: .85;
}
#sidebar .nav-link:hover svg,
#sidebar .nav-link-active svg {
  opacity: 1;
}

/* Sublinks */
#sidebar .nav-sublink {
  color: rgba(245,235,211,.6) !important;
  padding: 7px 12px !important;
  margin: 1px 10px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  transition: background .18s var(--ease), color .18s var(--ease) !important;
  gap: 10px;
}
#sidebar .nav-sublink:hover {
  background: rgba(255,255,255,.04) !important;
  color: var(--paper) !important;
}
#sidebar .nav-sublink.nav-sublink-active,
#sidebar .nav-sublink.bg-blue-50 {
  background: rgba(201,163,91,.12) !important;
  color: var(--paper) !important;
}

/* Submenu container */
#sidebar .submenu {
  border-left: 1px solid rgba(201,163,91,.12) !important;
  margin-left: 20px !important;
  padding-left: 4px !important;
}

/* Menu arrows */
#sidebar .menu-arrow { color: rgba(201,163,91,.5) !important; }

/* Menu group button */
#sidebar .menu-group > button.nav-link {
  color: rgba(245,235,211,.75) !important;
}

/* Sidebar foot — user info */
#sidebar .sidebar-foot,
#sidebar > div:last-child {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 12px 14px 16px;
}

/* Tooltip when collapsed */
#sidebar.sidebar-collapsed .nav-link:hover::after,
#sidebar.sidebar-collapsed .nav-sublink:hover::after {
  background: var(--navy-800) !important;
  font-family: var(--sans) !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  box-shadow: var(--shadow-md) !important;
  border: 1px solid rgba(201,163,91,.15) !important;
}

/* ============================================================
   TOPBAR / NOTIFICATION BAR
   ============================================================ */
#notification-bar {
  background: color-mix(in srgb, var(--paper) 80%, transparent) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid var(--rule) !important;
  height: 64px !important;
  padding: 0 28px !important;
  gap: 16px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 200 !important;
}

/* Search input in topbar */
#notification-bar input[type="text"] {
  background: var(--surface) !important;
  border: 1px solid var(--rule) !important;
  border-radius: 999px !important;
  padding: 0 14px 0 36px !important;
  color: var(--ink) !important;
  font-family: var(--sans) !important;
  font-size: 13px !important;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease) !important;
}
#notification-bar input[type="text"]:focus {
  border-color: var(--gold-400) !important;
  box-shadow: 0 0 0 4px rgba(201,163,91,.08) !important;
  outline: none !important;
}
#notification-bar input[type="text"]::placeholder {
  color: var(--ink-3) !important;
}

/* Notification bell button */
#notif-bell {
  width: 38px !important; height: 38px !important;
  border-radius: 999px !important;
  border: 1px solid var(--rule) !important;
  background: var(--surface) !important;
  color: var(--ink-2) !important;
  display: grid !important;
  place-items: center !important;
  transition: all .2s var(--ease) !important;
  padding: 0 !important;
}
#notif-bell:hover {
  color: var(--navy-700) !important;
  border-color: var(--gold-400) !important;
  transform: translateY(-1px) !important;
}

/* Profile button in topbar */
#profile-wrapper button {
  border: 1px solid var(--rule) !important;
  border-radius: 10px !important;
  background: var(--surface) !important;
  padding: 6px 10px !important;
  transition: all .2s var(--ease) !important;
}
#profile-wrapper button:hover {
  border-color: var(--gold-400) !important;
  box-shadow: var(--shadow-sm) !important;
}
#profile-wrapper .w-8.h-8 {
  background: linear-gradient(140deg, var(--gold-400), var(--gold-600)) !important;
  color: var(--navy-900) !important;
  font-family: var(--serif) !important;
}
#profile-wrapper .text-sm.text-gray-700 {
  color: var(--ink) !important;
  font-family: var(--sans) !important;
}

/* Dropdowns */
#notif-dropdown, #profile-dropdown {
  border: 1px solid var(--rule) !important;
  border-radius: var(--r-md) !important;
  box-shadow: var(--shadow-lg) !important;
  background: var(--surface) !important;
}
#notif-dropdown .font-semibold {
  color: var(--ink) !important;
  font-family: var(--sans) !important;
}
#notif-badge {
  background: var(--bad) !important;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
#main-content {
  background: transparent !important;
}
#main-content > .p-4,
#main-content > .p-4.md\:p-8,
#main-content > div.p-4 {
  padding: 0 !important;
  background: transparent !important;
}

/* ─── RESPIRO PARA QUEM NÃO USA .editorial-page (25/08/2026) ───────────────
   A regra acima zera o recuo da moldura porque o desenho original supunha que
   TODA tela abriria com .editorial-page, que traz o próprio recuo. Na prática,
   160 das 170 telas do sistema não usam a classe — e ficavam sem recuo nenhum,
   coladas nas duas bordas do monitor. Medido em 25/08/2026: Carteira, SISRH,
   VIGÍLIA e a História do lead começavam no pixel 256 e terminavam no 1920.

   Esta regra devolve a mesma régua da casa (1520px centralizados, com recuo
   lateral) só para quem NÃO traz .editorial-page dentro. Quem já usa a classe
   não é tocado — continua exatamente como está.

   Precisa vencer a regra acima em especificidade: o `:not(:has(...))` faz isso.
   Navegador antigo que não entenda `:has()` simplesmente ignora este bloco e a
   tela volta ao comportamento anterior — nada quebra. */
#main-content > .p-4:not(:has(> .editorial-page)),
#main-content > .p-4.md\:p-8:not(:has(> .editorial-page)),
#main-content > div.p-4:not(:has(> .editorial-page)) {
  padding: 36px 48px 80px !important;
  max-width: 1616px;   /* 1520 de conteúdo + os 48 de recuo de cada lado */
  margin: 0 auto;
}
@media (max-width: 1200px) {
  #main-content > .p-4:not(:has(> .editorial-page)),
  #main-content > .p-4.md\:p-8:not(:has(> .editorial-page)),
  #main-content > div.p-4:not(:has(> .editorial-page)) {
    padding: 28px 24px 60px !important;
  }
}
@media (max-width: 768px) {
  #main-content > .p-4:not(:has(> .editorial-page)),
  #main-content > .p-4.md\:p-8:not(:has(> .editorial-page)),
  #main-content > div.p-4:not(:has(> .editorial-page)) {
    padding: 20px 16px 48px !important;
  }
}

/* Mobile header */
.mobile-header {
  background: var(--navy-900) !important;
  border-bottom-color: rgba(201,163,91,.15) !important;
}

/* ============================================================
   KPI ICONS — sizing in painel
   ============================================================ */
.kpi-icon-lg {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gold-50);
  color: var(--gold-600);
  flex-shrink: 0;
}

/* ============================================================
   EDITORIAL HOME — section & card styles (used by React)
   ============================================================ */
.editorial-page {
  padding: 44px 48px 80px;
  max-width: 1520px;
  margin: 0 auto;
  font-family: var(--sans);
  color: var(--ink);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
}
.hero-eyebrow {
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-600); font-weight: 600;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.hero-eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--gold-500);
}
.hero-greeting {
  font-weight: 300;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1.0;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 6px;
}
.hero-greeting em { font-style: normal; font-weight: 600; color: var(--navy-700); }
.hero-greeting .name {
  font-weight: 700; color: var(--navy-700);
  display: inline-block; position: relative;
}
.hero-greeting .name::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .08em; height: .45em;
  background: linear-gradient(to top, rgba(201,163,91,.2), transparent);
  z-index: -1; border-radius: 2px;
}
.hero-sub {
  font-size: 13px; color: var(--ink-3); letter-spacing: .02em;
  margin-top: 4px;
}
.hero-time {
  text-align: right; font-weight: 400;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-2); line-height: 1.4;
}
.hero-clock {
  font-size: 44px; color: var(--ink);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.hero-clock .colon { color: var(--gold-500); animation: blink 1.2s step-end infinite; }
@keyframes blink { 50% { opacity: .25; } }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 32px; border-top: 1px solid var(--rule);
}
.hero-stat {
  padding: 20px 24px 20px 0;
  border-right: 1px solid var(--rule);
  cursor: pointer;
  transition: background .3s var(--ease);
}
.hero-stat:last-child { border-right: 0; }
.hero-stat:not(:first-child) { padding-left: 24px; }
.hero-stat:hover { background: rgba(201,163,91,.06); }
.hero-stat-label {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 10px;
}
.hero-stat-value {
  font-weight: 300; font-size: 48px;
  letter-spacing: -.02em; line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.hero-stat-delta {
  font-size: 11px; color: var(--ok);
  margin-top: 6px; display: flex; align-items: center; gap: 4px;
}
.hero-stat-delta.down { color: var(--bad); }

/* Sections */
.section-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 24px;
}
.section-head h2 {
  font-weight: 300; font-size: 32px;
  letter-spacing: -.02em; color: var(--ink); margin: 0;
}
.section-head h2 em { font-style: normal; font-weight: 600; color: var(--navy-700); }
.section-line { flex: 1; height: 1px; background: var(--rule); margin: 0 6px; }
.section-action {
  font-size: 12px; color: var(--navy-600); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s var(--ease), gap .2s var(--ease);
  cursor: pointer;
}
.section-action:hover { color: var(--gold-700); gap: 10px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 22px 24px;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
  position: relative; overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gold-300);
  transform: translateY(-2px);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.card-title {
  font-weight: 600; font-size: 16px;
  letter-spacing: -.005em; color: var(--ink);
}
.card-subtitle {
  font-size: 11px; color: var(--ink-3);
  letter-spacing: .1em; text-transform: uppercase;
}

/* KPI grid */
.kpi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.kpi {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: 22px;
  position: relative; overflow: hidden; cursor: pointer;
  transition: all .35s var(--ease);
}
.kpi::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gold-500);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.kpi:hover::before { transform: scaleX(1); }
.kpi:hover { border-color: var(--gold-300); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.kpi-value {
  font-weight: 300; font-size: 42px;
  letter-spacing: -.02em; line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.kpi-delta {
  font-size: 12px; margin-top: 8px;
  color: var(--ok); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.kpi-delta.down { color: var(--bad); }

.kpi--viz { background: var(--surface); }
.kpi--feature {
  grid-column: span 3;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700) 75%, var(--navy-600));
  color: var(--paper); border-color: var(--navy-800);
}
.kpi--feature .kpi-label { color: var(--gold-400); }
.kpi--feature .kpi-value { color: var(--paper); }
.kpi--feature::before { background: var(--gold-500); transform: scaleX(1); }
.kpi--feature::after {
  content: ""; position: absolute; right: -40px; bottom: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,163,91,.2), transparent 60%);
  pointer-events: none;
}

/* Viz row for donut + legend */
.kpi-viz-row {
  display: flex; align-items: center; gap: 16px;
}

/* Pipeline */
.pipeline {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 10px; align-items: end;
  padding: 20px 0 8px; height: 200px;
}
.pipe-col {
  display: flex; flex-direction: column;
  align-items: center; height: 100%;
  cursor: pointer; gap: 8px;
}
.pipe-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.pipe-bar {
  width: 100%;
  background: linear-gradient(to top, var(--navy-700), var(--navy-500));
  border-radius: 6px 6px 0 0;
  transform-origin: bottom;
  transform: scaleY(0);
  animation: grow .9s var(--ease-out) forwards;
  animation-delay: var(--d, .2s);
  min-height: 4px;
}
.pipe-col.accent .pipe-bar { background: linear-gradient(to top, var(--gold-700), var(--gold-500)); }
@keyframes grow { to { transform: scaleY(1); } }
.pipe-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: rgba(255,255,255,.06);
  display: grid; place-items: center;
  color: var(--gold-400);
}
.pipe-top { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pipe-count {
  font-weight: 600; font-size: 20px;
  letter-spacing: -.02em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pipe-label {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  text-align: center; line-height: 1.2;
}
.pipe-value { font-size: 10px; color: var(--gold-700); font-weight: 600; }

/* Score Ring */
.score-wrap {
  display: grid; grid-template-columns: auto 1fr;
  gap: 28px; align-items: center;
}
.score-ring {
  width: 155px; height: 155px; flex: 0 0 155px; position: relative;
}
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring-track { stroke: var(--rule); }
.score-ring-fill {
  stroke: var(--gold-500);
  stroke-dasharray: var(--circ);
  stroke-dashoffset: var(--circ);
  animation: ring 1.4s var(--ease-out) .3s forwards;
}
@keyframes ring { to { stroke-dashoffset: var(--off); } }
.score-ring-center {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
}
.score-value {
  font-weight: 300; font-size: 42px;
  letter-spacing: -.03em; line-height: 1;
  color: var(--ink);
}
.score-value small { font-size: 20px; color: var(--ink-3); font-weight: 300; }
.score-label { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.score-breakdown { display: flex; flex-direction: column; gap: 14px; }
.score-row { display: flex; align-items: center; gap: 14px; }
.score-row-code {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; width: 32px; flex-shrink: 0;
}
.score-row-track {
  flex: 1; height: 6px; border-radius: 999px;
  background: var(--rule); overflow: hidden;
}
.score-row-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold-600), var(--gold-400));
  border-radius: 999px;
  transform: scaleX(0); transform-origin: left;
  animation: grow-x 1s var(--ease-out) forwards;
  animation-delay: var(--d, .3s);
  width: calc(var(--w, 0) * 100%);
}
@keyframes grow-x { to { transform: scaleX(1); } }
.score-row-value { font-size: 13px; font-weight: 500; color: var(--ink); width: 36px; text-align: right; }

/* Financeiro card */
.fin-card {
  display: flex; flex-direction: column;
  gap: 14px;
}
.fin-value {
  font-weight: 300; font-size: 38px;
  letter-spacing: -.03em; line-height: 1;
  color: var(--ink);
}
.fin-sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.fin-chart {
  width: 100%; height: 100px;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; } to { opacity: 1; } }

/* Atalhos (shortcuts) */
.shortcut-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.shortcut {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: 20px 18px;
  cursor: pointer; transition: all .3s var(--ease);
  position: relative; overflow: hidden;
}
.shortcut::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gold-500); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.shortcut:hover::before { transform: scaleX(1); }
.shortcut:hover { border-color: var(--gold-300); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.shortcut-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--gold-50); color: var(--gold-600);
  display: grid; place-items: center; margin-bottom: 12px;
  border: 1px solid var(--gold-100);
}
.shortcut-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; margin-bottom: 4px; }
.shortcut-kind { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.shortcut-empty {
  border-style: dashed !important;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: var(--ink-3);
  min-height: 100px;
}
.shortcut-empty:hover { border-color: var(--gold-400) !important; color: var(--gold-600); }

/* Lists */
.list-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.list-card { padding: 20px 22px; }
.list-count {
  margin-left: auto;
  font-weight: 600; font-size: 22px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--rule);
  cursor: pointer; transition: background .18s var(--ease);
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 6px; background: rgba(201,163,91,.05); }
.list-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.list-item-title { flex: 1; font-size: 13px; color: var(--ink); line-height: 1.3; }
.list-item-time { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.list-empty { padding: 24px 0 8px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* Badges */
.badge {
  font-size: 10px; font-weight: 500;
  padding: 3px 9px; border-radius: 999px;
  letter-spacing: .04em;
  background: var(--paper-2); color: var(--ink-2);
  border: 1px solid var(--rule);
  display: inline-flex; align-items: center; gap: 4px;
}
.badge.ok   { background: #E9F3EC; border-color: #C8DFCC; color: var(--ok); }
.badge.bad  { background: #FAEBE4; border-color: #EDD1C2; color: var(--bad); }
.badge.gold { background: var(--gold-50); border-color: var(--gold-300); color: var(--gold-700); }


/* Command palette */
.cmdpalette-overlay {
  position: fixed; inset: 0;
  background: rgba(10,24,38,.55);
  backdrop-filter: blur(8px);
  display: grid; place-items: start center;
  padding-top: 120px;
  z-index: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease);
}
.cmdpalette-overlay.open { opacity: 1; pointer-events: all; }
.cmdpalette {
  width: 560px; max-width: 92vw;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform .25s var(--ease-out);
}
.cmdpalette-overlay.open .cmdpalette { transform: translateY(0); }
.cmdpalette-input {
  width: 100%; padding: 18px 20px;
  font-size: 16px; font-family: var(--sans); color: var(--ink);
  background: transparent; border: 0;
  border-bottom: 1px solid var(--rule);
  outline: none;
}
.cmdpalette-input::placeholder { color: var(--ink-3); }
.cmdpalette-list { padding: 8px 0 12px; max-height: 400px; overflow-y: auto; }
.cmdpalette-group-label {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-600); font-weight: 600;
  padding: 10px 18px 6px;
}
.cmdpalette-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 18px; cursor: pointer; font-size: 14px; color: var(--ink);
  transition: background .15s var(--ease);
}
.cmdpalette-item:hover { background: var(--paper-2); }
.cmdpalette-item .icon { color: var(--gold-600); flex-shrink: 0; }
.cmdpalette-item .hint {
  margin-left: auto; font-size: 11px; color: var(--ink-3);
  font-variant-caps: all-small-caps; letter-spacing: .06em;
}

/* Stagger animation */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stagger > * {
  opacity: 0; animation: rise .65s var(--ease-out) forwards;
}
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .12s; }
.stagger > *:nth-child(3) { animation-delay: .19s; }
.stagger > *:nth-child(4) { animation-delay: .26s; }
.stagger > *:nth-child(5) { animation-delay: .33s; }
.stagger > *:nth-child(6) { animation-delay: .40s; }
.stagger > *:nth-child(7) { animation-delay: .47s; }

/* Responsive adjustments */
@media (max-width: 1200px) {
  .editorial-page { padding: 28px 24px 60px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi--feature { grid-column: span 2; }
  .list-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .editorial-page { padding: 20px 16px 48px; }
  .hero { grid-template-columns: 1fr; }
  .hero-time { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi--feature { grid-column: span 1; }
  .list-grid { grid-template-columns: 1fr; }
  .shortcut-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(3, 1fr); height: auto; }
  .score-wrap { grid-template-columns: 1fr; justify-items: center; }
}
