/* ============================================================
   Prumo — Design System v5
   Dark/Light theme — Prumo palette (purple primary)
   ============================================================ */

/* ─────────────────────────────────────
   DARK THEME (padrão) — Prumo
───────────────────────────────────── */
:root, [data-theme="dark"] {
  /* Backgrounds */
  --bg-page:      #0f1116;
  --bg-sidebar:   #0f1116;
  --bg-card:      #1a1b22;
  --header-bg:    rgba(15,17,22,.88);
  --bg-card-alt:  #25262f;
  --bg-input:     #1a1b22;
  --bg-hover:     #252631;
  --bg-modal:     #1a1b22;
  --bg-overlay:   rgba(0,0,0,.72);

  /* Texto */
  --text:         #e4e8f4;
  --text-sec:     #7a8aaa;
  --text-muted:   #4a5068;
  --text-inv:     #09090f;

  /* Bordas */
  --border:       rgba(255,255,255,.06);
  --border-med:   rgba(255,255,255,.10);
  --border-focus: rgba(109,77,242,.50);

  /* Accent principal — Prumo roxo (dark mode: versão mais clara) */
  --primary:       #8C73F6;
  --primary-dark:  #6D4DF2;
  --primary-light: rgba(140,115,246,.15);
  --primary-100:   rgba(140,115,246,.28);

  /* Marca — Prumo */
  --brand-blue:        #8C73F6;
  --brand-blue-dark:   #6D4DF2;
  --brand-blue-mid:    #7B5FF0;
  --brand-blue-light:  rgba(140,115,246,.15);
  --brand-blue-100:    rgba(140,115,246,.28);
  --brand-coral:       #E5484D;
  --brand-coral-dark:  #c1393d;
  --brand-coral-light: rgba(229,72,77,.15);
  --brand-coral-100:   rgba(229,72,77,.28);
  --brand-copper:      #8C73F6;
  --brand-copper-dark: #6D4DF2;
  --brand-copper-light: rgba(140,115,246,.15);
  --accent:            #8C73F6;
  --accent-dark:       #6D4DF2;
  --accent-light:      rgba(140,115,246,.15);

  /* Sidebar — dark mode, mesma cor de fundo do restante do site */
  --sidebar-text:        #7a8aaa;
  --sidebar-hover:       rgba(109,77,242,.08);
  --sidebar-active-bg:   rgba(109,77,242,.22);
  --sidebar-active-text: #a891f8;
  --sidebar-border:      rgba(109,77,242,.12);
  --sidebar-group-text:  #8b92a9;

  /* Status — Prumo palette */
  --success:    #0E9F6E;
  --warning:    #F59E0B;
  --danger:     #E5484D;
  --info:       #8C73F6;
  --secondary:  #E5484D;

  --success-bg: rgba(14,159,110,.1);
  --warning-bg: rgba(245,158,11,.12);
  --danger-bg:  rgba(229,72,77,.1);
  --info-bg:    rgba(140,115,246,.14);

  /* Superfícies compat */
  --surface:      var(--bg-card);
  --surface-alt:  var(--bg-card-alt);
  --surface-high: #222540;

  /* Escala gray (compat com componentes existentes) */
  --gray-50:  #09090f;
  --gray-100: #0c0e1a;
  --gray-200: rgba(255,255,255,.06);
  --gray-300: rgba(255,255,255,.11);
  --gray-400: #4a5068;
  --gray-500: #7a8aaa;
  --gray-600: #a8b4cc;
  --gray-700: #c8d2e4;
  --gray-800: #e4e8f4;
  --gray-900: #f4f6fd;

  /* Sombras */
  --shadow-xs: 0 2px 8px rgba(0,0,0,.15);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.55);
  --shadow:    0 4px 20px rgba(0,0,0,.65);
  --shadow-md: 0 2px 8px rgba(0,0,0,.25);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.75);

  /* Layout */
  --sidebar-w:      248px;
  --sidebar-w-mini: 74px;
  --header-h:       60px;
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      18px;
  --transition:     .18s ease;
  --font:           'Hanken Grotesk', system-ui, sans-serif;

  /* Display/Tipografia */
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono:    'Space Mono', monospace;

  /* Botões — Prumo roxo plano */
  --btn-primary-bg:       #6D4DF2;
  --btn-primary-bg-hover: #5B3FE0;

  /* Glow colorido (moeda Tailwind com alpha aumentado para dark) */
  --glow-blue:   0 8px 32px rgba(59,130,246,.28);
  --glow-green:  0 8px 32px rgba(34,197,94,.28);
  --glow-amber:  0 8px 32px rgba(245,158,11,.28);
  --glow-copper: 0 8px 32px rgba(109,77,242,.32);
  --glow-slate:  0 8px 32px rgba(100,116,139,.22);
  --glow-rose:   0 8px 32px rgba(244,63,94,.28);

  /* Animações */
  --anim-base:   .35s;
  --anim-ease:   cubic-bezier(.22, 1, .36, 1);

  /* Skeleton loading */
  --skeleton-base:  rgba(255,255,255,.05);
  --skeleton-shine: rgba(255,255,255,.09);

  /* Modal glassmorphism */
  --modal-glass-bg:   rgba(18,20,31,.82);
  --modal-glass-blur: 18px;

  /* ──── Tipografia Fluid (clamp) ────
     Escala responsiva sem breakpoints
     Mín | Ideal (viewport) | Máx */
  --fs-h1:      clamp(28px, 4vw, 48px);
  --fs-h2:      clamp(24px, 3.5vw, 40px);
  --fs-h3:      clamp(20px, 3vw, 32px);
  --fs-h4:      clamp(18px, 2.5vw, 28px);
  --fs-body:    clamp(14px, 1.5vw, 18px);
  --fs-body-sm: clamp(13px, 1.4vw, 16px);
  --fs-label:   clamp(12px, 1.2vw, 14px);
  --fs-caption: clamp(11px, 1vw, 13px);
  --fs-button:  clamp(13px, 1.3vw, 16px);

  /* Line height scale */
  --lh-tight:   1.2;
  --lh-normal:  1.5;
  --lh-relaxed: 1.75;

  /* ──── Spacing Scale ────
     Base: 8px (1 unit = 8px)
     Usagem: padding: var(--space-2); margin: var(--space-4); gap: var(--space-3); */
  --space-1: 4px;    /* xs — inputs, badges */
  --space-2: 8px;    /* sm — buttons, small gaps */
  --space-3: 12px;   /* md — form groups, cards */
  --space-4: 16px;   /* lg — sections, padding geral */
  --space-5: 24px;   /* xl — large gaps, spacing entre cards */
  --space-6: 32px;   /* 2xl — major sections */
  --space-7: 48px;   /* 3xl — hero spacing, page margins */
  --space-8: 64px;   /* 4xl — large page gaps */
}

/* ─────────────────────────────────────
   LIGHT THEME — AbStack
───────────────────────────────────── */
[data-theme="light"] {
  --bg-page:      #F6F7F9;
  --bg-sidebar:   #ffffff;
  --bg-card:      #ffffff;
  --header-bg:    rgba(246,247,249,.88);
  --bg-card-alt:  #f8f9fc;
  --bg-input:     #ffffff;
  --bg-hover:     #faf9ff;
  --bg-modal:     #ffffff;
  --bg-overlay:   rgba(0,0,0,.45);

  --text:         #14161D;
  --text-sec:     #5b6068;
  --text-muted:   #9aa0ab;
  --text-inv:     #ffffff;

  --border:       #e6e8ec;
  --border-med:   #d4d6db;
  --border-focus: rgba(109,77,242,.45);

  /* Accent principal — Prumo roxo */
  --primary:       #6D4DF2;
  --primary-dark:  #5B3FE0;
  --primary-light: rgba(109,77,242,.1);
  --primary-100:   rgba(109,77,242,.2);

  /* Marca — Prumo */
  --brand-blue:        #6D4DF2;
  --brand-blue-dark:   #5B3FE0;
  --brand-blue-mid:    #7B5FF0;
  --brand-blue-light:  rgba(109,77,242,.1);
  --brand-blue-100:    rgba(109,77,242,.2);
  --brand-coral:       #E5484D;
  --brand-coral-dark:  #c1393d;
  --brand-coral-light: rgba(229,72,77,.1);
  --brand-coral-100:   rgba(229,72,77,.2);
  --brand-copper:      #6D4DF2;
  --brand-copper-dark: #5B3FE0;
  --brand-copper-light: rgba(109,77,242,.1);
  --accent:            #6D4DF2;
  --accent-dark:       #5B3FE0;
  --accent-light:      rgba(109,77,242,.1);

  /* Sidebar branca — light mode Prumo */
  --sidebar-text:        #5b6068;
  --sidebar-hover:       rgba(109,77,242,.08);
  --sidebar-active-bg:   #EFEBFE;
  --sidebar-active-text: #5B3FE0;
  --sidebar-border:      #e6e8ec;
  --sidebar-group-text:  #b6bbc4;

  --success:    #0E9F6E;
  --warning:    #F59E0B;
  --danger:     #E5484D;
  --info:       #6D4DF2;
  --secondary:  #E5484D;

  --success-bg: rgba(14,159,110,.1);
  --warning-bg: rgba(245,158,11,.12);
  --danger-bg:  rgba(229,72,77,.1);
  --info-bg:    rgba(109,77,242,.1);

  --surface:      #ffffff;
  --surface-alt:  #f7f9fc;
  --surface-high: #ffffff;

  --gray-50:  #f7f9fc;
  --gray-100: #edf2f7;
  --gray-200: rgba(0,0,0,.07);
  --gray-300: rgba(0,0,0,.12);
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #374151;
  --gray-700: #1f2937;
  --gray-800: #111827;
  --gray-900: #030712;

  --shadow-xs: 0 2px 8px rgba(0,0,0,.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow:    0 4px 16px rgba(0,0,0,.09);
  --shadow-md: 0 2px 8px rgba(0,0,0,.25);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

  /* Display/Tipografia */
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono:    'Space Mono', monospace;

  /* Botões — Prumo roxo plano (light) */
  --btn-primary-bg:       #6D4DF2;
  --btn-primary-bg-hover: #5B3FE0;

  /* Glow colorido (menor alpha para light theme) */
  --glow-blue:   0 8px 32px rgba(37,99,235,.20);
  --glow-green:  0 8px 32px rgba(5,150,105,.20);
  --glow-amber:  0 8px 32px rgba(217,119,6,.20);
  --glow-copper: 0 8px 32px rgba(109,77,242,.22);
  --glow-slate:  0 8px 32px rgba(100,116,139,.16);
  --glow-rose:   0 8px 32px rgba(220,38,38,.20);

  /* Animações */
  --anim-base:   .35s;
  --anim-ease:   cubic-bezier(.22, 1, .36, 1);

  /* Skeleton loading */
  --skeleton-base:  rgba(0,0,0,.06);
  --skeleton-shine: rgba(0,0,0,.10);

  /* Modal glassmorphism */
  --modal-glass-bg:   rgba(255,255,255,.88);
  --modal-glass-blur: 16px;
}

/* ════════════════════════════════
   RESET + BASE
════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.5;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
ul { list-style: none; }

/* Focus visible — WCAG 2.1 AA */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ─────────────────────────────────────
   Typography — Fluid Scale (clamp)
───────────────────────────────────── */
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 700; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); font-weight: 700; }
h3 { font-size: var(--fs-h3); line-height: var(--lh-tight); font-weight: 700; }
h4 { font-size: var(--fs-h4); line-height: var(--lh-tight); font-weight: 600; }
h5 { font-size: var(--fs-body); line-height: var(--lh-normal); font-weight: 600; }
h6 { font-size: var(--fs-body-sm); line-height: var(--lh-normal); font-weight: 600; }

p { font-size: var(--fs-body); line-height: var(--lh-normal); }

input,
textarea,
select {
  font-size: var(--fs-body-sm);
  line-height: var(--lh-normal);
  font-family: inherit;
}

button,
[role="button"],
.btn {
  font-size: var(--fs-button);
  font-weight: 600;
  line-height: 1.4;
}

label {
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: var(--lh-normal);
}

small,
.small {
  font-size: var(--fs-caption);
  line-height: var(--lh-normal);
}

/* ════════════════════════════════
   FOCUS-VISIBLE — WCAG 2.1 AA
════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* Generic interactive elements */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
[role="link"]:focus-visible,
[role="tab"]:focus-visible,
[role="tablist"] [role="tab"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Buttons */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-accent:focus-visible,
.btn-danger:focus-visible,
.btn-warning:focus-visible,
.btn-info:focus-visible,
.btn-success:focus-visible,
.btn-ghost:focus-visible,
.btn-icon:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Form controls */
.form-control:focus-visible,
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="password"]:focus-visible,
input[type="number"]:focus-visible,
input[type="date"]:focus-visible,
input[type="time"]:focus-visible,
input[type="search"]:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Navigation */
.nav-item:focus-visible,
.nav-group-toggle:focus-visible,
.sidebar a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: var(--radius);
}

/* Mobile bottom navigation */
.mbn-item:focus-visible,
.mbn-fab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Tables and lists */
.table-row:focus-visible,
.list-item:focus-visible,
.table-actions button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Checkboxes, radio buttons */
[role="checkbox"]:focus-visible,
[role="radio"]:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Modals and dialogs */
.modal:focus-visible,
[role="dialog"]:focus-visible,
.notif-modal-overlay [role="button"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Badges and pills */
.badge:focus-visible,
.pill:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Help and other interactive elements */
.help-btn:focus-visible,
.theme-toggle-btn:focus-visible,
.notif-btn:focus-visible,
.notif-item:focus-visible,
.notif-panel-close:focus-visible,
.dynamic-row .btn-remove:focus-visible,
[role="menuitem"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Modal close buttons and close actions */
.modal-close:focus-visible,
.modal-close-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d6db; border-radius: 8px; border: 2px solid var(--bg-page); }
::-webkit-scrollbar-thumb:hover { background: #b0b5bf; }

/* ════════════════════════════════
   LAYOUT
════════════════════════════════ */
.app-wrapper { display: flex; min-height: 100vh; }

/* Mobile overlay */
.mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 99;
}
.mobile-overlay.open { display: block; }

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}
.sidebar.mini { width: var(--sidebar-w-mini); }

/* Logo */
.sidebar-logo {
  padding: 0 var(--space-4);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-logo-img {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06);
}
.sidebar-logo-img img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-logo-text { flex: 1; overflow: hidden; white-space: nowrap; }
.sidebar-logo-text .brand-name {
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1; color: var(--text);
}
.sidebar-logo-text .brand-sub {
  font-family: 'Space Mono', monospace; font-size: 10px; color: #9aa0ab;
  font-weight: 400; margin-top: 3px; letter-spacing: .14em; text-transform: uppercase;
}
.sidebar-logo-svg { border-radius: 10px; }
.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: var(--transition); flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--sidebar-hover); color: var(--text); }
.sidebar.mini .sidebar-logo { padding: 0 var(--space-2); justify-content: center; gap: 0; }
.sidebar.mini .sidebar-logo-text { display: none; }
.sidebar.mini .sidebar-logo-svg { width: 32px; height: 32px; }
.sidebar.mini .sidebar-toggle { display: flex; }

/* Nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-2); }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-med); }

/* ── Nav Groups ── */
.nav-group { margin-bottom: 2px; }
.nav-group-toggle {
  display: flex; align-items: center; gap: var(--space-2);
  width: 100%; padding: var(--space-1) var(--space-2) var(--space-1) var(--space-3);
  background: none; border: none; cursor: pointer;
  color: var(--sidebar-group-text); font-size: 10px;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; font-family: var(--font);
  border-radius: var(--radius);
  white-space: nowrap; text-align: left; position: relative;
  transition: background var(--transition);
}
.nav-group-toggle:hover { background: var(--sidebar-hover); color: var(--text); }
.nav-group-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; opacity: .65;
}
.nav-group-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.grp-chevron {
  width: 14px; height: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease;
}
.nav-group-body {
  display: block;
  padding-left: 4px;
  max-height: 999px;
  transition: max-height 0.25s ease, opacity 0.25s ease;
  opacity: 1;
  overflow: visible;
}
.nav-group.closed .nav-group-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
.nav-group .grp-chevron {
  transform: rotate(90deg);
  transition: transform 0.25s ease;
}
.nav-group.closed .grp-chevron {
  transform: rotate(0deg);
}
.nav-group-body .nav-item { padding-left: 14px; position: relative; }
.nav-group-body .nav-item::before {
  content: '';
  position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--border-med); transition: background var(--transition);
}
.nav-group-body .nav-item.active::before,
.nav-group-body .nav-item:hover::before { background: var(--primary); }

/* Mini mode: grupos */
.sidebar.mini .nav-group-label { display: none; }
.sidebar.mini .grp-chevron      { display: none; }
.sidebar.mini .nav-group-toggle { justify-content: center; padding: var(--space-2); }
.sidebar.mini .nav-group-body   { max-height: 0; opacity: 0; overflow: hidden; }
.sidebar.mini .nav-group-icon   { width: 20px; height: 20px; opacity: .65; }
/* Tooltip via JavaScript — ver assets/js/tooltip.js */

/* Nav items */
.nav-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius);
  color: var(--sidebar-text); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background var(--transition), color var(--transition);
  white-space: nowrap; text-decoration: none; position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--text); }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--sidebar-active-text); }
.nav-icon {
  width: 20px; height: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.nav-item:hover .nav-icon { color: var(--text); }
.nav-item .nav-label { flex: 1; }
.nav-item .nav-badge {
  margin-left: auto; background: var(--primary); color: var(--text-inv);
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 99px;
}
.sidebar.mini .nav-item span:not(.nav-icon) { display: none; }
.sidebar.mini .nav-item .nav-label { display: none; }
.sidebar.mini .nav-badge { display: none; }
.sidebar.mini .nav-item { justify-content: center; padding: var(--space-3); padding-left: var(--space-3); }
.sidebar.mini .nav-group-body .nav-item { padding-left: var(--space-3); }
.sidebar.mini .nav-group-body .nav-item::before { display: none; }
/* Tooltip via JavaScript — ver assets/js/tooltip.js */

/* Divider */
.sidebar-divider { height: 1px; background: var(--sidebar-border); margin: var(--space-1) var(--space-2); }
.sidebar-footer .sidebar-divider { margin-bottom: var(--space-2); }

/* Sidebar Footer */
.sidebar-footer {
  padding: var(--space-2) var(--space-2) var(--space-3);
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-footer .nav-item { margin-bottom: var(--space-1); }
.user-card {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius);
  cursor: pointer; transition: background var(--transition);
}
.user-card:hover { background: var(--sidebar-hover); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #6D4DF2, #8C73F6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info { overflow: hidden; flex: 1; }
.user-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10px; color: var(--text-muted); }
.sidebar.mini .user-info { display: none; }
.sidebar.mini .user-card { justify-content: center; }
.sidebar-ver-badge {
  text-align: center; font-size: 10px; font-weight: 600;
  letter-spacing: .06em; color: var(--text-muted);
  padding: var(--space-1) 0 0; user-select: none;
}
.sidebar.mini .sidebar-ver-badge { display: none; }

/* ─── MAIN CONTENT ─── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column; min-height: 100vh;
  transition: margin-left var(--transition);
}
.main-content.mini { margin-left: var(--sidebar-w-mini); }

/* ─── HEADER ─── */
.page-header {
  background: var(--header-bg, rgba(246,247,249,.88));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-6);
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--space-4);
  position: sticky; top: 0; z-index: 90;
}
.page-header-left { display: flex; align-items: center; gap: var(--space-3); flex: 1; min-width: 0; }
.page-header h1 { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; line-height: 1.1; }
.breadcrumb { display: flex; align-items: center; gap: var(--space-1); font-size: 12px; color: var(--text-muted); flex-wrap: nowrap; overflow: hidden; }
.breadcrumb a { color: var(--text-sec); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--border-med); }
.page-header-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }

/* Page body */
.page-body { padding: var(--space-5); flex: 1; }

/* ════════════════════════════════
   CARDS
════════════════════════════════ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
a.card:hover, [data-clickable].card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-header {
  padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.card-title { font-size: 13px; font-weight: 700; color: var(--text); }
.card-body { padding: var(--space-4); }
.card-footer { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); background: var(--bg-card-alt); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.stat-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: var(--space-4);
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3);
  transition: transform .2s, box-shadow .2s;
  box-shadow: var(--shadow-xs);
}
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-sec); margin-bottom: var(--space-1); }
.stat-value { font-size: 24px; font-weight: 900; color: var(--text); line-height: 1; }
.stat-change { font-size: 11px; margin-top: 6px; display: flex; align-items: center; gap: 4px; font-weight: 500; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-icon { width: 42px; height: 42px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon.blue   { background: var(--primary-light); color: var(--primary); }
.stat-icon.copper { background: var(--brand-copper-light); color: var(--brand-copper); }
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.red    { background: var(--danger-bg); color: var(--danger); }
.stat-icon.gray   { background: rgba(100,116,139,.18); color: #94a3b8; }
.stat-icon.orange { background: rgba(234,88,12,.18); color: #fb923c; }

/* ════════════════════════════════
   BUTTONS
════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-1); padding: var(--space-2) var(--space-4);
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition); white-space: nowrap;
  text-decoration: none; line-height: 1.4; font-family: var(--font);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary   { background: var(--btn-primary-bg); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(109,77,242,.3); }
.btn-primary:hover  { background: var(--btn-primary-bg-hover); border-color: var(--primary-dark); box-shadow: 0 4px 14px rgba(109,77,242,.4); }
.btn-accent    { background: var(--brand-copper); color: #fff; border-color: var(--brand-copper); box-shadow: 0 2px 8px rgba(109,77,242,.25); }
.btn-accent:hover   { background: var(--brand-copper-dark); border-color: var(--brand-copper-dark); }
.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border-med); }
.btn-secondary:hover { background: var(--bg-card-alt); border-color: var(--border-med); }
.btn-danger    { background: #E5484D; color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #c1393d; border-color: #c1393d; box-shadow: 0 4px 12px rgba(229,72,77,.3); }
.btn-warning   { background: #F59E0B; color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #d97706; border-color: #d97706; box-shadow: 0 4px 12px rgba(245,158,11,.3); }
.btn-info      { background: #6D4DF2; color: #fff; border-color: var(--info); }
.btn-info:hover { background: #5B3FE0; border-color: #5B3FE0; box-shadow: 0 4px 12px rgba(109,77,242,.3); }
.btn-success   { background: #0E9F6E; color: #fff; border-color: var(--success); }
.btn-success:hover { background: #0a7d57; border-color: #0a7d57; box-shadow: 0 4px 12px rgba(14,159,110,.3); }
.btn-ghost     { background: transparent; color: var(--text-sec); border-color: transparent; }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-sm   { padding: var(--space-1) var(--space-2); font-size: 12px; }
.btn-lg   { padding: var(--space-3) var(--space-5); font-size: 14px; }
.btn-icon { padding: var(--space-2); width: 34px; height: 34px; }
.btn-icon.btn-sm { width: 28px; height: 28px; padding: var(--space-1); }

/* ════════════════════════════════
   FORMS
════════════════════════════════ */
.form-group { margin-bottom: var(--space-3); }
.form-row { display: grid; gap: var(--space-3); }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

label { display: block; font-size: 12px; font-weight: 600; color: var(--text-sec); margin-bottom: var(--space-1); }
label .req { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%; padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-med); border-radius: var(--radius);
  font-size: 13px; font-family: var(--font); color: var(--text);
  background: var(--bg-input); transition: var(--transition);
  appearance: none;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control.error { border-color: var(--danger); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8aaa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px;
}
[data-theme="light"] select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.form-hint  { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 4px; }

.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); flex: 1; }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; border-left: none; }
.input-group-text {
  padding: 8px 12px; background: var(--bg-card-alt);
  border: 1px solid var(--border-med); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 13px; color: var(--text-sec);
}

/* ════════════════════════════════
   TABLE
════════════════════════════════ */
.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-sec);
  background: var(--bg-card-alt); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover td { background: var(--bg-hover); }
.table-actions { display: flex; gap: var(--space-1); align-items: center; }

/* ════════════════════════════════
   BADGES
════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-2); border-radius: 99px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-blue    { background: var(--primary-light);        color: var(--primary); }
.badge-copper  { background: var(--brand-copper-light);   color: var(--brand-copper); }
.badge-green   { background: var(--success-bg);           color: var(--success); }
.badge-red     { background: var(--danger-bg);            color: var(--danger); }
.badge-gray    { background: rgba(100,116,139,.14);       color: var(--gray-400); }
.badge-orange  { background: rgba(251,146,60,.14);        color: #fb923c; }
.badge-yellow  { background: rgba(253,224,71,.14);        color: #ca8a04; }
.badge-success { background: var(--success-bg);           color: var(--success); }
.badge-warning { background: var(--warning-bg);           color: var(--warning); }
.badge-danger  { background: var(--danger-bg);            color: var(--danger); }
.badge-info    { background: var(--info-bg);              color: var(--info); }

/* Status RDO — Prumo */
.status-rascunho  { background: #eef0f2; color: #6b7280; }
.status-enviado   { background: rgba(109,77,242,.1); color: #5B3FE0; }
.status-aprovado  { background: rgba(14,159,110,.1); color: #0a7d57; }
.status-reprovado { background: rgba(229,72,77,.1);  color: #c1393d; }

/* ════════════════════════════════
   ALERTS
════════════════════════════════ */
.alert {
  padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  font-size: 13px; display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-4);
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg);  color: var(--success); border: 1px solid rgba(16,185,129,.25); }
.alert-danger  { background: var(--danger-bg);   color: var(--danger);  border: 1px solid rgba(248,113,113,.25); }
.alert-warning { background: var(--warning-bg);  color: var(--warning); border: 1px solid rgba(245,158,11,.25); }
.alert-info    { background: var(--info-bg);     color: var(--info);    border: 1px solid rgba(96,165,250,.25); }

/* ════════════════════════════════
   MODAL
════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: var(--bg-overlay);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: var(--space-5); opacity: 0; pointer-events: none; transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-modal); border-radius: var(--radius-xl);
  width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-med);
  transform: translateY(20px); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-sm  { max-width: 420px; }
.modal-md  { max-width: 620px; }
.modal-lg  { max-width: 820px; }
.modal-xl  { max-width: 1100px; }
.modal-header {
  padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--bg-modal); z-index: 1;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); width: 30px; height: 30px;
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  transition: var(--transition); font-size: 16px;
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body { padding: var(--space-6); }
.modal-footer {
  padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2);
  position: sticky; bottom: 0; background: var(--bg-modal);
}

/* ════════════════════════════════
   TABS
════════════════════════════════ */
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: var(--space-1); margin-bottom: var(--space-5); }
.tab {
  padding: var(--space-2) var(--space-4); font-size: 13px; font-weight: 600;
  color: var(--text-sec); border-bottom: 2px solid transparent;
  cursor: pointer; margin-bottom: -1px; transition: var(--transition); white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ════════════════════════════════
   PAGINATION
════════════════════════════════ */
.pagination { display: flex; align-items: center; gap: var(--space-1); justify-content: center; padding: var(--space-4) 0; }
.page-btn {
  width: 32px; height: 32px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border-med); background: var(--bg-card); color: var(--text);
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: var(--text-inv); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ════════════════════════════════
   SEARCH & FILTERS
════════════════════════════════ */
.filters-bar { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; margin-bottom: var(--space-4); }
.search-box { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 15px; height: 15px; }
.search-box input { padding-left: 34px; }

/* ════════════════════════════════
   EMPTY STATE
════════════════════════════════ */
.empty-state { text-align: center; padding: var(--space-7) var(--space-5); }
.empty-state-icon { font-size: 44px; margin-bottom: var(--space-3); opacity: .35; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: var(--space-1); }
.empty-state p { font-size: 13px; color: var(--text-sec); margin-bottom: var(--space-5); }

/* ════════════════════════════════
   FILE UPLOAD
════════════════════════════════ */
.dropzone {
  border: 2px dashed var(--border-med); border-radius: var(--radius-lg);
  padding: var(--space-7); text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--bg-card-alt);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--primary-light); }
.dropzone p { font-size: 13px; color: var(--text-sec); }
.dropzone strong { color: var(--primary); }

/* Photo grid */
.photo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:var(--space-4); margin-top:var(--space-4); }
.photo-entry { display:flex; flex-direction:column; border:1px solid var(--border); border-radius:var(--radius); background: var(--bg-card); overflow:visible; }
.photo-item { position:relative; border-radius:var(--radius) var(--radius) 0 0; overflow:hidden; aspect-ratio:4/3; background:var(--bg-card-alt); flex-shrink:0; }
.photo-item img { width:100%; height:100%; object-fit:cover; cursor:zoom-in; display:block; }
.photo-item .photo-remove {
  position:absolute; top:6px; right:6px; background:rgba(0,0,0,.6); color:#fff; border:none;
  border-radius:50%; width:24px; height:24px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:14px; transition:var(--transition); z-index:2;
}
.photo-item .photo-remove:hover { background:var(--danger); }
.photo-caption-input {
  width:100%; box-sizing:border-box; border:none; border-top:1px solid var(--border);
  border-radius:0 0 var(--radius) var(--radius); padding:var(--space-2) var(--space-3); font-size:12px; font-family:inherit;
  color:var(--text); background: var(--bg-card); min-height:34px; cursor:text;
}
.photo-caption-input:focus { outline:none; background: var(--bg-card-alt); border-top-color:var(--primary); }
.photo-caption-input::placeholder { color:var(--text-muted); font-style:italic; }
.photo-caption { padding:var(--space-1) var(--space-3); font-size:11px; color:var(--text-sec); border-top:1px solid var(--border); font-style:italic; }

/* ════════════════════════════════
   LOGIN (preservado intacto)
════════════════════════════════ */
.login-page {
  min-height: 100vh; display: flex;
  background: linear-gradient(135deg, #1e3549 0%, #2d4f6e 60%, #3a6285 100%);
}
.login-left {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: var(--space-7); flex-direction: column; text-align: center;
}
.login-left-logo { margin-bottom: var(--space-6); }
.login-left-logo img { width: 140px; filter: brightness(0) invert(1); opacity: .9; }
.login-left h2 { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: var(--space-2); }
.login-left p { color: rgba(255,255,255,.6); font-size: 14px; max-width: 280px; line-height: 1.6; }
.login-left-accent { width: 48px; height: 4px; background: #6D4DF2; border-radius: 99px; margin: var(--space-4) auto 0; }
.login-right {
  width: 440px; background: #252631; display: flex; align-items: center;
  justify-content: center; padding: var(--space-7) var(--space-7);
  box-shadow: -8px 0 40px rgba(0,0,0,.4); border-left: 1px solid rgba(255,255,255,.07);
}
.login-card { width: 100%; }
.login-card-logo { text-align: center; margin-bottom: var(--space-6); }
.login-card-logo img { height: 56px; object-fit: contain; }
.login-card h3 { font-size: 20px; font-weight: 800; color: #eef2f7; margin-top: var(--space-4); }
.login-card p { font-size: 13px; color: #8391a2; margin-top: var(--space-1); }
.login-footer { text-align: center; margin-top: var(--space-6); font-size: 11px; color: #6c757d; }

/* ════════════════════════════════
   RDO FORM
════════════════════════════════ */
.rdo-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: var(--space-4); }
.rdo-section-header {
  padding: var(--space-2) var(--space-4); background: var(--bg-card-alt);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--space-3);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.rdo-section-number {
  width: 22px; height: 22px; background: var(--primary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--text-inv); flex-shrink: 0;
}
.rdo-section-title { font-size: 13px; font-weight: 700; color: var(--text); }
.rdo-section-body { padding: var(--space-4); }
.dynamic-row {
  display: grid; gap: var(--space-3); align-items: end; padding: var(--space-3);
  background: var(--bg-card-alt); border-radius: var(--radius); margin-bottom: var(--space-2); border: 1px solid var(--border);
}
.dynamic-row .btn-remove { background: none; border: none; cursor: pointer; color: var(--text-muted); transition: var(--transition); padding: var(--space-1); border-radius: var(--radius); }
.dynamic-row .btn-remove:hover { color: var(--danger); background: var(--danger-bg); }

/* Mobile responsive — single column layout */
@media (max-width: 768px) {
  .dynamic-row {
    grid-template-columns: 1fr !important;
    gap: var(--space-2) !important;
    padding: var(--space-2) !important;
  }
  .dynamic-row > div { margin-bottom: var(--space-1); }
  .dynamic-row .form-group { margin: 0 !important; }
  .dynamic-row > button, .dynamic-row .btn-remove { align-self: flex-end; }

  /* Nested grids within dynamic rows collapse to single column */
  .dynamic-row > div > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-2) !important;
  }
}

/* ════════════════════════════════
   THEME TOGGLE
════════════════════════════════ */
.theme-toggle-btn {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg-card-alt); border: 1px solid var(--border-med);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-sec); transition: var(--transition); flex-shrink: 0;
}
.theme-toggle-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.theme-toggle-btn svg { width: 16px; height: 16px; }

/* ════════════════════════════════
   NOTIFICAÇÕES / BELL
════════════════════════════════ */
.notif-wrap { position: relative; flex-shrink: 0; }
.notif-btn {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg-card-alt); border: 1px solid var(--border-med);
  color: var(--text-sec); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); position: relative;
}
.notif-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.notif-btn-active { animation: bellShake 0.5s ease; }
@keyframes bellShake {
  0%,100%{transform:rotate(0)} 20%{transform:rotate(-15deg)} 40%{transform:rotate(15deg)}
  60%{transform:rotate(-10deg)} 80%{transform:rotate(10deg)}
}
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; border-radius: var(--radius); padding: 0 4px;
  background: #dc2626; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg-card);
}
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px; max-height: 420px;
  background: var(--bg-card); border: 1px solid var(--border-med);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  z-index: 500; flex-direction: column; overflow: hidden;
}
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 13px; color: var(--text);
  background: var(--bg-card-alt);
}
.notif-panel-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 14px; padding: 2px 6px; border-radius: 4px; transition: var(--transition); }
.notif-panel-close:hover { background: var(--border); color: var(--text); }
.notif-panel-body { overflow-y: auto; flex: 1; }
.notif-item { display: block; padding: 10px 16px; border-bottom: 1px solid var(--border); text-decoration: none; transition: background .15s; }
.notif-item:hover { background: var(--bg-card-alt); }
.notif-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-item-sub   { font-size: 11px; color: var(--text-sec); margin-top: 2px; }
.notif-item-autor { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.notif-empty, .notif-loading { padding: 24px 16px; text-align: center; color: var(--text-sec); font-size: 13px; }
.notif-more { padding: 8px 16px; text-align: center; color: var(--text-sec); font-size: 12px; background: var(--bg-card-alt); }
.notif-panel-footer { padding: 10px 14px; border-top: 1px solid var(--border); background: var(--bg-card-alt); }

/* Modal sistêmico (confirmações) */
.notif-modal-overlay {
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(var(--modal-glass-blur));
  z-index: 1000;
  transition: opacity var(--transition);
}
.notif-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--modal-glass-bg);
  backdrop-filter: blur(var(--modal-glass-blur));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--glow-slate);
  border: 1px solid var(--border-med);
  padding: 30px 26px 22px; z-index: 1001;
  width: min(420px, 90vw); flex-direction: column; align-items: center; text-align: center; gap: 12px;
  transition: transform var(--transition), opacity var(--transition);
}
.notif-modal-icon { font-size: 38px; line-height: 1; }
.notif-modal-title { font-size: 17px; font-weight: 700; color: var(--text); margin: 0; }
.notif-modal-msg   { font-size: 14px; color: var(--text-sec); margin: 0; line-height: 1.5; }
.notif-modal-actions { display: flex; gap: 10px; margin-top: 8px; width: 100%; }
.notif-modal-actions .btn { flex: 1; justify-content: center; }

/* ════════════════════════════════
   HELP BUTTON + DRAWER
════════════════════════════════ */
.help-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-card-alt); border: 1px solid var(--border-med);
  color: var(--text-sec); font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition); flex-shrink: 0; line-height: 1;
}
.help-btn:hover { background: var(--primary); color: var(--text-inv); border-color: var(--primary); }
#helpOverlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 299; }
#helpOverlay.open { display: block; }
#helpDrawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 95vw;
  background: var(--bg-card); z-index: 300;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); border-left: 1px solid var(--border-med);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
}
#helpDrawer.open { transform: translateX(0); }
.help-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--primary); color: var(--text-inv); flex-shrink: 0;
}
.help-drawer-title { font-size: 15px; font-weight: 700; }
.help-close {
  background: rgba(0,0,0,.15); border: none; color: var(--text-inv);
  width: 28px; height: 28px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.help-close:hover { background: rgba(0,0,0,.28); }
#helpBody { flex: 1; overflow-y: auto; padding: 0; font-size: 13px; color: var(--text); line-height: 1.6; }
#helpBody::-webkit-scrollbar { width: 5px; }
#helpBody::-webkit-scrollbar-thumb { background: var(--border-med); border-radius: 99px; }
.help-intro { padding: 16px 20px; background: var(--primary-light); border-bottom: 1px solid var(--primary-100); font-size: 13px; color: var(--text); line-height: 1.65; }
.help-section { border-bottom: 1px solid var(--border); }
.help-section-toggle { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 20px; background: none; border: none; cursor: pointer; text-align: left; color: var(--text); transition: background .15s; }
.help-section-toggle:hover { background: var(--bg-card-alt); }
.help-section-toggle[aria-expanded="true"] { background: var(--bg-card-alt); }
.help-section-toggle[aria-expanded="true"] .help-chevron { transform: rotate(180deg); }
.help-section-icon { font-size: 15px; flex-shrink: 0; }
.help-section-title { flex: 1; font-size: 13px; font-weight: 600; }
.help-chevron { flex-shrink: 0; color: var(--text-muted); transition: transform .2s; }
.help-section-body { padding: 4px 20px 16px; font-size: 13px; color: var(--text-sec); line-height: 1.7; }
.help-section-body p { margin-bottom: 8px; }
.help-section-body ul, .help-section-body ol { padding-left: 18px; margin-bottom: 8px; }
.help-section-body li { margin-bottom: 4px; }
.help-section-body strong { color: var(--text); }
.help-tip { background: var(--warning-bg); border: 1px solid rgba(245,158,11,.25); border-left: 3px solid var(--warning); border-radius: var(--radius-sm); padding: 8px 12px; margin-top: 10px; font-size: 12px; color: var(--warning); line-height: 1.55; }
.help-footer { padding: 12px 20px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

/* ════════════════════════════════
   PRINT
════════════════════════════════ */
@media print {
  .sidebar, .page-header, .page-header-actions, .btn, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-body { padding: 0 !important; }
  body { background: #fff !important; color: #000 !important; }
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0 !important; }
  .page-header { padding: 0 14px; }
  .page-body { padding: 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row.cols-2, .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr; }
  .modal { max-width: 100% !important; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .login-left { display: none; }
  .login-right { width: 100%; padding: 32px 24px; }
}
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

/* ════════════════════════════════
   UTILITIES
════════════════════════════════ */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-sm { font-size: 12px; } .text-xs { font-size: 11px; }
.text-muted { color: var(--text-sec); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-copper { color: var(--brand-copper); }
.text-blue { color: var(--primary); }
.font-bold { font-weight: 700; } .font-black { font-weight: 900; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ════════════════════════════════════════════════════════════
   PROJ-CARD — modelo de card reutilizável em todo o sistema
   (financeiro, projetos, relatórios, manutenções, dashboard)
════════════════════════════════════════════════════════════ */
.proj-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}
.proj-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
  position: relative;
}
.proj-card {
  box-shadow: var(--shadow-xs);
}
.proj-card:hover { box-shadow: var(--shadow-sm); }
.proj-card--danger  { border-left: 4px solid #ef4444; }
.proj-card--success { border-left: 4px solid #22c55e; }
.proj-card--info    { border-left: 4px solid #3b82f6; }
.proj-card--slate   { border-left: 4px solid #64748b; }
.proj-card--copper  { border-left: 4px solid var(--brand-copper); }
.proj-card--amber   { border-left: 4px solid #f59e0b; }

.proj-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 12px;
}
.proj-card__title-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.proj-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.proj-card__title:hover { color: var(--primary); }
.proj-card__client {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.proj-card__status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  box-shadow: 0 0 6px currentColor;
}
.proj-card__metrics {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  padding: 0 16px 14px;
}
.proj-card__metric { display: flex; flex-direction: column; gap: 3px; }
.proj-card__metric:last-child { text-align: right; }
.proj-card__metric-divider {
  width: 1px;
  background: var(--border);
  margin: 0 14px;
  align-self: stretch;
}
.proj-card__metric-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
}
.proj-card__metric-value {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  word-break: break-all;
}
.proj-card__metric-value--primary  { color: var(--primary); }
.proj-card__metric-value--realized { color: #22c55e; }
.proj-card__metric-value--danger   { color: #f87171; }
.proj-card__metric-value--amber    { color: #f59e0b; }

.proj-card__progress-wrap { padding: 0 16px 14px; }
.proj-card__progress-bar {
  height: 5px;
  background: var(--border-med);
  border-radius: 99px;
  overflow: hidden;
}
.proj-card__progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .5s ease;
}
.proj-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-card-alt);
  border-top: 1px solid var(--border);
  gap: 8px;
}
.proj-card__rdos {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-sec);
  font-weight: 600;
}
.proj-card__rdos svg { opacity: .65; }
.proj-card__exec {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1;
}
.proj-card__exec-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  opacity: .75;
}
.proj-card__aberto {
  font-size: 11px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px 10px;
}
@media (max-width: 600px) { .proj-cards-grid { grid-template-columns: 1fr; } }

/* ════════════════════════════════════════════════════════════
   KPI-CARD — card de KPI reutilizável (strip, grids)
════════════════════════════════════════════════════════════ */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: default;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.kpi-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.kpi-card.kpi-active { box-shadow: 0 0 0 2px var(--primary), 0 10px 28px rgba(0,0,0,.35); transform: translateY(-4px); }
.kpi-stripe { height: 4px; }
.kpi-card.kpi-blue   .kpi-stripe { background: #3b82f6; }
.kpi-card.kpi-green  .kpi-stripe { background: #22c55e; }
.kpi-card.kpi-amber  .kpi-stripe { background: #f59e0b; }
.kpi-card.kpi-slate  .kpi-stripe { background: #64748b; }
.kpi-card.kpi-copper .kpi-stripe { background: var(--brand-copper); }
.kpi-card.kpi-rose   .kpi-stripe { background: #f43f5e; }
.kpi-body { display: flex; align-items: flex-start; gap: 12px; padding: 16px; }
.kpi-icon-wrap { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi-icon-blue   { background: rgba(37,99,235,.18);   color: #60a5fa; }
.kpi-icon-green  { background: rgba(22,163,74,.18);   color: #4ade80; }
.kpi-icon-amber  { background: rgba(217,119,6,.18);   color: #fbbf24; }
.kpi-icon-slate  { background: rgba(100,116,139,.18); color: #94a3b8; }
.kpi-icon-blue   { background: rgba(109,77,242,.18);   color: #6D4DF2; }
.kpi-icon-rose   { background: rgba(244,63,94,.18);   color: #fb7185; }
.kpi-texts  { flex: 1; min-width: 0; }
.kpi-label  { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-sec); margin-bottom: 4px; }
.kpi-value  { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.kpi-sub    { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.kpi-hint   { font-size: 10px; color: var(--text-muted); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.kpi-valor  { font-size: 20px; font-weight: 800; color: var(--text); margin: 5px 0 3px; line-height: 1; }
.kpi-subtexto { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Global KPI strip ── */
.global-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.gkpi {
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:10px 14px;
  background:var(--bg-card);
  border-radius:9px;
  border:1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: transform .2s, box-shadow .2s;
  cursor: default;
}
.gkpi:hover { box-shadow: var(--shadow-sm); }
.gkpi-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-muted); }
.gkpi-value { font-size:20px; font-weight:800; color:var(--text); line-height:1.1; }
.gkpi-sub   { font-size:11px; color:var(--text-sec); }
.gkpi--faturado .gkpi-value { color:#22c55e; }
.gkpi--aberto   .gkpi-value { color:var(--primary); }
.gkpi--alerta   .gkpi-value { color:#f59e0b; }
.gkpi--risco    .gkpi-value { color:#f87171; }

/* ── Alertas ── */
.alerta-list { display:flex; flex-direction:column; gap:8px; }
.alerta-item {
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px 14px;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--bg-card);
  box-shadow: var(--shadow-xs);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.alerta-item:hover { box-shadow: var(--shadow-sm); }
.alerta-item.danger  { border-left:3px solid #f87171; }
.alerta-item.warning { border-left:3px solid #f59e0b; }
.alerta-item.info    { border-left:3px solid #60a5fa; }
.alerta-icon  { font-size:18px; flex-shrink:0; margin-top:1px; }
.alerta-title { font-size:13px; font-weight:700; color:var(--text); margin-bottom:2px; }
.alerta-sub   { font-size:12px; color:var(--text-sec); }
.alerta-val   { font-size:13px; font-weight:700; margin-left:auto; white-space:nowrap; }

/* ── Tabela KPI ── */
.tabela-kpi { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela-kpi thead { background: var(--bg-card-alt); }
.tabela-kpi th { padding: 10px; text-align: left; font-weight: 700; color: var(--text-sec); border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; }
.tabela-kpi td { padding: 10px; border-bottom: 1px solid var(--border); color: var(--text-sec); }
.tabela-kpi tbody tr:hover { background: var(--bg-card-alt); }

/* ════════════════════════════════
   CARDS — Glow colorido no hover
════════════════════════════════ */
/* KPI Cards Dashboard — cor via --kc variável inline */
.kpi-c {
  transition: transform .2s, filter .2s;
}
.kpi-c:hover {
  box-shadow: var(--shadow-sm);
}

/* KPI Cards Projetos — cor via --kpi-color variável inline */
.kpi-card {
  transition: transform var(--transition), box-shadow var(--transition);
}
.kpi-card:hover {
  box-shadow: var(--shadow-lg), var(--glow-copper);
  transform: translateY(-3px);
}

/* Project Cards — glow genérico colorido */
.proj-card {
  transition: transform var(--transition), box-shadow var(--transition);
}
.proj-card:hover {
  box-shadow: var(--shadow-lg), var(--glow-blue);
  transform: translateY(-3px);
}

/* Financial KPIs — glow baseado em accent-color */
.fin-kpi {
  transition: transform var(--transition), box-shadow var(--transition);
}
.fin-kpi:hover {
  transform: translateY(-3px);
}
.fin-kpi.accent-blue:hover {
  box-shadow: var(--shadow-lg), var(--glow-blue);
}
.fin-kpi.accent-green:hover {
  box-shadow: var(--shadow-lg), var(--glow-green);
}
.fin-kpi.accent-amber:hover {
  box-shadow: var(--shadow-lg), var(--glow-amber);
}
.fin-kpi.accent-gray:hover {
  box-shadow: var(--shadow-lg), var(--glow-slate);
}

/* Generic Cards — glow padrão */
.card {
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
a.card:hover, [data-clickable].card:hover {
  box-shadow: var(--shadow-lg), var(--glow-copper);
  transform: translateY(-3px);
}

/* ════════════════════════════════
   ANIMAÇÕES DE ENTRADA
════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fade-in { animation: fadeInUp var(--anim-base) var(--anim-ease) both; }
.anim-d1 { animation-delay: .05s; }
.anim-d2 { animation-delay: .10s; }
.anim-d3 { animation-delay: .15s; }
.anim-d4 { animation-delay: .20s; }
.anim-d5 { animation-delay: .25s; }
.anim-d6 { animation-delay: .30s; }
@media (prefers-reduced-motion: reduce) {
  .anim-fade-in { animation: none; opacity: 1; transform: none; }
}

/* ════════════════════════════════
   GLASSMORPHISM PARA MODAIS
════════════════════════════════ */
.modal {
  background: var(--modal-glass-bg);
  -webkit-backdrop-filter: blur(var(--modal-glass-blur));
  backdrop-filter: blur(var(--modal-glass-blur));
}

/* ════════════════════════════════
   SKELETON LOADING
════════════════════════════════ */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: var(--radius);
  display: block;
}
.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-kpi   { height: 32px; width: 80px; }
.skeleton-card  { height: 120px; }

/* ─────────────────────────────────
   SPINNER ANIMATION — Loading states
─────────────────────────────────── */
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ─────────────────────────────────
   TOAST NOTIFICATIONS — Queue system
─────────────────────────────────── */
@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast-container {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-med);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s ease forwards;
  pointer-events: auto;
  min-height: 48px;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 14px;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-left: 4px solid var(--primary);
}

.toast-info .toast-icon {
  color: var(--primary);
}

.toast-message {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

.toast-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-sec);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .toast-container {
    bottom: 80px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .toast {
    width: 100%;
  }
}

/* ════════════════════════════════
   DISPLAY FONT — Valores numéricos
════════════════════════════════ */
.kpi-value, .kpi-valor, .stat-value,
.gkpi-value, .proj-card__exec, .brand-name {
  font-family: var(--font-display);
}

/* ════════════════════════════════
   DASHBOARD — Tabs, KPIs, Panels
════════════════════════════════ */
.dash-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 24px;
  overflow-x: auto;
}

.dash-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.dash-tab:hover {
  color: var(--primary);
}

.dash-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.dash-tab svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.dash-pane {
  display: none;
}

.dash-pane.active {
  display: block;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-c {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border-left: 4px solid var(--kc, var(--primary));
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  cursor: default;
}

.kpi-c:hover {
  border-color: var(--kc, var(--primary));
  box-shadow: var(--shadow-sm);
}

.kpi-c .val {
  font-size: 32px;
  font-weight: 800;
  color: var(--kc, var(--primary));
  line-height: 1;
  transition: color 0.2s ease;
}

.kpi-c .lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.kpi-c .sub {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 3px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.panel-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}

.panel-title svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.panel-body {
  padding: 20px;
}

.panel-body--compact {
  padding: 12px 20px;
}

.empty-message {
  font-size: 13px;
  color: var(--gray-400);
  text-align: center;
  padding: 20px 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 800px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
}

.rank-row:last-child {
  border: none;
}

.rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-badge-1st {
  background: #F59E0B;
  color: #fff;
}

.rank-badge-2nd {
  background: #8b92a9;
  color: #ffffff;
}

.rank-badge-3rd {
  background: #E5484D;
  color: #ffffff;
}

.rank-badge-other {
  background: var(--primary);
  color: #ffffff;
}

.rank-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-subtitle {
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 2px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.rank-bar-wrap {
  width: 120px;
  flex-shrink: 0;
}

.rank-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 2px;
}

.rank-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.rank-bar-fill.rank-badge-1st {
  background: #F59E0B;
}

.rank-bar-fill.rank-badge-2nd {
  background: #8b92a9;
}

.rank-bar-fill.rank-badge-3rd {
  background: #E5484D;
}

.rank-bar-fill.rank-badge-other {
  background: var(--primary);
}

.rank-val {
  font-size: 12px;
  font-weight: 700;
  width: 60px;
  text-align: right;
  flex-shrink: 0;
  color: var(--gray-600);
}

.filter-bar {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-bar .form-group {
  margin: 0;
  min-width: 160px;
  flex: 1;
}

.filter-bar label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.proj-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.proj-card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.proj-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.proj-card-info {
  flex: 1;
  min-width: 0;
}

.proj-card-info a {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-card-info a:hover {
  color: var(--primary);
}

.proj-card-info small {
  font-size: 11px;
  color: var(--gray-500);
}

.week-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  margin-top: 16px;
}

.week-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.week-bar {
  width: 100%;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
}

.week-label {
  font-size: 9px;
  color: var(--gray-400);
}

.approval-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.approval-item:hover {
  background-color: var(--surface-alt);
}

/* ════════════════════════════════
   EMPTY STATE SVG MODIFIER
════════════════════════════════ */
.empty-state-svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  color: var(--text-muted);
  opacity: .4;
}

/* ════════════════════════════════
   ONBOARDING STEPPER MODAL
════════════════════════════════ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.onboarding-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-med);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 25px 50px rgba(0,0,0,.6);
  overflow: hidden;
  animation: slideUpIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onboarding-header {
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.onboarding-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.onboarding-subtitle {
  font-size: 14px;
  color: var(--text-sec);
}

.onboarding-stepper {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  background: var(--bg-hover);
}

.stepper-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.stepper-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  right: -24px;
  width: 16px;
  height: 2px;
  background: var(--border);
}

.stepper-step.active:not(:last-child)::after {
  background: var(--primary);
}

.stepper-circle {
  min-width: 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

/* ════════════════════════════════
   TOOLTIP SYSTEM — JavaScript
   Delay 300ms, auto-positioning
════════════════════════════════ */
.tooltip {
  background: var(--surface-high);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
  border: 1px solid var(--border-med);
  box-shadow: var(--shadow);
  pointer-events: none;
  z-index: 999;
  letter-spacing: 0;
  text-transform: none;
}

.stepper-step.active .stepper-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-inv);
}

.stepper-step.completed .stepper-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-inv);
}

.stepper-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sec);
  display: none;
}

@media (min-width: 480px) {
  .stepper-label { display: block; }
}

.onboarding-body {
  padding: 32px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.onboarding-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.onboarding-step.active {
  display: block;
}

.onboarding-step h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.onboarding-step p {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}


.onboarding-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  cursor: pointer;
  transition: all 0.2s ease;
}

.checklist-item:hover {
  background: var(--bg-card-alt);
  border-color: var(--primary);
}

.checklist-item input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary);
}

.checklist-label {
  font-size: 14px;
  color: var(--text);
  flex: 1;
  cursor: pointer;
}

.onboarding-footer {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-skip,
.btn-onboarding {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-skip {
  background: transparent;
  color: var(--text-sec);
  border: 1px solid var(--border-med);
}

.btn-skip:hover {
  color: var(--text);
  border-color: var(--border);
}

.btn-onboarding {
  background: var(--primary);
  color: var(--text-inv);
  flex: 1;
}

.btn-onboarding:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 16px rgba(109,77,242,.3);
}

.btn-onboarding:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────
   Focus-visible (WCAG 2.1 AA Accessibility)
───────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  button:focus-visible,
  .btn:focus-visible,
  input[type="button"]:focus-visible,
  input[type="submit"]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }

  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    box-shadow: 0 0 0 3px rgba(109, 77, 242, 0.1);
    outline: 2px solid var(--primary);
  }

  a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }

  .nav-item:focus-visible,
  .sidebar a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
  }

  .bottom-nav a:focus-visible,
  .bottom-nav button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -4px;
  }

  .modal input:focus-visible,
  .modal textarea:focus-visible,
  .modal select:focus-visible {
    box-shadow: 0 0 0 4px var(--primary);
  }

  .modal button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 1px;
  }
}

@supports not selector(:focus-visible) {
  button:focus,
  input:focus,
  select:focus,
  textarea:focus,
  a:focus {
    outline: 2px solid var(--primary);
  }
}

/* ─────────────────────────────────────
   Accessibility Utilities
───────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Modal/Dialog Accessibility */
[aria-modal="true"] {
  outline: none;
}

[aria-modal="true"]:focus-within {
  outline: none;
}

/* Skip to main content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 9999;
  border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
  top: 0;
}

/* ─────────────────────────────────────
   Dashboard — SVG Icon Replacements & Loading States
───────────────────────────────────── */

/* SVG Icon Container — replace emoji in headers */
.icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.icon-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Badge Icons (ranking medals, etc) */
.badge-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* Evaluation Panel — inline status display */
.eval-panel {
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid var(--border-med);
}

.eval-panel--success { background: rgba(14,159,110,.08);  border-color: rgba(14,159,110,.30); }
.eval-panel--warning { background: rgba(245,158,11,.08);  border-color: rgba(245,158,11,.30); }
.eval-panel--danger  { background: rgba(229,72,77,.08);   border-color: rgba(229,72,77,.30); }

.eval-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.eval-stat__value {
  font-size: 28px;
  font-weight: 900;
}

.eval-stat__value--success { color: var(--success); }
.eval-stat__value--warning { color: var(--warning); }
.eval-stat__value--danger  { color: var(--danger); }

.eval-stat__label {
  font-size: 13px;
  color: var(--text-sec);
}

.eval-metrics {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.eval-metric {
  font-size: 12px;
  color: var(--text-sec);
  display: flex;
  align-items: center;
  gap: 4px;
}

.eval-metric strong {
  color: var(--text);
  font-weight: 600;
}

.eval-metric .icon-svg {
  opacity: 0.75;
}

/* Button Loading State */
.btn.loading {
  opacity: 0.75;
  pointer-events: none;
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  margin-left: -7px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Prumo Dashboard Components ────────────────────────────────────────────── */
.pr-dash-kpi {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.pr-dash-card {
  background: var(--surface);
  border: 1px solid var(--card-border, var(--border));
  border-radius: 14px;
  padding: 18px;
}
.pr-dash-card-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.pr-dash-card-value {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 8px;
  line-height: 1.1;
  color: var(--text-primary, var(--text));
}
.pr-dash-card-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.pr-delta { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.pr-delta--up   { background: rgba(14,159,110,.1);  color: #0a7d57; }
.pr-delta--down { background: rgba(229,72,77,.1);   color: #c1393d; }
.pr-delta--warn { background: rgba(245,158,11,.12); color: #b06f02; }
.pr-delta-sub { font-size: 11px; color: var(--text-muted); }

.pr-dash-2col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.pr-dash-chart-card { display: flex; flex-direction: column; min-height: 280px; }
.pr-dash-chart-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.pr-dash-section-title { font-family: var(--font-display, 'Space Grotesk'); font-size: 15px; font-weight: 600; color: var(--text-primary, var(--text)); }
.pr-dash-section-sub   { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.pr-dash-legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-sec, var(--text-muted)); }
.pr-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }

.pr-dash-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 180px;
  padding-bottom: 4px;
  flex: 1;
}
.pr-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.pr-bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: 100%;
  height: 100%;
  justify-content: center;
}
.pr-bar-real {
  width: 38%;
  background: var(--primary);
  border-radius: 5px 5px 0 0;
  transition: height .3s ease;
}
.pr-bar-plan {
  width: 38%;
  background: var(--primary-light, rgba(109,77,242,.25));
  border-radius: 5px 5px 0 0;
  transition: height .3s ease;
}
.pr-bar-label { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono, 'Space Mono', monospace); white-space: nowrap; }

.pr-dash-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pr-link-action { font-size: 12px; color: var(--primary); font-weight: 600; text-decoration: none; background: none; border: none; cursor: pointer; padding: 0; }
.pr-link-action:hover { text-decoration: underline; }

.pr-rdos-list { display: flex; flex-direction: column; gap: 2px; }
.pr-rdo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.pr-rdo-row:hover { background: var(--surface-alt); }
.pr-rdo-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--primary-light, rgba(109,77,242,.1));
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.pr-rdo-info  { flex: 1; min-width: 0; }
.pr-rdo-obra  { font-size: 13px; font-weight: 600; color: var(--text-primary, var(--text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-rdo-meta  { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono, 'Space Mono', monospace); margin-top: 1px; }

.pr-obras-list { display: flex; flex-direction: column; gap: 4px; }
.pr-obra-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 8px; border-radius: 10px;
  transition: background .15s;
}
.pr-obra-row:hover { background: var(--surface-alt); }
.pr-obra-stripe { width: 8px; height: 38px; border-radius: 4px; flex: none; }
.pr-obra-info  { flex: 1; min-width: 0; }
.pr-obra-nome a { font-size: 13px; font-weight: 600; color: var(--text-primary, var(--text)); text-decoration: none; }
.pr-obra-nome a:hover { color: var(--primary); }
.pr-obra-meta  { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono, 'Space Mono', monospace); margin-top: 2px; }
.pr-obra-progress { flex: 1.2; min-width: 100px; }
.pr-progress-bar  { height: 7px; background: var(--surface-alt); border-radius: 5px; overflow: hidden; }
.pr-progress-fill { height: 100%; border-radius: 5px; transition: width .4s ease; }
.pr-obra-pct   { font-family: var(--font-display, 'Space Grotesk'); font-size: 14px; font-weight: 700; width: 40px; text-align: right; flex: none; }
.pr-obra-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 7px; white-space: nowrap; min-width: 64px; text-align: center; flex: none; }
.pr-obra-prazo { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex: none; }

@media (max-width: 1080px) {
  .pr-dash-kpi  { grid-template-columns: repeat(3, 1fr); }
  .pr-dash-2col { grid-template-columns: 1fr; }
  .pr-obra-prazo { display: none; }
}
@media (max-width: 820px) {
  .pr-dash-kpi  { grid-template-columns: repeat(2, 1fr); }
  .pr-obra-progress, .pr-obra-badge { display: none; }
}
