/* ═══════════════════════════════════════════════════════════════
   KAFFRA CLIENT PORTAL — portal.css
   Cinematic dark-theme · Glassmorphism · Aurora · HUD
   Raycast × Apple × Oakley DNA
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════
   00 — CSS CUSTOM PROPERTIES (animated)
═══════════════════════════════════════════ */
@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@property --aurora-1 {
  syntax: '<percentage>';
  initial-value: 0%;
  inherits: false;
}
@property --aurora-2 {
  syntax: '<percentage>';
  initial-value: 100%;
  inherits: false;
}


/* ═══════════════════════════════════════════
   01 — DESIGN TOKENS
   Heranca direta do Design System + extensoes portal
═══════════════════════════════════════════ */
:root {
  /* ── Backgrounds ── */
  --bg-root:       #050507;
  --bg-surface:    rgba(12,12,14,.85);
  --bg-card:       rgba(18,18,22,.65);
  --bg-card-hover: rgba(26,26,32,.7);
  --bg-elevated:   rgba(28,28,34,.8);
  --bg-overlay:    rgba(0,0,0,.7);

  /* ── Glass ── */
  --glass-bg:      rgba(255,255,255,.03);
  --glass-border:  rgba(255,255,255,.06);
  --glass-blur:    20px;

  /* ── Text ── */
  --text-primary:   #f0f0f2;
  --text-secondary: #a1a1aa;
  --text-tertiary:  #71717a;
  --text-disabled:  #52525b;
  --text-inverse:   #050507;

  /* ── Accent — Amber (Kaffra DNA) ── */
  --amber:          #F59E0B;
  --amber-hover:    #D97706;
  --amber-soft:     rgba(245,158,11,.10);
  --amber-glow:     rgba(245,158,11,.25);
  --amber-dim:      rgba(245,158,11,.05);
  --amber-border:   rgba(245,158,11,.18);
  --amber-text:     rgba(245,158,11,.9);

  /* ── Status ── */
  --status-success:      #22c55e;
  --status-success-soft: rgba(34,197,94,.12);
  --status-success-text: rgba(34,197,94,.9);
  --status-warning:      #eab308;
  --status-warning-soft: rgba(234,179,8,.12);
  --status-warning-text: rgba(234,179,8,.9);
  --status-error:        #ef4444;
  --status-error-soft:   rgba(239,68,68,.12);
  --status-error-text:   rgba(239,68,68,.9);
  --status-info:         #3b82f6;
  --status-info-soft:    rgba(59,130,246,.12);
  --status-info-text:    rgba(59,130,246,.9);

  /* ── Borders ── */
  --border:        rgba(255,255,255,.05);
  --border-md:     rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.14);
  --border-focus:  rgba(245,158,11,.5);

  /* ── Typography ── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* ── Font sizes ── */
  --text-2xs:  .625rem;   /* 10px */
  --text-xs:   .6875rem;  /* 11px */
  --text-sm:   .75rem;    /* 12px */
  --text-base: .8125rem;  /* 13px */
  --text-md:   .875rem;   /* 14px */
  --text-lg:   1rem;      /* 16px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  2rem;      /* 32px */
  --text-4xl:  2.5rem;    /* 40px */

  /* ── Font weights ── */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-heavy:    800;

  /* ── Spacing ── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Radii ── */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-2xl:  16px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm:    0 1px 3px rgba(0,0,0,.5);
  --shadow-md:    0 4px 20px rgba(0,0,0,.6);
  --shadow-lg:    0 12px 48px rgba(0,0,0,.8);
  --shadow-glow:  0 0 40px rgba(245,158,11,.12), 0 0 80px rgba(245,158,11,.05);
  --shadow-focus: 0 0 0 2px rgba(245,158,11,.2), 0 0 24px rgba(245,158,11,.08);

  /* ── Transitions ── */
  --ease-fast: .15s ease;
  --ease:      .2s ease;
  --ease-slow: .35s ease;
  --ease-spring: .4s cubic-bezier(.16,1,.3,1);

  /* ── Layout ── */
  --sidebar-width:     240px;
  --sidebar-collapsed: 64px;
  --topbar-height:     56px;
  --content-max:       1120px;
}


/* ═══════════════════════════════════════════
   02 — RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-root);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

/* ── Aurora background ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(245,158,11,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(245,158,11,.03) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 60% 20%, rgba(59,130,246,.025) 0%, transparent 50%);
  animation: aurora-shift 25s ease-in-out infinite alternate;
}
@keyframes aurora-shift {
  0% { opacity: .6; filter: hue-rotate(0deg); }
  50% { opacity: 1; filter: hue-rotate(5deg); }
  100% { opacity: .7; filter: hue-rotate(-3deg); }
}

/* ── Grain texture (Kaffra DNA) ── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: .022;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.is-hidden { display: none !important; }

/* ── Selection ── */
::selection {
  background: var(--amber);
  color: var(--text-inverse);
}
::-moz-selection {
  background: var(--amber);
  color: var(--text-inverse);
}


/* ═══════════════════════════════════════════
   03 — TYPOGRAPHY
═══════════════════════════════════════════ */

/* ── Headlines ── */
.h1 { font-size: var(--text-4xl); font-weight: var(--weight-heavy); letter-spacing: -.03em; line-height: 1.1; }
.h2 {
  font-size: var(--text-3xl); font-weight: var(--weight-heavy); letter-spacing: -.03em; line-height: 1.15;
  background: linear-gradient(135deg, var(--text-primary) 60%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.h3 { font-size: var(--text-2xl); font-weight: var(--weight-bold); letter-spacing: -.02em; line-height: 1.2; }
.h4 { font-size: var(--text-xl); font-weight: var(--weight-semibold); letter-spacing: -.01em; line-height: 1.3; }
.h5 { font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: 1.35; }
.h6 { font-size: var(--text-md); font-weight: var(--weight-semibold); line-height: 1.4; }

/* ── Headline accents (Kaffra DNA) ── */
.h-light { font-weight: var(--weight-light); font-style: italic; color: var(--text-secondary); }
.h-amber { color: var(--amber); }

/* ── Body variants ── */
.body-lg { font-size: var(--text-md); color: var(--text-secondary); line-height: 1.65; }
.body    { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.6; }
.body-sm { font-size: var(--text-sm); color: var(--text-tertiary); line-height: 1.5; }

/* ── Mono labels ── */
.label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.label-amber { color: var(--amber-text); }

/* ── Metric numbers ── */
.metric {
  font-size: var(--text-3xl);
  font-weight: var(--weight-heavy);
  letter-spacing: -.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.metric-sm {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: -.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}


/* ═══════════════════════════════════════════
   04 — VERIFY SCREEN
═══════════════════════════════════════════ */
#verify-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg-root);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .8s cubic-bezier(.4,0,.2,1), visibility .8s ease;
  overflow: hidden;
}
/* ── HUD grid behind verify ── */
#verify-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245,158,11,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,158,11,.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 70%);
  animation: hud-pulse 8s ease-in-out infinite alternate;
}
@keyframes hud-pulse {
  0% { opacity: .4; }
  100% { opacity: .8; }
}
/* ── Radial glow behind verify ── */
#verify-screen::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.08) 0%, rgba(245,158,11,.02) 40%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: verify-glow-pulse 4s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes verify-glow-pulse {
  0% { opacity: .5; transform: translate(-50%, -50%) scale(.9); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}
#verify-screen.dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.02);
}

/* ── Scan phase ── */
#verify-scan {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.verify-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0,0,0,.8);
  border: 1px solid rgba(245,158,11,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  color: var(--amber);
  box-shadow: 0 0 40px rgba(245,158,11,.1), inset 0 1px 0 rgba(255,255,255,.05);
}

.scan-bar {
  width: 260px;
  height: 1px;
  background: rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
}
.scan-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  animation: scan-fill 1.4s ease forwards;
  box-shadow: 0 0 20px rgba(245,158,11,.3);
}
@keyframes scan-fill {
  from { width: 0; }
  to { width: 100%; }
}

.scan-status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(255,255,255,.25);
  animation: scan-status-fade .4s ease forwards;
}
@keyframes scan-status-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

#scan-line {
  position: fixed;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 10%, rgba(245,158,11,.3) 30%, var(--amber) 50%, rgba(245,158,11,.3) 70%, transparent 90%);
  z-index: 501;
  animation: scan-sweep 1.3s ease-in-out forwards;
  pointer-events: none;
  box-shadow: 0 0 30px rgba(245,158,11,.3), 0 0 60px rgba(245,158,11,.1);
}
@keyframes scan-sweep {
  from { top: 0; opacity: 1; }
  90% { opacity: 1; }
  to { top: 100vh; opacity: 0; }
}

/* ── Login / magic-link phase ── */
#verify-magic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

/* ── Waiting state (portal being prepared) ── */
.waiting-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
  animation: waitingFadeIn 0.6s ease-out;
}
@keyframes waitingFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.waiting-state__icon {
  color: var(--amber);
  opacity: 0.8;
  animation: waitingPulse 2s ease-in-out infinite;
}
@keyframes waitingPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}
.waiting-state__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 8px 0 0;
}
.waiting-state__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.6;
}
.waiting-state__sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.7;
}
.waiting-state__logout {
  margin-top: 12px;
  font-size: 0.82rem;
  opacity: 0.5;
}
.waiting-state__logout:hover {
  opacity: 1;
}

/* ── PIN phase ── */
#verify-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.verify-card {
  background: rgba(18,18,22,.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 44px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
}

.pin-group {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.pin-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: var(--text-xl);
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  letter-spacing: 0;
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.pin-digit:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(245,158,11,.15), 0 0 30px rgba(245,158,11,.08);
  background: rgba(245,158,11,.04);
}
.pin-digit.filled {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}
.pin-digit.error {
  border-color: var(--status-error);
  box-shadow: 0 0 20px rgba(239,68,68,.15);
  animation: pin-shake .4s ease;
}

#pin-error {
  color: var(--status-error-text);
  font-size: var(--text-xs);
  display: none;
  margin-top: 8px;
}
#pin-error.visible {
  display: block;
}

@keyframes pin-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── Verify screen logo glow ── */
#verify-screen .sidebar-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1.5rem;
  background: rgba(0,0,0,.7);
  border: 1px solid rgba(245,158,11,.15);
  box-shadow: 0 0 40px rgba(245,158,11,.1), 0 0 80px rgba(245,158,11,.04);
}

/* ── Verify classes ── */
.verify-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.verify-brand {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: rgba(245,158,11,.35);
}

.verify-status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(255,255,255,.2);
  animation: scan-status-fade .4s .3s ease forwards;
  opacity: 0;
}

.client-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--amber-text);
  box-shadow: 0 0 12px rgba(245,158,11,.06);
}

/* Session warning bar — Glass */
#session-warning {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(234,179,8,.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(234,179,8,.15);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--status-warning-text);
  z-index: 200;
  animation: slide-up .4s cubic-bezier(.16,1,.3,1);
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }


/* ═══════════════════════════════════════════
   05 — PORTAL LAYOUT
═══════════════════════════════════════════ */
#portal {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--topbar-height) 1fr;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 1s cubic-bezier(.4,0,.2,1);
}
#portal.visible {
  opacity: 1;
}

/* ── Sidebar — Glassmorphism ── */
.sidebar {
  grid-row: 1 / -1;
  background: rgba(10,10,14,.9);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-right: 1px solid rgba(255,255,255,.04);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 2px;
  overflow-y: auto;
  transition: width var(--ease-spring);
  position: relative;
  z-index: 10;
}
/* ── Sidebar inner glow ── */
.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 10%, rgba(245,158,11,.06) 50%, transparent 90%);
  pointer-events: none;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin-bottom: 20px;
}
.sidebar-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(0,0,0,.6);
  border: 1px solid rgba(245,158,11,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 900;
  font-style: italic;
  color: var(--amber);
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(245,158,11,.06);
}
.sidebar-logo-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(245,158,11,.45);
}

/* ── Nav items ── */
.nav-section {
  margin-top: 24px;
}
.nav-section-label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-disabled);
  padding: 4px 12px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: var(--weight-medium);
  transition: all .25s ease;
  cursor: pointer;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,.04);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(245,158,11,.06);
  color: var(--text-primary);
  box-shadow: inset 0 0 20px rgba(245,158,11,.03);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 18px;
  background: var(--amber);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(245,158,11,.4);
}

.nav-icon {
  width: 18px;
  height: 18px;
  opacity: .4;
  flex-shrink: 0;
  transition: opacity .25s ease;
}
.nav-item.active .nav-icon {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(245,158,11,.3));
}
.nav-item:hover .nav-icon {
  opacity: .75;
}

.nav-badge {
  margin-left: auto;
  background: var(--amber-soft);
  color: var(--amber-text);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  padding: 1px 6px;
  border-radius: 9999px;
  line-height: 1.5;
}

/* ── Topbar — Glass ── */
.topbar {
  background: rgba(10,10,14,.7);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
  position: relative;
  z-index: 5;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.topbar-breadcrumb-sep {
  color: var(--text-disabled);
  font-size: var(--text-xs);
}
.topbar-breadcrumb-current {
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}
.topbar-breadcrumb-parent {
  color: var(--text-tertiary);
}

.topbar-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  padding: 10px 0;
}

.topbar-session-hint {
  margin: 0;
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.35;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Notificacoes — dropdown */
.notif-wrap {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 48px));
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  z-index: 200;
  overflow: hidden;
}

.notif-dropdown.is-hidden {
  display: none !important;
}

.notif-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.notif-dropdown__title {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.notif-dropdown__clear {
  font-size: 11px;
  color: var(--amber);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 6px;
}

.notif-dropdown__clear:hover {
  background: var(--amber-soft);
}

.notif-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.notif-dropdown__item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.notif-dropdown__item:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
}

.notif-dropdown__item.is-unread {
  border-color: var(--amber-border);
  background: rgba(245, 158, 11, 0.06);
}

.notif-dropdown__item-date {
  display: block;
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.notif-dropdown__empty {
  margin: 0;
  padding: 20px 14px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
}

.notif-dropdown__empty.is-hidden {
  display: none !important;
}

.notif-dropdown__foot {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.page-header--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Visao geral — atalhos */
.quick-actions-card {
  margin-bottom: var(--space-8);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  padding: 4px 0 8px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: var(--weight-medium);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.quick-action-btn:hover {
  border-color: var(--amber-border);
  background: var(--bg-card-hover);
}

.quick-action-btn.is-accent {
  border-color: var(--amber-border);
  background: rgba(245, 158, 11, 0.08);
}

.quick-action-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.deliverable--highlight {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 12px;
  transition: outline-color 0.3s ease;
}

.timeline--full {
  padding: 8px 0 24px;
}

.empty-state--compact {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

.tool-link-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tool-link-row a {
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: var(--amber);
}

.notif-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-error);
  position: absolute;
  top: 4px;
  right: 4px;
  animation: notif-pulse 2s ease-in-out infinite;
}
@keyframes notif-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
  50% { box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}

/* ── Content area ── */
.content {
  padding: 36px;
  overflow-y: auto;
  position: relative;
  max-width: var(--content-max);
}

/* ── Mouse spotlight (JS adds --mouse-x/y) ── */
#portal::before {
  content: "";
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  left: var(--mouse-x, -500px);
  top: var(--mouse-y, -500px);
  transform: translate(-50%, -50%);
  transition: left .3s ease, top .3s ease;
  filter: blur(30px);
}

.page-header {
  margin-bottom: var(--space-8);
}
.page-header .label {
  margin-bottom: var(--space-2);
}


/* ═══════════════════════════════════════════
   06 — PAGES & TRANSITIONS
═══════════════════════════════════════════ */
.page {
  display: none;
}
.page.active {
  display: block;
  animation: page-in .5s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(16px) scale(.995); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}


/* ═══════════════════════════════════════════
   07 — OVERVIEW PAGE
═══════════════════════════════════════════ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.admin-notes-card .admin-notes-body {
  margin: 0;
  padding: 0 20px 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.project-summary-card {
  margin-bottom: 24px;
}

.project-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 20px;
  padding: 0 20px 12px;
}

.project-summary-item--wide {
  grid-column: 1 / -1;
}

.project-summary-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.project-summary-value {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.project-summary-footer {
  padding: 0 20px 20px;
}

@media (max-width: 768px) {
  .project-summary-grid {
    grid-template-columns: 1fr;
  }
  .project-summary-item--wide {
    grid-column: auto;
  }
}

.overview-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.overview-col {
  min-width: 0;
}


/* ═══════════════════════════════════════════
   08 — CARDS
═══════════════════════════════════════════ */
.card {
  background: rgba(18,18,22,.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: all .3s ease;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,.06), transparent 50%, rgba(245,158,11,.04));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
/* ── Top-edge light reflection (Raycast DNA) ── */
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  pointer-events: none;
  border-radius: inherit;
}
.card:hover {
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
  transform: translateY(-1px);
}
.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

/* ── Metric card — Glass ── */
.metric-card {
  background: rgba(18,18,22,.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}
.metric-card::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(245,158,11,.03) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity .3s ease;
  opacity: 0;
}
.metric-card:hover {
  border-color: rgba(255,255,255,.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.metric-card:hover::after {
  opacity: 1;
}
.metric-card-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
}
.metric-card-value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-heavy);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: var(--space-2);
}
.metric-card-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.metric-card-delta.positive { color: var(--status-success-text); }
.metric-card-delta.negative { color: var(--status-error-text); }

/* ── ROI highlight card — Cinematic ── */
.roi-card {
  background: rgba(18,18,22,.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245,158,11,.12);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}
.roi-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from var(--gradient-angle), transparent 40%, rgba(245,158,11,.15) 50%, transparent 60%);
  animation: gradient-spin 6s linear infinite;
  z-index: -1;
}
@keyframes gradient-spin {
  to { --gradient-angle: 360deg; }
}
.roi-card::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245,158,11,.1) 0%, transparent 70%);
  pointer-events: none;
  animation: roi-glow-pulse 4s ease-in-out infinite alternate;
}
@keyframes roi-glow-pulse {
  0% { opacity: .5; }
  100% { opacity: 1; }
}
.roi-card-value {
  font-size: 3rem;
  font-weight: var(--weight-heavy);
  letter-spacing: -.04em;
  background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 50%, #F59E0B 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-text-shimmer 3s ease infinite;
  line-height: 1;
  position: relative;
}
@keyframes gradient-text-shimmer {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}


/* ═══════════════════════════════════════════
   09 — STEPPER
═══════════════════════════════════════════ */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  margin-bottom: 32px;
}
.stepper-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 2px solid var(--border);
  transition: border-color var(--ease);
  position: relative;
}
.stepper-step.completed { border-color: var(--status-success); }
.stepper-step.active { border-color: var(--amber); }
.stepper-step.pending { border-color: var(--border); }

.stepper-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
  border: 2px solid var(--border);
  color: var(--text-disabled);
  background: var(--bg-root);
}
.stepper-step.completed .stepper-dot {
  background: var(--status-success);
  border-color: var(--status-success);
  color: white;
}
.stepper-step.active .stepper-dot {
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim), 0 0 12px rgba(245,158,11,.2);
  animation: stepper-pulse 2s ease-in-out infinite;
}
@keyframes stepper-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--amber-dim), 0 0 12px rgba(245,158,11,.15); }
  50% { box-shadow: 0 0 0 4px var(--amber-dim), 0 0 20px rgba(245,158,11,.25); }
}

.stepper-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stepper-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}
.stepper-sub {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}
.stepper-step.pending .stepper-label {
  color: var(--text-disabled);
}


/* ═══════════════════════════════════════════
   10 — TIMELINE
═══════════════════════════════════════════ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 80px 24px 1fr;
  gap: 12px;
  padding: 16px 0;
  position: relative;
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-disabled);
  text-align: right;
  padding-top: 2px;
}
.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
  margin-top: 5px;
}
.timeline-line {
  width: 1px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
}
.timeline-item:last-child .timeline-line { display: none; }

.timeline-dot.milestone { background: var(--amber); box-shadow: 0 0 8px rgba(245,158,11,.3), 0 0 16px rgba(245,158,11,.1); }
.timeline-dot.success { background: var(--status-success); }
.timeline-dot.warning { background: var(--status-warning); }

.timeline-content-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}
.timeline-content-desc {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}


/* ═══════════════════════════════════════════
   11 — PROGRESS BAR
═══════════════════════════════════════════ */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber-hover), var(--amber));
  border-radius: 2px;
  transition: width .8s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 0 8px rgba(245,158,11,.3);
  position: relative;
}
.progress-fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: -1px;
  width: 3px;
  height: 6px;
  background: var(--amber);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(245,158,11,.5);
}
.progress-fill.success {
  background: linear-gradient(90deg, #16a34a, var(--status-success));
  box-shadow: 0 0 8px rgba(34,197,94,.3);
}
.progress-fill.success::after { background: var(--status-success); box-shadow: 0 0 8px rgba(34,197,94,.5); }

/* ── Progress ring (SVG-based) ── */
.progress-ring {
  position: relative;
  display: inline-flex;
}
.progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}


/* ═══════════════════════════════════════════
   12 — BADGES
═══════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  line-height: 1.6;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-success { background: var(--status-success-soft); color: var(--status-success-text); }
.badge-success .badge-dot { background: var(--status-success); }

.badge-warning { background: var(--status-warning-soft); color: var(--status-warning-text); }
.badge-warning .badge-dot { background: var(--status-warning); }

.badge-error { background: var(--status-error-soft); color: var(--status-error-text); }
.badge-error .badge-dot { background: var(--status-error); }

.badge-info { background: var(--status-info-soft); color: var(--status-info-text); }
.badge-info .badge-dot { background: var(--status-info); }

.badge-amber { background: var(--amber-soft); color: var(--amber-text); }
.badge-amber .badge-dot { background: var(--amber); }

.badge-neutral { background: rgba(255,255,255,.06); color: var(--text-secondary); }
.badge-neutral .badge-dot { background: var(--text-tertiary); }

/* ── Phase badges ── */
.phase-badge {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
}
.phase-badge.active {
  border-color: var(--amber-border);
  color: var(--amber-text);
  background: var(--amber-dim);
}


/* ═══════════════════════════════════════════
   13 — BUTTONS
═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
}

/* Primary — Glow */
.btn-primary {
  background: linear-gradient(135deg, #fafafa 0%, #e4e4e7 100%);
  color: var(--text-inverse);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .5s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(250,250,250,.15);
}
.btn-primary:hover::before {
  transform: translateX(100%);
}

/* Secondary — outline */
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-md);
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Text with arrow (Kaffra DNA) */
.btn-text {
  background: none;
  color: var(--text-tertiary);
  padding: 4px 0;
}
.btn-text .btn-arrow { transition: transform var(--ease); }
.btn-text:hover { color: var(--text-primary); }
.btn-text:hover .btn-arrow { transform: translateX(4px); }

/* Approve */
.btn-approve {
  background: var(--status-success-soft);
  color: var(--status-success-text);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(34,197,94,.15);
}
.btn-approve:hover {
  background: rgba(34,197,94,.2);
  border-color: rgba(34,197,94,.3);
}

/* Adjust */
.btn-adjust {
  background: var(--status-warning-soft);
  color: var(--status-warning-text);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(234,179,8,.15);
}
.btn-adjust:hover {
  background: rgba(234,179,8,.2);
  border-color: rgba(234,179,8,.3);
}

/* Danger */
.btn-danger {
  background: var(--status-error-soft);
  color: var(--status-error-text);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(239,68,68,.15);
}
.btn-danger:hover {
  background: rgba(239,68,68,.2);
}

/* Sizes */
.btn-sm { font-size: var(--text-xs); padding: 5px 10px; }
.btn-lg { font-size: var(--text-md); padding: 10px 20px; }

/* Icon button */
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-tertiary);
  border: none;
  cursor: pointer;
  transition: all var(--ease);
}
.btn-icon:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}


/* ═══════════════════════════════════════════
   14 — TABLE
═══════════════════════════════════════════ */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table thead th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-disabled);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr {
  transition: background var(--ease);
}
.table tbody tr:hover {
  background: var(--bg-card-hover);
}

.table-cell-primary {
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}

/* Row actions — visible on hover */
.table-actions {
  opacity: 0;
  transition: opacity var(--ease);
  display: flex;
  gap: var(--space-2);
}
.table tbody tr:hover .table-actions { opacity: 1; }


/* ═══════════════════════════════════════════
   15 — DELIVERABLE CARDS
═══════════════════════════════════════════ */
.entregaveis-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: var(--space-6);
}
@media (max-width: 900px) {
  .entregaveis-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.entregaveis-stat {
  background: rgba(18,18,22,.45);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.entregaveis-stat:hover {
  border-color: rgba(245,158,11,.12);
  box-shadow: 0 4px 24px rgba(0,0,0,.2);
}
.entregaveis-stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.entregaveis-stat-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
}
.entregaveis-stat.is-review { border-left: 2px solid var(--status-warning); }
.entregaveis-stat.is-approved { border-left: 2px solid var(--status-success); }
.entregaveis-stat.is-adjust { border-left: 2px solid var(--status-error); }
.entregaveis-stat.is-pipeline { border-left: 2px solid rgba(255,255,255,.15); }

.deliverables-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deliverable {
  background: rgba(18,18,22,.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}
.deliverable::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 0%), rgba(245,158,11,.04), transparent 40%);
  transition: opacity .35s ease;
}
.deliverable:hover::after { opacity: 1; }
.deliverable:hover {
  border-color: rgba(255,255,255,.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.deliverable-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.deliverable-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.18);
}
.deliverable-sprint-pill {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

.deliverable-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.deliverable-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}
.deliverable-meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

.deliverable-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255,255,255,.05);
}
.deliverable-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--amber);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245,158,11,.25);
  background: rgba(245,158,11,.06);
  transition: background .2s ease, border-color .2s ease;
}
.deliverable-download:hover {
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.4);
  color: var(--amber);
}
.deliverable-download svg { flex-shrink: 0; opacity: .9; }

.deliverable-adjust-note {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  background: rgba(239,68,68,.06);
  border: 1px solid rgba(239,68,68,.15);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 4px;
}
.deliverable-adjust-note strong {
  color: var(--status-error-text);
  font-weight: 600;
}

.deliverable-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: auto;
}

/* ── Approval state borders ── */
.deliverable.pending-review { border-left: 2px solid var(--status-warning); }
.deliverable.approved { border-left: 2px solid var(--status-success); }
.deliverable.needs-adjustment { border-left: 2px solid var(--status-error); }
.deliverable.status-pending { border-left: 2px dashed rgba(255,255,255,.12); }


/* ═══════════════════════════════════════════
   16 — FILTER TABS
═══════════════════════════════════════════ */
.filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.filter-tab {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.filter-tab:hover { color: var(--text-secondary); }
.filter-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--amber);
}


/* ═══════════════════════════════════════════
   17 — MODAL
═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-overlay-in .2s ease;
}
@keyframes modal-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: rgba(22,22,28,.85);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 480px;
  animation: modal-in .4s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 24px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.92) translateY(16px); filter: blur(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════
   18 — MEETING CARDS
═══════════════════════════════════════════ */
.meeting-card {
  background: rgba(18,18,22,.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all .3s ease;
}
.meeting-card:hover {
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.meeting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}
.meeting-body {
  padding: var(--space-5);
}

/* ── Transcript block ── */
.transcript {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--text-tertiary);
  background: rgba(5,5,7,.6);
  border: 1px solid rgba(255,255,255,.03);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  max-height: 240px;
  overflow-y: auto;
}
.transcript-speaker {
  color: var(--amber-text);
  font-weight: 500;
}
.transcript-timestamp {
  color: var(--text-disabled);
  margin-right: var(--space-2);
}


/* ═══════════════════════════════════════════
   19 — FORM ELEMENTS
═══════════════════════════════════════════ */
.input {
  width: 100%;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-root);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.input::placeholder { color: var(--text-disabled); }
.input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-root);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  outline: none;
  width: 100%;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.textarea:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.input-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}


/* ═══════════════════════════════════════════
   20 — ALERTS & NOTIFICATIONS
═══════════════════════════════════════════ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  border: 1px solid;
}
.alert-icon { flex-shrink: 0; margin-top: 1px; }
.alert-content { flex: 1; }
.alert-title { font-weight: var(--weight-semibold); margin-bottom: 2px; }
.alert-desc { color: inherit; opacity: .8; }

.alert-info    { background: var(--status-info-soft); border-color: rgba(59,130,246,.15); color: var(--status-info-text); }
.alert-success { background: var(--status-success-soft); border-color: rgba(34,197,94,.15); color: var(--status-success-text); }
.alert-warning { background: var(--status-warning-soft); border-color: rgba(234,179,8,.15); color: var(--status-warning-text); }
.alert-error   { background: var(--status-error-soft); border-color: rgba(239,68,68,.15); color: var(--status-error-text); }


/* ═══════════════════════════════════════════
   21 — TOAST
═══════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: rgba(22,22,28,.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl);
  padding: 12px 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  animation: toast-in .35s var(--ease-spring);
  max-width: 360px;
}
.toast.toast-out {
  animation: toast-out .3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}

.toast-success { border-left: 2px solid var(--status-success); }
.toast-warning { border-left: 2px solid var(--status-warning); }
.toast-error   { border-left: 2px solid var(--status-error); }
.toast-info    { border-left: 2px solid var(--status-info); }


/* ═══════════════════════════════════════════
   22 — LOADING & EMPTY STATES
═══════════════════════════════════════════ */

/* ── Skeleton loader (Vercel-style) ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text { height: 12px; margin-bottom: 8px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-metric { height: 32px; width: 120px; margin-bottom: 8px; }
.skeleton-card { height: 120px; }

/* ── Empty state ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-8);
  text-align: center;
}
.empty-state-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  opacity: .2;
}
.empty-state-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}
.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}


/* ═══════════════════════════════════════════
   23 — AMBIENT ELEMENTS (KAFFRA DNA)
═══════════════════════════════════════════ */
#ambient-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .45;
}

.ambient-glow {
  position: fixed;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(245,158,11,.05) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 30% 40%, rgba(59,130,246,.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  top: -200px;
  right: -200px;
  animation: glow-drift 30s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, 60px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(.95); }
}

/* ── Beam accents ── */
.beam-accent {
  position: absolute;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.04) 30%, rgba(245,158,11,.02) 60%, transparent);
  transform: rotate(-8deg);
  pointer-events: none;
}

/* ── Beam (portal subtle) ── */
.beam {
  position: absolute;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.06) 40%, rgba(245,158,11,.03) 65%, transparent);
  transform: rotate(-12deg);
  pointer-events: none;
}

/* ── Divider with glow ── */
.divider-glow {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.08) 50%, transparent);
}

/* ── HUD grid overlay (content area) ── */
.content::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(245,158,11,.008) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,158,11,.008) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 50% 40% at 50% 30%, rgba(0,0,0,.3) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 50% 40% at 50% 30%, rgba(0,0,0,.3) 0%, transparent 70%);
}


/* ═══════════════════════════════════════════
   24 — DIAGNOSTIC REPORT PAGE
═══════════════════════════════════════════ */
.diag-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.diag-section {
  margin-bottom: 32px;
}

/* ── Problem card — Glass ── */
.problem-card {
  background: rgba(18,18,22,.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  transition: all .3s ease;
}
.problem-card:hover {
  border-color: rgba(255,255,255,.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.problem-severity {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.severity-critical { color: var(--status-error-text); }
.severity-high { color: var(--status-warning-text); }
.severity-medium { color: var(--status-info-text); }

/* ── Opportunity card — Glass ── */
.opportunity-card {
  background: rgba(18,18,22,.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  transition: all .3s ease;
}
.opportunity-card:hover {
  border-color: rgba(255,255,255,.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.opportunity-rank {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: var(--weight-heavy);
  color: var(--amber-dim);
  position: absolute;
  top: 12px;
  right: 20px;
  line-height: 1;
}
.opportunity-roi {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--status-success-soft);
  color: var(--status-success-text);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.opportunity-effort {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ── CTA approval section — Cinematic ── */
.diag-cta {
  text-align: center;
  padding: 48px 40px;
  border: 1px solid rgba(245,158,11,.12);
  border-radius: var(--radius-2xl);
  background: rgba(245,158,11,.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}
.diag-cta::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from var(--gradient-angle), transparent 30%, rgba(245,158,11,.1) 50%, transparent 70%);
  animation: gradient-spin 8s linear infinite;
  z-index: -1;
}


/* ═══════════════════════════════════════════
   25 — AREA LABELS
═══════════════════════════════════════════ */
.area-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  margin-bottom: 16px;
}


/* ═══════════════════════════════════════════
   26 — INFO PAGE
═══════════════════════════════════════════ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.info-card {
  min-height: 120px;
}
.info-card:last-child {
  grid-column: 1 / -1;
}


/* ═══════════════════════════════════════════
   27 — MONTHLY REPORT PAGE
═══════════════════════════════════════════ */
.system-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.system-card {
  background: rgba(18,18,22,.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s ease;
}
.system-card:hover {
  border-color: rgba(255,255,255,.08);
}
.system-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.system-dot.operational { background: var(--status-success); box-shadow: 0 0 8px rgba(34,197,94,.5); animation: dot-pulse-green 2s ease-in-out infinite; }
.system-dot.alert { background: var(--status-warning); box-shadow: 0 0 8px rgba(234,179,8,.5); animation: dot-pulse-yellow 2s ease-in-out infinite; }
.system-dot.failure { background: var(--status-error); box-shadow: 0 0 8px rgba(239,68,68,.5); animation: dot-pulse-red 1.5s ease-in-out infinite; }
@keyframes dot-pulse-green { 0%,100% { box-shadow: 0 0 4px rgba(34,197,94,.3); } 50% { box-shadow: 0 0 10px rgba(34,197,94,.6); } }
@keyframes dot-pulse-yellow { 0%,100% { box-shadow: 0 0 4px rgba(234,179,8,.3); } 50% { box-shadow: 0 0 10px rgba(234,179,8,.6); } }
@keyframes dot-pulse-red { 0%,100% { box-shadow: 0 0 4px rgba(239,68,68,.3); } 50% { box-shadow: 0 0 10px rgba(239,68,68,.6); } }

.metric-comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}


/* ═══════════════════════════════════════════
   28 — SESSION WARNING
═══════════════════════════════════════════ */
.session-warning {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--status-warning-soft);
  border-top: 1px solid rgba(234,179,8,.2);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--status-warning-text);
  z-index: 200;
  animation: slide-up .3s ease;
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}


/* ═══════════════════════════════════════════
   29 — PENDENCY ITEMS
═══════════════════════════════════════════ */
.pendency-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(18,18,22,.4);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  transition: all .25s ease;
}
.pendency-item:hover {
  border-color: rgba(255,255,255,.08);
  transform: translateX(2px);
}
.pendency-item.overdue { border-color: var(--status-error); border-left-width: 2px; }

.pendency-title { font-size: var(--text-sm); font-weight: var(--weight-medium); }
.pendency-deadline { font-size: var(--text-xs); color: var(--text-tertiary); }
.pendency-deadline.overdue { color: var(--status-error-text); }


/* ═══════════════════════════════════════════
   30 — NEXT SPRINT ITEMS
═══════════════════════════════════════════ */
.sprint-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.sprint-item:last-child { border-bottom: none; }

.sprint-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sprint-check.done {
  background: var(--status-success);
  border-color: var(--status-success);
}

.sprint-item-title { font-size: var(--text-sm); font-weight: var(--weight-medium); }
.sprint-item-title.done { color: var(--text-tertiary); text-decoration: line-through; }


/* ═══════════════════════════════════════════
   31 — AUDIT STAMP
═══════════════════════════════════════════ */
.audit-stamp {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-disabled);
  display: flex;
  align-items: center;
  gap: 4px;
}


/* ═══════════════════════════════════════════
   32 — SCROLL REVEAL
═══════════════════════════════════════════ */
.rv {
  opacity: 0;
  transform: translateY(16px) scale(.98);
  filter: blur(4px);
  transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .5s cubic-bezier(.16,1,.3,1), filter .5s ease;
}
.rv.in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.rv-d1 { transition-delay: .08s; }
.rv-d2 { transition-delay: .16s; }
.rv-d3 { transition-delay: .24s; }
.rv-d4 { transition-delay: .32s; }


/* ═══════════════════════════════════════════
   33 — CONFETTI / APPROVAL CELEBRATION
═══════════════════════════════════════════ */
.confetti-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 500;
  animation: confetti-fall 2s cubic-bezier(.25,.46,.45,.94) forwards;
  box-shadow: 0 0 6px currentColor;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  70% { opacity: .8; }
  100% { opacity: 0; transform: translateY(500px) rotate(1080deg) scale(.3); }
}


/* ═══════════════════════════════════════════
   34 — RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  #portal {
    grid-template-columns: 1fr;
  }
  #portal::before { display: none; }
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 100;
    transition: left .3s var(--ease-spring);
  }
  .sidebar.open { left: 0; }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
    display: none;
  }
  .sidebar-backdrop.visible { display: block; }

  .content { padding: 20px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-columns { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .metric-comparison { grid-template-columns: 1fr; }

  .stepper { flex-direction: column; }
  .stepper-step {
    border-bottom: none;
    border-left: 2px solid var(--border);
    padding: 12px 16px;
  }
  .stepper-step.completed { border-left-color: var(--status-success); }
  .stepper-step.active { border-left-color: var(--amber); }

  .modal { margin: 16px; }
  .h1 { font-size: var(--text-3xl); }
  .h2 { font-size: var(--text-2xl); }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .pin-digit { width: 38px; height: 46px; }
}


/* ═══════════════════════════════════════════
   35 — AURORA LAYER
═══════════════════════════════════════════ */
.aurora-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aurora-layer::before {
  content: "";
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background:
    conic-gradient(from 120deg at 30% 20%, rgba(245,158,11,.04) 0deg, transparent 60deg, transparent 300deg, rgba(245,158,11,.02) 360deg),
    conic-gradient(from 240deg at 70% 70%, rgba(59,130,246,.02) 0deg, transparent 60deg, transparent 300deg, rgba(59,130,246,.01) 360deg);
  animation: aurora-rotate 60s linear infinite;
  filter: blur(80px);
}
@keyframes aurora-rotate {
  to { transform: rotate(360deg); }
}


/* ═══════════════════════════════════════════
   36 — GRADIENT TEXT UTILITY
═══════════════════════════════════════════ */
.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-amber {
  background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 50%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ═══════════════════════════════════════════
   37 — SCROLLBAR
═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }


/* ═══════════════════════════════════════════
   38 — PRINT
═══════════════════════════════════════════ */
@media print {
  .no-print,
  #verify-screen,
  #ambient-canvas,
  .ambient-glow,
  .aurora-layer,
  .sidebar,
  .topbar-actions,
  .topbar-session-hint,
  #toast-container,
  #session-warning,
  .modal-overlay,
  .entregaveis-stats,
  .filter-tabs,
  .quick-actions-card,
  .nav-badge,
  body::before,
  body::after {
    display: none !important;
  }

  .topbar {
    display: block !important;
    border: none;
    padding: 0 0 12px;
    background: transparent;
  }

  .topbar-breadcrumb {
    font-size: 14px;
    color: #111;
  }

  #portal {
    display: block !important;
    grid-template: none;
  }

  #portal::before {
    display: none !important;
  }

  .page {
    display: none !important;
    animation: none !important;
  }

  .page.active {
    display: block !important;
  }

  .content::before {
    display: none !important;
  }

  .content {
    padding: 12px 16px;
    max-width: none;
  }

  body {
    background: white;
    color: #111;
  }

  .card,
  .metric-card,
  .deliverable,
  .problem-card,
  .opportunity-card,
  .meeting-card,
  .system-card,
  .roi-card,
  .diag-section {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
    color: #111;
  }

  .h2, .h4, .h5, .body, .body-lg, .body-sm {
    color: #111;
  }
}


/* ═══════════════════════════════════════════
   39 — Reduced motion (acessibilidade)
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .confetti-particle {
    display: none !important;
  }
}


/* ═══════════════════════════════════════════
   40 — Accessibility: focus indicators, skip link, sr-only
═══════════════════════════════════════════ */

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

/* Skip link — visible only on focus */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 99999;
  padding: 12px 24px;
  background: var(--bg-surface);
  color: var(--amber);
  border: 2px solid var(--amber);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 16px;
}

/* Global focus-visible indicators for interactive elements */
.btn:focus-visible,
.btn-icon:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-approve:focus-visible,
.btn-adjust:focus-visible,
.btn-text:focus-visible,
.btn-sm:focus-visible,
.btn-lg:focus-visible,
.filter-tab:focus-visible,
.nav-item:focus-visible,
.quick-action-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.input:focus-visible,
.textarea:focus-visible,
.pin-digit:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
