/* ============================================================
   EVENTIPO — Event Operating System
   Design tokens: graphite base, metallic gold, executive type
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Base surfaces — deep graphite */
  --bg-void:      #0a0b0e;
  --bg-base:      #0e0f13;
  --bg-surface:   #14161b;
  --bg-raised:    #191c22;
  --bg-hover:     #1f232b;
  --bg-inset:     #0b0c0f;

  /* Hairlines & borders */
  --line:         #23262e;
  --line-soft:    #1a1d23;
  --line-strong:  #303542;

  /* Text */
  --ink:          #f1f1ee;
  --ink-2:        #b9bbc2;
  --ink-3:        #80838c;
  --ink-4:        #565963;

  /* Metallic gold */
  --gold:         oklch(0.78 0.085 85);
  --gold-bright:  oklch(0.88 0.09 88);
  --gold-deep:    oklch(0.62 0.075 78);
  --gold-glow:    oklch(0.78 0.085 85 / 0.14);
  --gold-line:    oklch(0.78 0.085 85 / 0.28);

  /* Functional accents (kept low-chroma, executive) */
  --pos:          oklch(0.74 0.07 155);
  --neg:          oklch(0.66 0.10 28);
  --info:         oklch(0.72 0.05 240);

  /* Type */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Helvetica Neue', Helvetica, 'Segoe UI', Arial, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Metrics */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sidebar-w: 256px;
  --topbar-h: 64px;

  --shadow-md: 0 8px 30px -12px rgba(0,0,0,0.7);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,0.8);
}

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

html, body {
  height: 100%;
  background: var(--bg-void);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { height: 100%; }

::selection { background: var(--gold-line); color: var(--ink); }

/* Scrollbars */
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #23262e; border-radius: 99px; border: 2px solid var(--bg-base); }
*::-webkit-scrollbar-thumb:hover { background: #303542; }

/* ---- Typography helpers ---- */
.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.gold-text { color: var(--gold); }

/* Gold sheen used sparingly on key numerals / marks */
.gold-sheen {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 42%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold);
}

/* ---- App layout ---- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100%;
  background: var(--bg-base);
}

.main {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(198,165,80,0.035) 0%, transparent 45%),
    var(--bg-base);
}

.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 48px 96px;
}

/* ---- Generic surfaces ---- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.hairline { height: 1px; background: var(--line); border: 0; }

/* ---- Buttons ---- */
.btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--ink);
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: #3a4150; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #1a1505;
  border: 1px solid var(--gold-bright);
  font-weight: 600;
}
.btn-gold:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--gold-bright), var(--gold)); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-raised); color: var(--ink); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }

/* ---- Pills / badges ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--ink-3);
  background: var(--bg-inset);
}
.pill .dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.pill-gold  { color: var(--gold); border-color: var(--gold-line); background: var(--gold-glow); }
.pill-pos   { color: var(--pos); border-color: oklch(0.74 0.07 155 / 0.3); }
.pill-neg   { color: var(--neg); border-color: oklch(0.66 0.10 28 / 0.3); }
.pill-info  { color: var(--info); border-color: oklch(0.72 0.05 240 / 0.3); }

/* ---- Focus ---- */
:focus-visible { outline: 1px solid var(--gold-line); outline-offset: 2px; }

/* utility */
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.muted { color: var(--ink-3); }
.tnum { font-variant-numeric: tabular-nums; }

/* fade-in on view switch — transform-only so content stays visible
   even if the animation clock is frozen (backgrounded iframe / reduced motion) */
@keyframes riseIn {
  from { transform: translateY(10px); }
  to   { transform: translateY(0); }
}
.rise { animation: riseIn .42s cubic-bezier(.2,.7,.3,1) both; }

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: var(--bg-void);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 14px 14px;
  overflow-y: auto;
}
.sidebar-logo { padding: 6px 8px 22px; }

.nav-section { margin-bottom: 22px; }
.nav-heading {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 0 10px 9px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 13.5px;
  cursor: pointer;
  transition: all .14s ease;
  position: relative;
}
.nav-item:hover { color: var(--ink); background: var(--bg-surface); }
.nav-item[data-active="true"] {
  color: var(--ink);
  background: var(--bg-surface);
  border-color: var(--line);
}
.nav-item[data-active="true"] .nav-ic { color: var(--gold); }
.nav-item[data-active="true"]::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 18px; background: var(--gold); border-radius: 0 2px 2px 0;
}
.nav-ic { display: flex; color: var(--ink-4); transition: color .14s; }
.nav-item:hover .nav-ic { color: var(--ink-2); }
.nav-label { flex: 1; text-align: left; }
.nav-item[data-gold="true"] .nav-ic { color: var(--gold); }
.nav-spark { color: var(--gold); opacity: .8; }

.sidebar-foot { margin-top: auto; padding-top: 10px; }
.ev-mini {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all .14s;
}
.ev-mini:hover { background: var(--bg-surface); }
.ev-mini[data-active="true"] { background: var(--bg-surface); border-color: var(--line); }
.ev-mini-bar { width: 3px; height: 26px; border-radius: 2px; flex-shrink: 0; }
.ev-mini-name { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-mini:hover .ev-mini-name { color: var(--ink); }
.ev-mini-meta { font-size: 9.5px; color: var(--ink-4); letter-spacing: 0.04em; }

.sidebar-user {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 11px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--bg-hover), var(--bg-raised));
  border: 1px solid var(--gold-line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: 0.04em;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(14,15,19,0.7);
  backdrop-filter: blur(10px);
}
.topbar-title { font-size: 21px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.topbar-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 1120px) {
  .topbar-search span { display: none; }
  .topbar-search { min-width: 0; padding: 0 11px; }
}
@media (max-width: 940px) {
  .topbar-search { display: none; }
}

.topbar-search {
  display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 12px 0 13px;
  min-width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-4);
  font-family: var(--sans); font-size: 12.5px;
  cursor: pointer; transition: all .14s;
}
.topbar-search:hover { border-color: var(--line-strong); color: var(--ink-3); }
.topbar-search span { flex: 1; text-align: left; }
.topbar-search kbd {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: var(--bg-inset); border: 1px solid var(--line); color: var(--ink-4);
}

.icon-btn {
  position: relative; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--ink-2); cursor: pointer; transition: all .14s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--ink); }
.dot-badge {
  position: absolute; top: 9px; right: 10px; width: 6px; height: 6px;
  background: var(--gold); border-radius: 99px; border: 1.5px solid var(--bg-surface);
}

/* Language toggle */
.lang-toggle { display: inline-flex; background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.lang-toggle button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  padding: 5px 10px; border-radius: 4px; border: 0; background: transparent;
  color: var(--ink-3); cursor: pointer; transition: all .14s;
}
.lang-toggle button:hover { color: var(--ink); }
.lang-toggle button[data-active="true"] { background: var(--gold-glow); color: var(--gold); }
