/* Alkebulan Connect — design system. One stylesheet for the whole app. */
:root {
  --bg: #F3F4F7; --surface: #FFFFFF; --surface-2: #F8F9FB; --ink: #0E1626; --muted: #5C667A; --line: #E4E7EE;
  --gold: #B8862B; --gold-strong: #8F6718; --gold-soft: #F7EDD6; --navy: #0A1220;
  --ok: #1F7A4D; --ok-bg: #E3F4EA; --danger: #B4372B; --danger-bg: #FBE9E6;
  --meeting: #9A5B14; --meeting-bg: #FBEFD9; --call: #1D6F66; --call-bg: #DDF1EE;
  --shadow: 0 1px 2px rgba(14,22,38,.06), 0 8px 24px rgba(14,22,38,.06); --shadow-lg: 0 20px 50px rgba(14,22,38,.18);
  --radius: 14px; --radius-sm: 10px;
  /* aliases used by inline styles in the app code */
  --ink-soft: var(--muted); --paper: var(--bg); --paper-alt: var(--surface-2); --rule: var(--line); --card: var(--surface); --accent: var(--gold);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1018; --surface: #121A28; --surface-2: #172131; --ink: #EEF1F6; --muted: #9AA6BB; --line: #243044;
    --gold: #D9B25A; --gold-strong: #E8C778; --gold-soft: #2A2415; --navy: #070C14;
    --ok: #62C591; --ok-bg: #13281D; --danger: #F08A7D; --danger-bg: #301816;
    --meeting: #E0A867; --meeting-bg: #2E2312; --call: #72C7BC; --call-bg: #122B28;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 20px 50px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
img { max-width: 100%; }
a { color: var(--gold-strong); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { height: 36px; width: 36px; object-fit: contain; display: block; }
.brand-text { font-family: var(--display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand-text b { color: var(--gold-strong); font-weight: 700; }
#headerRight { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; font-size: .8rem; color: var(--muted); }
.role-pill { background: var(--gold-soft); color: var(--gold-strong); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.switch-role { background: none; border: none; color: var(--muted); font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; padding: 2px 4px; }
.switch-role:hover { color: var(--ink); }
#content { max-width: 1120px; margin: 0 auto; padding: 18px 16px 130px; }
#placementBar { padding: 8px 16px 0; font-size: .76rem; color: var(--muted); max-width: 1120px; margin: 0 auto; }
#scriptureBar { font-family: var(--display); font-style: italic; color: var(--gold-strong); font-size: .86rem; text-align: center; padding: 10px 16px 0; max-width: 760px; margin: 0 auto; }
#verifyBar { margin: 12px auto 0; max-width: 1088px; background: var(--gold-soft); border: 1px dashed var(--gold); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .84rem; }

/* main navigation: bottom bar on phones, sidebar on desktop */
.nav-bar { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; gap: 2px; overflow-x: auto; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(14,22,38,.06); scrollbar-width: none; }
.nav-bar::-webkit-scrollbar { display: none; }
.nav-btn { flex: 0 0 auto; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; color: var(--muted); font: inherit; font-size: .66rem; font-weight: 500; padding: 7px 8px; border-radius: 12px; cursor: pointer; }
.nav-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn.active { color: var(--gold-strong); background: var(--gold-soft); font-weight: 600; }
@media (min-width: 960px) {
  body.has-nav #content { margin-left: 232px; max-width: none; padding: 26px 36px 80px; }
  body.has-nav #content > :not(.nav-bar) { max-width: 980px; margin-left: auto; margin-right: auto; }
  body.has-nav #placementBar, body.has-nav #scriptureBar, body.has-nav #verifyBar { margin-left: 264px; margin-right: 36px; max-width: none; text-align: left; }
  .nav-bar { top: 61px; right: auto; bottom: 0; width: 232px; flex-direction: column; gap: 2px; overflow-y: auto; border-top: none; border-right: 1px solid var(--line); padding: 14px 10px; box-shadow: none; }
  .nav-btn { flex-direction: row; justify-content: flex-start; gap: 12px; min-width: 0; font-size: .9rem; padding: 10px 12px; }
}

/* ---------- forms ---------- */
.field label { display: block; font-size: .74rem; font-weight: 500; color: var(--muted); margin-bottom: 5px; }
input, textarea, select { width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type="file"] { padding: 8px; font-size: .85rem; }
input[type="checkbox"], input[type="radio"] { width: auto; }
textarea { resize: vertical; }
.required-mark { color: var(--danger); }
.grid2, .grid3 { display: grid; gap: 12px; margin-bottom: 12px; }
.grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.phone-row { display: flex; gap: 8px; } .phone-row .phone-code { flex: 0 0 42%; font-size: .85rem; } .phone-row .phone-num { flex: 1; }
.btn-primary { background: linear-gradient(180deg, var(--gold) 0%, var(--gold-strong) 100%); color: #fff; border: none; border-radius: var(--radius-sm); padding: 11px 20px; font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px color-mix(in srgb, var(--gold) 38%, transparent); transition: transform .08s, filter .15s; }
.btn-primary:hover { filter: brightness(1.06); } .btn-primary:active { transform: translateY(1px); } .btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 14px; font: inherit; font-size: .84rem; font-weight: 500; cursor: pointer; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-strong); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); border-radius: var(--radius-sm); padding: 8px 14px; font: inherit; font-size: .84rem; font-weight: 500; cursor: pointer; }

/* ---------- cards & lists ---------- */
.add-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; box-shadow: var(--shadow); }
.add-card h2 { font-size: 1.05rem; margin: 0 0 14px; }
.section-heading { font-family: var(--display); font-weight: 600; font-size: 1.12rem; margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.banner { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; font-size: .84rem; color: var(--muted); margin-bottom: 16px; }
.banner.warn { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-family: var(--display); font-style: italic; }
.lead-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 15px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.lead-card.status-new { border-left-color: var(--danger); } .lead-card.status-in_followup { border-left-color: var(--gold); }
.lead-card.status-meeting_scheduled { border-left-color: var(--meeting); } .lead-card.status-meeting_done { border-left-color: var(--ok); }
.lead-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-name { font-weight: 600; font-size: 1rem; }
.lead-meta { font-size: .8rem; color: var(--muted); margin-top: 7px; display: flex; gap: 14px; flex-wrap: wrap; } .lead-meta a { color: var(--muted); }
.lead-notes { font-size: .86rem; color: var(--muted); margin-top: 9px; font-style: italic; border-left: 2px solid var(--line); padding-left: 11px; }
.lead-agent { font-size: .72rem; color: var(--muted); margin-top: 8px; }
.badge { font-size: .68rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.status-new { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.status-in_followup, .badge.meeting, .badge.status-meeting_scheduled { background: var(--meeting-bg); color: var(--meeting); border-color: transparent; }
.badge.status-meeting_done { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.expand-btn { background: none; border: none; color: var(--gold-strong); font: inherit; font-size: .82rem; font-weight: 500; cursor: pointer; margin-top: 10px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.panel { display: none; margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 14px; } .panel.open { display: block; }
.log-entry { font-size: .84rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: 9px 12px; margin-bottom: 8px; } .log-entry .log-meta, .log-meta { color: var(--muted); font-size: .72rem; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mini-form { display: none; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px; margin-top: 12px; } .mini-form.open { display: block; }
.meeting-box { background: var(--meeting-bg); color: var(--ink); border-radius: var(--radius-sm); padding: 11px 14px; margin-top: 10px; font-size: .86rem; } .meeting-box b { color: var(--meeting); }
.outcome-box { background: var(--ok-bg); border-radius: var(--radius-sm); padding: 11px 14px; margin-top: 10px; font-size: .86rem; }
.entry-phone { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--muted); font-size: .82rem; } .entry-phone:hover { color: var(--gold-strong); border-color: var(--gold); }
.folder-bar { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.folder-btn { background: var(--surface); border: 1px solid var(--line); color: var(--muted); font: inherit; font-size: .83rem; font-weight: 500; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.folder-btn .count { font-size: .72rem; opacity: .8; margin-left: 3px; } .folder-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-bar { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.tab-btn { background: none; border: none; font: inherit; font-size: .92rem; font-weight: 600; color: var(--muted); padding: 9px 10px 11px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--gold); } .tab-btn .count { font-size: .76rem; font-weight: 400; margin-left: 4px; }
.day-folder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.day-folder-header { display: flex; align-items: center; gap: 10px; padding: 13px 18px; cursor: pointer; font-weight: 600; } .day-folder-header:hover { background: var(--surface-2); }
.day-folder-header .day-count { font-size: .78rem; font-weight: 400; color: var(--muted); margin-left: auto; }
.day-folder-body { padding: 0 18px 16px; display: none; } .day-folder-body.open { display: block; }
.summary-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; } .summary-controls input { width: auto; padding: 6px 10px; }
.summary-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.summary-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 620px; }
table.summary-table th { text-align: left; font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.summary-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; } table.summary-table tr:last-child td { border-bottom: none; }
table.summary-table td.name-cell { font-weight: 600; } .note-cell { color: var(--muted); }
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%) translateY(-24px); max-width: 92%; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .86rem; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; z-index: 1000; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; } .toast.error { background: var(--danger); } .toast.success { background: var(--ok); }
.saved-flash { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(16px); background: var(--navy); color: #fff; padding: 7px 16px; border-radius: 999px; font-size: .76rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 900; } .saved-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 960px) { .saved-flash { bottom: 24px; } }

/* ---------- sign-in: the three doors ---------- */
.gate-wrap { min-height: calc(100vh - 140px); display: flex; align-items: center; justify-content: center; padding: 8px 0 40px; background: radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%); }
.gate { width: 100%; max-width: 440px; margin: 28px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg); }
.gate h2 { margin: 0 0 6px; font-size: 1.5rem; } .gate p { color: var(--muted); font-size: .9rem; }
.gate-error { color: var(--danger); background: var(--danger-bg); border-radius: var(--radius-sm); padding: 9px 12px; font-size: .84rem; margin-top: 12px; }
.doors { width: 100%; max-width: 980px; margin: 0 auto; padding: 8px 4px; text-align: center; }
.doors h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 18px 0 8px; } .doors .lede { color: var(--muted); max-width: 520px; margin: 0 auto 26px; }
.door-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
@media (max-width: 800px) { .door-grid { grid-template-columns: 1fr; } }
.door { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s, box-shadow .15s; }
.door:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: var(--shadow-lg); }
.door .door-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-strong); display: grid; place-items: center; } .door .door-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.door h3 { margin: 6px 0 0; font-size: 1.15rem; } .door p { margin: 0; color: var(--muted); font-size: .86rem; } .door .go { margin-top: auto; padding-top: 10px; color: var(--gold-strong); font-weight: 600; font-size: .86rem; }
.code-input { text-align: center; font-size: 1.25rem; letter-spacing: .12em; font-weight: 600; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.install-row { margin-top: 18px; font-size: .8rem; color: var(--muted); text-align: center; }

/* ---------- portal (clients & partners) + projects ---------- */
.portal-hero { background: linear-gradient(135deg, var(--navy), #16243B); color: #fff; border-radius: 20px; padding: 26px; margin-bottom: 22px; box-shadow: var(--shadow-lg); }
.portal-hero h1 { color: #fff; margin: 4px 0 6px; font-size: clamp(1.4rem, 3.5vw, 2rem); } .portal-hero p { margin: 0; color: rgba(255,255,255,.72); font-size: .92rem; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 600; color: var(--gold); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.project-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; text-align: left; font: inherit; color: var(--ink); padding: 0; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.project-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--gold-soft), var(--surface-2)); display: grid; place-items: center; color: var(--gold); overflow: hidden; } .project-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-cover svg { width: 38px; height: 38px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.project-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; } .project-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.project-area { font-size: .76rem; color: var(--muted); } .project-foot { margin-top: auto; font-size: .76rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.pill { display: inline-block; font-size: .68rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); text-transform: capitalize; align-self: flex-start; }
.pill.active { background: var(--ok-bg); color: var(--ok); border-color: transparent; } .pill.planning { background: var(--gold-soft); color: var(--gold-strong); border-color: transparent; }
.pill.on_hold { background: var(--meeting-bg); color: var(--meeting); border-color: transparent; } .pill.completed { background: var(--call-bg); color: var(--call); border-color: transparent; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; } .progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-strong)); border-radius: 999px; transition: width .5s; }
.back-link { background: none; border: none; color: var(--gold-strong); font: inherit; font-weight: 500; cursor: pointer; padding: 0; margin-bottom: 14px; }
.timeline { position: relative; margin-top: 8px; padding-left: 22px; } .timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg); }
.tl-meta { font-size: .74rem; color: var(--muted); margin-bottom: 6px; } .tl-text { white-space: pre-wrap; font-size: .92rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; } .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: var(--surface-2); display: block; }
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(5,9,16,.92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; } .lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.code-chip { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 600; letter-spacing: .06em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; user-select: all; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px; } .check-list label { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .82rem; cursor: pointer; color: var(--ink); margin: 0; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); height: 90px; margin-bottom: 12px; } @keyframes shimmer { to { background-position: -200% 0; } }
.org-node { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; } .org-node:hover { background: var(--surface-2); } .org-caret { width: 16px; color: var(--muted); font-size: .8rem; text-align: center; flex: 0 0 16px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
#verifyBar { gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- website management, media, inquiries, live, history ---------- */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin-bottom: 16px; gap: 2px; flex-wrap: wrap; }
.seg button { background: none; border: none; font: inherit; font-size: .84rem; font-weight: 500; color: var(--muted); padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.chip { font-size: .68rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.chip.live { background: var(--ok-bg); color: var(--ok); border-color: transparent; } .chip.pending { background: var(--meeting-bg); color: var(--meeting); border-color: transparent; }
.web-block { border-bottom: 1px solid var(--line); } .web-block:last-child { border-bottom: none; }
.web-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; flex-wrap: wrap; }
.web-name { font-weight: 600; } .web-count { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.web-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 2px 6px 10px; }
.web-child { margin: 6px 0; } .web-child input { flex: 1; min-width: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--gold-strong); line-height: 1.15; } .stat b small { font-size: .9rem; color: var(--muted); font-weight: 500; } .stat span { font-size: .78rem; color: var(--muted); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.media-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; cursor: zoom-in; } .media-card .vid-grid { margin: 0; display: block; }
.media-meta { padding: 12px 14px; font-size: .84rem; display: flex; flex-direction: column; gap: 4px; }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.vid { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.vid img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.vid .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 2rem; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.vid-frame, .live-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; display: block; }
.live-card { background: var(--navy); color: #fff; border-radius: 18px; padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow-lg); }
.live-card.idle { background: var(--surface); color: var(--ink); border: 1px dashed var(--gold); box-shadow: none; }
.live-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: .86rem; } .live-card.idle .live-head { margin: 0; }
.live-badge { background: #D6322B; color: #fff; font-weight: 700; font-size: .72rem; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; } .live-badge.sm { font-size: .64rem; padding: 2px 8px; }
.live-icon svg, svg.inline-ico { width: 20px; height: 20px; stroke: var(--gold-strong); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.cost-line { margin-top: 12px; padding: 12px 14px; background: var(--gold-soft); border-radius: var(--radius-sm); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: space-between; }
.cost-line span { font-size: .8rem; color: var(--muted); } .cost-line b { font-family: var(--display); font-size: 1.15rem; } .cost-line.mine { background: var(--call-bg); }

/* ---------- partner terms, staff picker, chips ---------- */
.terms-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; }
.terms-title { font-weight: 600; margin-bottom: 8px; } .terms-sub { font-size: .76rem; color: var(--muted); margin: 6px 0; }
.inst-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 6px; } @media (max-width: 560px) { .inst-row { grid-template-columns: 1fr 1fr; } }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--ink); margin: 0; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .8rem; }
.chip-x button { border: none; background: none; color: var(--muted); cursor: pointer; font-size: .9rem; padding: 0 4px; } .chip-x a { color: var(--gold-strong); }
.sp-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .sp-hit { font-size: .8rem !important; }
