/* ==========================================================================
   STRUVA PLANNING — Design System
   Identidade visual oficial (paleta, tipografia e componentes)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. FONTE — Inter hospedada no próprio site (sem requisição ao Google)
   Licença SIL OFL 1.1: assets/fonts/OFL.txt
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Paleta oficial */
  --azul-profundo: #0F2A44;
  --azul-medio: #1F4E79;
  --ciano: #00A8E8;
  --cinza-escuro: #2F3A45;
  --cinza-medio: #687C8F;
  --cinza-claro: #E4E9EF;
  --cinza-muito-claro: #F5F7FA;
  --branco: #FFFFFF;

  /* Derivadas de apoio */
  --azul-profundo-90: rgba(15, 42, 68, .90);
  --azul-profundo-60: rgba(15, 42, 68, .60);
  --ciano-suave: rgba(0, 168, 232, .12);
  --ciano-borda: rgba(0, 168, 232, .32);
  --azul-hover: #16609b;

  /* Semânticas de status */
  --sucesso: #1E9E6A;
  --sucesso-bg: #E6F5EF;
  --alerta: #C9821A;
  --alerta-bg: #FDF3E3;
  --erro: #C0392B;
  --erro-bg: #FBEAE8;
  --info: var(--ciano);
  --info-bg: var(--ciano-suave);
  --neutro: var(--cinza-medio);
  --neutro-bg: var(--cinza-claro);

  /* Texto */
  --txt-forte: var(--azul-profundo);
  --txt-corpo: #46586B;
  --txt-suave: var(--cinza-medio);

  /* Tipografia */
  --fonte: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Raios */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Sombras */
  --sh-xs: 0 1px 2px rgba(15, 42, 68, .06);
  --sh-sm: 0 2px 8px rgba(15, 42, 68, .06);
  --sh-md: 0 8px 24px rgba(15, 42, 68, .08);
  --sh-lg: 0 18px 48px rgba(15, 42, 68, .12);
  --sh-focus: 0 0 0 3px rgba(0, 168, 232, .28);

  /* Layout */
  --container: 1200px;
  --header-h: 76px;
  --sidebar-w: 264px;
  --topbar-h: 64px;

  /* Movimento */
  --t-fast: .16s cubic-bezier(.4, 0, .2, 1);
  --t: .28s cubic-bezier(.4, 0, .2, 1);
  --t-slow: .55s cubic-bezier(.16, 1, .3, 1);
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.6;
  color: var(--txt-corpo);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  color: var(--txt-forte);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.018em;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.35rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: var(--azul-medio); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--ciano); }
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; }
li { margin-bottom: .35rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--cinza-claro); margin: 2rem 0; }

:focus-visible { outline: none; box-shadow: var(--sh-focus); border-radius: var(--r-sm); }

::selection { background: var(--ciano-suave); color: var(--azul-profundo); }

/* Scrollbar discreta */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cinza-muito-claro); }
::-webkit-scrollbar-thumb { background: #cfd8e3; border-radius: var(--r-pill); border: 2px solid var(--cinza-muito-claro); }
::-webkit-scrollbar-thumb:hover { background: var(--cinza-medio); }

/* --------------------------------------------------------------------------
   3. UTILITÁRIOS
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container-wide { max-width: 1400px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 999;
  background: var(--azul-profundo); color: #fff; padding: 10px 18px; border-radius: var(--r-sm);
  transition: top var(--t);
}
.skip-link:focus { top: 16px; color: #fff; }

.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.muted { color: var(--txt-suave); }
.small { font-size: .82rem; }
.mono { font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace; font-size: .84em; letter-spacing: -.01em; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   4. LOGO
   -------------------------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark { height: 38px; width: auto; flex: none; display: block; }
.logo__text { display: flex; align-items: center; line-height: 1; }
.logo__nome { height: 30px; width: auto; display: block; }
.logo--sm .logo__mark { height: 30px; }
.logo--sm .logo__nome { height: 24px; }

/* --------------------------------------------------------------------------
   5. BOTÕES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r-sm);
  font-size: .93rem; font-weight: 600; letter-spacing: -.005em;
  border: 1px solid transparent; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary { background: var(--azul-medio); color: #fff; box-shadow: 0 2px 10px rgba(31, 78, 121, .22); }
.btn--primary:hover { background: var(--azul-hover); color: #fff; box-shadow: 0 6px 18px rgba(31, 78, 121, .3); }

.btn--accent { background: var(--ciano); color: #04283d; box-shadow: 0 2px 10px rgba(0, 168, 232, .28); }
.btn--accent:hover { background: #0bb8f8; color: #04283d; }

.btn--secondary { background: transparent; color: var(--azul-medio); border-color: #c3d2e0; }
.btn--secondary:hover { background: var(--cinza-muito-claro); border-color: var(--azul-medio); color: var(--azul-medio); }

.btn--ghost { background: transparent; color: var(--txt-corpo); }
.btn--ghost:hover { background: var(--cinza-muito-claro); color: var(--azul-profundo); }

.btn--text { padding: 6px 4px; background: none; color: var(--azul-medio); }
.btn--text:hover { color: var(--ciano); }

.btn--light { background: #fff; color: var(--azul-profundo); }
.btn--light:hover { background: #eef3f8; color: var(--azul-profundo); }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

.btn--danger { background: var(--erro); color: #fff; }
.btn--danger:hover { background: #a5301f; color: #fff; }

.btn--sm { padding: 7px 14px; font-size: .82rem; border-radius: 7px; }
.btn--sm svg { width: 14px; height: 14px; }
.btn--lg { padding: 16px 32px; font-size: 1.02rem; border-radius: var(--r-md); }
.btn--block { width: 100%; }
.btn--icon { padding: 8px; width: 36px; height: 36px; }
.btn[disabled], .btn:disabled { opacity: .45; pointer-events: none; }

/* --------------------------------------------------------------------------
   6. CARDS E SUPERFÍCIES
   -------------------------------------------------------------------------- */
.card {
  background: var(--branco);
  border: 1px solid var(--cinza-claro);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--ciano-borda); }
.card--flat { box-shadow: none; }
.card--pad-sm { padding: 18px; }
.card--soft { background: var(--cinza-muito-claro); border-color: transparent; }
.card__icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--ciano-suave); color: var(--azul-medio);
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }

.panel {
  background: var(--branco); border: 1px solid var(--cinza-claro);
  border-radius: var(--r-md); box-shadow: var(--sh-xs);
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--cinza-claro); flex-wrap: wrap;
}
.panel__head h3, .panel__head h4 { margin: 0; font-size: 1rem; }
.panel__body { padding: 20px; }
.panel__foot { padding: 14px 20px; border-top: 1px solid var(--cinza-claro); background: var(--cinza-muito-claro); border-radius: 0 0 var(--r-md) var(--r-md); }

/* --------------------------------------------------------------------------
   7. BADGES E CHIPS
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: .74rem; font-weight: 600; letter-spacing: .01em; line-height: 1.5;
  background: var(--neutro-bg); color: var(--cinza-escuro); white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge--no-dot::before { display: none; }
.badge--ok { background: var(--sucesso-bg); color: var(--sucesso); }
.badge--warn { background: var(--alerta-bg); color: var(--alerta); }
.badge--danger { background: var(--erro-bg); color: var(--erro); }
.badge--info { background: var(--info-bg); color: #0678a4; }
.badge--neutral { background: var(--cinza-claro); color: var(--cinza-medio); }
.badge--brand { background: rgba(31, 78, 121, .1); color: var(--azul-medio); }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: var(--r-pill); border: 1px solid var(--cinza-claro);
  background: var(--branco); font-size: .82rem; font-weight: 500; color: var(--txt-corpo);
  transition: all var(--t-fast);
}
.chip:hover { border-color: var(--ciano-borda); color: var(--azul-medio); }
.chip--active { background: var(--azul-medio); border-color: var(--azul-medio); color: #fff; }
.chip--active:hover { color: #fff; }

.tag-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--ciano-suave); border: 1px solid var(--ciano-borda);
  color: #0678a4; font-size: .76rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; margin-bottom: 18px;
}
.tag-eyebrow--light { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #7fd8f7; }

/* --------------------------------------------------------------------------
   8. FORMULÁRIOS
   -------------------------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label, .label {
  display: block; margin-bottom: 7px;
  font-size: .82rem; font-weight: 600; color: var(--azul-profundo); letter-spacing: -.005em;
}
.field .hint { font-size: .76rem; color: var(--txt-suave); margin-top: 6px; }
.req { color: var(--erro); }

.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid #ccd7e2; border-radius: var(--r-sm);
  background: var(--branco); font-size: .92rem; color: var(--txt-forte);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input::placeholder, .textarea::placeholder { color: #9db0c2; }
.input:hover, .select:hover, .textarea:hover { border-color: #adbecd; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--ciano); box-shadow: var(--sh-focus); background: #fff;
}
.textarea { min-height: 108px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23687C8F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
.input[readonly], .input:disabled, .select:disabled {
  background: var(--cinza-muito-claro); color: var(--txt-suave); cursor: not-allowed;
}

.search {
  position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--cinza-medio); pointer-events: none; }
.search .input { padding-left: 40px; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .9rem; margin-bottom: 10px; }
.check input[type=checkbox], .check input[type=radio] {
  width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--azul-medio); flex: none; cursor: pointer;
}

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; background: #c3d2e0; border-radius: var(--r-pill);
  transition: background var(--t); cursor: pointer;
}
.switch span::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform var(--t); box-shadow: var(--sh-xs);
}
.switch input:checked + span { background: var(--ciano); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: var(--sh-focus); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid .col-span-2 { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.fieldset-title {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--cinza-medio); margin: 26px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--cinza-claro);
}
.fieldset-title:first-child { margin-top: 0; }

/* --------------------------------------------------------------------------
   9. TABELAS
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); }
.table { font-size: .88rem; min-width: 640px; }
.table thead th {
  text-align: left; padding: 12px 16px;
  background: var(--cinza-muito-claro);
  font-size: .73rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--cinza-medio); border-bottom: 1px solid var(--cinza-claro); white-space: nowrap;
}
.table thead th.sortable { cursor: pointer; user-select: none; }
.table thead th.sortable:hover { color: var(--azul-medio); }
.table thead th.sortable::after { content: ' ↕'; opacity: .4; font-size: .9em; }
.table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--cinza-claro); vertical-align: middle; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: #fafcfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .td-strong { font-weight: 600; color: var(--azul-profundo); }
.table .td-actions { text-align: right; white-space: nowrap; }
.table .link-cell { font-weight: 600; color: var(--azul-medio); cursor: pointer; }
.table .link-cell:hover { color: var(--ciano); text-decoration: underline; }
.table--compact tbody td { padding: 9px 14px; }

.empty-state { padding: 48px 24px; text-align: center; color: var(--txt-suave); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; color: #c3d2e0; }

/* --------------------------------------------------------------------------
   10. ABAS
   -------------------------------------------------------------------------- */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--cinza-claro);
  overflow-x: auto; scrollbar-width: none;
}
.tabs--scroll {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 16px; font-size: .88rem; font-weight: 600; color: var(--txt-suave);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.tab:hover { color: var(--azul-medio); }
.tab.is-active { color: var(--azul-medio); border-bottom-color: var(--ciano); }
.tab-panel { display: none; padding-top: 24px; }
.tab-panel.is-active { display: block; animation: fadeUp .35s var(--t-slow) both; }

/* --------------------------------------------------------------------------
   11. MODAIS E DRAWERS
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 42, 68, .55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 24px;
  overflow-y: auto;
}
.modal-backdrop.is-open { display: flex; animation: fadeIn .2s ease both; }
.modal {
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column;
  animation: modalIn .3s var(--t-slow) both;
}
.modal--lg { max-width: 880px; }
.modal--xl { max-width: 1080px; }
.modal__head {
  padding: 20px 24px; border-bottom: 1px solid var(--cinza-claro);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.modal__head h3 { margin: 0 0 2px; font-size: 1.15rem; }
.modal__head p { margin: 0; font-size: .85rem; color: var(--txt-suave); }
.modal__body { padding: 24px; overflow-y: auto; flex: 1; }
.modal__foot {
  padding: 16px 24px; border-top: 1px solid var(--cinza-claro);
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  background: var(--cinza-muito-claro); border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.modal__close {
  width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--cinza-medio); flex: none; transition: all var(--t-fast);
}
.modal__close:hover { background: var(--cinza-claro); color: var(--azul-profundo); }
.modal__close svg { width: 18px; height: 18px; }

@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------------------
   12. TOAST
   -------------------------------------------------------------------------- */
.toast-zone {
  position: fixed; right: 22px; bottom: 22px; z-index: 400;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--azul-profundo); color: #fff;
  padding: 13px 17px; border-radius: var(--r-md); box-shadow: var(--sh-lg);
  font-size: .88rem; animation: toastIn .32s var(--t-slow) both;
}
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ciano); }
.toast--ok svg { color: #4ade80; }
.toast--warn svg { color: #fbbf24; }
.toast--err svg { color: #f87171; }
.toast.is-out { animation: toastOut .28s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* --------------------------------------------------------------------------
   13. TIMELINE
   -------------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(180deg, var(--ciano), var(--cinza-claro));
}
.timeline__item { position: relative; padding-bottom: 22px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ''; position: absolute; left: -26px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--ciano);
}
.timeline__item--done::before { background: var(--ciano); }
.timeline__item--muted::before { border-color: #c3d2e0; }
.timeline__time { font-size: .76rem; color: var(--txt-suave); font-weight: 600; letter-spacing: .02em; }
.timeline__title { font-weight: 600; color: var(--azul-profundo); font-size: .92rem; }
.timeline__desc { font-size: .84rem; color: var(--txt-suave); }

/* --------------------------------------------------------------------------
   14. STEPPER
   -------------------------------------------------------------------------- */
.stepper { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step { display: flex; align-items: center; gap: 9px; flex: none; }
.step__num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cinza-claro); color: var(--cinza-medio);
  font-size: .8rem; font-weight: 700; transition: all var(--t);
}
.step__label { font-size: .82rem; font-weight: 600; color: var(--txt-suave); white-space: nowrap; transition: color var(--t); }
.step__line { width: 34px; height: 2px; background: var(--cinza-claro); margin: 0 10px; flex: none; }
.step.is-active .step__num { background: var(--azul-medio); color: #fff; box-shadow: 0 0 0 4px rgba(31, 78, 121, .13); }
.step.is-active .step__label { color: var(--azul-profundo); }
.step.is-done .step__num { background: var(--sucesso); color: #fff; }
.step.is-done .step__label { color: var(--txt-corpo); }
@media (max-width: 860px) { .step__label { display: none; } .step__line { width: 20px; margin: 0 5px; } }

/* --------------------------------------------------------------------------
   15. KPI / STAT
   -------------------------------------------------------------------------- */
.kpi {
  background: #fff; border: 1px solid var(--cinza-claro); border-radius: var(--r-md);
  padding: 18px 20px; transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  position: relative; overflow: hidden;
}
.kpi--hover:hover { border-color: var(--ciano-borda); box-shadow: var(--sh-sm); transform: translateY(-2px); }
.kpi__label { font-size: .78rem; font-weight: 600; color: var(--txt-suave); letter-spacing: .02em; display: flex; align-items: center; gap: 7px; }
.kpi__label svg { width: 15px; height: 15px; color: var(--cinza-medio); }
.kpi__value { font-size: 1.95rem; font-weight: 700; color: var(--azul-profundo); line-height: 1.1; margin: 8px 0 4px; letter-spacing: -.03em; }
.kpi__delta { font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kpi__delta--up { color: var(--sucesso); }
.kpi__delta--down { color: var(--erro); }
.kpi__delta--flat { color: var(--txt-suave); }
.kpi--accent { border-left: 3px solid var(--ciano); }
.kpi--warn { border-left: 3px solid var(--alerta); }
.kpi--danger { border-left: 3px solid var(--erro); }
.kpi--ok { border-left: 3px solid var(--sucesso); }

/* Barra de progresso */
.bar { height: 7px; background: var(--cinza-claro); border-radius: var(--r-pill); overflow: hidden; }
.bar__fill { height: 100%; background: var(--azul-medio); border-radius: var(--r-pill); transition: width 1.1s var(--t-slow); }
.bar__fill--accent { background: var(--ciano); }
.bar__fill--ok { background: var(--sucesso); }
.bar__fill--warn { background: var(--alerta); }
.bar__fill--danger { background: var(--erro); }

/* Avatar */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--azul-medio); color: #fff;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.avatar--sm { width: 28px; height: 28px; font-size: .68rem; }
.avatar--lg { width: 52px; height: 52px; font-size: 1.05rem; }
.avatar--ciano { background: var(--ciano); color: #04283d; }
.avatar--dark { background: var(--cinza-escuro); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -9px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* --------------------------------------------------------------------------
   16. ANIMAÇÕES DE ENTRADA
   -------------------------------------------------------------------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--t-slow), transform .7s var(--t-slow); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }
.reveal-d5 { transition-delay: .4s; }
.reveal-d6 { transition-delay: .48s; }

/* --------------------------------------------------------------------------
   17. SEÇÕES (site institucional)
   -------------------------------------------------------------------------- */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section--tight { padding: clamp(48px, 6vw, 72px) 0; }
.section--soft { background: var(--cinza-muito-claro); }
.section--dark { background: var(--azul-profundo); color: rgba(255, 255, 255, .78); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark .muted { color: rgba(255, 255, 255, .6); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { font-size: 1.05rem; color: var(--txt-suave); margin-bottom: 0; }
.section--dark .section-head p { color: rgba(255, 255, 255, .7); }
