/* ==== SiteSecured ==== Navy shield, green tick. Status colours: green covered, red short, amber warn. */
:root {
    --sx-ink: #0A2234;
    --sx-primary: #0B3D5C;
    --sx-primary-hover: #082F47;
    --sx-accent: #2BD08A;
    --sx-accent-ink: #063B26;
    --sx-green: #1F9D63;
    --sx-page: #F3F6F9;
    --sx-card: #FFFFFF;
    --sx-text: #1E293B;
    --sx-muted: #64748B;
    --sx-line: #E2E8F0;
    --sx-good: #15803D;
    --sx-good-bg: #DCFCE7;
    --sx-bad: #B91C1C;
    --sx-bad-bg: #FEE2E2;
    --sx-warn: #B45309;
    --sx-warn-bg: #FEF3C7;
    --sx-radius: 12px;
    --sx-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .05);
    --sx-font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --bs-body-color: var(--sx-text);
    --bs-body-font-family: var(--sx-font);
}

html, body { font-family: var(--sx-font); background: var(--sx-page); color: var(--sx-text); }
a { color: var(--sx-primary); text-underline-offset: 2px; }
a:hover { color: var(--sx-primary-hover); }
h1:focus { outline: none; }
.validation-message { color: var(--sx-bad); font-size: .875rem; }
.invalid { outline: 1px solid var(--sx-bad); }

/* ---- Buttons and forms ---- */
.btn { border-radius: 999px; font-weight: 600; padding-left: 1rem; padding-right: 1rem; }
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-top-left-radius: 999px; border-bottom-left-radius: 999px; }
.btn-group > .btn:last-child { border-top-right-radius: 999px; border-bottom-right-radius: 999px; }
.btn-primary, .btn-primary:disabled { background-color: var(--sx-primary); border-color: var(--sx-primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background-color: var(--sx-primary-hover); border-color: var(--sx-primary-hover); color: #fff; }
.btn-outline-primary { color: var(--sx-primary); border-color: var(--sx-primary); }
.btn-outline-primary:hover, .btn-outline-primary:active { background-color: var(--sx-primary); border-color: var(--sx-primary); color: #fff; }
.btn-outline-secondary { color: var(--sx-text); border-color: #CBD5E1; }
.btn-outline-secondary:hover { background: #EEF2F6; border-color: #CBD5E1; color: var(--sx-text); }
.btn-accent { background: var(--sx-accent); border-color: var(--sx-accent); color: var(--sx-accent-ink); }
.btn-accent:hover { filter: brightness(.95); color: var(--sx-accent-ink); }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--sx-primary); box-shadow: 0 0 0 .2rem rgba(43, 208, 138, .45);
}
.form-check-input:checked { background-color: var(--sx-primary); border-color: var(--sx-primary); }
.form-control, .form-select { border-radius: 8px; }

/* ---- Shell ---- */
.sx-shell { min-height: 100vh; display: flex; flex-direction: column; }
.sx-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.sx-topbar { background: #fff; border-bottom: 1px solid var(--sx-line); position: sticky; top: 0; z-index: 20; }
.sx-topbar-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 4rem; }
.sx-home { text-decoration: none; flex: none; }
.sx-account { margin-left: auto; display: flex; align-items: center; gap: .6rem; flex: none; }
.sx-account form { display: inline; margin: 0; }
.sx-who { font-size: .9rem; color: var(--sx-muted); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-nav { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
.sx-nav::-webkit-scrollbar { display: none; }
.sx-pill { white-space: nowrap; padding: .45rem .85rem; border-radius: 9px; font-size: .92rem; font-weight: 500; color: var(--sx-text); text-decoration: none; }
.sx-pill:hover { background: #EEF2F6; color: var(--sx-text); }
.sx-pill.active { background: var(--sx-ink); color: #fff; box-shadow: inset 0 -3px 0 var(--sx-accent); }
.sx-content { padding-top: 1.75rem; padding-bottom: 3rem; flex: 1; }
.sx-footer { color: var(--sx-muted); font-size: .82rem; padding: 1.25rem 0; border-top: 1px solid var(--sx-line); }

.sx-logo { display: inline-flex; align-items: center; gap: .5rem; line-height: 1; }
.sx-logo-mark { width: 2.1rem; height: 2.1rem; flex: none; }
.sx-logo-word { font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em; }
.sx-logo-word .a { color: var(--sx-primary); }
.sx-logo-word .b { color: var(--sx-green); }

@media (max-width: 820px) {
    .sx-wrap { padding-left: 1rem; padding-right: 1rem; }
    .sx-topbar-inner { flex-wrap: wrap; gap: .5rem 1rem; padding-top: .6rem; }
    .sx-nav { order: 3; width: 100%; padding-bottom: .55rem; }
    .sx-who { display: none; }
    .sx-content { padding-top: 1.25rem; }
}

/* ---- Page parts ---- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--sx-primary); }
.muted { color: var(--sx-muted); }
h5 { font-size: 1.05rem; font-weight: 700; color: var(--sx-ink); }
.pre { white-space: pre-line; }
.nowrap { white-space: nowrap; }
.form-narrow { max-width: 820px; }
.auth-card { max-width: 440px; margin: 1rem auto; background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: var(--sx-radius); box-shadow: var(--sx-shadow); padding: 1.75rem; }
.sx-card { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: var(--sx-radius); box-shadow: var(--sx-shadow); padding: 1.1rem 1.25rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.5rem; }
.stat { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: var(--sx-radius); box-shadow: var(--sx-shadow); padding: .9rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; text-decoration: none; color: inherit; }
.stat .lbl { color: var(--sx-muted); font-size: .82rem; order: -1; }
.stat .num { font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--sx-primary); font-variant-numeric: tabular-nums; }
.stat.bad .num { color: var(--sx-bad); }
.stat.good .num { color: var(--sx-good); }
.stat.warn .num { color: var(--sx-warn); }
.stat-link:hover { border-color: var(--sx-accent); color: inherit; }
.getting-started ol { padding-left: 1.2rem; }

/* ---- Chips ---- */
.chip { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.chip-good { background: var(--sx-good-bg); color: var(--sx-good); }
.chip-bad { background: var(--sx-bad-bg); color: var(--sx-bad); }
.chip-warn { background: var(--sx-warn-bg); color: var(--sx-warn); }
.chip-muted { background: #E2E8F0; color: #475569; }

/* ---- Tables ---- */
.sx-table-wrap { border-radius: var(--sx-radius); overflow: auto; box-shadow: var(--sx-shadow); background: var(--sx-card); border: 1px solid var(--sx-line); margin-bottom: 1.5rem; }
.sx-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sx-table thead th { background: var(--sx-ink); color: #fff; font-weight: 600; font-size: .82rem; text-align: left; padding: .7rem .9rem; white-space: nowrap; }
.sx-table td { padding: .65rem .9rem; border-top: 1px solid var(--sx-line); vertical-align: middle; }
.sx-table tbody tr:hover { background: #F8FAFC; }
.sx-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sx-table tr.cancelled td { color: var(--sx-muted); text-decoration: line-through; }
.sx-table tr.cancelled td:last-child { text-decoration: none; }
.row-link { font-weight: 600; text-decoration: none; }
.row-link:hover { text-decoration: underline; }

/* ---- Event page ---- */
.staffing { border-left: 6px solid var(--sx-line); }
.staffing.ok { border-left-color: var(--sx-good); }
.staffing.short { border-left-color: var(--sx-bad); }
.staffing-nums { display: flex; gap: 2rem; flex-wrap: wrap; }
.staffing-nums .num { font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--sx-primary); font-variant-numeric: tabular-nums; }
.staffing.short .staffing-nums > div:nth-child(3) .num { color: var(--sx-bad); }
.staffing.ok .staffing-nums > div:nth-child(3) .num { color: var(--sx-good); }
.staffing-nums .lbl { color: var(--sx-muted); font-size: .82rem; }
.short-banner { margin-top: .75rem; background: var(--sx-bad-bg); color: var(--sx-bad); font-weight: 700; border-radius: 8px; padding: .55rem .8rem; }
.quick-update { border-top: 1px dashed var(--sx-line); padding-top: .85rem; }
.roster, .sent, .unavail-list { list-style: none; padding: 0; margin: 0; }
.roster li, .unavail-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--sx-line); }
.roster li:first-child, .unavail-list li:first-child { border-top: 0; }
.sent li { padding: .4rem 0; border-top: 1px solid var(--sx-line); }
.sent li:first-child { border-top: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .5rem 0 .5rem .9rem; border-left: 3px solid var(--sx-accent); margin-bottom: .4rem; }
.needs { background: #F1F5F9; border-radius: 10px; padding: .6rem .9rem; height: 100%; }
.needs .num { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--sx-primary); }
.needs.warn { background: var(--sx-bad-bg); }

/* ---- Calendar ---- */
.cal-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: .78rem; font-weight: 700; color: var(--sx-muted); text-align: center; padding: .2rem 0; }
.cal-day { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: 8px; min-height: 6.5rem; padding: .3rem; font-size: .76rem; overflow: hidden; }
.cal-day.other { background: #F8FAFC; color: var(--sx-muted); }
.cal-day.today { border-color: var(--sx-primary); box-shadow: inset 0 0 0 1px var(--sx-primary); }
.cal-date { font-weight: 700; margin-bottom: .15rem; }
.cal-event { display: block; border-radius: 5px; padding: .1rem .3rem; margin-bottom: 2px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.ok { background: var(--sx-good-bg); color: var(--sx-good); }
.cal-event.short { background: var(--sx-bad-bg); color: var(--sx-bad); font-weight: 700; }
.cal-event.cancelled { background: #E2E8F0; color: #64748B; text-decoration: line-through; }
.cal-count { font-weight: 700; }
.cal-away { color: #7C2D12; background: var(--sx-warn-bg); border-radius: 5px; padding: .05rem .3rem; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
    .cal-day { min-height: 4.5rem; font-size: .66rem; padding: .2rem; }
    .cal-count { display: none; }
}

/* ---- Guard link page ---- */
.shift-card.cancelled { opacity: .65; }

/* ---- Landing ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding: 1.5rem 0 2.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--sx-green); margin-bottom: .5rem; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; letter-spacing: -.03em; color: var(--sx-ink); line-height: 1.08; }
.hero .lead { font-size: 1.12rem; color: #334155; margin: 1rem 0 1.5rem; max-width: 38rem; }
.calc { border-top: 6px solid var(--sx-accent); }
.calc-title { font-weight: 800; font-size: 1.15rem; color: var(--sx-ink); margin-bottom: .75rem; }
.calc-answer { display: flex; align-items: baseline; gap: .5rem; margin: 1rem 0 .2rem; font-weight: 700; }
.calc-answer .num { font-size: 3.2rem; font-weight: 800; color: var(--sx-primary); line-height: 1; }
.calc-note { margin-top: .75rem; font-size: .85rem; background: #F1F5F9; border-radius: 8px; padding: .5rem .7rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.feature { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: var(--sx-radius); padding: 1.2rem; box-shadow: var(--sx-shadow); }
.feature h3 { font-size: 1.08rem; font-weight: 700; color: var(--sx-ink); }
.feature p { color: #475569; margin: 0; font-size: .95rem; }
.ficon { font-size: 1.5rem; margin-bottom: .4rem; }
.story { margin-bottom: 2rem; border-left: 6px solid var(--sx-bad); }
.story h2, .cta h2 { font-size: 1.35rem; font-weight: 800; color: var(--sx-ink); }
.cta { text-align: center; background: var(--sx-ink); color: #fff; border-radius: var(--sx-radius); padding: 2.2rem 1rem; }
.cta h2 { color: #fff; margin-bottom: 1rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

#blazor-error-ui { background: #FEF3C7; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
