:root {
    color-scheme: light;
    --lv-ink: #17232e;
    --lv-muted: #62717e;
    --lv-line: #d7dfe4;
    --lv-paper: #ffffff;
    --wash: #edf2f5;
    --navy: #073b44;
    --blue: #0d7f85;
    --red: #a33737;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-size: 16px; line-height: 1.5; }
.admin-page { color: var(--lv-ink); background: var(--wash); }
.login-page { display: block; padding: 0; background: var(--wash); }
.admin-page.login-page {
    display: grid;
    align-items: center;
    justify-items: end;
    padding: clamp(24px, 5vw, 76px);
    background:
        linear-gradient(90deg, rgba(0, 74, 79, .08) 0%, rgba(0, 74, 79, .28) 52%, rgba(0, 57, 63, .78) 100%),
        url('liveview-backdrop-team.png?v=20260912-4') center / cover no-repeat scroll;
}
.liveview-main {
    min-height: calc(100vh - 158px);
    display: grid;
    align-items: center;
    justify-items: end;
    padding: clamp(24px, 5vw, 76px);
    background:
        linear-gradient(90deg, rgba(0, 74, 79, .08) 0%, rgba(0, 74, 79, .28) 52%, rgba(0, 57, 63, .78) 100%),
        url('liveview-backdrop-team.png?v=20260912-4') center / cover no-repeat scroll;
}
.login-card {
    width: min(100%, 445px);
    padding: 44px;
    border: 1px solid rgba(164, 229, 229, .42);
    border-top: 5px solid #27b7b0;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 32px 90px rgba(0, 20, 24, .48);
    backdrop-filter: blur(14px);
}
.brand-mark, .small-mark { display: inline-grid; place-items: center; background: var(--navy); color: white; font-weight: 800; letter-spacing: .08em; }
.brand-mark { width: 68px; height: 62px; margin-bottom: 30px; background: linear-gradient(145deg, #063b43, #0d7279); }
.small-mark { width: 42px; height: 42px; margin-right: 14px; font-size: 12px; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2 { margin: 0; line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 6vw, 2.7rem); }
h2 { font-size: 1.65rem; }
.intro { margin: 12px 0 28px; color: var(--lv-muted); }
.login-card label, .admin-page label { display: block; margin-bottom: 7px; font-weight: 700; }
.login-card label span, .admin-page label span { color: var(--lv-muted); font-weight: 400; }
.login-card input, .admin-page input { width: 100%; min-height: 48px; border: 1px solid #aebbc4; border-radius: 4px; padding: 10px 12px; background: white; color: var(--lv-ink); font: inherit; }
.login-card input:focus, .admin-page input:focus { outline: 3px solid rgba(24, 121, 165, .22); border-color: var(--blue); }
#pin { text-transform: uppercase; letter-spacing: .22em; font-weight: 800; }
.login-card button, .admin-page button { min-height: 48px; border: 0; border-radius: 4px; padding: 11px 20px; background: linear-gradient(135deg, #0b777d, #0d9290); color: white; font: inherit; font-weight: 800; cursor: pointer; }
.login-card button { width: 100%; margin-top: 14px; }
.login-card button:hover, .admin-page button:hover { background: var(--navy); }
.liveview-links { padding: 64px clamp(24px, 5vw, 76px); background: #f7faf9; color: var(--lv-ink); }
.liveview-links-heading { max-width: 720px; margin-bottom: 28px; }
.liveview-links-heading h2 { margin-bottom: 10px; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.liveview-links-heading p:last-child { margin: 0; color: var(--lv-muted); font-size: 1.05rem; }
.liveview-link-grid { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.liveview-link-card { min-height: 330px; display: grid; grid-template-rows: auto 3.8rem minmax(4.5rem, 1fr) auto; align-content: start; padding: 28px; border: 1px solid var(--lv-line); border-radius: 16px; background: #fff; box-shadow: 0 12px 34px rgba(16, 24, 32, .06); }
.liveview-link-card > span { display: inline-block; margin-bottom: 16px; border-radius: 999px; padding: 6px 10px; background: #dff7ef; color: #0b4f4a; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.liveview-link-card h3 { margin: 0; color: var(--lv-ink); font-size: 1.35rem; line-height: 1.2; }
.liveview-link-card p { margin: 14px 0 20px; color: var(--lv-muted); }
.liveview-link-card a { color: #0b4f4a; font-weight: 800; text-decoration: underline; text-decoration-color: #ffd338; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.liveview-link-card--photo { overflow: hidden; border: 0; color: #fff; }
.liveview-link-card--photo {
    background:
        linear-gradient(180deg, rgba(2, 33, 39, .08) 0%, rgba(2, 33, 39, .92) 76%),
        url('../assets/insight-damage-patterns-targeted-training.jpg') center / cover no-repeat;
}
.liveview-link-card--photo > span { align-self: flex-start; background: #ffd338; color: #17232e; }
.liveview-link-card--photo h3,
.liveview-link-card--photo p { color: #fff; }
.liveview-link-card--photo a { align-self: flex-start; color: #fff; }
.help { margin: 24px 0 0; color: var(--lv-muted); font-size: .9rem; }
.help a { color: var(--blue); font-weight: 700; }
.access-help { margin-top: 22px; border: 1px solid #b8dcd2; border-left: 5px solid #218779; padding: 24px; background: #eef8f5; }
.access-help h2 { color: var(--navy); font-size: 1.35rem; }
.access-help p { margin: 12px 0; color: var(--lv-muted); }
.help-button { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 20px; border-radius: 4px; padding: 11px 20px; background: linear-gradient(135deg, #0b777d, #0d9290); color: white; font-weight: 800; text-align: center; text-decoration: none; }
.help-button:hover, .help-button:focus-visible { background: var(--navy); }
.alert, .notice { margin: 20px 0; border-left: 4px solid var(--red); padding: 12px 14px; background: #fff0f0; }
.notice { border-color: #267b51; background: #edf8f1; }
.admin-page .topbar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 12px max(20px, calc((100vw - 1120px) / 2)); background: var(--navy); color: white; }
.admin-page .topbar > div { display: flex; align-items: center; }
.admin-page .topbar a { color: white; }
.admin-shell { width: min(1120px, calc(100% - 32px)); margin: 34px auto 70px; }
.panel { margin-bottom: 22px; padding: 28px; background: white; border: 1px solid var(--lv-line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.settings-grid, .org-form { display: grid; grid-template-columns: 1.25fr 1.25fr auto; gap: 18px; align-items: end; }
.org-form { grid-template-columns: 1.25fr 2fr .8fr auto; }
.count { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; background: var(--wash); font-weight: 800; }
.directory-tools { margin: -4px 0 22px; }
.directory-tools label { font-size: .86rem; }
.directory-tools input { max-width: 440px; background: #fbfdfd; }
.filter-empty { margin: 4px 0 18px; }
.org-row { border-top: 1px solid var(--lv-line); }
.org-row:last-child { border-bottom: 1px solid var(--lv-line); }
.org-row summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 6px; cursor: pointer; }
.org-row.enabled > summary { border-left: 4px solid #9ccfaf; padding-left: 14px; background: #eef8f1; }
.org-row.disabled > summary { border-left: 4px solid #dfa3a3; padding-left: 14px; background: #fceeee; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 82px; min-height: 36px; border: 1px solid transparent; border-radius: 99px; padding: 6px 12px; font-size: .8rem; font-weight: 800; text-decoration: none; }
.status-badge.enabled { border-color: #86c39c; background: #bfe4ca; color: #1d5d3a; }
.status-badge.disabled { border-color: #d99494; background: #efbcbc; color: #7d2d2d; }
.status-badge:hover, .status-badge:focus-visible { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(13, 127, 133, .14); }
.edit-form { padding: 8px 6px 20px; }
.inline-form { padding: 0 6px 20px; }
.secondary { min-height: 40px; background: transparent; color: var(--red); border: 1px solid #d8a5a5; }
.empty { color: var(--lv-muted); }
@media (max-width: 800px) {
    .settings-grid, .org-form { grid-template-columns: 1fr; }
    .liveview-main { justify-items: center; background-position: 38% center; background-attachment: scroll; }
    .liveview-link-grid { grid-template-columns: 1fr; }
    .liveview-link-card { grid-template-rows: auto auto auto auto; }
    .admin-page.login-page { justify-items: center; background-position: 38% center; background-attachment: scroll; }
    .login-card { padding: 32px 25px; }
    .panel { padding: 22px 18px; }
}
@media (min-width: 801px) and (max-width: 1100px) {
    .liveview-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .liveview-link-card--photo { grid-column: 1 / -1; }
}
