:root {
    --hub-red: #c1121f;
    --hub-ink: #16181b;
    --hub-green: #176b45;
    --hub-blue: #245aa8;
    --hub-gold: #f0b429;
    --hub-line: #d8dce1;
    --hub-soft: #f5f6f7;
    --hub-white: #fff;
}

* { box-sizing: border-box; }
body { background: var(--hub-soft); color: var(--hub-ink); font-family: Arial, sans-serif; margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: var(--hub-blue); }
.hub-header { align-items: center; background: var(--hub-ink); color: #fff; display: flex; gap: 16px; justify-content: space-between; min-height: 78px; padding: 14px max(16px, calc((100vw - 1180px) / 2)); }
.hub-header h1 { font-size: 1.35rem; margin: 0; }
.hub-header p { margin: 4px 0 0; }
.hub-home { background: #fff; border-radius: 4px; color: var(--hub-ink); font-weight: 800; min-height: 48px; padding: 14px 16px; text-decoration: none; }
.hub-main { margin: 0 auto; max-width: 1180px; padding: 22px 16px 60px; }
.hub-intro { margin-bottom: 20px; }
.hub-intro h2 { font-size: 1.55rem; margin: 0 0 8px; }
.hub-intro p { max-width: 760px; }
.hub-search { background: #fff; border: 1px solid var(--hub-line); border-left: 6px solid var(--hub-blue); margin: 0 0 22px; padding: 18px; }
.hub-search h2 { font-size: 1.25rem; margin: 0 0 14px; }
.hub-search label { max-width: 680px; }
.hub-search-results { display: grid; gap: 8px; }
.hub-search-results > p { margin: 4px 0; }
.hub-search-match { align-items: center; background: var(--hub-soft); border: 1px solid var(--hub-line); display: flex; gap: 12px; justify-content: space-between; padding: 10px; }
.hub-search-match strong, .hub-search-match span { display: block; }
.hub-search-match span { color: #454b52; font-size: .84rem; margin-top: 4px; }
.hub-search-match .hub-button { flex: 0 0 auto; }
.hub-message { background: #fff; border-left: 5px solid var(--hub-blue); margin: 14px 0; padding: 14px; }
.hub-message.is-error { border-left-color: var(--hub-red); }
.hub-login { background: #fff; border: 1px solid var(--hub-line); border-top: 5px solid var(--hub-red); margin: 28px auto; max-width: 430px; padding: 22px; }
.hub-login h2 { margin-top: 0; }
label { display: grid; font-weight: 800; gap: 6px; margin-bottom: 14px; }
input, select, textarea { border: 2px solid #747b83; border-radius: 4px; min-height: 48px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus, a:focus { outline: 4px solid rgba(36, 90, 168, .3); outline-offset: 2px; }
.hub-button { align-items: center; background: var(--hub-red); border: 2px solid var(--hub-red); border-radius: 4px; color: #fff; cursor: pointer; display: inline-flex; font-weight: 800; justify-content: center; min-height: 48px; padding: 11px 15px; text-decoration: none; }
.hub-button.secondary { background: #fff; border-color: #59616a; color: var(--hub-ink); }
.hub-button.warning { background: var(--hub-gold); border-color: #b77e00; color: #111; }
.hub-button.danger { background: #fff; border-color: var(--hub-red); color: #8e0d18; }
.hub-button:disabled { cursor: not-allowed; opacity: .55; }
.session-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.session-card { background: #fff; border: 1px solid var(--hub-line); border-top: 6px solid var(--hub-red); border-radius: 6px; padding: 18px; }
.session-card h2, .session-card h3 { font-size: 1.18rem; margin: 0 0 6px; }
.session-meta { color: #454b52; margin: 0 0 14px; }
.status-line { align-items: center; display: flex; gap: 8px; justify-content: space-between; margin-bottom: 14px; }
.status-badge { background: #e9f3ed; border: 1px solid #72a98b; border-radius: 999px; color: #114c32; font-size: .8rem; font-weight: 900; padding: 6px 9px; }
.status-badge.is-setup { background: #f1f2f3; border-color: #9ca2a8; color: #30343a; }
.metrics { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; }
.metric { background: var(--hub-soft); border-left: 3px solid var(--hub-blue); min-height: 64px; padding: 9px; }
.metric strong { display: block; font-size: 1.2rem; }
.metric span { color: #42484e; font-size: .76rem; }
.session-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.session-actions .hub-button { flex: 1 1 145px; }
.hub-section { border-top: 3px solid var(--hub-ink); margin-top: 30px; padding-top: 18px; }
.hub-section h2 { margin-top: 0; }
.export-grid, .recovery-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-panel { background: #fff; border: 1px solid var(--hub-line); border-radius: 6px; padding: 16px; }
.tool-panel h3 { margin-top: 0; }
.field-help { color: #4a5056; font-size: .8rem; font-weight: 400; }
.account-active-control { margin-bottom: 14px; }
.staff-form-actions, .staff-account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-form-actions .hub-button, .staff-account-actions .hub-button { flex: 1 1 160px; }
.staff-directory { margin-top: 20px; }
.staff-directory h3 { margin: 0 0 5px; }
.staff-directory p { margin: 0; }
.staff-account-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.staff-account-card { background: #fff; border: 1px solid var(--hub-line); border-left: 5px solid var(--hub-blue); border-radius: 6px; padding: 15px; }
.staff-account-card.is-inactive { border-left-color: #747b83; }
.staff-account-card h4 { font-size: 1.05rem; margin: 0 0 4px; }
.staff-account-card dl { display: grid; gap: 8px; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.6fr); margin: 14px 0 0; }
.staff-account-card dt { color: #4a5056; font-size: .82rem; font-weight: 800; }
.staff-account-card dd { margin: 0; overflow-wrap: anywhere; }
.staff-account-actions { margin-top: 14px; }
.primary-account-note { background: var(--hub-soft); color: #454b52; font-size: .82rem; margin-top: 14px; padding: 10px; }
.account-status { border: 1px solid #72a98b; border-radius: 999px; color: #114c32; font-size: .76rem; font-weight: 900; padding: 5px 8px; }
.account-status.is-inactive { border-color: #9ca2a8; color: #30343a; }
.check-grid { display: grid; gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.check-label { align-items: center; display: flex; font-weight: 700; gap: 8px; margin: 0; min-height: 48px; }
.check-label input { min-height: 24px; width: 24px; }
.public-session-card { border-top-color: var(--hub-blue); }
.public-session-card .hub-button { background: var(--hub-blue); border-color: var(--hub-blue); }
.last-updated { color: #4a5056; font-size: .84rem; }
.practice-warning { background: #fff5d6; border: 2px solid #c78a00; margin-bottom: 18px; padding: 14px; }

@media (max-width: 760px) {
    .hub-header { align-items: flex-start; flex-direction: column; }
    .session-grid, .export-grid, .recovery-grid, .staff-account-grid { grid-template-columns: 1fr; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hub-main { padding-inline: 12px; }
    .session-card { padding: 15px; }
    .hub-search { padding: 14px; }
    .hub-search-match { align-items: stretch; flex-direction: column; }
    .hub-search-match .hub-button { width: 100%; }
}
