/* True North Visual Co. — Client Portal */
:root {
  --bg: #121214;
  --bg2: #18181b;
  --panel: #1d1d21;
  --panel2: #24242a;
  --line: rgba(236, 228, 214, 0.08);
  --line2: rgba(236, 228, 214, 0.14);
  --text: #ece6dc;
  --muted: #9c968c;
  --faint: #6d6861;
  --gold: #c9a55c;
  --gold2: #e2c482;
  --gold-soft: rgba(201, 165, 92, 0.12);
  --green: #7fb28a;
  --red: #d98473;
  --blue: #8fa9c9;
  --radius: 14px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Archivo", system-ui, -apple-system, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--gold2); text-decoration: none; }
a:hover { color: #f0d79f; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(201, 165, 92, 0.35); }

.boot { min-height: 100vh; display: grid; place-items: center; }
.mark-spin { width: 34px; height: 34px; border: 2px solid var(--line2); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── Auth ───── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { position: relative; overflow: hidden; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at 10% 110%, rgba(201,165,92,0.18), transparent 60%), radial-gradient(800px 500px at 100% 0%, rgba(201,165,92,0.08), transparent 60%), #0e0e10; border-right: 1px solid var(--line); }
.auth-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse at 30% 70%, #000 10%, transparent 70%); opacity: 0.5; pointer-events: none; }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h1 { font-size: clamp(36px, 4.6vw, 62px); line-height: 1.04; max-width: 13ch; }
.auth-hero h1 em { font-style: italic; color: var(--gold2); }
.auth-hero p { color: var(--muted); max-width: 42ch; font-size: 16px; margin-top: 18px; }
.auth-feats { display: flex; gap: 26px; flex-wrap: wrap; color: var(--muted); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.auth-feats span::before { content: "✦"; color: var(--gold); margin-right: 8px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 30px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 28px; }
.auth-card .btn { width: 100%; justify-content: center; padding: 13px; margin-top: 8px; }
.auth-foot { margin-top: 26px; font-size: 13px; color: var(--faint); }

/* ───── Brand ───── */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 17px; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }

/* ───── Shell ───── */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--bg2) 249px, var(--line) 249px, var(--line) 250px, transparent 250px); }
.side { position: sticky; top: 0; height: 100vh; padding: 24px 16px; border-right: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; gap: 28px; }
.side .brand { padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; transition: 0.15s; }
.nav a svg { width: 18px; height: 18px; opacity: 0.8; flex: none; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.nav a.active { color: var(--text); background: var(--gold-soft); box-shadow: inset 2px 0 0 var(--gold); }
.nav a.active svg { color: var(--gold); opacity: 1; }
.nav .count { margin-left: auto; background: var(--gold); color: #1a1408; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #3a3326, #26231d); color: var(--gold2); font-weight: 600; font-size: 13px; border: 1px solid var(--line2); flex: none; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 12px; color: var(--faint); }
.icon-btn { background: none; border: 1px solid transparent; color: var(--muted); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--line2); }
.icon-btn svg { width: 17px; height: 17px; }

.main { min-width: 0; padding: 34px clamp(18px, 4vw, 52px) 80px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; font-weight: 600; }
.page-head h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.1; }
.page-head p { color: var(--muted); margin: 8px 0 0; max-width: 60ch; }
.crumb { color: var(--muted); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.crumb:hover { color: var(--text); }

/* ───── Client context bar (admin) ───── */
.ctx { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; flex-wrap: wrap; }
.ctx .avatar { width: 42px; height: 42px; font-size: 15px; }
.ctx h2 { font-size: 21px; }
.ctx .meta { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--gold); }

/* ───── Cards & grid ───── */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 19px; }
.card-head .link { font-size: 13px; white-space: nowrap; }
.card.hero { background: radial-gradient(600px 260px at 100% 0%, rgba(201,165,92,0.16), transparent 70%), var(--panel); border-color: rgba(201,165,92,0.22); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1; }
.stat span { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); border: 1px dashed var(--line2); border-radius: var(--radius); }
.empty h4 { color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

/* ───── Progress ───── */
.meter { display: flex; flex-direction: column; gap: 8px; }
.meter-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.meter-top b { font-weight: 600; }
.bar { height: 7px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); border-radius: 99px; transition: width 0.6s ease; }
.bar.done i { background: linear-gradient(90deg, #6fa37c, var(--green)); }

/* ───── Buttons & inputs ───── */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: 14px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; transition: 0.15s; white-space: nowrap; }
.btn:hover { border-color: rgba(236,228,214,0.28); background: #2b2b31; }
.btn svg { width: 16px; height: 16px; }
.btn.gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1b1407; border-color: transparent; box-shadow: 0 6px 20px rgba(201,165,92,0.18); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: #cfc8bc; }
.field .hint { font-size: 12.5px; color: var(--faint); margin-top: -2px; }
.input, .select, .textarea { width: 100%; background: #141417; border: 1px solid var(--line2); border-radius: 10px; padding: 11px 13px; outline: none; transition: 0.15s; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,165,92,0.15); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239c968c' stroke-width='1.6'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.error { color: var(--red); font-size: 13.5px; margin: 4px 0 12px; }

/* ───── Chips & badges ───── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line2); background: transparent; color: var(--muted); cursor: pointer; font-weight: 500; font-size: 13.5px; transition: 0.15s; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--gold-soft); border-color: rgba(201,165,92,0.5); color: var(--gold2); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,0.06); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.gold { background: var(--gold-soft); color: var(--gold2); }
.badge.green { background: rgba(127,178,138,0.12); color: var(--green); }
.badge.red { background: rgba(217,132,115,0.12); color: var(--red); }
.badge.blue { background: rgba(143,169,201,0.12); color: var(--blue); }

/* ───── Lists ───── */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { color: var(--muted); font-size: 13px; }
a.list-item { color: inherit; border-radius: 10px; padding-left: 10px; padding-right: 10px; }
a.list-item:hover { background: rgba(255,255,255,0.025); }
.datebox { width: 52px; flex: none; text-align: center; border: 1px solid var(--line2); border-radius: 11px; padding: 6px 0; background: #17171a; }
.datebox small { display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.datebox b { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.1; }

/* ───── Shoot card ───── */
.shoot { display: flex; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); align-items: flex-start; }
.shoot + .shoot { margin-top: 12px; }
.shoot .grow { flex: 1; min-width: 0; }
.shoot h4 { font-family: var(--sans); font-size: 16px; font-weight: 600; }
.shoot .meta { color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.shoot .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.next-shoot { display: flex; gap: 18px; align-items: center; }
.next-shoot .datebox { width: 68px; padding: 10px 0; }
.next-shoot .datebox b { font-size: 28px; }

/* ───── Booking ───── */
.book { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.step-label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 600; }
.step-label i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold2); font-size: 12px; font-weight: 700; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h4 { font-size: 19px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding-bottom: 4px; }
.cal button { height: 46px; border-radius: 11px; border: 1px solid transparent; background: transparent; color: var(--faint); cursor: default; font-weight: 500; position: relative; }
.cal button.avail { color: var(--text); background: #1a1a1e; border-color: var(--line2); cursor: pointer; }
.cal button.avail::after { content: ""; position: absolute; bottom: 7px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold); }
.cal button.avail:hover { border-color: var(--gold); }
.cal button.sel { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1b1407; border-color: transparent; }
.cal button.sel::after { background: #1b1407; }
.cal button.today { box-shadow: inset 0 0 0 1px rgba(201,165,92,0.4); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot { padding: 11px 8px; border-radius: 10px; border: 1px solid var(--line2); background: #1a1a1e; cursor: pointer; font-weight: 600; font-size: 14px; }
.slot:hover { border-color: var(--gold); }
.slot.on { background: var(--gold-soft); border-color: var(--gold); color: var(--gold2); }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-line span { color: var(--muted); }
.summary-line b { font-weight: 600; text-align: right; }

/* ───── Library ───── */
.month-head { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.month-head:first-child { margin-top: 0; }
.month-head h3 { font-size: 24px; }
.month-head span { color: var(--muted); font-size: 13px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.media-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: 0.2s; text-align: left; padding: 0; color: inherit; }
.media-card:hover { transform: translateY(-2px); border-color: rgba(201,165,92,0.35); box-shadow: var(--shadow); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2a261f, #17171a 70%); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.thumb .play span { width: 46px; height: 46px; border-radius: 50%; background: rgba(18,18,20,0.6); backdrop-filter: blur(6px); display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.18); }
.thumb .play svg { width: 16px; height: 16px; color: #fff; margin-left: 2px; }
.thumb.vertical { aspect-ratio: 16/9; }
.media-card .info { padding: 14px 16px 16px; }
.media-card .info b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.player iframe, .player video, .player img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }

/* ───── Scripts ───── */
.script-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.doc { background: #f6f1e8; color: #23201b; border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow); }
.doc h1 { font-size: 30px; margin-bottom: 10px; color: #1b1712; }
.doc h2 { font-size: 21px; margin: 30px 0 10px; padding-top: 18px; border-top: 1px solid rgba(0,0,0,0.08); color: #1b1712; }
.doc h3 { font-size: 17px; margin: 20px 0 8px; }
.doc p { margin: 8px 0; }
.doc strong { color: #000; }
.doc ul, .doc ol { padding-left: 22px; margin: 8px 0; }
.doc li { margin: 4px 0; }
.doc .broll { color: #6b5a33; font-size: 14px; background: rgba(201,165,92,0.13); border-left: 2px solid var(--gold); padding: 6px 10px; border-radius: 0 6px 6px 0; margin: 6px 0; }
.doc blockquote { margin: 10px 0; padding-left: 14px; border-left: 3px solid var(--gold); color: #4a4234; }
.doc hr { border: 0; border-top: 1px solid rgba(0,0,0,0.1); margin: 20px 0; }
.doc code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 4px; }
.doc-edit { width: 100%; min-height: 70vh; background: #f6f1e8; color: #23201b; border-radius: var(--radius); padding: 28px; border: 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px; line-height: 1.6; outline: none; }
.script-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: inherit; transition: 0.15s; }
.script-row + .script-row { margin-top: 10px; }
.script-row:hover { border-color: rgba(201,165,92,0.35); color: inherit; }
.script-row h4 { font-family: var(--sans); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.script-row p { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feedback { background: rgba(217,132,115,0.08); border: 1px solid rgba(217,132,115,0.25); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.feedback b { color: var(--red); display: block; font-size: 13px; margin-bottom: 4px; }
.generating { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 70px 20px; text-align: center; }
.generating .orb { width: 70px; height: 70px; border-radius: 50%; background: conic-gradient(from 0deg, var(--gold), transparent 70%); animation: spin 1.4s linear infinite; mask: radial-gradient(circle, transparent 55%, #000 57%); }
.generating p { color: var(--muted); max-width: 40ch; }

/* ───── Client cards (admin) ───── */
.client-card { display: flex; flex-direction: column; gap: 16px; color: inherit; transition: 0.2s; }
.client-card:hover { border-color: rgba(201,165,92,0.35); color: inherit; transform: translateY(-2px); }
.client-card .top { display: flex; gap: 12px; align-items: center; }
.client-card h3 { font-size: 19px; }
.mini-meters { display: flex; flex-direction: column; gap: 10px; }
.mini-meters .meter-top { font-size: 13px; }
.client-card .foot { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; color: var(--muted); }

/* ───── Plan ───── */
.plan-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.plan-item { border: 1px solid var(--line2); border-radius: 12px; padding: 16px; background: #19191c; }
.plan-item b { font-family: var(--serif); font-size: 30px; font-weight: 500; color: var(--gold2); display: block; line-height: 1; margin-bottom: 8px; }
.item-row { display: grid; grid-template-columns: 1fr 80px 1fr 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-wrap; }

/* ───── Modal & toast ───── */
.overlay { position: fixed; inset: 0; background: rgba(6,6,8,0.72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; z-index: 50; animation: fade 0.15s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); animation: rise 0.2s ease; }
.modal.wide { max-width: 880px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.modal-head h3 { font-size: 21px; }
.modal-body { padding: 22px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.99); } }
#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2a2a30; border: 1px solid var(--line2); padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; animation: rise 0.2s; display: flex; gap: 10px; align-items: center; }
.toast.ok::before { content: "✦"; color: var(--gold); }
.toast.err { border-color: rgba(217,132,115,0.4); }
.toast.err::before { content: "!"; color: var(--red); font-weight: 800; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(0,0,0,0.2); border-top-color: currentColor; border-radius: 50%; animation: spin 0.8s linear infinite; }
.loading { padding: 60px; display: grid; place-items: center; }

.setup-steps { counter-reset: s; padding: 0; list-style: none; margin: 0; }
.setup-steps li { counter-increment: s; position: relative; padding-left: 34px; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.setup-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--gold-soft); color: var(--gold2); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.setup-steps b { color: var(--text); font-weight: 600; }
code.inline { background: #141417; border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; color: var(--gold2); word-break: break-all; }

/* ───── Mobile ───── */
.mobile-bar { display: none; }
@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .script-layout { grid-template-columns: 1fr; }
  .book { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 24px; min-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-hero h1 { font-size: 34px; }
  .auth-feats { display: none; }
  .shell { grid-template-columns: 1fr; background: none; }
  .side { display: none; }
  .mobile-bar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(18,18,20,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-around; background: rgba(24,24,27,0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--muted); padding: 6px 4px; flex: 1; }
  .mobile-nav a svg { width: 20px; height: 20px; }
  .mobile-nav a.active { color: var(--gold2); }
  .main { padding: 22px 16px 100px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 8px; }
  .item-row { grid-template-columns: 1fr 64px 34px; }
  .item-row .notes { display: none; }
}
@media (min-width: 861px) { .mobile-nav { display: none; } }

/* ═════════════ North theme layer — matches the North command dashboard ═════════════ */
:root {
  --bg: #101418; --bg2: #0c1014; --panel: #151a20; --panel2: #1a2028;
  --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.14);
  --text: #e7eaf0; --muted: #8b93a1; --faint: #5f6774;
  --gold: #93794f; --gold2: #c9ae7f; --gold-soft: rgba(147,121,79,.16);
  --arc: #5ed6ff; --arc2: rgba(94,214,255,.55);
  --red: #e0604f; --green: #7fc9a0; --blue: #5ed6ff;
  --serif: "Hanken Grotesk", system-ui, sans-serif; --sans: "Hanken Grotesk", system-ui, sans-serif;
}
html, body { font-size: 15.5px; }
body {
  background: radial-gradient(900px 520px at 22% 8%, rgba(147,121,79,.16), transparent 65%),
              radial-gradient(700px 500px at 85% 55%, rgba(147,121,79,.09), transparent 70%),
              radial-gradient(800px 600px at 15% 95%, rgba(147,121,79,.08), transparent 70%), #101418;
  background-attachment: fixed;
}
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.04; }
.page-head h1 b, h1 em { color: var(--gold2); font-style: normal; text-shadow: 0 0 28px rgba(201,174,127,.45); }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--gold2); letter-spacing: .18em; text-shadow: 0 0 14px rgba(201,174,127,.5); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 10px 2px rgba(201,174,127,.8); animation: blink 2.4s infinite; flex: none; }
@keyframes blink { 50% { opacity: .3; } }

/* HUD background + cursor glow */
.hudbg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5; }
.hudbg .r1, .hudbg .r2 { transform-origin: 88% 14%; animation: spin 90s linear infinite; }
.hudbg .r2 { animation-duration: 60s; animation-direction: reverse; }
.hudbg .r3 { transform-origin: 8% 88%; animation: spin 120s linear infinite; }
.glowcur { position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none; z-index: 0; background: radial-gradient(circle, rgba(94,214,255,.08), rgba(201,174,127,.04) 40%, transparent 70%); mix-blend-mode: screen; opacity: 0; transition: opacity .5s; }
#app, .shell { position: relative; z-index: 1; }

/* Boot overlay */
.boot-ov { position: fixed; inset: 0; z-index: 100; background: #0a0d11; display: grid; place-items: center; transition: opacity .6s, visibility .6s; }
.boot-ov.done { opacity: 0; visibility: hidden; }
.boot-ov .core { position: relative; width: min(300px, 64vw); aspect-ratio: 1; display: grid; place-items: center; }
.boot-ov svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.boot-ov .ring { transform-box: fill-box; transform-origin: center; stroke-dasharray: var(--l); stroke-dashoffset: var(--l); animation: draw 1s cubic-bezier(.4,0,.2,1) forwards, spin 6s linear infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.boot-ov img { width: 34%; border-radius: 18px; filter: drop-shadow(0 0 26px rgba(201,174,127,.55)); animation: logoIn 1s cubic-bezier(.2,.8,.2,1) both .25s; }
@keyframes logoIn { from { opacity: 0; transform: scale(.7); } }
.boot-ov .bt { position: absolute; left: 0; right: 0; top: calc(50% + min(170px, 38vw)); text-align: center; color: var(--gold2); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; text-shadow: 0 0 12px rgba(201,174,127,.6); }
.boot-ov .bar2 { width: min(220px, 56vw); height: 2px; background: rgba(201,174,127,.15); margin: 14px auto 0; overflow: hidden; border-radius: 2px; }
.boot-ov .bar2 i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--arc)); box-shadow: 0 0 10px var(--arc); animation: load 1.3s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes load { to { width: 100%; } }

/* Logo */
.brand-logo { width: 42px; height: 42px; border-radius: 11px; flex: none; object-fit: cover; border: 1px solid rgba(201,174,127,.35); box-shadow: 0 0 18px rgba(147,121,79,.35); transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.brand:hover .brand-logo { transform: rotate(-4deg) scale(1.06); box-shadow: 0 0 26px rgba(201,174,127,.6); }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-name small { color: var(--gold2); font-weight: 600; }
.auth-hero .brand-logo { width: 56px; height: 56px; border-radius: 14px; }

/* Shell */
.shell { background: linear-gradient(90deg, rgba(12,16,20,.86) 249px, var(--line) 249px, var(--line) 250px, transparent 250px); }
.side { background: transparent; backdrop-filter: blur(6px); }
.nav a { position: relative; overflow: hidden; transition: color .2s, background .25s, transform .25s; }
.nav a:hover { transform: translateX(3px); }
.nav a.active { background: linear-gradient(90deg, rgba(147,121,79,.22), rgba(147,121,79,.04)); box-shadow: inset 2px 0 0 var(--gold2), 0 0 24px rgba(147,121,79,.12); }
.nav a.active svg { color: var(--gold2); filter: drop-shadow(0 0 6px rgba(201,174,127,.8)); }
.nav .count { background: var(--arc); color: #06212b; box-shadow: 0 0 12px var(--arc); animation: blink 2.4s infinite; }
.avatar { background: linear-gradient(135deg, #2a2418, #151a20); color: var(--gold2); border-color: rgba(201,174,127,.35); box-shadow: 0 0 14px rgba(147,121,79,.25); }

/* Panels / cards */
.card, .shoot, .script-row, .media-card, .ctx, .plan-item {
  position: relative; overflow: hidden; background: #151a20;
  background-image: linear-gradient(110deg, transparent 42%, rgba(255,255,255,.04) 50%, transparent 58%);
  background-size: 260% 100%; background-position: 130% 0; background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(147,121,79,.05), 0 0 40px rgba(147,121,79,.04) inset;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s, background-position 1.1s ease-out;
}
.card:hover, .shoot:hover, .script-row:hover, .media-card:hover, .plan-item:hover {
  transform: translateY(-3px); background-position: -30% 0;
  border-color: rgba(94,214,255,.42);
  box-shadow: 0 0 0 1px rgba(94,214,255,.18), 0 0 40px rgba(94,214,255,.12), 0 0 60px rgba(147,121,79,.16), 0 14px 34px rgba(0,0,0,.4);
}
form.card:hover, .card.no-lift:hover { transform: none; }
.card::before, .card::after, .shoot::before, .shoot::after, .script-row::before, .script-row::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 0 solid var(--arc); opacity: 0; pointer-events: none; z-index: 2;
  filter: drop-shadow(0 0 6px var(--arc)); transition: all .35s cubic-bezier(.2,.8,.2,1);
}
.card::before, .shoot::before, .script-row::before { top: 12px; left: 12px; border-width: 2px 0 0 2px; transform: translate(-8px,-8px); }
.card::after, .shoot::after, .script-row::after { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; transform: translate(8px,8px); }
.card:hover::before, .card:hover::after, .shoot:hover::before, .shoot:hover::after, .script-row:hover::before, .script-row:hover::after { opacity: 1; transform: none; }
.card.hero { background-color: #151a20; background-image: radial-gradient(600px 260px at 100% 0%, rgba(201,174,127,.16), transparent 70%), linear-gradient(110deg, transparent 42%, rgba(255,255,255,.04) 50%, transparent 58%); background-size: 100% 100%, 260% 100%; background-position: 0 0, 130% 0; border-color: rgba(201,174,127,.28); }
.card.hero:hover { background-position: 0 0, -30% 0; }
.scan { position: absolute; left: 0; right: 0; top: -30%; height: 30%; pointer-events: none; z-index: 1; background: linear-gradient(180deg, transparent, rgba(94,214,255,.04) 70%, rgba(94,214,255,.22) 99%, transparent); opacity: 0; }
.card:hover > .scan, .reveal > .scan { animation: scanY 1.1s cubic-bezier(.3,.1,.3,1); }
@keyframes scanY { 0% { top: -30%; opacity: 1; } 100% { top: 100%; opacity: .2; } }

/* Entrance */
.rise { opacity: 0; transform: translateY(14px); animation: riseIn .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--d, 0s); }
@keyframes riseIn { to { opacity: 1; transform: none; } }

/* Stats */
.stat b { font-weight: 700; color: #fff; letter-spacing: -.02em; text-shadow: 0 0 22px rgba(255,255,255,.16); font-variant-numeric: tabular-nums; }
.card.stat b { font-size: 38px; }
.datebox { border-color: rgba(94,214,255,.45); box-shadow: 0 0 16px rgba(94,214,255,.15); background: rgba(94,214,255,.03); }
.datebox small { color: var(--arc); text-shadow: 0 0 8px var(--arc2); }
.datebox b { font-weight: 700; color: #fff; }

/* Bars */
.bar { background: rgba(255,255,255,.06); }
.bar i { background: linear-gradient(90deg, #7a643f, #c9ae7f); box-shadow: 0 0 12px rgba(201,174,127,.55); transform-origin: left; animation: grow 1.2s cubic-bezier(.2,.8,.2,1) both .2s; }
@keyframes grow { from { transform: scaleX(0); } }
.bar.done i { background: linear-gradient(90deg, #2aa7d6, var(--arc)); box-shadow: 0 0 14px var(--arc); }
.meter:hover .bar i { filter: brightness(1.25); box-shadow: 0 0 18px rgba(201,174,127,.9); }

/* Telemetry */
.telemetry { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--arc); margin-top: 14px; text-shadow: 0 0 10px var(--arc2); }
.telemetry span { display: inline-flex; align-items: center; gap: 7px; }
.telemetry span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--arc); box-shadow: 0 0 8px var(--arc); animation: blink 1.8s infinite; }
.telemetry span:nth-child(2)::before { animation-delay: .4s; } .telemetry span:nth-child(3)::before { animation-delay: .8s; }
.telemetry span.off { color: var(--muted); text-shadow: none; } .telemetry span.off::before { background: var(--faint); box-shadow: none; animation: none; }

/* Buttons, chips, inputs */
.btn { border-radius: 8px; transition: transform .2s, box-shadow .25s, border-color .2s, background .2s, filter .2s; }
.btn:hover { transform: translateY(-1px); border-color: var(--gold2); box-shadow: 0 0 16px rgba(201,174,127,.35); }
.btn.gold { background: linear-gradient(180deg, #a98b5b, var(--gold)); color: #fff; box-shadow: 0 0 18px rgba(147,121,79,.45); position: relative; overflow: hidden; }
.btn.gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s; }
.btn.gold:hover { box-shadow: 0 0 28px rgba(201,174,127,.75); filter: brightness(1.08); }
.btn.gold:hover::after { transform: translateX(120%); }
.chip { border-radius: 6px; font-weight: 600; transition: all .2s; }
.chip:hover { border-color: var(--gold2); box-shadow: 0 0 14px rgba(201,174,127,.35); transform: translateY(-1px); }
.chip.on { background: rgba(147,121,79,.2); border-color: var(--gold2); color: #fff; box-shadow: 0 0 16px rgba(201,174,127,.3); }
.input, .select, .textarea { background: #0b0e12; border-radius: 8px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--arc); box-shadow: 0 0 0 3px rgba(94,214,255,.15), 0 0 18px rgba(94,214,255,.15); }
.badge { border-radius: 99px; }
.badge.gold { background: rgba(147,121,79,.2); color: var(--gold2); border: 1px solid rgba(147,121,79,.4); }
.badge.blue { background: rgba(94,214,255,.1); color: var(--arc); }
.badge.green { background: rgba(127,201,160,.12); color: var(--green); }
.tabs a { transition: color .2s; } .tabs a.active { border-bottom-color: var(--gold2); text-shadow: 0 0 12px rgba(201,174,127,.5); }

/* Booking */
.cal button.avail { background: #11161b; transition: all .2s; }
.cal button.avail::after { background: var(--arc); box-shadow: 0 0 6px var(--arc); }
.cal button.avail:hover { border-color: var(--arc); box-shadow: 0 0 16px rgba(94,214,255,.25); transform: translateY(-2px); }
.cal button.sel { background: linear-gradient(180deg, #a98b5b, var(--gold)); color: #fff; box-shadow: 0 0 20px rgba(201,174,127,.6); }
.cal button.sel::after { background: #fff; }
.slot { background: #11161b; transition: all .2s; animation: riseIn .4s both; }
.slot:hover { border-color: var(--arc); box-shadow: 0 0 14px rgba(94,214,255,.25); }
.slot.on { background: rgba(94,214,255,.1); border-color: var(--arc); color: #fff; box-shadow: 0 0 18px rgba(94,214,255,.35); }
.step-label i { background: transparent; border: 1px solid rgba(94,214,255,.5); color: var(--arc); box-shadow: 0 0 8px rgba(94,214,255,.3); }

/* Library */
.thumb { background: linear-gradient(135deg, #2a2418, #101418 70%); }
.thumb img { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.media-card:hover .thumb img { transform: scale(1.06); }
.thumb .play span { transition: transform .3s, box-shadow .3s; }
.media-card:hover .thumb .play span { transform: scale(1.12); box-shadow: 0 0 24px rgba(201,174,127,.7); border-color: var(--gold2); }
.month-head h3 { font-size: 26px; }

/* Script doc keeps paper look, slightly warmer */
.doc { background: #f4f1ea; animation: riseIn .6s both; }
.doc h1, .doc h2, .doc h3 { font-weight: 700; }
.generating .orb { background: conic-gradient(from 0deg, var(--arc), var(--gold2), transparent 75%); filter: drop-shadow(0 0 14px var(--arc)); }

/* Modal, toast */
.modal { background: #151a20; box-shadow: 0 0 0 1px rgba(147,121,79,.2), 0 0 46px rgba(147,121,79,.2), 0 20px 50px rgba(0,0,0,.6); }
.modal-head, .modal-foot { background: #151a20; }
.toast { background: rgba(21,26,32,.96); box-shadow: 0 0 0 1px rgba(94,214,255,.2), 0 0 30px rgba(94,214,255,.15); }
.toast.ok::before { color: var(--arc); }

/* Auth */
.auth-hero { background: transparent; }
.auth-hero::after { opacity: .35; }
.auth-feats span::before { color: var(--arc); text-shadow: 0 0 8px var(--arc); }

.mobile-bar, .mobile-nav { background: rgba(12,16,20,.92); }
.mobile-nav a.active { color: var(--gold2); }
@media (max-width: 860px) { .shell { background: none; } .hudbg { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .boot-ov, .glowcur { display: none; }
  .rise { opacity: 1; transform: none; }
}
