/* ============================================
   FinControl — Tema profissional (fintech)
   Marca: verde-água #00D6A3 | Fonte: Manrope
   Ícones: Material Symbols Outlined
   ============================================ */

:root {
  /* Marca */
  --brand: #00d6a3;
  --brand-strong: #00b98a;
  --brand-soft: #e6faf4;
  --brand-ink: #053b30;

  /* Fundo e superfícies */
  --bg: #f5f7f9;
  --bg-card: #ffffff;
  --bg-card-hover: #fafbfc;
  --bg-table: #f8fafb;
  --bg-input: #f8fafb;
  --bg-input-focus: #ffffff;
  --border: #e6eaf0;
  --border-light: #f0f3f6;

  /* Texto */
  --text: #0f1f2e;
  --text-secondary: #3d5266;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --navy-100: #eef2f7;
  --navy-300: #94a3b8;
  --navy-400: #64748b;
  --navy-500: #3d5266;
  --card: #ffffff;
  --radius: 14px;

  /* Sombras */
  --shadow: 0 1px 2px rgba(15, 31, 46, .05);
  --shadow-md: 0 4px 12px rgba(15, 31, 46, .06);
  --shadow-lg: 0 10px 30px rgba(15, 31, 46, .08);
  --shadow-xl: 0 24px 60px rgba(15, 31, 46, .14);

  /* Cores funcionais */
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-light: #eef4ff;
  --emerald: #0ca678;
  --emerald-hover: #0b8f66;
  --emerald-light: #e6faf4;
  --red: #e5484d;
  --red-hover: #d1363b;
  --red-light: #fdecec;
  --amber: #f59e0b;
  --amber-light: #fef4e2;
  --purple: #7c3aed;
  --purple-light: #f3eefe;
}

[data-theme="dark"] {
  --bg: #0b1320;
  --bg-card: #121c2b;
  --bg-card-hover: #172233;
  --bg-table: #0f1926;
  --bg-input: #101c2a;
  --bg-input-focus: #152234;
  --border: #1d2a3c;
  --border-light: #182538;

  --text: #e6edf5;
  --text-secondary: #b3c0d0;
  --text-muted: #7d8ea0;
  --text-light: #51647a;

  --navy-100: #1d2a3c;
  --navy-300: #51647a;
  --navy-400: #7d8ea0;
  --navy-500: #b3c0d0;
  --card: #121c2b;
  --radius: 14px;

  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, .6);

  --blue-light: rgba(37, 99, 235, .16);
  --emerald-light: rgba(0, 214, 163, .14);
  --red-light: rgba(229, 72, 77, .16);
  --amber-light: rgba(245, 158, 11, .16);
  --purple-light: rgba(124, 58, 237, .18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  -webkit-font-smoothing: antialiased; font-size: 15px;
  transition: background .25s, color .25s;
}

/* ====== Material Symbols ====== */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  font-size: 22px; line-height: 1; letter-spacing: normal;
  text-transform: none; display: inline-block; white-space: nowrap;
  word-wrap: normal; direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}
.ms-sm { font-size: 18px; }
.ms-lg { font-size: 26px; }
.ms-xl { font-size: 34px; }

/* ====== LOGIN ====== */
#loginScreen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; position: relative; overflow: hidden;
  background: #f5f7f9;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 12% 0%, rgba(0, 214, 163, .14), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(37, 99, 235, .08), transparent 55%);
}
.login-card {
  position: relative; z-index: 1; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; padding: 2.75rem 2.5rem; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-brand { text-align: center; margin-bottom: 2rem; }
.login-brand .brand-mark { margin: 0 auto 1rem; }
.login-brand .brand-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.login-brand .brand-tag { font-size: .82rem; color: var(--text-muted); margin-top: .25rem; }
#loginScreen label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .4rem; }
#loginScreen .btn { margin-top: .25rem; }
#loginError { color: var(--red); font-size: .8rem; margin-top: .75rem; min-height: 1em; }

/* ====== Botões ====== */
.btn {
  padding: .6rem 1.15rem; border: none; border-radius: 10px;
  font-size: .83rem; font-weight: 600; font-family: 'Manrope', sans-serif;
  cursor: pointer; display: inline-flex; align-items: center; gap: .45rem;
  transition: all .15s; letter-spacing: -.01em; line-height: 1.4;
}
.btn .material-symbols-outlined { font-size: 18px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 185, 138, .3); }
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 185, 138, .28); }
.btn-primary:active { transform: translateY(0); }
.btn-success { background: var(--emerald); color: #fff; }
.btn-success:hover { background: var(--emerald-hover); transform: translateY(-1px); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-hover); transform: translateY(-1px); }
.btn-warning { background: var(--amber); color: #fff; }
.btn-warning:hover { background: #e08e00; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { background: var(--bg-card-hover); border-color: var(--text-light); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-light); padding: .375rem; border-radius: 8px; }
.btn-ghost:hover { background: var(--border-light); color: var(--text-secondary); }
.btn-sm { padding: .42rem .9rem; font-size: .76rem; }
.btn-xs { padding: .28rem .55rem; font-size: .72rem; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.btn .material-symbols-outlined { pointer-events: none; }

/* ====== Layout ====== */
#app { display: none; }
.layout { display: flex; min-height: 100vh; }

/* ====== Sidebar ====== */
.sidebar {
  width: 264px; background: var(--bg-card); color: var(--text);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0;
  height: 100vh; z-index: 50; border-right: 1px solid var(--border);
}
.sidebar-brand {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.4rem 1.4rem 1.25rem; border-bottom: 1px solid var(--border-light);
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--brand); color: var(--brand-ink);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-mark .material-symbols-outlined { font-size: 22px; }
.brand-name { font-size: 1.06rem; font-weight: 800; letter-spacing: -.02em; }
.sidebar-nav { flex: 1; padding: .6rem 0; overflow-y: auto; }
.sidebar .nav-section {
  padding: 1rem 1.4rem .4rem; font-size: .66rem; font-weight: 700;
  color: var(--text-light); text-transform: uppercase; letter-spacing: .08em;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem 1rem; margin: 1px .65rem;
  color: var(--text-secondary); font-size: .84rem; font-weight: 500;
  transition: all .15s; cursor: pointer; border-radius: 9px; position: relative;
}
.sidebar-nav a .material-symbols-outlined { font-size: 21px; color: var(--text-muted); transition: color .15s; }
.sidebar-nav a:hover { background: var(--bg-card-hover); color: var(--text); }
.sidebar-nav a:hover .material-symbols-outlined { color: var(--text-secondary); }
.sidebar-nav a.ativo { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.sidebar-nav a.ativo .material-symbols-outlined { color: var(--brand-strong); }
.sidebar-nav a.ativo::before {
  content: ''; position: absolute; left: -.65rem; width: 3px; height: 22px;
  background: var(--brand); border-radius: 0 3px 3px 0;
}
.sidebar-footer {
  padding: .9rem 1.1rem; border-top: 1px solid var(--border-light);
  display: flex; justify-content: space-between; align-items: center;
}
.theme-toggle, .btn-logout {
  background: var(--bg-card-hover); border: none; color: var(--text-muted);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.theme-toggle:hover, .btn-logout:hover { background: var(--border-light); color: var(--text); }
.btn-logout:hover { color: var(--red); }

/* ====== Content ====== */
.content {
  margin-left: 264px; flex: 1; padding: 2.25rem 2.5rem; max-width: 1320px;
  transition: background .25s, color .25s;
}
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.6rem; gap: 1rem; }
.page-header h1 { font-size: 1.42rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); display: flex; align-items: center; gap: .55rem; }
.page-header h1 .material-symbols-outlined { font-size: 28px; color: var(--brand-strong); }
.page-header .subtitle { color: var(--text-muted); font-size: .84rem; margin-top: .3rem; }
.page-actions { display: flex; gap: .5rem; align-items: center; }

/* ====== Cards ====== */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin-bottom: 1.6rem;
}
.card {
  background: var(--bg-card); border-radius: var(--radius); padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: all .18s; position: relative; overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--brand); }
.card-click { cursor: pointer; }
.card-click:active { transform: translateY(0); }
.card .card-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .8rem; color: var(--text-secondary);
}
.card .card-icon .material-symbols-outlined { font-size: 22px; }
.card .card-icon.blue { background: var(--blue-light); color: var(--blue); }
.card .card-icon.green { background: var(--emerald-light); color: var(--emerald); }
.card .card-icon.red { background: var(--red-light); color: var(--red); }
.card .card-icon.amber { background: var(--amber-light); color: var(--amber); }
.card .card-icon.purple { background: var(--purple-light); color: var(--purple); }
.card .card-label { font-size: .76rem; color: var(--text-muted); font-weight: 600; margin-bottom: .3rem; }
.card .card-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.card .card-value.positivo { color: var(--emerald); }
.card .card-value.negativo { color: var(--red); }
.card .card-footer { font-size: .75rem; color: var(--text-light); margin-top: .3rem; }
.card .card-trend { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 700; margin-top: .5rem; }
.card .card-trend.up { color: var(--emerald); }
.card .card-trend.down { color: var(--red); }

/* ====== Tabelas ====== */
.table-wrapper {
  background: var(--bg-card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden;
}
.table-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.3rem; border-bottom: 1px solid var(--border);
}
.table-header h3 { font-size: .9rem; font-weight: 700; }
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: .8rem 1.1rem; text-align: left; font-size: .68rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em;
  background: var(--bg-table); border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: .85rem 1.1rem; font-size: .84rem; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-card-hover); }
.valor { font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ====== Tags ====== */
.tag {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .68rem; border-radius: 9999px;
  font-size: .7rem; font-weight: 700; letter-spacing: .01em;
}
.tag-pendente { background: var(--amber-light); color: #a16207; }
.tag-pago { background: var(--emerald-light); color: #0b6e52; }
.tag-atrasado { background: var(--red-light); color: var(--red-hover); }
.tag-despesa { background: var(--red-light); color: var(--red-hover); }
.tag-receita { background: var(--emerald-light); color: #0b6e52; }
.tag-variavel { background: var(--amber-light); color: #a16207; }
.tag-fixa { background: var(--purple-light); color: var(--purple); }

.actions { display: flex; gap: .25rem; justify-content: flex-end; }

/* ====== Empty state ====== */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-light); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: .75rem; opacity: .65; }
.empty-state .icon .material-symbols-outlined { font-size: 40px; }
.empty-state h4 { font-size: .95rem; color: var(--text-secondary); margin-bottom: .25rem; font-weight: 700; }
.empty-state p { font-size: .82rem; color: var(--text-light); }

/* ====== Modal ====== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(11, 19, 32, .5); backdrop-filter: blur(4px);
  z-index: 100; align-items: center; justify-content: center; animation: fadeIn .18s ease;
}
.modal-overlay.ativo { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal {
  background: var(--bg-card); border-radius: 16px; width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); animation: slideUp .22s ease;
  border: 1px solid var(--border);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-card); z-index: 2;
}
.modal-header h2 { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.modal-close {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 9px; cursor: pointer;
  color: var(--text-light); transition: all .15s;
}
.modal-close:hover { background: var(--bg-card-hover); color: var(--text); }
.modal-close .material-symbols-outlined { font-size: 20px; }
.modal-body { padding: 1.5rem; }

.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .4rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .62rem .85rem; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: .86rem; font-family: 'Manrope', sans-serif;
  transition: all .15s; background: var(--bg-input); color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--brand); background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(0, 214, 163, .13);
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
[type="color"] { height: 42px; padding: 3px; }
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center;
  appearance: none; padding-right: 2.5rem;
}
.input-icon { position: relative; }
.input-icon .material-symbols-outlined {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  font-size: 19px; color: var(--text-light); pointer-events: none;
}
.input-icon input { padding-left: 2.5rem; }

/* ====== Filter selects ====== */
.filter-select {
  padding: .5rem .85rem; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: .82rem; font-family: 'Manrope', sans-serif; font-weight: 600;
  background: var(--bg-card); color: var(--text-secondary); transition: all .15s;
}
.filter-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 214, 163, .13); }

/* ====== Charts ====== */
.chart-container {
  background: var(--bg-card); border-radius: var(--radius); padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.chart-container h3 { font-size: .84rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-secondary); display: flex; align-items: center; gap: .45rem; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ====== Progress ====== */
.progress { height: 7px; background: var(--border-light); border-radius: 9999px; overflow: hidden; margin-top: .4rem; }
.progress-bar { height: 100%; border-radius: 9999px; transition: width .6s cubic-bezier(.4,0,.2,1); background: var(--brand); }
.progress-bar.green { background: linear-gradient(90deg, var(--emerald), var(--brand)); }

/* ====== Toast ====== */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 200; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast {
  padding: .8rem 1rem; border-radius: 10px; font-size: .83rem; font-weight: 600;
  pointer-events: auto; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: .6rem;
  animation: toastIn .3s ease; max-width: 380px;
}
.toast.success { background: var(--emerald); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
.toast.warning { background: var(--amber); color: #fff; }
.toast.info { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(24px); } }
.toast.removing { animation: toastOut .25s ease forwards; }

/* ====== Section ====== */
.section-title {
  font-size: .78rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem;
  padding-bottom: .55rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .45rem;
}

/* ====== Utilities ====== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-2 { gap: .5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; gap: .5rem; }

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .sidebar { width: 72px; }
  .sidebar-brand { justify-content: center; padding: 1rem .5rem; }
  .sidebar-brand .brand-name, .sidebar-nav a span:last-child, .sidebar .nav-section { display: none; }
  .sidebar-nav a { justify-content: center; padding: .65rem; margin: 1px .5rem; }
  .sidebar-nav a.ativo::before { left: -.5rem; }
  .sidebar-footer { flex-direction: column; gap: .5rem; }
  .content { margin-left: 72px; padding: 1.4rem; }
  .charts-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
  .card .card-value { font-size: 1.25rem; }
}

/* ====== Modo Impressao ====== */
@media print {
  @page { size: A4; margin: 12mm; }

  .sidebar, .sidebar-nav, .sidebar-brand, .sidebar-footer,
  .page-actions, .btn, .toast-container, .modal-overlay,
  .filter-select, .filtros, .nav-mes, .mes-nav { display: none !important; }

  html, body { background: #fff !important; color: #111 !important; }

  .content { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; }

  .card {
    box-shadow: none !important;
    border: 1px solid #d5dbe3 !important;
    break-inside: avoid;
    page-break-inside: avoid;
    background: #fff !important;
  }

  .table-wrapper { box-shadow: none !important; border: 1px solid #d5dbe3 !important; break-inside: avoid; }
  table { font-size: 10.5px !important; }
  th, td { padding: 5px 8px !important; }

  .section-title { break-after: avoid; page-break-after: avoid; margin-top: 10px !important; }

  .charts-grid { display: block !important; }
  .chart-container { break-inside: avoid; page-break-inside: avoid; margin-bottom: 12px; }

  canvas { max-width: 100% !important; height: auto !important; }

  h1 { font-size: 18px !important; }
  .card-value { font-size: 15px !important; }
  .empty-state { display: none !important; }

  .page-header { margin-bottom: 10px !important; border-bottom: 2px solid #0f1f2e; padding-bottom: 6px; }
  a { text-decoration: none; color: #111 !important; }
}

/* ====== PAINEL — HERO + KPIs ====== */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #0f1f2e 0%, #14344a 55%, #0c5f52 100%);
  color: #fff;
  padding: 1.35rem 1.6rem 2.7rem;
  margin-bottom: -1.85rem;
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -80px;
  width: 230px; height: 230px; border-radius: 50%;
  background: rgba(0, 214, 163, .16);
}
.hero::before {
  content: ""; position: absolute; right: 90px; bottom: -100px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(0, 214, 163, .10);
}
.hero-top {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
}
.hero-brand { display: flex; align-items: center; gap: .6rem; }
.hero-logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand);
  color: #04231c; font-weight: 900; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.hero-brand .nome { font-size: 1rem; font-weight: 800; letter-spacing: -.3px; line-height: 1; }
.hero-brand .sub { font-size: .58rem; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: 2px; }

.hero-body { position: relative; z-index: 2; margin-top: 1.5rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.hero-kicker { font-size: .6rem; letter-spacing: 2.2px; text-transform: uppercase; color: var(--brand); font-weight: 800; }
.hero-title { font-size: 1.9rem; font-weight: 800; letter-spacing: -1px; line-height: 1.05; margin: .15rem 0 0; }
.hero-title span { font-weight: 300; color: rgba(255,255,255,.55); }
.hero-meta { font-size: .68rem; color: rgba(255,255,255,.6); text-align: right; line-height: 1.7; }
.hero-meta b { color: #fff; font-size: .8rem; }

.hero-actions { display: flex; align-items: center; gap: .5rem; }
.hero .mes-nav {
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.18) !important;
  color: #fff;
}
.hero .mes-nav button, .hero .mes-nav span { color: #fff !important; }
.hero .mes-nav button:hover { background: rgba(255,255,255,.14); }
.hero .btn-outline {
  background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); color: #fff;
}
.hero .btn-outline:hover { background: rgba(255,255,255,.18); color: #fff; }

/* KPIs que sobem sobre a faixa */
.cards.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .85rem;
  padding: 0 1.1rem;
  margin: 0 0 -.4rem;
  position: relative;
  z-index: 3;
}
.cards.kpi-grid .card {
  border: none;
  border-top: 3px solid var(--brand-strong);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 31, 46, .12);
  padding: 1rem 1.1rem .9rem;
}
.cards.kpi-grid .card .card-label {
  font-size: .62rem; letter-spacing: .9px; text-transform: uppercase; font-weight: 800; color: var(--navy-400);
}
.cards.kpi-grid .card .card-value { font-size: 1.5rem; letter-spacing: -.7px; margin-top: .15rem; }
.cards.kpi-grid .card .card-footer { font-size: .66rem; margin-top: .2rem; }
.cards.kpi-grid .card.tone-red { border-top-color: #d92d20; }
.cards.kpi-grid .card.tone-navy { border-top-color: #14344a; }
.cards.kpi-grid .card.tone-amber { border-top-color: #f59e0b; }
[data-theme="dark"] .cards.kpi-grid .card { box-shadow: 0 6px 18px rgba(0,0,0,.35); }

@media (max-width: 900px) {
  .hero { padding: 1.1rem 1.1rem 2.3rem; }
  .hero-title { font-size: 1.5rem; }
  .cards.kpi-grid { padding: 0 .6rem; }
}
.cards.kpi-grid + .section-title { margin-top: 1.7rem !important; }
