/* =========================================================
   Phersei — Stile dark-luxury (oro su antracite)
   Palette e font coerenti con il branding Phersei.
   Tutti i nomi-classe storici sono conservati: i template
   restano invariati nella struttura, cambia solo la pelle.
   ========================================================= */

:root {
  /* Palette Phersei ufficiale */
  --bg:    #13161c;   /* antracite */
  --bg2:   #0e1116;   /* antracite scuro */
  --card:  #1b1f28;   /* grafite */
  --card2: #20252f;   /* grafite chiara */
  --gold:  #c8954c;   /* oro/bronzo */
  --gold2: #e3bd78;   /* oro chiaro */
  --light: #f3eee4;   /* avorio */
  --muted: #8c93a0;   /* grigio testo secondario */
  --line:  #2c323d;   /* bordo sottile */

  /* Alias semantici: gli stessi nomi usati prima dai template,
     rimappati sulla palette dark-luxury per non toccare l'HTML. */
  --navy:    var(--card);     /* ex blu istituzionale → grafite */
  --blue:    var(--gold2);    /* link */
  --blue-l:  var(--gold);     /* accento/CTA */
  --white:   var(--light);    /* "bianco" → avorio */
  --gray-50:  #181c24;
  --gray-100: #1f242e;
  --gray-200: var(--line);
  --gray-600: var(--muted);
  --gray-700: #c3c8d1;
  --gray-900: var(--bg2);

  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.30);
  --shadow-md: 0 10px 30px -8px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.40);
}

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

body {
  font-family: 'Jost', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-700);
  background:
    radial-gradient(1200px 600px at 50% -10%, #1c222c 0%, var(--bg) 55%, var(--bg2) 100%) fixed;
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--gold2); }

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: rgba(200,149,76,.10);
  color: var(--gold2);
  padding: .08em .35em;
  border-radius: 5px;
  font-size: .92em;
}

/* ---- Utility ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

/* =========================================================
   Lockup brand: Phersei · <NomeProdotto>
   La parte [data-brand] viene riscritta dal selettore JS.
   ========================================================= */
.brand-lockup { display: inline-flex; align-items: baseline; gap: .42rem; }
.brand-house {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  letter-spacing: .5px;
}
.brand-sep { color: var(--gold); opacity: .8; font-weight: 400; }
[data-brand] {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--gold2);
}

/* =========================================================
   Selettore nome prodotto (pill nella navbar)
   ========================================================= */
.brand-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-switch label {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.brand-switch select {
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(180deg, var(--card2), var(--card));
  color: var(--gold2);
  font-family: 'Cormorant Garamond', serif;
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .4px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 6px 32px 6px 16px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  background-image:
    linear-gradient(180deg, var(--card2), var(--card)),
    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='%23e3bd78' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 12px center;
  background-size: auto, 12px;
}
.brand-switch select:hover { border-color: var(--gold2); }
.brand-switch select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(200,149,76,.25);
}
.brand-switch select option {
  background: var(--card);
  color: var(--light);
}

/* ---- Navbar ---- */
.navbar {
  background: rgba(14,17,22,.92);
  backdrop-filter: blur(8px);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
}
.navbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--light);
  font-weight: 600;
  font-size: 1.18rem;
  text-decoration: none;
}
.navbar-brand:hover { text-decoration: none; color: var(--light); }
.navbar-brand svg { color: var(--gold); flex-shrink: 0; }
.brand-badge {
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: var(--bg2);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  align-self: center;
  font-family: 'Jost', sans-serif;
}
.navbar-nav { display: flex; align-items: center; gap: 6px; list-style: none; }
.navbar-nav a {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 400;
  padding: 7px 13px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.navbar-nav a:hover, .navbar-nav a.active {
  background: rgba(200,149,76,.10);
  color: var(--gold2);
  text-decoration: none;
}
.navbar-nav a.nav-cta {
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: var(--bg2);
  font-weight: 600;
}
.navbar-nav a.nav-cta:hover { filter: brightness(1.06); color: var(--bg2); }
.navbar-nav a.nav-cta-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--light);
  font-weight: 500;
}
.navbar-nav a.nav-cta-ghost:hover { background: rgba(255,255,255,.05); color: var(--gold2); }

/* ---- Hero ---- */
.hero {
  background:
    radial-gradient(900px 480px at 50% -20%, #1d2531 0%, var(--bg) 60%, var(--bg2) 100%);
  color: var(--light);
  padding: 110px 24px 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(200,149,76,.10), transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.12;
  margin-bottom: 22px;
  color: var(--light);
}
.hero h1 span { color: var(--gold2); }
.hero-lead {
  font-size: 1.12rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 660px;
  margin: 0 auto 38px;
  line-height: 1.7;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  font-family: 'Jost', sans-serif;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: var(--bg2);
  border: none;
  box-shadow: 0 6px 20px -8px rgba(200,149,76,.6);
}
.btn-primary:hover { filter: brightness(1.06); text-decoration: none; color: var(--bg2); }
.btn-outline {
  background: transparent;
  color: var(--light);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover {
  background: rgba(200,149,76,.10);
  text-decoration: none;
  color: var(--gold2);
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-disclaimer {
  font-size: .78rem;
  color: var(--muted);
  opacity: .8;
  margin-top: 22px;
}

/* ---- Trust bar ---- */
.trust-bar {
  background: var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
}
.trust-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--gray-700);
  font-weight: 400;
}
.trust-item svg { color: var(--gold); flex-shrink: 0; }

/* ---- Sezioni generiche ---- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 16px;
  letter-spacing: .5px;
}
.section-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto 56px;
}

/* ---- Feature grid ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.feature-card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 28px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  text-align: left;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #3a414e; }
.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(200,149,76,.10);
  border: 1px solid rgba(200,149,76,.30);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-icon svg { color: var(--gold2); }
.feature-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; font-weight: 600; color: var(--light); margin-bottom: 8px; letter-spacing: .3px;
}
.feature-card p { font-size: .9rem; color: var(--muted); font-weight: 300; }

/* ---- How it works ---- */
.steps { counter-reset: steps; display: flex; flex-direction: column; gap: 20px; max-width: 760px; margin: 0 auto; }
.step {
  counter-increment: steps;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: left;
}
.step-num {
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: var(--bg2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .98rem;
}
.step-num::before { content: counter(steps); }
.step-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem; font-weight: 600; color: var(--light); margin-bottom: 4px; letter-spacing: .3px;
}
.step-body p { font-size: .9rem; color: var(--muted); font-weight: 300; }

/* ---- CTA section ---- */
.cta-section {
  background:
    radial-gradient(700px 320px at 50% 120%, rgba(200,149,76,.14), transparent 70%),
    var(--bg2);
  color: var(--light);
  padding: 84px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.cta-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem; font-weight: 700; margin-bottom: 16px; letter-spacing: .5px;
}
.cta-section p { font-size: 1.05rem; color: var(--muted); font-weight: 300; margin-bottom: 32px; }

/* ---- Footer ---- */
footer {
  background: var(--bg2);
  color: var(--muted);
  padding: 52px 24px 26px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600; color: var(--light); font-size: 1.2rem; margin-bottom: 10px; letter-spacing: .4px;
}
.footer-desc { font-size: .85rem; line-height: 1.6; font-weight: 300; }
.footer-col h4 { color: var(--gold2); font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: var(--muted); font-size: .88rem; }
.footer-col ul a:hover { color: var(--gold2); text-decoration: none; }
.footer-divider { border: none; border-top: 1px solid var(--line); margin-bottom: 24px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .82rem; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--muted); }
.footer-bottom-links a:hover { color: var(--gold2); text-decoration: none; }

/* ---- Pagine legali ---- */
.legal-page { padding: 56px 0 80px; }
.legal-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  padding: 52px 24px;
  margin-bottom: 48px;
}
.legal-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem; font-weight: 700; color: var(--light); margin-bottom: 8px; letter-spacing: .5px;
}
.legal-header .subtitle { color: var(--muted); font-weight: 300; }
.legal-content { max-width: 780px; margin: 0 auto; }
.legal-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--light);
  margin: 2rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--line);
  letter-spacing: .3px;
}
.legal-content h3 { font-size: 1.05rem; font-weight: 600; color: var(--gold2); margin: 1.5rem 0 .5rem; }
.legal-content p { margin-bottom: 1rem; font-size: .95rem; font-weight: 300; color: var(--gray-700); }
.legal-content ul, .legal-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-content li { font-size: .95rem; margin-bottom: .4rem; font-weight: 300; color: var(--gray-700); }
.legal-content strong { color: var(--light); font-weight: 500; }
.legal-box {
  background: rgba(200,149,76,.07);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 1.5rem 0;
  font-size: .9rem;
}
.legal-box strong { color: var(--gold2); }
.legal-contact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 2rem;
  font-size: .9rem;
}
.legal-contact strong { color: var(--gold2); display: block; margin-bottom: 4px; }

/* ---- Data deletion status ---- */
.status-card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  max-width: 560px;
  margin: 32px auto 0;
  box-shadow: var(--shadow);
}
.status-card h1, .status-card h2 { font-family: 'Cormorant Garamond', serif; letter-spacing: .3px; }
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  background: rgba(227,189,120,.15);
  color: var(--gold2);
}
.status-badge.done { background: rgba(120,200,150,.15); color: #8fd6a6; }

/* ---- Dashboard ---- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.kpi-card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-card-alert { border-color: rgba(216,164,143,.45); background: linear-gradient(180deg, #271f24, var(--card)); }
.kpi-label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.kpi-value { font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; font-weight: 700; color: var(--gold2); line-height: 1.1; }
.kpi-card-alert .kpi-value { color: #e2937e; }
.kpi-meta { font-size: .8rem; color: var(--muted); font-weight: 300; }

.dash-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
.dash-panel {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.dash-panel-title { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; color: var(--light); margin-bottom: 4px; letter-spacing: .3px; }
.dash-panel-sub { font-size: .85rem; color: var(--muted); font-weight: 300; margin-bottom: 24px; }

/* Grafico severità (barre CSS) */
.sev-chart { display: flex; flex-direction: column; gap: 14px; }
.sev-row { display: grid; grid-template-columns: 130px 1fr 90px; align-items: center; gap: 12px; }
.sev-name { font-size: .82rem; color: var(--gray-700); font-weight: 400; }
.sev-track { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; height: 22px; overflow: hidden; }
.sev-bar { height: 100%; border-radius: 6px; min-width: 2px; transition: width .4s ease; }
.sev-count { font-size: .82rem; color: var(--gray-700); font-weight: 600; text-align: right; }
.sev-pct { color: var(--muted); font-weight: 400; }
.dash-footnote { font-size: .75rem; color: var(--muted); margin-top: 18px; font-style: italic; }

/* Lista pagine */
.page-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.page-item { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.015); }
.page-avatar {
  width: 40px; height: 40px; min-width: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold2), var(--gold)); color: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.page-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.page-name { font-weight: 600; color: var(--light); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-id { font-size: .75rem; color: var(--muted); }
.page-status { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: #8fd6a6; font-weight: 600; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,.6); }
.page-empty { color: var(--muted); font-size: .9rem; padding: 12px; }

.dash-mock-note {
  display: flex; align-items: center; gap: 10px;
  margin-top: 28px; padding: 14px 18px;
  background: rgba(200,149,76,.07); border: 1px solid rgba(200,149,76,.25); border-radius: 12px;
  font-size: .85rem; color: var(--gold2);
}
.dash-mock-note svg { flex-shrink: 0; color: var(--gold); }
.dash-mock-note strong { color: var(--light); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .navbar-nav { display: none; }
  .navbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .brand-switch label { display: none; }
}
@media (max-width: 768px) {
  .dash-cols { grid-template-columns: 1fr; }
  .sev-row { grid-template-columns: 110px 1fr 70px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .trust-bar-inner { gap: 20px; justify-content: flex-start; }
  .hero { padding: 80px 20px 64px; }
}

/* =============================================================
   Egida — Interfaccia investigativa (hersei-inspired layout)
   Sidebar dark + contenuto chiaro + accento arancio
   ============================================================= */

:root {
  --eg-sidebar-w: 220px;
  --eg-orange:   #F06235;
  --eg-orange-d: #D9532A;
  --eg-sidebar-bg: #111827;
  --eg-sidebar-text: #9CA3AF;
  --eg-content-bg: #F4F5F7;
  --eg-card-bg:  #FFFFFF;
  --eg-border:   #E5E7EB;
  --eg-text:     #111827;
  --eg-muted:    #6B7280;
}

body.egida-page { background: var(--eg-content-bg); }

.eg-shell { display: flex; min-height: 100vh; background: var(--eg-content-bg); }

/* ── Sidebar ─────────────────────────────────── */
.eg-sidebar {
  width: var(--eg-sidebar-w); min-width: var(--eg-sidebar-w);
  min-height: 100vh;
  position: fixed; left: 0; top: 0; bottom: 0;
  background: var(--eg-sidebar-bg);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.06);
  overflow-y: auto; overflow-x: hidden;
  z-index: 100;
}
.eg-main { margin-left: var(--eg-sidebar-w); flex: 1; min-height: 100vh; background: var(--eg-content-bg); display: flex; flex-direction: column; }

.eg-sb-brand { display:flex; align-items:center; gap:10px; padding:18px 16px 14px; border-bottom:1px solid rgba(255,255,255,.07); }
.eg-sb-brand-icon { width:32px; height:32px; background:rgba(240,98,53,.18); border-radius:8px; display:flex; align-items:center; justify-content:center; color:var(--eg-orange); flex-shrink:0; }
.eg-sb-brand strong { display:block; color:#F9FAFB; font-size:.92rem; font-family:'Cormorant Garamond',serif; font-weight:700; line-height:1; }
.eg-sb-brand small  { font-size:.55rem; letter-spacing:.1em; color:#4B5563; text-transform:uppercase; font-weight:500; }

.eg-sb-user { display:flex; align-items:center; gap:9px; padding:12px 14px; border-bottom:1px solid rgba(255,255,255,.06); }
.eg-sb-av   { width:30px; height:30px; border-radius:50%; background:var(--eg-orange); color:#fff; font-size:.78rem; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.eg-sb-user strong { display:block; color:#F9FAFB; font-size:.8rem; font-weight:600; line-height:1; }
.eg-sb-user small  { color:#6B7280; font-size:.68rem; }

.eg-nav { flex:1; padding:8px 8px 4px; }
.eg-nav-section { font-size:.58rem; font-weight:700; letter-spacing:.13em; color:#374151; text-transform:uppercase; padding:10px 8px 4px; }
.eg-nav-item {
  display:flex; align-items:center; gap:8px;
  padding:7px 10px; border-radius:6px;
  color:var(--eg-sidebar-text); font-size:.82rem; font-weight:400;
  text-decoration:none; transition:background .12s, color .12s;
  margin-bottom:1px; border-left:2px solid transparent; white-space:nowrap;
}
.eg-nav-item svg { flex-shrink:0; opacity:.7; }
.eg-nav-item:hover { background:rgba(255,255,255,.05); color:#E5E7EB; text-decoration:none; }
.eg-nav-item.active { background:rgba(240,98,53,.12); color:var(--eg-orange); border-left-color:var(--eg-orange); font-weight:500; }
.eg-nav-item.active svg { opacity:1; }

.eg-case-chip { display:flex; align-items:center; gap:6px; padding:4px 10px 8px; font-size:.74rem; color:#6B7280; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.eg-case-chip svg { flex-shrink:0; opacity:.6; }
.eg-sb-footer { padding:8px 8px 12px; border-top:1px solid rgba(255,255,255,.06); }

/* ── Top bar ─────────────────────────────────── */
.eg-topbar { background:var(--eg-card-bg); border-bottom:1px solid var(--eg-border); padding:12px 24px; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; position:sticky; top:0; z-index:10; }
.eg-breadcrumb { display:flex; align-items:center; gap:5px; font-size:.8rem; color:var(--eg-muted); }
.eg-breadcrumb a { color:var(--eg-muted); text-decoration:none; }
.eg-breadcrumb a:hover { color:var(--eg-orange); }
.eg-sep { opacity:.4; }
.eg-breadcrumb strong { color:var(--eg-text); font-weight:500; }
.eg-topbar-actions { display:flex; gap:8px; }

/* ── Content ─────────────────────────────────── */
.eg-content { padding:22px 24px 60px; flex:1; }
.eg-page-hd { margin-bottom:20px; }
.eg-page-title { font-size:1.45rem; font-weight:700; color:var(--eg-text); font-family:'Cormorant Garamond',serif; letter-spacing:.2px; }
.eg-page-sub   { font-size:.83rem; color:var(--eg-muted); margin-top:2px; }

/* ── Buttons ─────────────────────────────────── */
.eg-btn { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius:7px; font-size:.82rem; font-weight:500; cursor:pointer; text-decoration:none; font-family:'Jost',sans-serif; border:1px solid transparent; transition:all .13s; white-space:nowrap; }
.eg-btn:hover { text-decoration:none; }
.eg-btn-primary   { background:var(--eg-orange);  color:#fff; border-color:var(--eg-orange); }
.eg-btn-primary:hover { background:var(--eg-orange-d); color:#fff; border-color:var(--eg-orange-d); }
.eg-btn-secondary { background:#fff; color:var(--eg-text); border-color:var(--eg-border); }
.eg-btn-secondary:hover { background:#F9FAFB; color:var(--eg-text); }
.eg-btn-ghost  { background:transparent; color:var(--eg-muted); border-color:transparent; }
.eg-btn-ghost:hover  { background:#F3F4F6; color:var(--eg-text); }
.eg-btn-danger { background:#FEF2F2; color:#DC2626; border-color:#FECACA; }
.eg-btn-danger:hover { background:#FEE2E2; }

/* ── KPI pills ───────────────────────────────── */
.eg-kpi-strip { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.eg-kpi-pill { background:var(--eg-card-bg); border:1px solid var(--eg-border); border-radius:10px; padding:14px 18px; min-width:120px; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.eg-kpi-pill strong { display:block; font-size:1.75rem; font-weight:700; line-height:1; color:var(--eg-text); font-family:'Cormorant Garamond',serif; }
.eg-kpi-pill span   { font-size:.68rem; color:var(--eg-muted); letter-spacing:.05em; text-transform:uppercase; }
.eg-kpi-pill.alert  { border-color:var(--eg-orange); }
.eg-kpi-pill.alert strong { color:var(--eg-orange); }

/* ── Score badge ─────────────────────────────── */
.eg-score { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:7px; font-weight:700; font-size:.88rem; font-family:'Cormorant Garamond',serif; }
.eg-score.high { background:#FEE2E2; color:#DC2626; }
.eg-score.mid  { background:#FEF3C7; color:#D97706; }
.eg-score.low  { background:#F3F4F6; color:#9CA3AF; }

/* ── Filter tabs ─────────────────────────────── */
.eg-filter-bar { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
.eg-ftab { background:#fff; border:1px solid var(--eg-border); border-radius:999px; padding:5px 13px; font-size:.78rem; cursor:pointer; color:var(--eg-muted); font-family:'Jost',sans-serif; transition:all .12s; }
.eg-ftab.active, .eg-ftab:hover { background:var(--eg-orange); border-color:var(--eg-orange); color:#fff; }

/* ── Card / Table ────────────────────────────── */
.eg-card { background:var(--eg-card-bg); border:1px solid var(--eg-border); border-radius:10px; box-shadow:0 1px 2px rgba(0,0,0,.05); }
.eg-card-header { padding:14px 18px; border-bottom:1px solid var(--eg-border); display:flex; align-items:center; justify-content:space-between; }
.eg-card-header h3 { font-size:.88rem; font-weight:600; color:var(--eg-text); margin:0; }

.eg-table { width:100%; border-collapse:collapse; font-size:.855rem; }
.eg-table th { background:#F9FAFB; padding:9px 14px; text-align:left; font-size:.68rem; letter-spacing:.08em; color:var(--eg-muted); font-weight:600; border-bottom:1px solid var(--eg-border); text-transform:uppercase; white-space:nowrap; }
.eg-table td { padding:11px 14px; border-bottom:1px solid #F3F4F6; color:var(--eg-text); vertical-align:middle; }
.eg-table tr:last-child td { border-bottom:none; }
.eg-table tr.hidden { display:none; }
.eg-table tr:hover td { background:#FAFAFA; }

/* ── Status badges ───────────────────────────── */
.eg-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 8px; border-radius:999px; font-size:.71rem; font-weight:600; }
.eg-badge-new    { background:#EFF6FF; color:#3B82F6; }
.eg-badge-active { background:#DCFCE7; color:#16A34A; }
.eg-badge-closed { background:#F3F4F6; color:#6B7280; }
.eg-badge-high   { background:#FEE2E2; color:#DC2626; }
.eg-badge-ready  { background:#EEF2FF; color:#6366F1; }

/* ── Avatar ──────────────────────────────────── */
.eg-avatar { width:32px; height:32px; border-radius:7px; background:#F3F4F6; border:1px solid var(--eg-border); display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:.82rem; color:var(--eg-muted); overflow:hidden; flex-shrink:0; }
.eg-avatar img { width:100%; height:100%; object-fit:cover; }

/* ── Search ──────────────────────────────────── */
.eg-search-wrap { position:relative; margin-bottom:12px; }
.eg-search-wrap input { width:100%; padding:8px 12px 8px 34px; background:#fff; border:1px solid var(--eg-border); border-radius:8px; color:var(--eg-text); font-size:.855rem; font-family:'Jost',sans-serif; box-sizing:border-box; }
.eg-search-wrap input:focus { outline:none; border-color:var(--eg-orange); box-shadow:0 0 0 3px rgba(240,98,53,.1); }
.eg-search-wrap svg { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:#9CA3AF; pointer-events:none; }

/* ── Form fields ─────────────────────────────── */
.eg-fld { display:block; margin-bottom:14px; }
.eg-fld label { display:block; font-size:.8rem; font-weight:600; color:var(--eg-text); margin-bottom:4px; }
.eg-fld input, .eg-fld textarea { width:100%; padding:9px 12px; background:#fff; border:1px solid var(--eg-border); border-radius:8px; color:var(--eg-text); font-size:.88rem; font-family:'Jost',sans-serif; }
.eg-fld input:focus, .eg-fld textarea:focus { outline:none; border-color:var(--eg-orange); box-shadow:0 0 0 3px rgba(240,98,53,.1); }
.eg-fld small { color:var(--eg-muted); font-size:.74rem; margin-top:3px; display:block; }

/* ── Add panel (collapsible) ─────────────────── */
.eg-add-panel { margin-bottom:14px; }
.eg-add-toggle { display:flex; justify-content:space-between; align-items:center; cursor:pointer; user-select:none; padding:12px 16px; }
.eg-add-toggle h3 { font-size:.84rem; font-weight:600; color:var(--eg-text); margin:0; }
.eg-add-body { display:none; padding:0 16px 16px; }
.eg-add-body.open { display:grid; grid-template-columns:1fr 1fr; gap:10px 18px; }
.eg-add-full { grid-column:1/-1; }

/* ── Action buttons ──────────────────────────── */
.eg-action-btns { display:flex; gap:5px; }
.eg-action-btn { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:6px; border:1px solid var(--eg-border); background:#fff; color:var(--eg-muted); cursor:pointer; text-decoration:none; font-size:.82rem; transition:all .12s; }
.eg-action-btn:hover { background:#F3F4F6; color:var(--eg-text); text-decoration:none; }
.eg-action-btn.danger { border-color:#FECACA; color:#EF4444; }
.eg-action-btn.danger:hover { background:#FEF2F2; }

/* ── Empty state ─────────────────────────────── */
.eg-empty { text-align:center; padding:48px 24px; color:var(--eg-muted); }
.eg-empty svg { margin-bottom:12px; opacity:.3; }

/* ── Costs page ──────────────────────────────── */
.eg-section-title { font-size:1rem; font-weight:700; color:var(--eg-text); margin:0 0 12px; display:flex; align-items:baseline; gap:10px; }
.eg-section-title span { font-size:.75rem; font-weight:400; color:var(--eg-muted); }
.eg-note-box { border-left:3px solid var(--eg-orange); background:rgba(240,98,53,.06); border-radius:0 8px 8px 0; padding:12px 16px; font-size:.84rem; color:var(--eg-text); margin-bottom:18px; line-height:1.55; }
.eg-note-box strong { color:var(--eg-orange); }
.eg-note-box.red { border-color:#DC2626; background:rgba(220,38,38,.05); }
.eg-note-box.red strong { color:#DC2626; }

.eg-gdpr-ok   { color:#16A34A; font-weight:600; font-size:.8rem; }
.eg-gdpr-warn { color:#DC2626; font-weight:600; font-size:.8rem; }

.eg-cost-tag { display:inline-block; padding:2px 8px; border-radius:5px; font-size:.73rem; font-weight:600; }
.eg-cost-cheap    { background:#DCFCE7; color:#16A34A; }
.eg-cost-moderate { background:#FEF9C3; color:#A16207; }
.eg-cost-expensive{ background:#FEE2E2; color:#DC2626; }

.eg-status-active  { display:inline-flex; align-items:center; gap:4px; color:#16A34A; font-size:.78rem; font-weight:600; }
.eg-status-ready   { display:inline-flex; align-items:center; gap:4px; color:#6366F1; font-size:.78rem; font-weight:600; }
.eg-status-off     { display:inline-flex; align-items:center; gap:4px; color:#9CA3AF; font-size:.78rem; font-weight:500; }
.eg-status-blocked { display:inline-flex; align-items:center; gap:4px; color:#DC2626; font-size:.78rem; font-weight:600; }
.eg-dot { width:6px; height:6px; border-radius:50%; background:currentColor; display:inline-block; flex-shrink:0; }

/* ── Profile cell ────────────────────────────── */
.eg-profile-name { font-weight:500; color:var(--eg-text); }
.eg-profile-url  { color:var(--eg-orange); text-decoration:none; font-size:.78rem; word-break:break-all; }
.eg-profile-url:hover { text-decoration:underline; }
.eg-agent-note   { font-size:.73rem; color:var(--eg-muted); margin-top:2px; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 880px) {
  .eg-sidebar { transform: translateX(-100%); }
  .eg-main    { margin-left: 0; }
  .eg-add-body.open { grid-template-columns: 1fr; }
}
