/* Portal-wide overrides — loaded after brand.css on all portal pages */
/* Single source of truth for all shared styles across client & internal portals. */

/* ── Global typography tokens ── */
.welcome-line  { color: #ffffff; }
.section-title { color: #ffffff; }
.field-label   { color: #ffffff; }
.req           { color: #6ee7b7; }

/* ── Page title — single source of truth for all portal pages ── */
.page-title,
.page-heading,
.page-hero-title {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 36px;
  color: #ffffff;
}

/* ── Page header wrapper — single source of truth for all portal pages ── */
/* Provides consistent spacing, divider line, and vertical rhythm below the title */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
/* Suppress the heading's own bottom margin inside a page-header;
   spacing is controlled by the wrapper's gap and padding-bottom instead */
.page-header .page-heading,
.page-header .page-title {
  margin-bottom: 0;
}

/* ── Page sub-line (below the heading) ── */
.page-sub {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  color: var(--text-dim);
  opacity: 0.5;
  letter-spacing: 0.04em;
}

/* ── Page hero sub-line (brand page: "for CLIENT NAME") ── */
.page-hero-sub { display: flex; align-items: baseline; gap: 8px; }
.page-hero-for { font-family: 'Reenie Beanie', cursive; font-size: 22px; color: var(--text-dim); }
.page-hero-client {
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
}

body,
p, span, a, li, td, label, input, select, textarea, button {
  font-size: 12px;
  line-height: 1.1em;
}

/* ── Sidebar logo — canonical alignment rule ── */
/* "prompt" (DM Serif) on top, "studios" (Bebas) centered beneath it */
.sidebar-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  text-decoration: none;
}

.sidebar-logo-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 19.2px;
  color: var(--text);
}

.sidebar-logo-sub {
  font-family: 'Bebas Neue', Arial Black, sans-serif;
  font-size: 3.6px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 3px;
  display: block;
}

/* ── Portal dark-theme tokens — universal across client & admin portals ── */
:root {
  --bg:            #0a0a0a;
  --surface:       #111111;
  --elevated:      #181818;
  --border:        #1e1e1e;
  --border-inner:  #161616;
  --text:          #f0ece4;
  --text-dim:      #a0a0a0;
  --text-ghost:    #505050;
  --accent:        #E6E2D3;

  /* Admin-portal aliases — admin CSS uses --admin-* names; these map to shared tokens */
  --admin-bg:      var(--bg);
  --admin-surface: var(--surface);
  --admin-border:  var(--border);
  --admin-text:    var(--text);
  --admin-muted:   var(--text);
  --admin-bar-bg:  var(--surface);

  /* Admin status/feedback colours */
  --admin-green:   #6EE7B7;
  --admin-amber:   #F59E0B;
  --admin-red:     #F87171;

  /* ── Tonal scale — fills the dark-on-dark hierarchy ── */
  --text-whisper: #3a3a3a;  /* barely perceptible */
  --ui-quiet:     #505050;  /* very dim UI elements */
  --text-low:     #6e6e6e;  /* dim secondary text */
  --link-dim:     #747474;  /* dim links & actions */
  --text-muted:   #8a8a8a;  /* muted labels */
  --text-subtle:  #9a9a9a;  /* subtle labels */
  --text-faded:   #b0b0b0;  /* faded text */
}

/* ── Sidebar layout — shared across all internal portal pages ── */
#sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  width: 220px; flex-shrink: 0;
  background: #0d0d0d; border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 28px 0; z-index: 100;
}
#portal-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; min-height: 100vh;
}
.sidebar-top { padding: 0 20px; margin-bottom: 28px; }

#employee-name-display {
  display: block; font-size: 10px; color: var(--text-ghost);
  margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.role-pill {
  display: inline-block; font-family: 'Poppins', sans-serif;
  font-size: 9px; font-weight: 300; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid; margin-top: 6px;
}
.role-pill-admin  { color: #a78bfa; background: rgba(167,139,250,0.08); border-color: rgba(167,139,250,0.3); }
.role-pill-ep     { color: #93C5FD; background: rgba(147,197,253,0.08); border-color: rgba(147,197,253,0.3); }
.role-pill-editor { color: #34d399; background: rgba(52,211,153,0.08);  border-color: rgba(52,211,153,0.3);  }

#sidebar nav { flex: 1; }
#sidebar nav ul { list-style: none; padding: 0; margin: 0; }
#sidebar nav ul li a,
#sidebar nav ul li span {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  font-family: 'Poppins', sans-serif; font-weight: 300; font-size: 12px;
  text-decoration: none; transition: color 0.15s;
}
.nav-icon               { flex-shrink: 0; opacity: 0.35; }
.nav-active             { color: var(--text); cursor: pointer; }
.nav-active:hover       { color: #ffffff; }
.nav-active:hover .nav-icon { opacity: 0.65; }
.nav-current            { color: var(--accent) !important; border-left: 2px solid var(--accent); padding-left: 18px !important; }
.nav-current .nav-icon  { opacity: 0.8; }
.nav-disabled           { color: var(--text-ghost); cursor: default; pointer-events: none; }
.nav-divider            { height: 1px; background: var(--border); margin: 10px 20px; }

#sidebar .nav-tip-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; min-width: 13px; max-width: 13px; height: 13px;
  padding: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.18);
  font-size: 8px; font-style: italic; font-family: Georgia, serif;
  letter-spacing: 0; line-height: 1; flex-shrink: 0; margin-left: 5px;
  cursor: default; pointer-events: auto;
  transition: border-color 0.15s, color 0.15s;
}
#sidebar .nav-tip-icon:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.5); }

/* ── Inbox nav badge ── */
.nav-inbox-badge {
  margin-left: auto;
  background: var(--accent);
  color: #111111;
  font-family: 'Poppins', sans-serif; font-size: 9px; font-weight: 600; line-height: 1;
  padding: 2px 6px; border-radius: 8px;
  min-width: 16px; text-align: center;
}

#nav-tip-popup {
  position: fixed; display: none;
  background: #0d0d0d; border: 1px solid rgba(255,255,255,0.1);
  color: rgba(230,226,211,0.6); font-family: 'Poppins', sans-serif;
  font-size: 10px; font-weight: 300; letter-spacing: 0.04em;
  padding: 7px 12px; z-index: 9999; pointer-events: none;
  max-width: 220px; line-height: 1.5;
}

.sidebar-bottom { margin-top: auto; padding: 0 20px; }
#sign-out-btn {
  display: block; width: 100%; text-align: left; font-size: 10px;
  color: var(--ui-quiet); background: none; border: none; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-weight: 300;
  padding: 10px 0; letter-spacing: 0.05em; transition: color 0.2s;
}
#sign-out-btn:hover { color: var(--text); }

/* ── Nav sub-items (used in shared nav.html) ── */
.nav-subitems { list-style: none; padding: 0; margin: 0 0 4px; }
#sidebar .nav-subitems li a,
#sidebar .nav-subitems li span {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 20px 4px 44px; font-size: 10px; letter-spacing: 0.03em;
  color: #3a3a3a; cursor: default; pointer-events: none;
}
#sidebar .nav-subitems li a { color: var(--text-dim); cursor: pointer; pointer-events: auto; }
#sidebar .nav-subitems li a:hover { color: #ffffff; }
#sidebar .nav-subitems li a.nav-current {
  color: var(--accent) !important; border-left: 2px solid var(--accent); padding-left: 42px !important;
}

/* ── Client name display (client portal sidebar) ── */
#client-name-display {
  display: block; font-size: 10px; color: var(--text-ghost);
  margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Responsive sidebar (collapses to top bar on narrow screens) ── */
@media (max-width: 768px) {
  body { flex-direction: column; }
  #sidebar {
    position: static; width: 100%; height: 56px; overflow: visible;
    flex-direction: row; align-items: center;
    padding: 0 20px; border-right: none; border-bottom: 1px solid var(--border);
  }
  .sidebar-top { padding: 0; margin-bottom: 0; margin-right: auto; }
  #sidebar nav ul { display: flex; align-items: center; }
  #sidebar nav ul li a,
  #sidebar nav ul li span { padding: 0 10px; font-size: 11px; }
  .nav-icon { display: none; }
  .nav-current { border-left: none; padding-left: 10px !important; }
  .nav-disabled, .nav-divider { display: none; }
  .sidebar-bottom { margin-top: 0; padding: 0; margin-left: 8px; }
  #sign-out-btn   { padding: 0 0 0 10px; white-space: nowrap; }
}

/* ════════════════════════════════════════════════════════
   CLIENT PROFILE LAYOUT — shared by internal/client.html
   and client/profile.html (and any future profile-style page)
   ════════════════════════════════════════════════════════ */

/* ── Title area ── */
.client-title-area {
  padding: 20px 0 32px; border-bottom: 1px solid var(--admin-border);
  display: flex; align-items: flex-end; gap: 32px;
}
.title-left { flex: 1; min-width: 0; }

/* ── Deliverables mini card (Scope) ── */
.deliverables-mini {
  flex-shrink: 0; width: 33%; max-width: 33%;
  background: var(--admin-surface); border: 1px solid var(--admin-border); padding: 18px 22px;
}
.dmini-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dmini-row:last-child { border-bottom: none; }
.dmini-lbl {
  font-family: var(--font-body); font-size: 10px; font-weight: 300;
  letter-spacing: 0.2em; text-transform: uppercase; color: #E6E2D3; opacity: 0.4;
}
.dmini-val { font-size: 14px; color: #E6E2D3; }

/* ── Two-column section row ── */
.sections-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }

/* ── Client name / sub-title ── */
.client-name-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.client-contact-name {
  font-family: var(--font-heading); font-size: 52px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0; color: #E6E2D3; line-height: 0.95;
}
.client-brand-sub {
  font-family: var(--font-body); font-size: 14px; font-weight: 300;
  letter-spacing: 0.06em; color: rgba(230,226,211,0.42); margin-bottom: 6px;
}
.client-ep-line {
  font-family: var(--font-body); font-size: 11px; font-weight: 300;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(230,226,211,0.28); margin-bottom: 20px;
}
.client-ep-link {
  color: rgba(147,197,253,0.7); text-decoration: none;
  border-bottom: 1px solid rgba(147,197,253,0.2); transition: color 0.2s, border-color 0.2s;
}
.client-ep-link:hover { color: #93C5FD; border-bottom-color: rgba(147,197,253,0.5); }

/* ── Channel icon strip ── */
.channels-strip { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.channels-strip-icons { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-height: 28px; }
.channels-strip-nil { font-family: var(--font-body); font-size: 11px; color: var(--admin-muted); opacity: 0.35; }
.icon-link { border-bottom: none !important; text-decoration: none !important; }

/* ── Section wrapper ── */
.section-wrap { margin-top: 36px; }
.section-label {
  font-family: var(--font-body); font-size: 10px; font-weight: 300;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text); margin-bottom: 14px;
}
.section-card {
  background: var(--admin-surface); border: 1px solid var(--admin-border); padding: 28px 32px;
}

/* ── Field grid ── */
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 40px; }
.field-item { display: flex; flex-direction: column; gap: 0; }
.field-item.span-full { grid-column: 1 / -1; }
.field-hdr { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.field-lbl {
  font-family: var(--font-body); font-size: 10px; font-weight: 300;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: #E6E2D3; opacity: 0.4; display: inline-flex; align-items: center; gap: 4px;
}
.field-lbl-icon { width: 11px; height: 11px; flex-shrink: 0; stroke: currentColor; fill: none; }
.field-val { font-size: 14px; color: #E6E2D3; line-height: 1.55; }
.field-val a {
  color: #E6E2D3; text-decoration: none;
  border-bottom: 1px solid rgba(230,226,211,0.22); transition: border-color 0.2s;
  word-break: break-all; overflow-wrap: break-word;
}
.field-val a:hover { border-bottom-color: rgba(230,226,211,0.6); }
.field-grid-2col { grid-template-columns: 1fr 1fr; }
.field-grid-1col { grid-template-columns: 1fr; }
.null-val { color: #E6E2D3; opacity: 0.18; }

/* ── Platform icons ── */
.platform-pills { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.plat-icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; overflow: hidden;
  vertical-align: middle; flex-shrink: 0; cursor: default;
}
.plat-icon-wrap svg { display: block; }

/* ── Content verticals grid ── */
.vertical-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.vertical-col { display: flex; flex-direction: column; gap: 10px; }
.vertical-col-header {
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: #6EE7B7;
  padding-bottom: 6px; border-bottom: 1px solid rgba(110,231,183,0.15);
}
.vertical-sub-row { display: flex; flex-direction: column; gap: 3px; }
.vertical-sub-lbl {
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--admin-muted); opacity: 0.6;
}
@media (max-width: 900px) { .vertical-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .vertical-grid { grid-template-columns: 1fr; } }

/* ── Brand vibe tags ── */
.vibe-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vibe-tag {
  display: inline-block; font-family: var(--font-body); font-size: 11px; font-weight: 300;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 12px; background: rgba(230,226,211,0.05);
  border: 1px solid rgba(230,226,211,0.18); color: #E6E2D3;
}

/* ── Toggle switch (read/write, used on both portals) ── */
.toggle-label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.toggle-track {
  position: relative; width: 36px; height: 20px; flex-shrink: 0;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.18s, border-color 0.18s;
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px; width: 12px; height: 12px;
  background: rgba(255,255,255,0.22); transition: transform 0.18s ease, background 0.18s;
}
.toggle-label input:checked ~ .toggle-track { background: rgba(110,231,183,0.15); border-color: rgba(110,231,183,0.45); }
.toggle-label input:checked ~ .toggle-track .toggle-thumb { transform: translateX(16px); background: #6EE7B7; }
.toggle-status { font-size: 13px; color: #E6E2D3; opacity: 0.32; transition: opacity 0.18s; }
.toggle-status.is-on { opacity: 0.9; color: #6EE7B7; }

/* ── Loading / error states ── */
.loading-state { padding: 80px; text-align: center; color: var(--admin-muted); opacity: 0.32; }
.error-state   { padding: 80px; text-align: center; color: var(--admin-red); }

/* ── Global portal table heading typography ── */
/* All portal table <th> and .th-inner spans share these typographic values.
   Individual tables may override color only. */
.portal-table th,
table th,
.th-inner {
  font-family: 'Poppins', sans-serif;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
