/* studio-nav.css — unified Hapalops Studio chrome.
   Design tokens extracted from index.html (gold + dark, Playfair + DM Sans).
   Used by every page in the Studio so the nav, colors, typography are consistent. */

:root {
  --bg:           #0d0d0d;
  --bg-2:         #0a0a0a;
  --surface:      #161616;
  --surface-elev: #1a1a1a;
  --panel:        #1c1c1c;
  --panel-2:      #1f1f1f;
  --border:       #272727;
  --border-2:     #333;
  --gold:         #C9A84C;
  --gold-bright:  #E5C166;
  --gold-dim:     #a88838;
  --gold-glow:    rgba(201,168,76,0.18);
  --gold-subtle:  rgba(201,168,76,0.08);
  --gold-border:  rgba(201,168,76,0.35);
  --coral:        #E07A5F;
  --coral-subtle: rgba(224,122,95,0.10);
  --coral-border: rgba(224,122,95,0.35);
  --text:         #f0ece4;
  --text-2:       #8a8078;
  --text-3:       #4a4540;
  --white:        #ffffff;
  --red:          #e17055;
  --green:        #00b894;
  --orange:       #fdcb6e;
  --blue:         #74b9ff;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    22px;
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', 'DM Sans', serif; font-weight: 600; line-height: 1.2; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ── Top nav ── */
#studio-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: 'DM Sans', sans-serif;
}

#studio-nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

#studio-nav .brand-mark {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#studio-nav .brand-mark svg { width: 100%; height: 100%; display: block; }

#studio-nav .brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

#studio-nav .brand-name em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}

#studio-nav .nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  margin: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
#studio-nav .nav-tabs::-webkit-scrollbar { display: none; }

#studio-nav .nav-tab {
  position: relative;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}
#studio-nav .nav-tab:hover { color: var(--text); background: var(--surface); }
#studio-nav .nav-tab.active {
  background: var(--gold-subtle);
  color: var(--gold);
  font-weight: 600;
}
#studio-nav .nav-tab .ext {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.5;
  font-size: 10px;
  vertical-align: top;
  transform: translateY(2px);
}

#studio-nav .right-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

#studio-nav .user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text);
}

#studio-nav .user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: #0d0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

#studio-nav .logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
#studio-nav .logout-btn:hover {
  color: var(--text);
  border-color: var(--gold-border);
}

/* ── Reusable component styles for page bodies ── */
.studio-page { padding: 28px 32px 80px; max-width: 1400px; margin: 0 auto; }
.studio-page h1 { font-size: 28px; margin-bottom: 4px; letter-spacing: -0.01em; }
.studio-page .subtitle { color: var(--text-2); font-size: 13.5px; margin-bottom: 22px; }

.studio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.studio-btn {
  background: var(--gold);
  color: #0d0d0d;
  border: 0;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
}
.studio-btn:hover { background: var(--gold-dim); }

.studio-btn.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.studio-btn.secondary:hover { border-color: var(--gold-border); }

.studio-btn.danger {
  background: rgba(225,112,85,0.15);
  border: 1px solid rgba(225,112,85,0.4);
  color: var(--red);
}
.studio-btn.danger:hover { background: rgba(225,112,85,0.25); }

/* Pills for status etc. */
.studio-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.studio-pill.muted   { background: rgba(138,128,120,0.18); color: var(--text-2); }
.studio-pill.good    { background: rgba(0,184,148,0.18); color: var(--green); }
.studio-pill.warn    { background: rgba(253,203,110,0.18); color: var(--orange); }
.studio-pill.bad     { background: rgba(225,112,85,0.18); color: var(--red); }
.studio-pill.info    { background: rgba(116,185,255,0.18); color: var(--blue); }
.studio-pill.accent  { background: var(--gold-subtle); color: var(--gold); }

/* Form primitives */
.studio-field { margin-bottom: 14px; }
.studio-field label {
  display: block; font-size: 11.5px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px;
}
.studio-field input, .studio-field select, .studio-field textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 14px; font-family: inherit;
  transition: var(--transition);
}
.studio-field input:focus, .studio-field select:focus, .studio-field textarea:focus {
  outline: 0; border-color: var(--gold);
}

/* Tables */
.studio-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
  font-size: 14px;
}
.studio-table th {
  text-align: left; padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  color: var(--text-2); font-weight: 600;
  text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.studio-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.studio-table tr:last-child td { border-bottom: none; }

@media (max-width: 720px) {
  #studio-nav { padding: 0 14px; height: 56px; }
  #studio-nav .nav-tabs { margin: 0 8px; }
  #studio-nav .brand-name { display: none; }
  #studio-nav .user-pill .name { display: none; }
  .studio-page { padding: 20px 16px 60px; }
}

/* ── Index page (legacy SPA) — hide duplicate chrome ──
   index.html has its own .app-header with brand + nav-tabs that duplicates
   the new top-nav. The same header also wraps the wizard step-indicator
   which we want to KEEP. Surgical CSS: hide the duplicates, keep steps. */
.app-header > .header-brand,
.app-header > div:has(> .nav-tabs),
.app-header > div > .nav-tabs {
  display: none !important;
}
.app-header {
  background: transparent !important;
  border-bottom: 0 !important;
  padding: 14px 24px !important;
  height: auto !important;
  justify-content: center !important;
}
.app-header .progress-bar-wrap {
  flex: 0 1 auto;
  max-width: 1000px;
  width: 100%;
}

/* ── Leads page — neutralize its local --accent override so it inherits
   the gold theme. The page-local :root declaration would otherwise win. */
.studio-leads-shell {
  --accent: var(--gold) !important;
  --accent-hover: var(--gold-dim) !important;
}

/* ── Per-page legacy headers — clients.html, restaurant-ads.html,
   templates.html, voices.html, batches.html each have their own <header>
   with an eyebrow + page title + duplicate nav. Hide ONLY the duplicate
   nav inside those headers — keep the eyebrow + h1 because that's useful
   page context. */
body > header > nav {
  display: none !important;
}
/* The eyebrow on those pages sometimes says "Create Studio"; that's
   legacy branding. Re-skin it to feel cohesive with the new chrome. */
body > header > div > .eyebrow {
  color: var(--gold) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  margin-bottom: 4px !important;
}
body > header > div > h1 {
  font-family: 'Playfair Display', serif !important;
  color: var(--text) !important;
}

/* ── Studio nav brand mark — sized for both the SVG and the mascot PNG ── */
#studio-nav .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
