:root {
  --bg: #0e1014;
  --panel: #171a20;
  --panel2: #1e222a;
  --line: #2b303a;
  --text: #f5f6f8;
  --muted: #a9b0bd;
  --accent: #3180ff;
  --accent2: #61a1ff;
  --good: #56c596;
  --warn: #f3c969;
  --bad: #ef6d74;
  --shadow: 0 18px 50px rgba(0,0,0,.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 12% -10%, #272a34 0, var(--bg) 34%); color: var(--text); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.shell { min-height: 100vh; }
.topbar { height: 70px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: rgba(14,16,20,.88); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .02em; }
.logo { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: #ffffff; font-weight: 900; }
.brand small { color: var(--muted); font-weight: 500; display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 70px; }
.hero { display: grid; grid-template-columns: 1.4fr .6fr; gap: 24px; align-items: stretch; margin-bottom: 26px; }
.hero-card, .card { background: linear-gradient(180deg, rgba(31,35,43,.96), rgba(22,25,31,.96)); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.hero-card { padding: 30px; }
.hero h1 { font-size: clamp(30px, 5vw, 54px); margin: 6px 0 10px; line-height: .98; letter-spacing: -.04em; }
.eyebrow { color: var(--accent2); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .15em; }
.sub { color: var(--muted); line-height: 1.6; }
.countdown { padding: 25px; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.countdown strong { font-size: 46px; }
.countdown span { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card { padding: 22px; }
.card h2, .card h3 { margin-top: 0; }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; }
.tab { border: 1px solid var(--line); color: var(--muted); background: #16191f; padding: 10px 14px; border-radius: 999px; white-space: nowrap; }
.tab.active { background: var(--accent); color: #ffffff; border-color: var(--accent); font-weight: 800; }
.btn { border: 1px solid var(--line); background: #232832; color: var(--text); padding: 10px 15px; border-radius: 11px; font-weight: 700; }
.btn:hover { filter: brightness(1.08); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn.danger { background: rgba(239,109,116,.12); color: #ff9399; border-color: rgba(239,109,116,.35); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 10px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
input, select, textarea { width: 100%; color: var(--text); background: #101319; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(49,128,255,.16); }
textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 12px; }
.form-grid .span-6 { grid-column: span 6; } .form-grid .span-4 { grid-column: span 4; } .form-grid .span-8 { grid-column: span 8; } .form-grid .span-12 { grid-column: span 12; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { border: 1px solid var(--line); background: #13161c; border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.row.music { grid-template-columns: minmax(170px,1.2fr) minmax(130px,1fr) 150px auto; align-items: center; }
.row.timeline { grid-template-columns: 95px minmax(170px,1fr) minmax(190px,1.3fr) auto; align-items: center; }
.song-title { font-weight: 800; } .song-artist, .meta, .muted { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid var(--line); }
.pill.good { color: var(--good); background: color-mix(in srgb,var(--good) 12%,transparent); border-color:color-mix(in srgb,var(--good) 42%,var(--line)); }
.pill.warn { color: var(--warn); background: color-mix(in srgb,var(--warn) 12%,transparent); border-color:color-mix(in srgb,var(--warn) 42%,var(--line)); }
.pill.bad { color: var(--bad); background: color-mix(in srgb,var(--bad) 12%,transparent); border-color:color-mix(in srgb,var(--bad) 42%,var(--line)); }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.stat { background: #12151b; border: 1px solid var(--line); border-radius: 15px; padding: 16px; }
.stat strong { display: block; font-size: 28px; }
.stat span { color: var(--muted); font-size: 13px; }
.event-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; border: 1px solid var(--line); background: #13161c; border-radius: 16px; padding: 17px; }
.event-card h3 { margin: 0 0 5px; }
.event-list { display: flex; flex-direction: column; gap: 12px; }
.progress { height: 7px; background: #0e1014; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--accent); border-radius: inherit; }
.login { width: min(430px, calc(100% - 32px)); margin: 12vh auto; }
.login .card { padding: 30px; }
.login h1 { margin-bottom: 8px; }
.notice { padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: #12151b; color: var(--muted); margin-bottom: 16px; }
.notice.warn { border-color:color-mix(in srgb,var(--warn) 48%,var(--line)); color:var(--text); background:color-mix(in srgb,var(--warn) 9%,var(--theme-card, var(--panel))); }
.notice.warn strong { color:var(--warn); }
.notice.good { border-color:color-mix(in srgb,var(--good) 48%,var(--line)); color:var(--text); background:color-mix(in srgb,var(--good) 9%,var(--theme-card, var(--panel))); }
.notice.good strong { color:var(--good); }
.notice.bad { border-color:color-mix(in srgb,var(--bad) 48%,var(--line)); color:var(--text); background:color-mix(in srgb,var(--bad) 9%,var(--theme-card, var(--panel))); }
.notice.bad strong { color:var(--bad); }
.statusline { position: fixed; bottom: 16px; right: 16px; z-index: 50; border: 1px solid var(--line); background: rgba(18,21,27,.93); color: var(--muted); padding: 8px 11px; border-radius: 999px; font-size: 12px; backdrop-filter: blur(10px); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--good); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 12px; background: #f6f7f8; color: #111; font-weight: 800; transition: .2s; z-index: 100; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { border: 1px dashed #343a45; border-radius: 14px; padding: 28px; color: var(--muted); text-align: center; }
.split { display:flex; justify-content:space-between; gap:16px; align-items:center; }
.check { display:flex; align-items:center; gap:9px; color:var(--muted); }
.check input { width:auto; }
.locked { opacity:1; }
hr { border:0; border-top:1px solid var(--line); margin:20px 0; }
@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; }
  .col-8,.col-6,.col-4 { grid-column:span 12; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .row.music,.row.timeline { grid-template-columns:1fr; }
  .form-grid .span-4,.form-grid .span-6,.form-grid .span-8 { grid-column:span 12; }
  .topbar { padding:0 16px; }
}

.security-panel { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.security-panel summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 800; user-select: none; }
.security-panel summary:hover { color: var(--text); }
.security-body { padding-top: 14px; }

.question-section { margin-bottom: 0; }
.question-admin-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:center; border:1px solid var(--line); background:#13161c; border-radius:14px; padding:14px; }
.question-admin-main { min-width:0; }
.question-admin-actions { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-end; }
.question-client-section { margin-bottom:0; }
.question-field { border-bottom:1px solid rgba(255,255,255,.06); padding-bottom:18px; margin-bottom:18px; }
.question-field:last-child { border-bottom:0; padding-bottom:0; margin-bottom:0; }
.required-star { color:var(--bad); }
.choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.choice { display:flex; align-items:flex-start; gap:9px; border:1px solid var(--line); background:#101319; border-radius:11px; padding:11px; color:var(--text); }
.choice input { width:auto; margin-top:3px; }
.conditional-note { color:var(--accent2); }
details.card > summary { cursor:pointer; }
@media (max-width:850px){
  .question-admin-row { grid-template-columns:1fr; }
  .question-admin-actions { justify-content:flex-start; }
  .choice-grid { grid-template-columns:1fr; }
}

/* v12 planning section navigation and introductions */
.question-section-tabs { display:flex; gap:8px; overflow-x:auto; padding:2px 0 10px; margin-bottom:14px; scrollbar-width:thin; }
.question-section-tab { flex:0 0 auto; border:1px solid var(--line); background:#141820; color:var(--muted); padding:10px 13px; border-radius:11px; font-weight:800; white-space:nowrap; }
.question-section-tab.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.intro-group { border:1px solid var(--line); background:#12161d; border-radius:16px; padding:16px; margin-bottom:14px; }
.intro-group h3 { margin:0 0 14px; }
.intro-person { position:relative; }
.intro-number { color:var(--accent2); font-size:12px; font-weight:900; letter-spacing:.1em; text-transform:uppercase; margin-bottom:12px; }
.intro-add { width:100%; border-style:dashed; margin-top:4px; }
.two-stats { grid-template-columns:repeat(2,1fr); }
@media (max-width:850px){ .two-stats { grid-template-columns:1fr 1fr; } }

/* v14 venue lookup */
.venue-lookup { position:relative; }
.venue-suggestions { position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:30; border:1px solid var(--line); border-radius:12px; background:#101319; box-shadow:var(--shadow); overflow:hidden; }
.venue-suggestion { width:100%; text-align:left; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--text); padding:11px 12px; cursor:pointer; display:flex; flex-direction:column; gap:3px; }
.venue-suggestion:last-child { border-bottom:0; }
.venue-suggestion:hover,.venue-suggestion:focus { background:#18202b; outline:none; }
.venue-suggestion span { color:var(--muted); font-size:12px; }
.venue-address-check { margin-top:10px; font-size:13px; align-items:flex-start; }

/* v15 song catalog autocomplete */
.song-lookup { position:relative; }
.song-suggestions { position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:40; border:1px solid var(--line); border-radius:12px; background:#101319; box-shadow:var(--shadow); overflow:hidden; max-height:320px; overflow-y:auto; }
.song-suggestion { width:100%; text-align:left; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--text); padding:11px 12px; cursor:pointer; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 12px; align-items:center; }
.song-suggestion:last-child { border-bottom:0; }
.song-suggestion:hover,.song-suggestion:focus { background:#18202b; outline:none; }
.song-suggestion strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.song-suggestion span { color:var(--muted); font-size:12px; text-align:right; }
.song-suggestion small { grid-column:1 / -1; color:var(--accent2); font-size:11px; }
.song-suggestion-empty { color:var(--muted); padding:12px; font-size:13px; line-height:1.45; }


/* v23: keep the question creation/editor panel visible while scrolling long question lists */
@media (min-width: 851px) {
  .question-editor-sticky {
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

/* v24 calendar picker */
.date-picker-wrap { position:relative; }
.date-picker-wrap input[type="date"] { padding-right:48px; min-height:46px; }
.date-picker-wrap input[type="date"]::-webkit-calendar-picker-indicator { opacity:0; position:absolute; inset:0; width:100%; height:100%; cursor:pointer; }
.date-picker-btn { position:absolute; right:6px; top:50%; transform:translateY(-50%); width:36px; height:36px; border:0; border-radius:9px; background:#18202b; color:var(--accent2); display:grid; place-items:center; cursor:pointer; z-index:2; }
.date-picker-btn:hover,.date-picker-btn:focus { background:#202b39; color:#fff; outline:1px solid var(--accent); }
.date-picker-btn svg { width:20px; height:20px; }

/* v24 Open Dance Floor FYI acknowledgements */
.fyi-card { border:1px solid rgba(49,128,255,.42); background:rgba(49,128,255,.075); border-radius:15px; padding:16px; margin-bottom:14px; }
.fyi-card p { margin:8px 0 10px; line-height:1.58; color:var(--text); }
.fyi-label { display:inline-flex; align-items:center; padding:4px 8px; border-radius:999px; background:rgba(49,128,255,.18); color:#9bc3ff; font-size:11px; font-weight:900; letter-spacing:.12em; }
.acknowledgement-control { display:flex; align-items:center; gap:10px; margin-top:12px; border-top:1px solid rgba(255,255,255,.08); padding-top:12px; color:var(--text); font-weight:800; text-transform:none !important; letter-spacing:0 !important; font-size:14px !important; }
.acknowledgement-control input { width:20px; height:20px; flex:0 0 auto; }

/* v24 searchable dance-floor song builder */
.dance-song-builder,.song-file-upload { border:1px solid var(--line); background:#12161d; border-radius:16px; padding:16px; margin-bottom:16px; }
.dance-song-builder h3,.song-file-upload h3 { margin:0 0 6px; }
.dance-song-add { margin-top:16px; padding:14px; border:1px dashed #394456; border-radius:14px; background:#0f1319; }
.dance-song-list { display:flex; flex-direction:column; gap:9px; margin-top:16px; }
.dance-song-row { display:grid; grid-template-columns:34px minmax(0,1.4fr) minmax(150px,1fr) auto; gap:9px; align-items:center; border:1px solid var(--line); background:#101319; border-radius:13px; padding:10px; }
.dance-song-row input { margin:0; }
.dance-song-number { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:rgba(49,128,255,.16); color:#9bc3ff; font-size:12px; font-weight:900; }
.dance-song-readonly { display:grid; grid-template-columns:34px 1fr; gap:10px; align-items:center; border:1px solid var(--line); background:#101319; border-radius:13px; padding:11px; }
.compact-empty { padding:16px; }

/* v24 song-list attachments */
.song-file-picker { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; margin:14px 0 7px; }
.song-file-picker input[type="file"] { padding:9px; }
.song-file-list { display:flex; flex-direction:column; gap:8px; margin-top:14px; }
.song-file-row { display:flex; justify-content:space-between; gap:14px; align-items:center; border:1px solid var(--line); border-radius:12px; background:#101319; padding:11px 12px; }

@media (max-width:850px){
  .dance-song-row { grid-template-columns:32px 1fr; }
  .dance-song-row > input,.dance-song-row > button { grid-column:2; }
  .song-file-picker { grid-template-columns:1fr; }
  .song-file-row { align-items:flex-start; flex-direction:column; }
}

/* Keep Song Name, Artist and timing notes visually together as one song selection. */
.question-field.song-title-field { border-bottom:0; margin-bottom:0; padding-bottom:10px; }
.question-field.song-title-field + .question-field.song-artist-mid { border-bottom:0; margin-bottom:0; padding-bottom:10px; }
.question-field.song-title-field + .question-field.song-artist-end { margin-top:0; }
.question-field.song-artist-mid + .question-field.song-notes-field { padding-top:2px; }
.question-field.song-title-field label,
.question-field.song-artist-field label,
.question-field.song-notes-field label { letter-spacing:.06em; }
\n\n/* v26: render Song Name + Artist + timing notes as one visual block. */\n.song-question-group {\n  border:1px solid var(--line);\n  background:#101319;\n  border-radius:15px;\n  padding:14px;\n  margin-bottom:18px;\n}\n.song-question-group .question-field {\n  border-bottom:0 !important;\n  margin-bottom:0 !important;\n  padding-bottom:12px !important;\n}\n.song-question-group .question-field:last-child {\n  padding-bottom:0 !important;\n}\n.song-question-group .question-field + .question-field {\n  padding-top:2px;\n}\n.song-question-group .meta:empty { display:none; }\n

/* v27 Zoom Call View + Gig Brief */
.zoom-call-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}
.sticky-private-notes{position:sticky;top:18px}
.zoom-event-summary,.brief-event-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--panel-2);margin:16px 0 20px}
.zoom-event-summary strong,.brief-event-head strong{display:block;font-size:1.15rem}.zoom-event-summary span,.brief-event-head span{display:block;color:var(--muted)}
.brief-section{border:1px solid var(--line);border-radius:16px;overflow:hidden;margin:14px 0;background:rgba(255,255,255,.015)}
.brief-section h3{margin:0;padding:12px 14px;background:rgba(56,139,253,.08);border-bottom:1px solid var(--line);font-size:1rem}
.brief-row{display:grid;grid-template-columns:minmax(190px,35%) 1fr;gap:16px;padding:11px 14px;border-bottom:1px solid var(--line)}
.brief-row:last-child{border-bottom:0}.brief-label{font-weight:750;color:#d9e0ec}.brief-value{min-width:0;overflow-wrap:anywhere}.brief-missing .brief-label{color:#f4c56b}.brief-heading{margin:28px 0 10px}.private-note-read{border:1px solid rgba(244,197,107,.35);background:rgba(244,197,107,.07);padding:16px;border-radius:14px;line-height:1.55}.brief-toolbar{align-items:flex-start}
@media(max-width:900px){.zoom-call-grid{grid-template-columns:1fr}.sticky-private-notes{position:static}.brief-row{grid-template-columns:1fr;gap:5px}.zoom-event-summary,.brief-event-head{align-items:flex-start;flex-direction:column}}

/* v29 Gig Brief toolbar cleanup */
@media(max-width:700px){
  .brief-toolbar{display:block}
  .brief-toolbar .actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:16px;width:100%}
  .brief-toolbar .actions .btn{width:100%;justify-content:center}
}


/* v30: keep the active planning-section tab visible after every selection/re-render */
.question-section-tabs { scroll-behavior:smooth; scroll-padding-inline:18px; }
.question-section-tab { scroll-margin-inline:18px; }

/* v33 focused gig brief */
.gig-brief-note{margin:14px 0 10px;color:var(--muted);font-size:13px}.brief-row.gig-brief-cue{background:rgba(45,140,255,.055)}.brief-row.gig-brief-cue .brief-label{color:#73b6ff}.brief-row.gig-brief-cue .brief-value{font-weight:800}

.admin-home-link { text-decoration: none; border-radius: 12px; padding: 4px 7px 4px 4px; margin-left: -4px; transition: background .16s ease, opacity .16s ease; }
.admin-home-link:hover { background: rgba(255,255,255,.055); }
.admin-home-link:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }

/* v39 - wedding-specific Mac Scanner handoff */
.scanner-job-card{border-color:#28558a;background:linear-gradient(180deg,rgba(26,80,139,.12),rgba(255,255,255,.01))}
.scanner-job-card h2{margin:.15rem 0 .35rem}
.scanner-job-card .sub{max-width:720px;margin-bottom:0}
.scanner-safety-note{margin-top:14px}
@media(max-width:760px){.scanner-job-card .split{display:block}.scanner-job-card .actions{margin-top:14px}.scanner-job-card .actions .btn{width:100%}}


/* v40 client-selectable wedding portal themes */
body[data-client-theme="midnight"] {
  --bg:#0e1014; --panel:#171a20; --panel2:#1e222a; --line:#2b303a; --text:#f5f6f8; --muted:#a9b0bd;
  --accent:#3180ff; --accent2:#61a1ff; --good:#56c596; --warn:#f3c969; --bad:#ef6d74;
  --theme-glow:#272a34; --theme-card:#171a20; --theme-card2:#1f232b; --theme-deep:#101319; --theme-row:#13161c; --theme-topbar:rgba(14,16,20,.88);
}
body[data-client-theme="champagne"] {
  --bg:#f7f3ea; --panel:#fffdf8; --panel2:#f4ecdf; --line:#dfd1bc; --text:#332d26; --muted:#766d61;
  --accent:#8f672f; --accent2:#7d5927; --good:#47745a; --warn:#7d5927; --bad:#a54852;
  --theme-glow:#eadbc4; --theme-card:#fffdf8; --theme-card2:#f7efe3; --theme-deep:#fffaf3; --theme-row:#fbf4e9; --theme-topbar:rgba(255,253,248,.90);
}
body[data-client-theme="blush"] {
  --bg:#fff5f7; --panel:#fffafd; --panel2:#fae8ee; --line:#e8cbd5; --text:#412f36; --muted:#806872;
  --accent:#c86d88; --accent2:#b94f71; --good:#648d77; --warn:#ad7c43; --bad:#c76071;
  --theme-glow:#f5dce4; --theme-card:#fffafd; --theme-card2:#fcecf1; --theme-deep:#fff7fa; --theme-row:#fff0f5; --theme-topbar:rgba(255,250,253,.91);
}
body[data-client-theme="sage"] {
  --bg:#f3f6f0; --panel:#fbfdf9; --panel2:#e8efe4; --line:#ccd8c7; --text:#2d392f; --muted:#687568;
  --accent:#6f8f73; --accent2:#58765d; --good:#5b8f69; --warn:#a98749; --bad:#b76565;
  --theme-glow:#dfe9da; --theme-card:#fbfdf9; --theme-card2:#eef3eb; --theme-deep:#f8fbf6; --theme-row:#edf3e9; --theme-topbar:rgba(251,253,249,.92);
}
body[data-client-theme="noir"] {
  --bg:#090a0c; --panel:#121316; --panel2:#1a1c20; --line:#343136; --text:#f7f3ea; --muted:#aaa39a;
  --accent:#d8ad5a; --accent2:#f0c979; --good:#64b684; --warn:#d0a24f; --bad:#e07779;
  --theme-glow:#28231b; --theme-card:#121316; --theme-card2:#1b1c20; --theme-deep:#0d0e10; --theme-row:#141519; --theme-topbar:rgba(9,10,12,.91);
}
body[data-client-theme="coastal"] {
  --bg:#f2f8fb; --panel:#fbfdfe; --panel2:#e8f2f6; --line:#c9dce5; --text:#263b46; --muted:#647b86;
  --accent:#3f91b5; --accent2:#2c7899; --good:#4f8f76; --warn:#aa8450; --bad:#b7656e;
  --theme-glow:#dceef5; --theme-card:#fbfdfe; --theme-card2:#eaf5f9; --theme-deep:#f7fbfd; --theme-row:#edf7fa; --theme-topbar:rgba(251,253,254,.92);
}

body[data-client-theme] { background:radial-gradient(circle at 12% -10%,var(--theme-glow) 0,var(--bg) 36%); transition:background .25s ease,color .25s ease; }
body[data-client-theme] .client-portal .topbar { background:var(--theme-topbar); }
body[data-client-theme] .client-portal .hero-card,
body[data-client-theme] .client-portal .card { background:linear-gradient(180deg,var(--theme-card2),var(--theme-card)); }
body[data-client-theme] .client-portal .tab,
body[data-client-theme] .client-portal .btn { background:var(--panel2); }
body[data-client-theme] .client-portal .btn.primary,
body[data-client-theme] .client-portal .tab.active,
body[data-client-theme] .client-portal .logo { background:var(--accent); border-color:var(--accent); color:#fff; }
body[data-client-theme] .client-portal input,
body[data-client-theme] .client-portal select,
body[data-client-theme] .client-portal textarea,
body[data-client-theme] .client-portal .choice,
body[data-client-theme] .client-portal .song-question-group,
body[data-client-theme] .client-portal .dance-song-builder,
body[data-client-theme] .client-portal .song-file-upload { background:var(--theme-deep); color:var(--text); }
body[data-client-theme] .client-portal .row,
body[data-client-theme] .client-portal .event-card,
body[data-client-theme] .client-portal .stat,
body[data-client-theme] .client-portal .intro-group,
body[data-client-theme] .client-portal .dance-song-row,
body[data-client-theme] .client-portal .dance-song-readonly,
body[data-client-theme] .client-portal .song-file-row { background:var(--theme-row); }
body[data-client-theme] .client-portal input:focus,
body[data-client-theme] .client-portal select:focus,
body[data-client-theme] .client-portal textarea:focus { box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent); }
body[data-client-theme] .client-portal .statusline { background:var(--theme-topbar); }

.theme-trigger { display:inline-flex; align-items:center; gap:7px; }
.theme-overlay { position:fixed; inset:0; z-index:90; display:grid; place-items:start center; padding:86px 18px 30px; background:rgba(0,0,0,.46); backdrop-filter:blur(12px); overflow-y:auto; }
.theme-panel { width:min(900px,100%); border:1px solid var(--line); border-radius:24px; background:linear-gradient(180deg,var(--theme-card2),var(--theme-card)); color:var(--text); box-shadow:0 28px 80px rgba(0,0,0,.36); padding:24px; }
.theme-panel-head { display:flex; gap:20px; justify-content:space-between; align-items:flex-start; }
.theme-panel h2 { margin:6px 0 4px; font-size:28px; }
.theme-panel .sub { margin:0; }
.theme-close { width:40px; height:40px; border-radius:12px; border:1px solid var(--line); background:var(--panel2); color:var(--text); font-size:26px; line-height:1; }
.theme-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:20px; }
.theme-card { position:relative; min-height:150px; border:1px solid var(--line); border-radius:18px; padding:14px; background:var(--theme-deep); color:var(--text); text-align:left; display:flex; flex-direction:column; gap:7px; transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.theme-card:hover { transform:translateY(-2px); border-color:var(--accent); }
.theme-card.selected { border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 25%,transparent); }
.theme-card strong { font-size:15px; }
.theme-card small { color:var(--muted); line-height:1.35; }
.theme-swatches { display:flex; height:58px; overflow:hidden; border-radius:12px; border:1px solid rgba(0,0,0,.08); margin-bottom:4px; }
.theme-swatches i { flex:1; display:block; }
.theme-selected { margin-top:auto; color:var(--accent2); font-weight:900; font-size:11px; text-transform:uppercase; letter-spacing:.1em; }
.theme-hint { margin-top:16px; color:var(--muted); font-size:12px; text-align:center; }
@media(max-width:720px){
  .theme-overlay{padding-top:76px}.theme-panel{padding:18px;border-radius:20px}.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-panel h2{font-size:23px}
}
@media(max-width:440px){.theme-grid{grid-template-columns:1fr}.theme-card{min-height:132px}}

/* v41 readability pass: semantic colours follow the selected client theme. */
body[data-client-theme] .client-portal .btn.primary,
body[data-client-theme] .client-portal .tab.active,
body[data-client-theme] .client-portal .question-section-tab.active { color:#fff; }
body[data-client-theme="champagne"] .client-portal .btn.primary,
body[data-client-theme="champagne"] .client-portal .tab.active,
body[data-client-theme="champagne"] .client-portal .question-section-tab.active { text-shadow:0 1px 1px rgba(0,0,0,.15); }
body[data-client-theme] .client-portal .btn.danger { color:var(--bad); border-color:color-mix(in srgb,var(--bad) 45%,var(--line)); background:color-mix(in srgb,var(--bad) 10%,transparent); }
body[data-client-theme] .client-portal .required-star { color:var(--bad); }
body[data-client-theme] .client-portal .conditional-note { color:var(--accent2); }


/* v42 Classic Wedding elegance pass
   Removes legacy dark utility styling from the default champagne client theme. */
body[data-client-theme="champagne"] {
  --bg:#f7f3eb;
  --panel:#fffdf9;
  --panel2:#f6eee2;
  --line:#dcc8aa;
  --text:#342d25;
  --muted:#74695c;
  --accent:#9f7233;
  --accent2:#7f5a29;
  --good:#4f765d;
  --warn:#815c2a;
  --bad:#a44c55;
  --theme-glow:#eadcc7;
  --theme-card:#fffdf9;
  --theme-card2:#fbf5eb;
  --theme-deep:#fffaf3;
  --theme-row:#fbf5ec;
  --theme-topbar:rgba(255,253,249,.94);
  --shadow:0 18px 48px rgba(83,61,34,.12);
}

body[data-client-theme="champagne"] .client-portal {
  color:var(--text);
}
body[data-client-theme="champagne"] .client-portal .topbar {
  border-bottom-color:#e4d6c2;
  box-shadow:0 8px 30px rgba(83,61,34,.055);
}
body[data-client-theme="champagne"] .client-portal .hero-card,
body[data-client-theme="champagne"] .client-portal .card {
  border-color:#dfccb0;
  box-shadow:0 16px 42px rgba(83,61,34,.10);
}
body[data-client-theme="champagne"] .client-portal .hero h1 {
  font-family:ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-weight:700;
  letter-spacing:-.025em;
}
body[data-client-theme="champagne"] .client-portal .eyebrow {
  color:#89622f;
}

/* Main Overview / Questions navigation */
body[data-client-theme="champagne"] .client-portal .tabs {
  gap:10px;
}
body[data-client-theme="champagne"] .client-portal .tab {
  background:linear-gradient(180deg,#fffdf9,#f4ebdf);
  color:#625645;
  border-color:#ddc9ab;
  box-shadow:0 5px 14px rgba(83,61,34,.055);
}
body[data-client-theme="champagne"] .client-portal .tab:hover {
  background:#f7ecdb;
  color:#4c3f30;
  border-color:#cdae82;
}
body[data-client-theme="champagne"] .client-portal .tab.active {
  background:linear-gradient(180deg,#aa7b39,#95682f);
  border-color:#95682f;
  color:#fff;
  box-shadow:0 8px 18px rgba(143,103,47,.20);
}

/* Wedding planning section navigation: replace the old black pills. */
body[data-client-theme="champagne"] .client-portal .question-section-tabs {
  gap:10px;
  padding:4px 1px 13px;
}
body[data-client-theme="champagne"] .client-portal .question-section-tab {
  background:linear-gradient(180deg,#fffdf9,#f5ede2);
  color:#5d5142;
  border:1px solid #ddc9ab;
  border-radius:13px;
  padding:11px 15px;
  font-weight:750;
  box-shadow:0 6px 16px rgba(83,61,34,.06);
  transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease;
}
body[data-client-theme="champagne"] .client-portal .question-section-tab:hover,
body[data-client-theme="champagne"] .client-portal .question-section-tab:focus-visible {
  background:#f7ecdb;
  color:#473a2c;
  border-color:#c9aa7d;
  transform:translateY(-1px);
  outline:none;
  box-shadow:0 8px 18px rgba(83,61,34,.09);
}
body[data-client-theme="champagne"] .client-portal .question-section-tab.active {
  background:linear-gradient(180deg,#aa7b39,#96682e);
  color:#fff;
  border-color:#96682e;
  text-shadow:0 1px 1px rgba(63,42,18,.20);
  box-shadow:0 9px 20px rgba(143,103,47,.22);
}

/* Form controls */
body[data-client-theme="champagne"] .client-portal input,
body[data-client-theme="champagne"] .client-portal select,
body[data-client-theme="champagne"] .client-portal textarea {
  background:#fffdf9;
  border-color:#dfccb0;
  color:#342d25;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}
body[data-client-theme="champagne"] .client-portal input:focus,
body[data-client-theme="champagne"] .client-portal select:focus,
body[data-client-theme="champagne"] .client-portal textarea:focus {
  border-color:#ad834a;
  box-shadow:0 0 0 3px rgba(159,114,51,.13);
}
body[data-client-theme="champagne"] .client-portal .field label,
body[data-client-theme="champagne"] .client-portal .question-field label {
  color:#665a4b;
}
body[data-client-theme="champagne"] .client-portal .question-field {
  border-bottom-color:rgba(143,103,47,.14);
}

/* Buttons: warm neutral by default, bronze only when primary. */
body[data-client-theme="champagne"] .client-portal .btn {
  background:linear-gradient(180deg,#fffdf9,#f3e9dc);
  border-color:#ddc9ab;
  color:#56493a;
  box-shadow:0 4px 12px rgba(83,61,34,.05);
}
body[data-client-theme="champagne"] .client-portal .btn:hover {
  background:#f6ead8;
  border-color:#caa97b;
}
body[data-client-theme="champagne"] .client-portal .btn.primary {
  background:linear-gradient(180deg,#aa7b39,#95682f);
  border-color:#95682f;
  color:#fff;
  box-shadow:0 7px 17px rgba(143,103,47,.19);
}
body[data-client-theme="champagne"] .client-portal .btn.ghost {
  background:rgba(255,253,249,.74);
}

/* Calendar control */
body[data-client-theme="champagne"] .client-portal .date-picker-btn {
  background:#f5ecdf;
  color:#8f672f;
  border:1px solid #dfccb0;
  box-shadow:none;
}
body[data-client-theme="champagne"] .client-portal .date-picker-btn:hover,
body[data-client-theme="champagne"] .client-portal .date-picker-btn:focus {
  background:#ead8bc;
  color:#68471f;
  outline:1px solid #b58b52;
}

/* Cards, rows and grouped answer controls */
body[data-client-theme="champagne"] .client-portal .row,
body[data-client-theme="champagne"] .client-portal .event-card,
body[data-client-theme="champagne"] .client-portal .stat,
body[data-client-theme="champagne"] .client-portal .intro-group,
body[data-client-theme="champagne"] .client-portal .choice,
body[data-client-theme="champagne"] .client-portal .song-question-group,
body[data-client-theme="champagne"] .client-portal .dance-song-builder,
body[data-client-theme="champagne"] .client-portal .song-file-upload,
body[data-client-theme="champagne"] .client-portal .dance-song-row,
body[data-client-theme="champagne"] .client-portal .dance-song-readonly,
body[data-client-theme="champagne"] .client-portal .song-file-row {
  background:#fffaf3;
  border-color:#e2d0b7;
}
body[data-client-theme="champagne"] .client-portal .dance-song-add {
  background:#fbf3e8;
  border-color:#d4bb98;
}
body[data-client-theme="champagne"] .client-portal .dance-song-number {
  background:#efe0c8;
  color:#76501f;
}
body[data-client-theme="champagne"] .client-portal .progress {
  background:#eadfce;
}

/* Autocomplete / lookup dropdowns should also stay light. */
body[data-client-theme="champagne"] .client-portal .venue-suggestions,
body[data-client-theme="champagne"] .client-portal .song-suggestions {
  background:#fffdf9;
  border-color:#dcc8aa;
  box-shadow:0 16px 34px rgba(83,61,34,.14);
}
body[data-client-theme="champagne"] .client-portal .venue-suggestion,
body[data-client-theme="champagne"] .client-portal .song-suggestion {
  color:#342d25;
  border-bottom-color:#eadfce;
}
body[data-client-theme="champagne"] .client-portal .venue-suggestion:hover,
body[data-client-theme="champagne"] .client-portal .venue-suggestion:focus,
body[data-client-theme="champagne"] .client-portal .song-suggestion:hover,
body[data-client-theme="champagne"] .client-portal .song-suggestion:focus {
  background:#f8efe2;
}
body[data-client-theme="champagne"] .client-portal .song-suggestion small {
  color:#7f5a29;
}

/* Notices and FYI cards */
body[data-client-theme="champagne"] .client-portal .notice {
  background:#fffaf3;
  border-color:#dfccb0;
  color:#5e5244;
}
body[data-client-theme="champagne"] .client-portal .fyi-card {
  border-color:rgba(159,114,51,.34);
  background:rgba(159,114,51,.07);
}
body[data-client-theme="champagne"] .client-portal .fyi-label {
  background:rgba(159,114,51,.14);
  color:#76501f;
}
body[data-client-theme="champagne"] .client-portal .acknowledgement-control {
  border-top-color:rgba(143,103,47,.16);
}
body[data-client-theme="champagne"] .client-portal .statusline {
  background:rgba(255,253,249,.94);
  border-color:#dfccb0;
  box-shadow:0 8px 24px rgba(83,61,34,.10);
}

/* Keep the theme picker itself elegant when Classic Wedding is selected. */
body[data-client-theme="champagne"] .theme-panel {
  border-color:#dcc8aa;
  box-shadow:0 28px 80px rgba(83,61,34,.22);
}
body[data-client-theme="champagne"] .theme-close,
body[data-client-theme="champagne"] .theme-card {
  background:#fffaf3;
  border-color:#dfccb0;
  color:#342d25;
}
body[data-client-theme="champagne"] .theme-card:hover {
  background:#f8efe2;
}

@media (max-width:850px) {
  body[data-client-theme="champagne"] .client-portal .question-section-tab {
    padding:10px 13px;
  }
}

/* v43 Admin workflow / post-wedding follow-up */
.dashboard-section-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-end; margin:8px 0 12px; }
.dashboard-section-head h2 { margin:4px 0 0; }
.workflow-event-card { display:block; padding:0; overflow:hidden; background:linear-gradient(180deg,#171b22,#12161c); }
.workflow-event-card .event-card-main { padding:18px; }
.workflow-strip { display:grid; grid-template-columns:repeat(7,minmax(120px,1fr)); gap:8px; margin-top:15px; overflow-x:auto; padding-bottom:3px; }
.workflow-step { min-width:120px; display:flex; align-items:center; gap:8px; padding:9px 10px; border:1px solid var(--line); border-radius:11px; background:#101319; color:var(--muted); font-size:12px; font-weight:800; white-space:nowrap; }
.workflow-step.done { background:rgba(86,197,150,.11); border-color:rgba(86,197,150,.42); color:#82e2b9; }
.workflow-check { width:19px; height:19px; border-radius:50%; display:grid; place-items:center; flex:0 0 auto; background:#1d222b; color:var(--muted); }
.workflow-step.done .workflow-check { background:rgba(86,197,150,.2); color:#95efc8; }
.waiting-line { margin-top:12px; padding:10px 12px; border-radius:10px; background:rgba(243,201,105,.08); border:1px solid rgba(243,201,105,.25); color:#f0cf82; font-size:13px; }
.waiting-line.complete { background:rgba(86,197,150,.08); border-color:rgba(86,197,150,.25); color:#82e2b9; }
.job-progress-card { margin-bottom:14px; }
.workflow-actions { display:flex; flex-wrap:wrap; gap:9px; margin:15px 0 0; }
.good-btn { background:rgba(86,197,150,.12)!important; border-color:rgba(86,197,150,.42)!important; color:#8ce5bd!important; }
.reminder-card { margin-bottom:0; border-color:rgba(243,201,105,.28); }
.reminder-card textarea { min-height:190px; background:#101319; line-height:1.5; }
.archive-panel { margin-top:18px; border:1px solid var(--line); border-radius:14px; background:#11151b; }
.archive-panel summary { cursor:pointer; padding:14px 16px; color:var(--muted); font-weight:800; }
.archive-panel .archived-list { padding:0 14px 14px; }

@media (max-width:850px) {
  .dashboard-section-head { align-items:flex-start; flex-direction:column; }
  .workflow-strip { grid-template-columns:repeat(7,150px); }
  .workflow-actions .btn { flex:1 1 100%; }
}
.feedback-card { border-color:rgba(86,197,150,.25); }
.feedback-card textarea { min-height:180px; line-height:1.5; background:#101319; }
