/* AI Video Production — shared base styles.
   Loaded on every multi-page route. Same look-and-feel as legacy index.html.
   Owner: keep in sync when redesigning. */

:root {
  --bg: #0E0E14;
  --bg-deeper: #08080D;
  --surface-1: #16161F;
  --surface-2: #1F1F2C;
  --surface-3: #252534;
  --surface-hover: #2A2A3A;
  --border: #232330;
  --border-strong: #33334A;
  --text: #F5F5F7;
  --text-dim: #8B8B9C;
  --text-muted: #5A5A6B;
  --accent: #C4FF3E;
  --accent-dim: rgba(196, 255, 62, 0.10);
  --accent-glow: rgba(196, 255, 62, 0.35);
  --warn: #FFB84E;
  --warn-dim: rgba(255, 184, 78, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Manrope', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% -10%, rgba(196, 255, 62, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(80, 100, 200, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.layout { display: flex; height: 100vh; position: relative; z-index: 1; }

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: 244px;
  flex-shrink: 0;
  background: var(--bg-deeper);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0 12px;
}
.brand { padding: 4px 20px 22px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.brand-row { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: linear-gradient(145deg, var(--accent) 0%, #7FCB20 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: 15px;
  color: var(--bg-deeper); letter-spacing: -0.04em;
  box-shadow: 0 0 24px rgba(196, 255, 62, 0.22);
}
.brand-lines { line-height: 1.2; }
.brand-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.brand-owner { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.04em; }

.nav { padding: 0 10px; flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 20px; }
.nav-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-muted); padding: 6px 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px; border-radius: 7px;
  color: var(--text-dim); text-decoration: none;
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all 0.15s ease;
  position: relative; user-select: none;
}
.nav-item .badge {
  margin-left: auto; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-muted);
  background: var(--surface-1);
  padding: 1px 6px; border-radius: 4px; line-height: 1.4;
}
.nav-item svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.6; fill: none; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-1); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-item.active::before {
  content: ''; position: absolute;
  left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--accent); border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav-item.active .badge { background: transparent; color: var(--accent); opacity: 0.6; }

.user-card {
  margin: 0 12px; padding: 11px 12px; border-radius: 9px;
  background: var(--surface-1); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; transition: border-color 0.15s ease;
}
.user-card:hover { border-color: var(--border-strong); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #FF7E5F 0%, #FEB47B 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--bg-deeper); font-weight: 700; font-size: 13px;
  font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -0.02em;
  flex-shrink: 0;
}
.user-meta { min-width: 0; flex: 1; }
.user-name { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.2; }
.user-email {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px;
}

/* ---------- MAIN ---------- */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 44px 40px 56px;
  min-width: 0;
}
.main::-webkit-scrollbar { width: 8px; }
.main::-webkit-scrollbar-track { background: transparent; }
.main::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 4px; }

/* ---------- COMMON UI ---------- */
.page-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--text-muted); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 6px; }
.page-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.page-title .accent { color: var(--accent); }
.page-subtitle { color: var(--text-dim); font-size: 14px; max-width: 760px; margin-bottom: 24px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-1); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn.primary {
  background: var(--accent); color: var(--bg-deeper);
  border-color: var(--accent); font-weight: 600;
}
.btn.primary:hover { background: #B8F02E; }
.btn.ghost { background: transparent; }
.btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ---------- MOBILE ---------- */
.menu-toggle { display: none; }

@media (max-width: 1100px) {
  .main { padding: 32px 24px 40px; }
}

@media (max-width: 768px) {
  html, body { overflow: auto; }
  body { overflow-x: hidden; }
  .layout { z-index: auto; }
  .main { padding: 80px 14px 40px; min-width: 0; max-width: 100vw; box-sizing: border-box; overflow-x: hidden; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 100; transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 244px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    z-index: 99;
  }
  .sidebar-overlay.open { display: block; }
  .menu-toggle {
    display: block;
    position: fixed; top: 14px; left: 14px;
    z-index: 200;
    width: 40px; height: 40px;
    background: var(--surface-1); border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
  }
  .menu-toggle svg { width: 22px; height: 22px; stroke: var(--text); stroke-width: 2; fill: none; }
  .page-title { font-size: 24px; }
}
