/* ============================================================
   Comfort Removals — design tokens
   Palette carries over the Comfort green/gold identity, with
   contrast ratios checked against WCAG AA on white.
   ============================================================ */
:root {
    --brand-green: #14612f;
    --brand-green-dark: #0b3a1c;
    --brand-green-light: #2e8b4f;
    --brand-gold: #8f6c0a;          /* 4.9:1 on white — passes AA as text; brighter gold is for dark grounds */
    --brand-gold-bright: #e3c04a;
    --brand-ink: #10231a;           /* headings */
    --brand-body: #39463e;          /* body copy — 9.2:1 on white */
    --brand-muted: #5d6b62;         /* secondary copy — 5.6:1 on white */
    --brand-cream: #f5f8f4;
    --brand-line: #dbe4dc;
    --brand-line-strong: #c3d1c6;

    --danger: #a3231a;
    --danger-bg: #fdecea;
    --danger-line: #f2c2bd;
    --success: #14612f;
    --success-bg: #e6f4ea;
    --success-line: #b6dcc3;

    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(16, 35, 26, .06), 0 2px 8px rgba(16, 35, 26, .05);
    --shadow-md: 0 4px 12px rgba(16, 35, 26, .08), 0 12px 32px rgba(16, 35, 26, .09);
    --shadow-lg: 0 18px 50px rgba(16, 35, 26, .16);

    --max-width: 1180px;
    --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 17px;              /* readable base; everything below scales from this */
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--brand-body);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    color: var(--brand-ink);
    line-height: 1.2;
    margin: 0 0 .55em;
    font-weight: 750;
    letter-spacing: -.015em;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.1rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.65rem, 2.8vw, 2.2rem); letter-spacing: -.02em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-green); text-decoration: none; font-weight: 600; }
a:hover { color: var(--brand-green-dark); text-decoration: underline; }

:focus-visible {
    outline: 3px solid var(--brand-green-light);
    outline-offset: 2px;
    border-radius: 4px;
}

h1:focus { outline: none; }

.muted { color: var(--brand-muted); }
.text-center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section { padding: clamp(3.25rem, 7vw, 5.5rem) 0; }
.section--cream { background: var(--brand-cream); }

.section__head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section__head p { font-size: 1.1rem; color: var(--brand-muted); }

.eyebrow {
    display: inline-block;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand-green);
    background: rgba(20, 97, 47, .1);
    padding: .4rem .9rem;
    border-radius: 100px;
    margin-bottom: 1.1rem;
}

/* ---------- Logo ---------- */
.comfort-logo { display: inline-flex; align-items: center; }
.comfort-logo__text { display: flex; flex-direction: column; line-height: 1; }
.comfort-logo__comfort {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: .01em;
    color: var(--brand-green);
}
.comfort-logo__removals {
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .3em;
    color: var(--brand-gold);
    margin-top: .25rem;
}
.comfort-logo--light .comfort-logo__comfort { color: #fff; }
.comfort-logo--light .comfort-logo__removals { color: var(--brand-gold-bright); }

/* ---------- Header ---------- */
.site { display: flex; flex-direction: column; min-height: 100vh; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--brand-line);
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: .9rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-header__brand { flex: none; }
.site-header__brand:hover { text-decoration: none; }

/* ---------- Nav ---------- */
.nav-menu { margin-left: auto; }

.nav-menu__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 42px;
    padding: 0 10px;
    border: 1px solid var(--brand-line-strong);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}
.nav-menu__toggle span { display: block; height: 2px; background: var(--brand-green); border-radius: 2px; }

.nav-menu__list {
    display: flex;
    align-items: center;
    gap: .2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu__list a {
    display: inline-block;
    padding: .55rem .9rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: .97rem;
    color: var(--brand-ink);
}
.nav-menu__list a:hover { background: var(--brand-cream); text-decoration: none; }
.nav-menu__list a.active { color: var(--brand-green); background: rgba(20, 97, 47, .09); }

.nav-menu__cta {
    background: var(--brand-green) !important;
    color: #fff !important;
    padding: .6rem 1.2rem !important;
    margin-left: .4rem;
}
.nav-menu__cta:hover { background: var(--brand-green-dark) !important; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.6rem;
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--brand-green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--brand-green-dark); color: #fff; box-shadow: var(--shadow-md); }

.btn-secondary { background: var(--brand-cream); color: var(--brand-green); border: 1px solid var(--brand-line-strong); }
.btn-secondary:hover:not(:disabled) { background: #eaf1ea; color: var(--brand-green-dark); }

.btn-gold { background: var(--brand-gold-bright); color: #29230a; }
.btn-gold:hover:not(:disabled) { background: #efd066; color: #29230a; }

.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .7); }
.btn-outline:hover:not(:disabled) { background: rgba(255, 255, 255, .16); color: #fff; border-color: #fff; }

.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; padding: .45rem 1rem; font-size: .92rem; }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }

.btn-call { background: var(--brand-cream); color: var(--brand-green); font-size: .95rem; padding: .6rem 1.1rem; }
.btn-call:hover:not(:disabled) { background: #e8f0e9; color: var(--brand-green-dark); }

.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    color: #fff;
    background:
        radial-gradient(1000px 460px at 85% -15%, rgba(227, 192, 74, .22), transparent 62%),
        linear-gradient(140deg, var(--brand-green-dark) 0%, var(--brand-green) 60%, #1d7a3d 100%);
    background-color: var(--brand-green-dark);
    overflow: hidden;
}
.hero__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: clamp(3.5rem, 8vw, 6rem) 1.5rem;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero__lead {
    font-size: clamp(1.08rem, 1.6vw, 1.28rem);
    color: rgba(255, 255, 255, .93);
    max-width: 58ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.25rem; }
.hero__points {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    margin: 2.75rem 0 0;
    padding: 1.75rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, .25);
    list-style: none;
}
.hero__points li { color: #fff; font-weight: 600; font-size: .98rem; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.75rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); align-items: start; }

.card {
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-line-strong); }
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--brand-muted); }

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(20, 97, 47, .1);
    font-size: 1.55rem;
    margin-bottom: 1.15rem;
}

.check-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.check-list li { position: relative; padding-left: 2.1rem; margin-bottom: .85rem; }
.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: .15rem;
    width: 1.45rem;
    height: 1.45rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-green);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(140deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
    color: #fff;
    text-align: center;
    padding: clamp(3rem, 6vw, 4.5rem) 1.5rem;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .92); max-width: 56ch; margin: 0 auto 1.9rem; font-size: 1.08rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; }

/* ---------- Forms ---------- */
.form-card {
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    box-shadow: var(--shadow-md);
}

.form-grid { display: grid; gap: 1.35rem; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.form-field { display: flex; flex-direction: column; margin-bottom: 1.25rem; }
.form-grid .form-field { margin-bottom: 0; }
.form-field--full { grid-column: 1 / -1; }

.form-field label {
    font-weight: 650;
    font-size: .95rem;
    color: var(--brand-ink);
    margin-bottom: .45rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: .75rem .95rem;
    border: 1px solid var(--brand-line-strong);
    border-radius: 9px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--brand-ink);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #8a978f; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(20, 97, 47, .16);
}
.form-field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }

.hint { font-size: .88rem; color: var(--brand-muted); margin: .5rem 0 0; }

.validation-message, .validation-errors {
    color: var(--danger);
    font-size: .89rem;
    font-weight: 600;
    margin-top: .35rem;
}
.invalid { border-color: var(--danger) !important; }
.valid.modified:not([type=checkbox]) { border-color: var(--brand-green-light); }

.alert {
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.alert--success { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.alert--error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; background: var(--brand-ink); color: rgba(255, 255, 255, .8); }
.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2.5rem;
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.site-footer h3 {
    color: #fff;
    font-size: .85rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.site-footer a { color: rgba(255, 255, 255, .82); font-weight: 500; }
.site-footer a:hover { color: var(--brand-gold-bright); }
.site-footer p { margin-bottom: .6rem; }
.site-footer__brand p { margin-top: 1.1rem; color: var(--brand-gold-bright); font-style: italic; }
.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding: 1.25rem 1.5rem;
    text-align: center;
    font-size: .9rem;
    color: rgba(255, 255, 255, .7);
}
.site-footer__sep { opacity: .5; margin: 0 .4rem; }

/* ============================================================
   Admin panel
   ============================================================ */
.admin { display: flex; flex-direction: column; min-height: 100vh; background: var(--brand-cream); }

.admin-header { background: var(--brand-ink); color: #fff; }
.admin-header__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: .85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.admin-header__brand { display: inline-flex; align-items: center; gap: .7rem; }
.admin-header__brand:hover { text-decoration: none; }
.admin-header__badge {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--brand-gold-bright);
    color: #29230a;
    padding: .2rem .5rem;
    border-radius: 5px;
}

.admin-nav { display: flex; gap: .25rem; margin-left: 1rem; }
.admin-nav a {
    color: rgba(255, 255, 255, .82);
    padding: .5rem .9rem;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.admin-nav a.active { background: rgba(255, 255, 255, .16); color: #fff; }

.admin-header__user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .9rem;
    font-size: .93rem;
    color: rgba(255, 255, 255, .85);
}

.admin-main { flex: 1; padding: 2.25rem 0 4rem; }
.admin-container { max-width: 1320px; margin: 0 auto; padding: 0 1.5rem; }

.admin-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.admin-page-head h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: .3rem; }
.admin-page-head p { color: var(--brand-muted); margin: 0; }

.breadcrumb { margin-bottom: 1.25rem; font-size: .95rem; }

/* Stats */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.stat {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    padding: 1.15rem 1.35rem;
    box-shadow: var(--shadow-sm);
}
.stat__value { display: block; font-size: 2rem; font-weight: 750; color: var(--brand-ink); line-height: 1.1; }
.stat__label { display: block; font-size: .88rem; color: var(--brand-muted); margin-top: .2rem; }

/* Filters */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip {
    padding: .45rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--brand-line-strong);
    background: #fff;
    color: var(--brand-body);
    font-family: inherit;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.chip:hover { border-color: var(--brand-green-light); color: var(--brand-green); }
.chip--active { background: var(--brand-green); border-color: var(--brand-green); color: #fff; }

/* Tables */
.table-wrap {
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th {
    text-align: left;
    font-size: .78rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--brand-muted);
    font-weight: 700;
    padding: .9rem 1.1rem;
    border-bottom: 1px solid var(--brand-line);
    background: #fbfdfa;
    white-space: nowrap;
}
.data-table td {
    padding: .95rem 1.1rem;
    border-bottom: 1px solid var(--brand-line);
    vertical-align: top;
    color: var(--brand-body);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr.clickable { cursor: pointer; transition: background-color .12s ease; }
.data-table tbody tr.clickable:hover { background: var(--brand-cream); }
.data-table .num { text-align: right; white-space: nowrap; }
.data-table .sub { display: block; font-size: .87rem; color: var(--brand-muted); margin-top: .15rem; }
.data-table .link { color: var(--brand-green); font-weight: 600; }

/* Badges */
.badge {
    display: inline-block;
    padding: .25rem .6rem;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
    border: 1px solid transparent;
}
.badge--lg { font-size: .9rem; padding: .4rem .9rem; }
.badge--new { background: #fff4d6; color: #7a5600; border-color: #f0dca4; }
.badge--quoted { background: #dff0fb; color: #10537d; border-color: #b3d9ef; }
.badge--accepted { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.badge--declined { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge--closed { background: #ecefed; color: #4c5952; border-color: #d6ddd8; }
.badge--role { background: rgba(20, 97, 47, .1); color: var(--brand-green); margin-right: .3rem; }

/* Panels */
.detail-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; }
.detail-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }

.panel {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
}
.panel h2 { font-size: 1.15rem; margin-bottom: 1.2rem; }
.panel h3 { font-size: 1rem; margin: 1.4rem 0 .5rem; }

.detail-list { margin: 0; display: grid; gap: .8rem; }
.detail-list > div { display: grid; grid-template-columns: minmax(6.5rem, 10.5rem) minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.detail-list dt { color: var(--brand-muted); font-size: .92rem; font-weight: 600; }
.detail-list dd { margin: 0; color: var(--brand-ink); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

.quoted-text {
    white-space: pre-wrap;
    background: var(--brand-cream);
    border-left: 3px solid var(--brand-line-strong);
    padding: .85rem 1rem;
    border-radius: 0 8px 8px 0;
    color: var(--brand-body);
    font-size: .96rem;
    margin: .5rem 0 0;
}

.prior-quote {
    background: var(--brand-cream);
    border: 1px solid var(--brand-line);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.4rem;
    font-size: .95rem;
}
.prior-quote strong { color: var(--brand-ink); font-size: 1.1rem; }
.prior-quote .quoted-text { background: #fff; margin-top: .7rem; }

.empty-state {
    background: #fff;
    border: 1px dashed var(--brand-line-strong);
    border-radius: var(--radius);
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--brand-muted);
}
.empty-state h3 { color: var(--brand-ink); }

/* Login */
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1.5rem;
    background:
        radial-gradient(800px 400px at 50% 0%, rgba(20, 97, 47, .16), transparent 70%),
        var(--brand-cream);
}
.login-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}
.login-card__head { text-align: center; margin-bottom: 1.75rem; }
.login-card__head h1 { font-size: 1.6rem; margin: 1.4rem 0 .35rem; }
.login-card__head p { color: var(--brand-muted); font-size: .97rem; margin: 0; }
.login-card__foot { text-align: center; margin: 1.5rem 0 0; font-size: .93rem; }

/* ---------- Admin tables on phones ----------
   An eight-column table can only be read by scrolling sideways on a phone, so each
   row becomes a card with its column name shown beside the value. */
@media (max-width: 640px) {
    .table-wrap { overflow-x: visible; border: 0; background: none; box-shadow: none; }

    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table thead { display: none; }

    .data-table tbody tr {
        background: #fff;
        border: 1px solid var(--brand-line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        padding: .35rem .25rem;
        margin-bottom: .9rem;
    }
    .data-table tbody tr:last-child { margin-bottom: 0; }

    .data-table td {
        display: grid;
        grid-template-columns: 8.5rem minmax(0, 1fr);
        gap: .75rem;
        align-items: baseline;
        padding: .5rem .9rem;
        border-bottom: 1px solid var(--brand-line);
        text-align: left;
    }
    .data-table td:last-child { border-bottom: 0; }

    /* Column name, taken from the markup so it stays in step with the header row. */
    .data-table td::before {
        content: attr(data-label);
        font-size: .78rem;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--brand-muted);
    }
    .data-table td.num { text-align: left; }

    /* The whole card is tappable, so the "Open" cell would just be noise. */
    .data-table td.td-open { display: none; }
}

/* ---------- Utilities / responsive ---------- */
.d-none { display: none; }

@media (min-width: 768px) {
    .d-md-inline-flex { display: inline-flex; }
}

@media (max-width: 900px) {
    .nav-menu__toggle { display: flex; }
    .nav-menu__list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .6rem 1.5rem 1.1rem;
        background: #fff;
        border-bottom: 1px solid var(--brand-line);
        box-shadow: var(--shadow-md);
    }
    .nav-menu--open .nav-menu__list { display: flex; }
    .nav-menu__list a { padding: .85rem .6rem; border-radius: 8px; }
    .nav-menu__cta { text-align: center; margin: .4rem 0 0; }
}

@media (max-width: 640px) {
    html { font-size: 16px; }
    .detail-list > div { grid-template-columns: 1fr; gap: .15rem; }
    .admin-header__inner { gap: .75rem; }
    .admin-nav { margin-left: 0; width: 100%; overflow-x: auto; }
    .admin-header__user { margin-left: 0; }
}

/* ---------- Blazor framework UI ---------- */
/* ---------- Boot screen ----------
   Shown while the WebAssembly runtime downloads. The van holds still and the road
   moves under it, which reads as travel without shifting the layout. Progress comes
   from the --blazor-load-percentage variable Blazor updates as assets arrive. */
.boot {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 2rem;
    background:
        radial-gradient(900px 500px at 50% 18%, rgba(46, 139, 79, .38), transparent 62%),
        linear-gradient(160deg, #0b3a1c 0%, #14612f 58%, #0b3a1c 100%);
    animation: boot-in .45s ease-out both;
}

@keyframes boot-in { from { opacity: 0; } to { opacity: 1; } }

.boot__stage { position: relative; width: min(300px, 72vw); }

.boot__van {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .3));
    animation: boot-bob 1.15s ease-in-out infinite;
}

/* A small vertical bob suggests the van is in motion over the road below. */
@keyframes boot-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

.boot__wheel { animation: boot-roll 1.15s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes boot-roll { to { rotate: 360deg; } }

/* The moving element: dashes sliding right-to-left under a stationary van. */
.boot__road {
    height: 4px;
    margin-top: .35rem;
    border-radius: 4px;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, .85) 0 28px, transparent 28px 56px);
    background-size: 56px 100%;
    animation: boot-road .55s linear infinite;
    opacity: .55;
}
@keyframes boot-road { to { background-position-x: -56px; } }

.boot__word {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    animation: boot-rise .6s .12s ease-out both;
}
.boot__word-a {
    font-size: clamp(1.7rem, 6vw, 2.3rem);
    font-weight: 800;
    letter-spacing: .02em;
    color: #fff;
}
.boot__word-b {
    margin-top: .45rem;
    font-size: clamp(.72rem, 2.4vw, .9rem);
    font-weight: 700;
    letter-spacing: .34em;
    text-indent: .34em;
    color: var(--brand-gold-bright);
}

@keyframes boot-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.boot__bar {
    width: min(240px, 62vw);
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    overflow: hidden;
    animation: boot-rise .6s .2s ease-out both;
}
.boot__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-gold-bright), #fff);
    /* Blazor sets this as assets download; the fallback keeps the bar visible
       during the brief moment before the runtime reports any progress. */
    width: var(--blazor-load-percentage, 8%);
    transition: width .3s ease-out;
}

.boot__pct {
    margin: 0;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .75);
    animation: boot-rise .6s .28s ease-out both;
}
.boot__pct::after { content: var(--blazor-load-percentage-text, "Loading"); }

@media (prefers-reduced-motion: reduce) {
    .boot, .boot__van, .boot__wheel, .boot__road,
    .boot__word, .boot__bar, .boot__pct { animation: none; }
    .boot__bar i { transition: none; }
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff8dc;
    border-top: 1px solid #e8d9a0;
    color: #4a3c00;
    bottom: 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .12);
    display: none;
    left: 0;
    padding: .8rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: .6rem;
}
