/* DS: Xperiun Reports v2 — editorial / executive dashboard
   Inspirado no relatório Consolidado Funis (12-mai-2026) */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Condensed:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Cores */
  --bg-deepest: #0D0C0E;
  --bg-card: #14131A;
  --bg-elevated: #1C1B28;
  --bg-card-hover: rgba(28, 26, 38, 0.85);

  --accent-blue: #4668D4;
  --accent-bright: #5A7FFF;
  --accent-glow: #7099FF;
  --accent-gold: #D4B896;
  --accent-gold-bright: #E8C9A0;
  --accent-gold-deep: #B8955A;

  --text-white: #FFFFFF;
  --text-primary: #F0EFF8;
  --text-secondary: #9DA5C8;
  --text-muted: #6B729A;

  --border-faint: rgba(255, 255, 255, 0.06);
  --border-mid: rgba(255, 255, 255, 0.12);
  --border-gold: rgba(232, 201, 160, 0.35);
  --border-accent: rgba(90, 127, 255, 0.35);

  --green: #3FD1B8;
  --red: #FF6B7A;
  --yellow: #FFC74F;

  /* Fonts */
  --font-display: 'Bebas Neue', sans-serif;
  --font-cond: 'Barlow Condensed', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Layout */
  --container: 1280px;
  --sidebar-w: 260px;
  --nav-h: 56px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;

  /* Gradients */
  --gradient-orb: radial-gradient(ellipse at 38% 52%, #1F2E75 0%, #16205A 12%, #0F143E 28%, #0A0C24 48%, #0D0C0E 70%);
  --gradient-gold: linear-gradient(135deg, #F0DFC0 0%, #D4B896 55%, #B8955A 100%);

  /* Shadow */
  --shadow-elevated: 0 8px 48px rgba(0, 0, 0, 0.7);
  --shadow-glow-gold: 0 0 24px rgba(232, 201, 160, 0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-deepest);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: var(--accent-glow); text-decoration: none; transition: color .2s; }
a:hover { color: var(--text-white); }
strong { color: var(--text-white); font-weight: 600; }
em { color: var(--accent-gold-bright); font-style: normal; }
h1, h2, h3, h4 { font-family: var(--font-cond); font-weight: 700; letter-spacing: .02em; }

/* ============ Gold-grid ambient ============ */
.gold-grid-ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: flex; max-width: 1400px; margin: 0 auto;
  left: var(--sidebar-w); right: 0;
  transition: left .3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.sidebar-collapsed .gold-grid-ambient { left: 0; }
.gold-grid-ambient .col {
  flex: 1; border-left: 1px solid rgba(232, 201, 160, 0.05);
  position: relative; overflow: hidden;
}
.gold-grid-ambient .col:last-child { border-right: 1px solid rgba(232, 201, 160, 0.05); }
.gold-grid-ambient .beam {
  position: absolute; top: 0; left: -1px; width: 1px; height: 260px;
  background: linear-gradient(180deg, transparent 0%, rgba(232, 201, 160, 0.45) 50%, transparent 100%);
  animation: beamFall 14s linear infinite;
}
.gold-grid-ambient .beam.strong {
  background: linear-gradient(180deg, transparent 0%, rgba(232, 201, 160, 0.7) 50%, transparent 100%);
  animation-duration: 18s;
}
@keyframes beamFall {
  0% { transform: translateY(-100%); opacity: 0; }
  5% { opacity: .35; }
  50% { opacity: .9; }
  95% { opacity: .35; }
  100% { transform: translateY(100vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gold-grid-ambient .beam { animation: none !important; opacity: .15 !important; }
}

/* ============ Sidebar lateral ============ */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(10, 9, 16, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-faint);
  display: flex; flex-direction: column;
  z-index: 50;
  overflow-y: auto;
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 22px 20px;
  border-bottom: 1px solid var(--border-faint);
  font-family: var(--font-cond);
  font-weight: 700; font-size: 13px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-gold);
  text-decoration: none;
  flex-shrink: 0;
  transition: color .2s;
}
.sidebar-brand:hover { color: var(--accent-gold-bright); }
.sidebar-brand img { width: 24px; height: auto; opacity: .95; }
.sidebar-brand .sub {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .28em;
  margin-top: 2px;
}

.sidebar-section { padding: 22px 12px 8px; }
.sidebar-section-label {
  font-family: var(--font-cond);
  font-size: 10px; font-weight: 700;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--accent-gold);
  padding: 0 14px 14px;
  display: flex; align-items: center; gap: 8px;
}
.sidebar-section-label::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent-gold); box-shadow: 0 0 6px var(--accent-gold-bright);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all .15s;
  border: 1px solid transparent;
}
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
}
.sidebar-link.active {
  background: rgba(212, 184, 150, 0.08);
  color: var(--accent-gold-bright);
  border-color: var(--border-gold);
}
.sidebar-link.coming-soon {
  opacity: .5;
  pointer-events: none;
  cursor: default;
}
.sidebar-link .icon { font-size: 13px; flex-shrink: 0; opacity: .7; }
.sidebar-link.active .icon { opacity: 1; }

.sidebar-badge {
  margin-left: auto;
  font-family: var(--font-cond);
  font-size: 9px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-faint);
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border-faint);
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar-user {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-logout {
  font-family: var(--font-cond);
  font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  background: none; border: none; padding: 0;
  text-align: left;
  transition: color .2s;
}
.sidebar-logout:hover { color: var(--accent-glow); }

/* Orelhinha — botão de colapsar/expandir */
.sidebar-handle {
  position: fixed;
  top: 50%; left: var(--sidebar-w);
  transform: translate(0, -50%);
  width: 22px; height: 56px;
  background: rgba(20, 19, 26, 0.96);
  border: 1px solid var(--border-faint);
  border-left: none;
  border-radius: 0 8px 8px 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 49;
  color: var(--accent-gold);
  font-size: 13px;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1), background .15s, color .15s;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.25);
}
.sidebar-handle:hover {
  background: rgba(28, 26, 38, 0.98);
  color: var(--accent-gold-bright);
}
body.sidebar-collapsed .sidebar-handle {
  left: 0;
}
.sidebar-handle .arrow {
  display: inline-block;
  transition: transform .3s;
}
body.sidebar-collapsed .sidebar-handle .arrow {
  transform: rotate(180deg);
}

/* ============ Main content ============ */
.main {
  margin-left: var(--sidebar-w);
  position: relative;
  z-index: 2;
  min-height: 100vh;
  transition: margin-left .3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.sidebar-collapsed .main {
  margin-left: 0;
}
.main-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 32px 96px;
}

/* ============ Page header (hero) ============ */
.page-header {
  position: relative;
  margin-bottom: 56px;
  padding: 24px 0 40px;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -40px; left: -200px; right: -200px; bottom: -40px;
  background: var(--gradient-orb);
  opacity: .35;
  z-index: -1;
  filter: blur(40px);
  pointer-events: none;
}

.page-label {
  font-family: var(--font-cond);
  font-size: 11px; font-weight: 700;
  letter-spacing: .38em; text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.page-label::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-gold); box-shadow: 0 0 8px var(--accent-gold-bright);
}
.page-breadcrumb {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--font-cond);
  font-size: 11px; font-weight: 600;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.page-breadcrumb a { color: var(--text-muted); transition: color .2s; }
.page-breadcrumb a:hover { color: var(--accent-gold-bright); }
.page-breadcrumb .sep { opacity: .5; }
.page-breadcrumb .current { color: var(--accent-gold-bright); }

.page-title {
  font-family: var(--font-cond);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700; letter-spacing: .015em;
  text-transform: uppercase;
  color: var(--text-white);
  line-height: 1.02;
  margin-bottom: 16px;
}
.page-title .gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}
.page-lead {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 72ch;
  line-height: 1.7;
}

/* ============ Section divider ============ */
.section-divider {
  display: flex; align-items: center; gap: 20px;
  margin: 56px 0 32px;
  font-family: var(--font-cond);
  font-size: 11px; font-weight: 700;
  letter-spacing: .38em; text-transform: uppercase;
  color: var(--accent-gold);
}
.section-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-gold) 0%, transparent 100%);
}

/* ============ Cards ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.card {
  background: linear-gradient(180deg, rgba(20, 19, 26, 0.85) 0%, rgba(14, 13, 18, 0.85) 100%);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all .25s;
  display: flex; flex-direction: column;
  min-height: 220px;
  position: relative; overflow: hidden;
}
.card.linked {
  cursor: pointer;
  border-color: var(--border-gold);
}
.card.linked::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(90, 127, 255, 0.04) 0%, transparent 60%);
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.card.linked::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-gold); opacity: .55;
}
.card.linked:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold-bright);
  box-shadow: var(--shadow-elevated), var(--shadow-glow-gold);
}
.card.linked:hover::before { opacity: 1; }

.card-num { display: none; }
.card-title {
  font-family: var(--font-cond);
  font-size: 20px; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase;
  color: var(--text-white);
  line-height: 1.18; margin-bottom: 10px;
}
.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1; margin-bottom: 18px;
}

.card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.badge {
  font-family: var(--font-cond);
  font-size: 10px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid;
}
.badge.gold { color: var(--accent-gold-bright); border-color: var(--border-gold); background: rgba(212, 184, 150, 0.08); }
.badge.blue { color: var(--accent-glow); border-color: var(--border-accent); background: rgba(70, 104, 212, 0.08); }
.badge.green { color: var(--green); border-color: rgba(63, 209, 184, 0.35); background: rgba(63, 209, 184, 0.08); }
.badge.muted { color: var(--text-muted); border-color: var(--border-faint); background: rgba(255, 255, 255, 0.03); }

.card-footer, .card-cta { display: none; }

/* ============ Info box ============ */
.info {
  background: rgba(20, 19, 26, 0.6);
  border: 1px solid var(--border-faint);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin: 48px 0 0;
}
.info-label {
  font-family: var(--font-cond);
  font-size: 11px; font-weight: 700;
  letter-spacing: .35em; text-transform: uppercase;
  color: var(--accent-gold); margin-bottom: 12px;
}
.info p {
  color: var(--text-secondary);
  margin-bottom: 10px;
  max-width: 80ch;
  font-size: 14px;
  line-height: 1.7;
}
.info p:last-child { margin-bottom: 0; }

/* ============ Empty state ============ */
.empty {
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-md);
  padding: 72px 32px;
  text-align: center;
  color: var(--text-muted);
  background: rgba(20, 19, 26, 0.3);
}
.empty-title {
  font-family: var(--font-cond);
  font-size: 18px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.empty p { font-size: 14px; max-width: 60ch; margin: 0 auto; }

.empty.empty-compact {
  padding: 28px 28px;
  text-align: left;
}
.empty.empty-compact p { margin: 0; max-width: none; font-size: 13px; color: var(--text-muted); }

/* ============ Mobile ============ */
@media (max-width: 900px) {
  /* Sidebar começa fechada em mobile */
  body:not(.sidebar-collapsed) .sidebar { box-shadow: 8px 0 32px rgba(0, 0, 0, 0.6); }
  .main { margin-left: 0 !important; }
  .gold-grid-ambient { left: 0 !important; }

  .main-inner { padding: 40px 20px 64px; }
  .page-header { margin-bottom: 36px; padding: 12px 0 24px; }
  .page-title { font-size: clamp(32px, 8vw, 44px); }
  .card-grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 22px; min-height: 180px; }
  .info { padding: 22px 24px; margin-top: 32px; }
}
