/* =========================================================================
   NZ Gold Guitar Awards — design system
   Shared by the web app (Blazor WebAssembly) and the MAUI hybrid app.
   Breakpoints: phone < 640px, tablet < 960px, desktop >= 960px.
   ========================================================================= */

:root {
    --ink: #16140F;
    --ink-2: #3F3A30;
    --muted: #5B5547;
    --black: #0E0D0A;
    --black-2: #2A2620;
    --gold: #E5AE10;
    --gold-light: #F3D57A;
    --gold-soft: #FBF1D3;
    --gold-deep: #7A5600;
    --ground: #F5F3EE;
    --surface: #FFFFFF;
    --line: #E2DDD1;
    --line-soft: #EEEAE0;
    --line-strong: #CFC8B8;
    --ok: #1E6B45;
    --ok-bg: #E4F1E9;
    --warn: #8A4A00;
    --warn-bg: #FBEBD3;
    --danger: #A3221B;
    --radius: 12px;
    --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--gold-deep); }
a:hover { color: #4F3800; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; line-height: 1.1; }
h1 { font-size: 40px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
h1:focus { outline: none; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--gold-deep); letter-spacing: .08em; text-transform: uppercase; }
.lead { margin: 4px 0 0; color: var(--muted); }
.display-num { font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1.1; }

.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grow { flex-grow: 1; min-width: 0; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 0 16px; border-radius: 8px;
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
    font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #FAF8F3; color: var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn-xl { min-height: 52px; padding: 0 24px; font-size: 17px; }
.btn-sm { min-height: 36px; padding: 0 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #2D2A22; color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #D6A10C; color: var(--ink); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-dashed { border-style: dashed; border-color: #A99F88; color: var(--gold-deep); background: transparent; }

/* ---------- forms ---------- */
.field label, .label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.optional { font-weight: 400; color: var(--muted); }
.input {
    width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 8px;
    padding: 0 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink);
}
.input:focus { outline: 3px solid var(--gold-light); border-color: var(--gold-deep); }
select.input { padding-right: 32px; }
.input-sm { min-height: 40px; font-size: 15px; }
.input-code { font-size: 24px; letter-spacing: .3em; font-weight: 600; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 12px; top: 10px; color: var(--muted); }
.input-prefix > .input { padding-left: 26px; }
.input-search { position: relative; }
.input-search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-search > .input { padding-left: 38px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.error-text { font-size: 14px; color: var(--danger); margin-top: 6px; }
.grid2, .grid3, .grid5 { display: grid; gap: 16px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; background: #fff; }
.radio-card input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--ink); flex-shrink: 0; }
.radio-card.on { border: 2px solid var(--ink); padding: 11px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 600; font-size: 14px; margin-bottom: 8px; }

/* ---------- cards, badges, chips ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 24px; }
.card-head { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.card-dark { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px; }
.card-dark h2, .card-dark h3 { color: var(--gold-light); }
.note { display: flex; gap: 12px; padding: 14px 18px; background: var(--gold-soft); border-radius: var(--radius); font-size: 15px; }
.note-ok { display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center; padding: 14px 20px; background: var(--ok-bg); color: #14482F; border-radius: var(--radius); font-size: 15px; }
.note-ok a { color: #14482F; font-weight: 600; }
.note-warn { display: flex; gap: 8px; align-items: center; padding: 14px 20px; background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); font-size: 15px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; font-family: var(--font-body); vertical-align: middle; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-neutral { background: var(--line-soft); color: var(--ink-2); }
.badge-dark { background: var(--ink); color: var(--gold-light); }
.badge-gold { background: var(--gold-soft); color: var(--gold-deep); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--gold-soft); font-size: 14px; font-weight: 600; }
.chip button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--gold-deep); display: flex; align-items: center; justify-content: center; }
.chip button:hover { background: rgba(122, 86, 0, .12); }

.pill { min-height: 38px; min-width: 64px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pill.on, .pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { min-height: 38px; padding: 0 14px; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.avatar { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--gold-soft); color: var(--gold-deep); display: flex; align-items: center; justify-content: center; font-weight: 600; }

.switch { position: relative; width: 48px; height: 28px; border-radius: 999px; border: 0; cursor: pointer; padding: 0; background: #A99F88; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { left: 23px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .rowlink { font-weight: 600; color: var(--ink); text-decoration: none; }
.table .rowlink:hover { text-decoration: underline; }
.table-tight td { padding: 10px 12px; vertical-align: top; }
.table-tight th { padding: 10px 12px; }

.dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; }
.dl dt { font-size: 13px; color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; font-size: 14px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); }

/* ---------- public layout ---------- */
.pub-header { background: var(--black); padding: 16px 24px; }
.pub-header-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pub-header img { height: 56px; width: auto; display: block; }
.pub-header a.light { color: var(--gold-light); font-size: 14px; font-weight: 500; }
.pub-main { max-width: 1180px; margin: 0 auto; padding: 40px 24px 64px; }
.pub-main-narrow { max-width: 960px; }

.stepper { list-style: none; margin: 0 0 32px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; font-size: 15px; color: var(--muted); }
.stepper li .n { width: 28px; height: 28px; border-radius: 50%; background: var(--line-soft); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.stepper li.done { color: var(--ink); cursor: pointer; }
.stepper li.done .n { background: var(--ok); color: #fff; }
.stepper li.current { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.stepper li.current .n { background: var(--gold); color: var(--ink); }
.progress-mobile { display: none; }

.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; align-items: start; }
.sticky { position: sticky; top: 24px; }

.fees { margin: 0; display: grid; grid-template-columns: 1fr auto; row-gap: 10px; font-size: 15px; }
.fees dd { margin: 0; font-weight: 600; }
.fees dt span { color: #BDB5A3; }

.perf-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.add-card { background: #fff; border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 24px; }

.age-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.age-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 0; background: #fff; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.age-head.open { background: var(--ink); color: #fff; }
.age-head .t { font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.age-head .d { font-size: 15px; color: var(--muted); margin-left: 8px; }
.age-head.open .d { color: #D8D1C0; }
.age-head .price { font-weight: 600; color: var(--gold-deep); white-space: nowrap; }
.age-head.open .price { color: var(--gold-light); }
.sec-row { display: grid; grid-template-columns: minmax(150px, 1fr) 250px minmax(0, 1.6fr); gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.sec-row .name { font-weight: 600; }
.sec-row .name small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }

.summary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; }
.summary-list small { display: block; font-size: 13px; color: var(--muted); }
.total-row { border-top: 2px solid var(--ink); padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.mobile-total { display: none; }

.done-icon { width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; }
.facts { display: flex; flex-wrap: wrap; gap: 32px; }
.facts .k { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ---------- auth layout ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand { background: var(--black); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-brand img { width: 100%; max-width: 520px; height: auto; display: block; }
.auth-brand p.big { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1.05; color: var(--gold-light); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }

/* ---------- admin layout ---------- */
.admin { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--black); color: #E9E4D8; padding: 20px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side img.logo { width: 100%; height: auto; display: block; }
.navh { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #A79F8C; font-weight: 600; padding: 0 12px; margin: 0 0 6px; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 8px; color: #E9E4D8; text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { background: #1E1B15; color: #fff; }
.nav a.active { background: var(--gold); color: var(--ink); font-weight: 600; }
.nav .sub a { min-height: 36px; padding-left: 34px; font-size: 14px; color: #CFC8B8; }
.nav .sub a.active { color: var(--ink); }
.nav a.current { color: #fff; font-weight: 600; }
.status-dot { width: 8px; height: 8px; margin: 0 5px; border-radius: 50%; background: #6E6A61; flex-shrink: 0; }
.status-dot.live { background: #3FB57A; }
.side-user { margin-top: auto; border-top: 1px solid var(--black-2); padding-top: 16px; display: flex; align-items: center; gap: 10px; }
.side-user .av { width: 36px; height: 36px; border-radius: 50%; background: var(--black-2); color: var(--gold-light); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.side-user button { width: 40px; height: 40px; border-radius: 8px; color: #E9E4D8; background: transparent; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.side-user button:hover { background: #1E1B15; }

.admin-main { padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.crumbs { font-size: 14px; color: var(--muted); }

.mbar { display: none; }
.tabbar { display: none; }
.drawer-scrim { display: none; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.stat .k { font-size: 14px; color: var(--muted); }
.stat .v { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.1; }

.toolbar { padding: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.toolbar .input-search { flex: 1 1 240px; }
.toolbar select.input { width: auto; }

.comp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.comp-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.comp-card.live { border: 2px solid var(--gold); padding: 23px; }
.comp-card dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.comp-card dt { font-size: 13px; color: var(--muted); }
.comp-card dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 28px; }
.comp-add { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--gold-deep); background: transparent; min-height: 260px; font: inherit; font-weight: 600; cursor: pointer; }

.entry-cards { display: none; list-style: none; margin: 0; padding: 0; }
.entry-cards a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }

.cols-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }

.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px; width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(22, 20, 15, .12); text-align: left; }
.menu button { width: 100%; min-height: 40px; padding: 0 12px; border: 0; background: #fff; border-radius: 6px; font: inherit; font-size: 15px; text-align: left; cursor: pointer; color: var(--ink); }
.menu button:hover { background: var(--ground); }
.menu .danger { color: var(--danger); }
.relative { position: relative; }

.rule { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 24px; border-top: 1px solid var(--line-soft); }
.rule.off .strong { color: var(--muted); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-soft); color: var(--ink-2); margin-left: 6px; vertical-align: middle; }
.tag-gold { background: var(--gold-soft); color: var(--gold-deep); }

.toggle-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.toggle-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- timetable ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.tabs button { display: flex; flex-direction: column; align-items: flex-start; padding: 10px 18px; border: 0; background: transparent; font: inherit; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; line-height: 1.3; cursor: pointer; }
.tabs button small { font-weight: 400; font-size: 13px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 16px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line-soft); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.tl-scroll { overflow-x: auto; padding: 0 16px 16px; }
.tl { display: grid; min-width: 760px; }
.tl-head { padding: 10px 8px; font-weight: 600; font-size: 14px; }
.tl-col { position: relative; border-left: 1px solid var(--line); }
.tl-times { position: relative; font-size: 12px; color: var(--muted); }
.tl-times span { position: absolute; right: 8px; transform: translateY(-50%); }
.tl-break { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #EEEAE0 0 4px, #F8F6F1 4px 8px); }
.tl-blk { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 6px 8px; overflow: hidden; font-size: 13px; line-height: 1.25; color: var(--ink); border: 0; text-align: left; font-family: inherit; cursor: pointer; }
.tl-blk strong { display: block; font-size: 14px; }
.tl-blk.sel { outline: 3px solid var(--ink); outline-offset: -1px; }
.ag-jun { background: #FBE3A6; }
.ag-int { background: #CFE3F2; }
.ag-sen { background: #EBD5C6; }
.ag-cla { background: #D7E8CF; }
.ag-opn { background: #E3D9F0; }
.sess-list { display: none; }
.sess-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-top: 1px solid var(--line-soft); background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.sess-btn .t { width: 56px; font-weight: 600; font-size: 15px; flex-shrink: 0; }
.sess-btn .sw { width: 10px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.sess-break { padding: 8px 16px; background: var(--ground); font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); }
.venue-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.venue-chips .pill { flex-shrink: 0; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(22, 20, 15, .55); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 1000; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 48px); overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: 0 20px 48px rgba(22, 20, 15, .28); }
.modal-lg { max-width: 720px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px 0; }
.modal-head h2 { font-size: 28px; }
.modal-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ground); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--ink); }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.checklist { background: var(--ground); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.checklist .ok { display: flex; gap: 8px; align-items: flex-start; color: var(--ok); font-size: 14px; }
.checklist .bad { display: flex; gap: 8px; align-items: flex-start; color: var(--danger); font-size: 14px; }
.checklist svg { margin-top: 3px; flex-shrink: 0; }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.opt-row input { width: 24px; height: 24px; margin: 0; accent-color: var(--ink); flex-shrink: 0; }
.opt-row.disabled { cursor: not-allowed; color: var(--muted); }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1100; width: min(440px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(22, 20, 15, .25); font-size: 15px; }
.toast.warn { background: var(--warn); }
.toast button { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ---------- demo launcher ---------- */
.demo-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.demo-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.demo-card:hover { border-color: var(--gold); color: var(--ink); }
.demo-card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.demo-card.dark h2 { color: var(--gold-light); }
.demo-card.dark:hover { color: #fff; }

/* ======================= responsive ======================= */
@media (max-width: 1100px) {
    .comp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols-aside { grid-template-columns: 1fr; }
    .grid5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hide-md { display: none; }
}

@media (max-width: 1000px) {
    .layout-aside { grid-template-columns: 1fr; }
    .sticky { position: static; }
}

@media (max-width: 960px) {
    .admin { grid-template-columns: 1fr; }
    .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 900; transform: translateX(-100%); transition: transform .2s; }
    .admin.drawer-open .side { transform: none; }
    .admin.drawer-open .drawer-scrim { display: block; position: fixed; inset: 0; background: rgba(22, 20, 15, .5); z-index: 800; }
    .mbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 700; background: var(--black); color: #fff; padding: 8px 8px 8px 12px; }
    .mbar .title { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--gold-light); }
    .mbar button { width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 700; background: var(--black); padding-bottom: env(safe-area-inset-bottom); }
    .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; color: #A79F8C; text-decoration: none; font-size: 12px; font-weight: 600; }
    .tabbar a.active { color: var(--gold-light); }
    .admin-main { padding: 20px 16px 96px; gap: 16px; }
    h1 { font-size: 34px; }
    .comp-cards { grid-template-columns: 1fr; }
    .dl { grid-template-columns: 1fr 1fr; }
    .rule { grid-template-columns: 52px minmax(0, 1fr); padding: 14px 16px; }
    .rule > :last-child { grid-column: 2; justify-self: start; }
    .table-entries { display: none; }
    .entry-cards { display: block; }
    .tl-scroll, .legend { display: none; }
    .sess-list { display: block; }
}

@media (max-width: 860px) {
    .auth { grid-template-columns: 1fr; min-height: 0; }
    .auth-brand { padding: 28px 20px; gap: 16px; }
    .auth-brand p.big { font-size: 28px; }
    .auth-brand .tagline { display: none; }
    .auth-main { padding: 28px 20px 48px; align-items: flex-start; }
}

@media (max-width: 760px) {
    .sec-row { grid-template-columns: 1fr; gap: 10px; padding: 14px 16px; }
}

@media (max-width: 640px) {
    .grid2, .grid3, .demo-cards { grid-template-columns: 1fr; }
    .grid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pub-header { padding: 12px 16px; }
    .pub-header img { height: 38px; }
    .pub-header a.light { display: none; }
    .pub-main { padding: 20px 16px 120px; }
    .stepper { display: none; }
    .progress-mobile { display: block; margin-bottom: 16px; }
    .progress-mobile .bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
    .progress-mobile .bars span { height: 6px; border-radius: 3px; background: #DDD7C9; }
    .progress-mobile .bars span.on { background: var(--gold); }
    h1 { font-size: 32px; }
    .card-pad { padding: 18px 16px; }
    .perf-card { padding: 12px; }
    .perf-card .badge { display: none; }
    .age-head .t { font-size: 22px; }
    .age-head .d { display: block; margin-left: 0; font-size: 14px; }
    .wizard-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
    .wizard-actions .btn { flex: 1; }
    .mobile-total { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--ink); color: #fff; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); align-items: center; gap: 12px; }
    .summary-card { display: none; }
    .modal-backdrop { align-items: flex-end; padding: 0; }
    .modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; }
    .modal-foot .btn { flex: 1; }
    .toasts { bottom: 88px; }
}

/* ---------- Blazor template defaults (kept) ---------- */
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "An error has occurred."; }
#blazor-error-ui { color-scheme: light only; background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1200; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
