:root {
    --forest: #1F4D3A;
    --forest-600: #183D2E;
    --forest-50: #E7EFE9;
    --amber: #C8873A;
    --amber-600: #A86E2C;
    --amber-50: #F7ECDD;
    --signal: #7ED957;
    --night: #121417;
    --ink: #16181B;
    --ink-2: #2A2D31;

    --app-bg: #F5F3EE;
    --surface: #FFFFFF;
    --surface-2: #FAF9F6;
    --surface-3: #EFEDE8;

    --border: #E2DED6;
    --border-subtle: #ECE9E2;
    --border-dashed: #D2CCC0;

    --text: #16181B;
    --text-2: #3E4349;
    --text-3: #676D74;
    --text-4: #6B7076;
    --text-faint: #C5C8CB;

    --btn-bg: var(--ink);
    --btn-fg: #FFFFFF;

    --sel-bg: var(--amber-50);
    --sel-text: #7A4A12;
    --sel-border: #E8CFAA;

    --accent: var(--ink);
    --accent-hover: var(--ink-2);
    --accent-bg: #EFEDE8;
    --accent-border: #D2CCC0;

    --danger: #B4432E;
    --danger-bg: #F8E8E3;
    --danger-border: #EBC3B8;

    --success: #2F7A2F;
    --success-bg: #EAF6E2;
    --success-border: #BFE3A8;

    --overlay: rgba(18, 20, 23, 0.5);
    --card-shadow: 0 1px 2px rgba(18, 20, 23, 0.06);
    --modal-shadow: 0 24px 48px -12px rgba(18, 20, 23, 0.35);
    --focus-ring: 0 0 0 3px rgba(200, 135, 58, 0.28);

    --sidebar-bg: var(--night);
    --sidebar-text: rgba(237, 238, 240, 0.62);

    --radius: 6px;
    --radius-lg: 10px;
    --speed: 160ms;

    --sans: "Manrope", "Segoe UI", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

:root[data-theme="dark"] {
    --app-bg: #111315;
    --surface: #1A1D20;
    --surface-2: #1F2226;
    --surface-3: #272B30;

    --border: #30343A;
    --border-subtle: #24282C;
    --border-dashed: #3A3F45;

    --text: #EDEEF0;
    --text-2: #C7CACE;
    --text-3: #979CA2;
    --text-4: #8A9097;
    --text-faint: #464B51;

    --btn-bg: #EDEEF0;
    --btn-fg: #111315;
    --btn-hover: #FFFFFF;

    --sel-bg: #2B2318;
    --sel-text: #E6B275;
    --sel-border: #4A3A25;

    --accent: #EDEEF0;
    --accent-hover: #FFFFFF;
    --accent-bg: #272B30;
    --accent-border: #3A3F45;

    --danger: #EE8B74;
    --danger-bg: #3A211B;
    --danger-border: #5C3328;

    --success: #7ED957;
    --success-bg: #1C3320;
    --success-border: #2F5634;

    --warning: #E3AE62;
    --warning-bg: #372A16;
    --warning-border: #5A4424;

    --overlay: rgba(0, 0, 0, 0.6);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    --modal-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);

    --sidebar-bg: #0C0D0F;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
}

body {
    font: 500 14px/1.5 var(--sans);
    color: var(--text);
    background: var(--app-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.brand-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.brand-mark .brand-wing { fill: var(--amber); }

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 232px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: var(--sidebar-bg) url("../img/contours-dark.svg") left 40% / 640px auto no-repeat;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #F4F5F6;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    padding: 0 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 1rem;
    text-decoration: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0.75rem;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color var(--speed), color var(--speed);
}

.sidebar-link:hover { background: rgba(255, 255, 255, 0.05); color: #F4F5F6; }
.sidebar-link.active { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.sidebar-link.active::before {
    content: "";
    position: absolute;
    left: -0.75rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--amber);
}

.sidebar .sidebar-icon { width: 18px; height: 18px; }
.sidebar-link.active .sidebar-icon { color: var(--amber); }

.layout-content {
    flex: 1;
    min-width: 0;
    padding: 2rem 2.25rem;
    overflow-y: auto;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 1rem 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-org {
    padding: 0 0.75rem 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
}

.sidebar-org-empty {
    color: #E8917D;
}

.sidebar-org-switcher {
    padding: 0 0.75rem 0.2rem;
}

.sidebar-org-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    color: #F4F5F6;
    font: 700 0.72rem var(--sans);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
}

.sidebar-org-select:hover {
    background: rgba(255, 255, 255, 0.09);
}

.sidebar-org-select option {
    background: #1A1D20;
    color: #fff;
    text-transform: none;
}

.sidebar-user {
    padding: 0 0.75rem 0.5rem;
    font-size: 0.75rem;
    color: rgba(237, 238, 240, 0.45);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius);
    background: none;
    border: none;
    color: var(--sidebar-text);
    font: 600 0.875rem var(--sans);
    cursor: pointer;
    transition: background-color var(--speed), color var(--speed);
}
.sidebar-logout:hover { background: rgba(232, 145, 125, 0.12); color: #F0A795; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0;
}

.flash {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
    border-left: 3px solid var(--signal);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 600;
}

.landing-flash {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    border-radius: 0;
    text-align: center;
}

.admin-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.admin-tab {
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-3);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--speed);
}

.admin-tab:hover {
    color: var(--text);
}

.admin-tab.active {
    color: var(--text);
    border-bottom-color: var(--amber);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
    font: 700 0.875rem/1.2 var(--sans);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color var(--speed), border-color var(--speed), color var(--speed), box-shadow var(--speed), transform var(--speed);
}
.btn:active { transform: translateY(1px); }

.btn-dark { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.btn-dark:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text-4); color: var(--text); }

.btn-outline-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-border); margin-right: auto; }
.btn-outline-danger:hover { background: var(--danger-bg); }

/* SparrowNest design system: BUTTON PANEL.  Source of truth: SparrowNestCompany/06-design/button-panel.css (see buttons.md).
   Buttons that belong together are ONE bordered strip with thin dividers, all the same height, instead of loose buttons of different sizes.
   Uses the colour variables every Sparrow app already has: --surface --border --sel-bg --sel-text --text-3 --danger --danger-bg --radius --card-shadow. */
/* the actions of a page are always at the right edge of the header, on the title's row or, when they do not fit there, on their own row */
.page-actions { align-items: stretch; justify-content: flex-end; margin-left: auto; }
.page-header > :is(.btn, form, .page-actions) { margin-left: auto; }
.page-header > :is(.btn, form, .page-actions) ~ :is(.btn, form, .page-actions) { margin-left: 0; }

.btn-panel {
    display: inline-flex;
    align-items: stretch;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.btn-panel > form { display: flex; margin: 0; }
.btn-panel .btn { border: 0; border-radius: 0; background: transparent; box-shadow: none; margin: 0; }
.btn-panel > * + * { border-left: 1px solid var(--border); }
.btn-panel .btn:hover { background: var(--sel-bg); color: var(--sel-text); }
.btn-panel .btn-quiet { color: var(--text-3); font-weight: 600; }
.btn-panel .btn-forest { background: var(--forest); color: #fff; }
.btn-panel .btn-forest:hover { background: var(--forest-600); color: #fff; }
.btn-panel .btn-outline-danger { background: transparent; color: var(--danger); }
.btn-panel .btn-outline-danger:hover { background: var(--danger-bg); color: var(--danger); }
/* small buttons grouped next to a title (for example a heat's header): same panel, tighter */
.btn-panel-sm .btn { padding: 0.32rem 0.7rem; font-size: 0.8rem; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-4);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background-color var(--speed), color var(--speed);
}
.icon-btn:hover { color: var(--danger); background: var(--danger-bg); }

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.data-table th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.8rem 1rem;
    font-size: 0.875rem;
    color: var(--text-2);
    border-bottom: 1px solid var(--border-subtle);
}

.data-table tr.data-row { cursor: pointer; transition: background-color var(--speed); }
.data-table tr.data-row:hover { background: var(--surface-2); }
.data-table tr.data-row.selected { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--amber); }
.data-table tr:last-child td { border-bottom: none; }

.data-table .empty-row { text-align: center; color: var(--text-4); padding: 2.5rem !important; }

.chip {
    font-family: var(--mono);
    font-size: 0.78rem;
    background: var(--surface-3);
    color: var(--text-2);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.text-end { text-align: right; }
.inline-form { display: inline; }

.overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
}

.overlay[hidden] {
    display: none !important;
}

.modal {
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--modal-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title { margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }

.modal-close {
    display: inline-flex;
    padding: 4px;
    border-radius: var(--radius);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-4);
    text-decoration: none;
    transition: background-color var(--speed), color var(--speed);
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-2);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.field-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-2);
    display: block;
    margin-bottom: 0.35rem;
}

.field-input,
select.field-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font: 500 0.9rem var(--sans);
    outline: none;
    color: var(--text);
    background: var(--surface);
    transition: border-color var(--speed), box-shadow var(--speed);
}

.field-input:focus { border-color: var(--text); box-shadow: var(--focus-ring); }

.field-error {
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 600;
    display: block;
    margin-top: 3px;
}

.picker {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 180px;
    overflow-y: auto;
}

.picker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem 0.4rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--sel-border);
    background: var(--sel-bg);
}

.picker-item span {
    flex: 1;
    font-size: 0.85rem;
    color: var(--sel-text);
    font-weight: 700;
}

.picker-item [data-remove] {
    display: inline-flex;
    background: none;
    border: none;
    color: var(--text-4);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
}
.picker-item [data-remove] .icon { flex: none; }
.picker-item [data-remove]:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.picker-empty {
    font-size: 0.8rem;
    color: var(--text-4);
    margin: 0;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-2);
    cursor: pointer;
}

.validation-summary ul {
    color: var(--danger);
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
    padding-left: 1.1rem;
}
.validation-summary:empty { display: none; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    transition: border-color var(--speed), box-shadow var(--speed);
}
.info-card:hover { border-color: var(--border); box-shadow: 0 6px 18px -10px rgba(18, 20, 23, 0.3); }

.info-card h2 { margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 800; color: var(--text); }
.info-card p { margin: 0 0 1rem; color: var(--text-3); font-size: 0.85rem; }

.auth-body {
    background: var(--app-bg) url("../img/contours-light.svg") center / cover no-repeat;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
:root[data-theme="dark"] .auth-page { background-image: url("../img/contours-dark.svg"); }

.auth-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--modal-shadow);
    border: 1px solid var(--border-subtle);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.75rem;
}

.auth-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); margin: 0 0 0.25rem; }
.auth-subtitle { font-size: 0.875rem; color: var(--text-3); margin: 0 0 1.5rem; }

.mb-field { margin-bottom: 1rem; }

.auth-submit { width: 100%; justify-content: center; margin-top: 0.5rem; padding: 0.75rem; }

.landing-body { background: var(--app-bg); }

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    max-width: 1080px;
    margin: 0 auto;
}

.landing-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.landing-hero-band {
    position: relative;
    overflow: hidden;
    background: var(--app-bg) url("../img/contours-light.svg") center / cover no-repeat;
}

.landing-hero {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 4.5rem 2rem 5rem;
    text-align: center;
}

.landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: var(--surface);
    color: var(--forest);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.landing-eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 0 3px rgba(126, 217, 87, 0.25);
}

.landing-title {
    font-size: clamp(2.25rem, 4.8vw, 3.5rem);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 1.25rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.landing-title-accent { color: var(--forest); }

.landing-subtitle {
    font-size: 1.05rem;
    color: var(--text-3);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}

.landing-cta {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.landing-cta-btn { padding: 0.85rem 1.75rem; font-size: 0.95rem; }

.btn-accent {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.btn-accent:hover {
    background: var(--ink-2);
    border-color: var(--ink-2);
}

.btn-perch { position: relative; }

.perch-bird {
    position: absolute;
    right: 22px;
    bottom: calc(100% - 2px);
    width: 34px;
    height: 26px;
    overflow: visible;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    will-change: transform, opacity;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.bird-wing { transform-origin: 14px 11px; transform: rotate(10deg); }
.bird-tail { transform-origin: 8.5px 13px; }
.bird-head { transform-origin: 22px 13px; }
.bird-legs { opacity: 0; transition: opacity 0.15s; }

.btn-perch.flapping .bird-wing { animation: bird-wing 0.1s ease-in-out infinite alternate; }
.btn-perch.landed .bird-legs { opacity: 1; }
.btn-perch.landed .bird-tail { animation: bird-tail 0.45s ease-in-out 0.25s 2; }
.btn-perch.landed .bird-head { animation: bird-peck 0.5s ease-in-out 0.9s 2; }

@keyframes bird-wing {
    from { transform: rotate(10deg); }
    to { transform: rotate(-58deg); }
}

@keyframes bird-tail {
    50% { transform: rotate(-16deg); }
}

@keyframes bird-peck {
    50% { transform: rotate(14deg) translateY(0.8px); }
}

@media (prefers-reduced-motion: reduce) {
    .btn-perch.flapping .bird-wing,
    .btn-perch.landed .bird-tail,
    .btn-perch.landed .bird-head { animation: none; }
}
.landing-section {
    max-width: 1080px;
    margin: 0 auto;
    padding: 3.5rem 2rem;
    border-top: 1px solid var(--border);
}

.landing-section-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    text-align: center;
    margin: 0 0 2rem;
}

.landing-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.landing-steps li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.landing-step-num {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 0.9rem var(--mono);
}

.landing-steps h3 { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 800; color: var(--text); }
.landing-steps p { margin: 0; color: var(--text-3); line-height: 1.6; }

.landing-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
}

.landing-bullets li {
    position: relative;
    padding-left: 2rem;
    color: var(--text-2);
    line-height: 1.6;
}

.landing-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15rem;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: var(--success-bg);
}
.landing-bullets li::after {
    content: "";
    position: absolute;
    left: 0.25rem;
    top: 0.4rem;
    width: 0.8rem;
    height: 0.8rem;
    background: var(--success);
    -webkit-mask: var(--icon-check) center / contain no-repeat;
    mask: var(--icon-check) center / contain no-repeat;
}

.landing-who { text-align: center; }
.landing-who p {
    max-width: 640px;
    margin: 0 auto;
    color: var(--text-3);
    line-height: 1.6;
    font-size: 1.05rem;
}

.landing-closing {
    background: var(--night) url("../img/contours-dark.svg") center / cover no-repeat;
    text-align: center;
    padding: 4rem 2rem;
}

.landing-closing h2 { color: #fff; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
.landing-closing p { color: rgba(237, 238, 240, 0.65); margin: 0 0 1.75rem; }
.landing-closing .btn-accent { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.landing-closing .btn-accent:hover { background: #D6974B; border-color: #D6974B; }

.landing-contact {
    max-width: 1080px;
    margin: 3.5rem auto 4rem;
    padding: 2rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
}

.landing-contact-title { margin: 0 0 0.75rem; font-size: 1.1rem; font-weight: 800; color: var(--text); }
.landing-contact-name { margin: 0 0 0.5rem; color: var(--text-2); font-weight: 700; }
.landing-contact p { margin: 0.25rem 0; }
.landing-contact a { color: var(--forest); font-weight: 600; text-decoration: none; }
.landing-contact a:hover { text-decoration: underline; }

@media (max-width: 800px) {
    .landing-steps, .landing-bullets { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

.icon {
    display: inline-block;
    flex-shrink: 0;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.2em;
    background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}
.icon-grid { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='3.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.icon-person { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.6'/%3E%3Cpath d='M4.5 20.5c0-4.1 3.4-7.2 7.5-7.2s7.5 3.1 7.5 7.2'/%3E%3C/svg%3E"); }
.icon-group { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8.5' r='3'/%3E%3Ccircle cx='17' cy='9.5' r='2.4'/%3E%3Cpath d='M3 20c0-3.5 2.7-6.2 6-6.2s6 2.7 6 6.2'/%3E%3Cpath d='M15.8 14.1c2.9-.3 5.2 2 5.2 5.4'/%3E%3C/svg%3E"); }
.icon-tag { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 11.6V4.9c0-.8.6-1.4 1.4-1.4h6.7l9 9-8.1 8.1z'/%3E%3Ccircle cx='8' cy='8' r='1.3' fill='black' stroke='none'/%3E%3C/svg%3E"); }
.icon-zone { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='17' height='17' rx='2' stroke-dasharray='3.2 2.6'/%3E%3Ccircle cx='12' cy='12' r='2.6' fill='black' stroke='none'/%3E%3C/svg%3E"); }
.icon-shield { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2l7 2.8v5.3c0 4.6-3 8-7 9.6-4-1.6-7-5-7-9.6V6z'/%3E%3Cpath d='M9 12l2.2 2.2L15.5 10'/%3E%3C/svg%3E"); }
.icon-sliders { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h9M18 7h2M4 17h3M11 17h9'/%3E%3Ccircle cx='15.5' cy='7' r='2.3'/%3E%3Ccircle cx='8.5' cy='17' r='2.3'/%3E%3C/svg%3E"); }
.icon-logout { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4H6.5A2.5 2.5 0 0 0 4 6.5v11A2.5 2.5 0 0 0 6.5 20H10'/%3E%3Cpath d='M15 8l4 4-4 4M19 12H9.5'/%3E%3C/svg%3E"); }
.icon-list { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 6.5h10M9.5 12h10M9.5 17.5h10'/%3E%3Ccircle cx='5' cy='6.5' r='1.2' fill='black' stroke='none'/%3E%3Ccircle cx='5' cy='12' r='1.2' fill='black' stroke='none'/%3E%3Ccircle cx='5' cy='17.5' r='1.2' fill='black' stroke='none'/%3E%3C/svg%3E"); }
.icon-lanes { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3.5v17'/%3E%3Cpath d='M9 7.5h11M9 12h11M9 16.5h11' stroke-dasharray='2.5 2'/%3E%3C/svg%3E"); }
.icon-stopwatch { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13.5' r='7'/%3E%3Cpath d='M12 13.5V10M10 3h4M12 3v3.5M18 6.5l1.4-1.4'/%3E%3C/svg%3E"); }
.icon-ruler { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 16.5l13-13 4 4-13 13z'/%3E%3Cpath d='M7.5 12.5l1.8 1.8M10.5 9.5l1.8 1.8M13.5 6.5l1.8 1.8'/%3E%3C/svg%3E"); }
.icon-printer { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9V3.5h10V9'/%3E%3Crect x='3.5' y='9' width='17' height='7.5' rx='1.5'/%3E%3Cpath d='M7 13.5h10v7H7z'/%3E%3C/svg%3E"); }
.icon-podium { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20.5h18'/%3E%3Cpath d='M9 20.5V7h6v13.5M3.5 20.5V12H9M15 20.5V14.5h5.5v6'/%3E%3C/svg%3E"); }
.icon-pennant { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 21V3.5'/%3E%3Cpath d='M5.5 4.5l13 4.6-13 4.6'/%3E%3C/svg%3E"); }
.icon-globe { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M3.5 12h17'/%3E%3Cpath d='M12 3.5c-2.4 2.4-3.6 5.2-3.6 8.5s1.2 6.1 3.6 8.5c2.4-2.4 3.6-5.2 3.6-8.5S14.4 5.9 12 3.5z'/%3E%3C/svg%3E"); }
.icon-swap { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 4l-3 3 3 3M4.5 7h13M16.5 14l3 3-3 3M19.5 17h-13'/%3E%3C/svg%3E"); }
.icon-close { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E"); }
.icon-arrow-left { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.icon-arrow-right { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.icon-undo { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14L4 9l5-5'/%3E%3Cpath d='M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/%3E%3C/svg%3E"); }
.icon-check { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.icon-scan { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='18' r='1.6' fill='black' stroke='none'/%3E%3Cpath d='M6 12.5a5.5 5.5 0 0 1 5.5 5.5M6 7a11 11 0 0 1 11 11'/%3E%3C/svg%3E"); }
:root { --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

.sidebar { transition: width var(--speed), transform 200ms ease; }

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0 0.75rem 1.1rem 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.sidebar-head .sidebar-logo {
    padding: 0;
    margin: 0;
    border: 0;
    min-width: 0;
}
.sidebar-logo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: var(--sidebar-text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color var(--speed), color var(--speed);
}
.sidebar-toggle:hover { background: rgba(255, 255, 255, 0.07); color: #F4F5F6; }
.sidebar-toggle .icon-sidebar-open { display: none; }
.sidebar-close { display: none; }

.sidebar-link > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar, .sidebar-scrim { display: none; }

@media (min-width: 901px) {
    html.sidebar-collapsed .sidebar { width: 68px; }
    html.sidebar-collapsed .sidebar-head {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0 0 1.1rem;
    }
    html.sidebar-collapsed .sidebar-logo > span,
    html.sidebar-collapsed .sidebar-link > span:last-child,
    html.sidebar-collapsed .sidebar-logout > span:last-child,
    html.sidebar-collapsed .sidebar-section-label,
    html.sidebar-collapsed .sidebar-org,
    html.sidebar-collapsed .sidebar-org-switcher,
    html.sidebar-collapsed .sidebar-user { display: none; }
    html.sidebar-collapsed .sidebar-nav,
    html.sidebar-collapsed .sidebar-bottom { padding-left: 0.6rem; padding-right: 0.6rem; }
    html.sidebar-collapsed .sidebar-link,
    html.sidebar-collapsed .sidebar-logout { justify-content: center; padding-left: 0; padding-right: 0; }
    html.sidebar-collapsed .sidebar-link.active::before { left: -0.6rem; }
    html.sidebar-collapsed .sidebar-toggle .icon-sidebar-close { display: none; }
    html.sidebar-collapsed .sidebar-toggle .icon-sidebar-open { display: inline-block; }
}

@media (max-width: 900px) {
    .layout { display: block; }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 900;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        height: 56px;
        padding: 0 0.75rem;
        background: var(--sidebar-bg);
        color: #F4F5F6;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    .topbar .sidebar-toggle { color: #F4F5F6; font-size: 1.25rem; width: 40px; height: 40px; }
    .topbar-brand {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        min-width: 0;
        color: #F4F5F6;
        font-weight: 800;
        font-size: 1rem;
        text-decoration: none;
    }
    .topbar-brand .brand-mark { width: 24px; height: 24px; }
    .topbar-title {
        flex: 1 1 0;
        margin-left: 0.5rem;
        text-align: right;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--amber);
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1100;
        width: min(288px, 86vw);
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
    }
    body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.45); }
    .sidebar-collapse { display: none; }
    .sidebar-close { display: inline-flex; }

    .sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 1050;
        display: block;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease;
    }
    body.nav-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
    body.nav-open { overflow: hidden; }

    .layout-content { padding: 1.1rem 1rem 2rem; }
    .page-header { flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; }
    .page-title { font-size: 1.35rem; }
    .page-actions { width: 100%; }
    .admin-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .admin-tab { white-space: nowrap; }
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table th, .data-table td { white-space: nowrap; padding-left: 0.75rem; padding-right: 0.75rem; }
    .card-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }

    .overlay { padding: 0.75rem; align-items: flex-end; }
    .modal, .modal-wide { max-width: none; max-height: 92vh; max-height: 92dvh; }
    .modal-footer { flex-wrap: wrap; }

    .auth-card { padding: 1.75rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar, .sidebar-scrim { transition: none; }
}

.icon-menu { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E"); }
.icon-sidebar-close { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4.5' width='17' height='15' rx='2'/%3E%3Cpath d='M9 4.5v15M15.5 9.5L13 12l2.5 2.5'/%3E%3C/svg%3E"); }
.icon-sidebar-open { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4.5' width='17' height='15' rx='2'/%3E%3Cpath d='M9 4.5v15M13 9.5l2.5 2.5-2.5 2.5'/%3E%3C/svg%3E"); }

.auth-links { margin-top: 1.1rem; display: flex; justify-content: space-between; font-size: 0.85rem; }
.auth-links a { color: var(--text-2); font-weight: 600; }

.auth-home {
    position: absolute;
    top: 1.1rem;
    left: 1.25rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
}
.auth-home:hover { color: var(--text); }
.auth-home:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 3px; border-radius: 4px; }
@media (max-width: 640px) { .auth-page { padding-top: 3.5rem; } }

:root {
    --toggle-off: #B8B2A7;
    --toggle-on: #C8873A;
    --toggle-knob: #FFFFFF;
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23676D74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
    --select-chevron-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23676D74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 14.5l6-6 6 6'/%3E%3C/svg%3E");
    --picker-shadow: 0 12px 32px -12px rgba(18, 20, 23, 0.3);
}
:root[data-theme="dark"] {
    --toggle-off: #464B51;
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23979CA2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
    --select-chevron-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23979CA2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 14.5l6-6 6 6'/%3E%3C/svg%3E");
    --picker-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
}

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    display: inline-block;
    width: 2.25rem;
    height: 1.25rem;
    margin: 0;
    border-radius: 999px;
    vertical-align: middle;
    cursor: pointer;
    background-color: var(--toggle-off);
    background-image: radial-gradient(circle, var(--toggle-knob) 0 0.5rem, transparent calc(0.5rem + 0.5px));
    background-size: 1.25rem 1.25rem;
    background-repeat: no-repeat;
    background-position: left center;
    transition: background-color var(--speed), background-position var(--speed);
}
input[type="checkbox"]:checked {
    background-color: var(--toggle-on);
    background-position: right center;
}
input[type="checkbox"]:focus-visible { outline: 2px solid #C8873A; outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }

select.field-input {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.25rem;
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem 1rem;
    cursor: pointer;
}

@supports (appearance: base-select) {
    select.field-input,
    select.field-input::picker(select) { appearance: base-select; }
    select.field-input { display: flex; align-items: center; }
    select.field-input::picker-icon { display: none; }
    select.field-input:open { background-image: var(--select-chevron-up); }
    select.field-input::picker(select) {
        margin-top: 0.3rem;
        padding: 0.3rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--surface);
        box-shadow: var(--picker-shadow);
        max-height: 18rem;
        overflow-y: auto;
    }
    select.field-input option {
        padding: 0.55rem 0.75rem;
        border-radius: var(--radius);
        color: var(--text);
        font: 500 0.9rem var(--sans);
    }
    select.field-input option::checkmark { display: none; }
    select.field-input option:hover,
    select.field-input option:focus-visible { background: var(--surface-3); outline: none; }
    select.field-input option:checked { background: var(--sel-bg); color: var(--sel-text); font-weight: 700; }
    select.field-input option:disabled { color: var(--text-4); }
}

@media (prefers-reduced-motion: reduce) {
    input[type="checkbox"] { transition: none; }
}

.flash-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); border-left-color: var(--danger); }

.cp-back { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--text-3); text-decoration: none; margin-bottom: 0.35rem; }
.cp-back:hover { color: var(--text); }
.cp-sub { color: var(--text-3); font-size: 0.85rem; margin: 0.15rem 0 0; }

.cp-panel { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.cp-panel > h2 { margin: 0 0 0.25rem; font-size: 1.02rem; font-weight: 800; color: var(--text); }
.cp-hint { margin: 0 0 1rem; color: var(--text-3); font-size: 0.83rem; max-width: 70ch; }
.cp-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }

.cp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1rem; }
.cp-form .full { grid-column: 1 / -1; }
.cp-actions { display: flex; gap: 0.5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.cp-actions .left { margin-right: auto; }
@media (max-width: 640px) { .cp-form { grid-template-columns: minmax(0, 1fr); } }

.tag { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-open { color: var(--sel-text); background: var(--sel-bg); }
.tag-closed { color: var(--text-3); background: var(--surface-3); }

.cp-rules { display: flex; flex-direction: column; gap: 0.75rem; }
.cp-rule { border: 1px solid var(--border); border-left: 3px solid var(--border-dashed); border-radius: var(--radius); padding: 0.85rem 1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 1rem; background: var(--surface-2); }
.cp-rule.active { border-left-color: var(--amber); }
.cp-rule-title { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cp-rule-when { font-family: var(--mono); font-size: 0.8rem; color: var(--text-2); }
.cp-rule-who { display: flex; flex-wrap: wrap; gap: 0.35rem; grid-column: 1 / -1; }
.cp-rule-tools { display: flex; gap: 0.35rem; align-items: flex-start; grid-row: 1 / span 2; grid-column: 2; }
.cp-who { font-size: 0.78rem; padding: 2px 8px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.cp-who.role { border-style: dashed; }
.cp-empty { color: var(--text-3); font-size: 0.88rem; padding: 0.5rem 0; }

.cp-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cp-seg label { padding: 0.45rem 0.9rem; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.cp-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cp-seg label:has(input:checked) { background: var(--btn-bg); color: var(--btn-fg); }
.cp-seg label:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.cp-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.5rem 1rem; }
.cp-days { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.cp-group-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); margin: 0 0 0.5rem; }

.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .map-layout { grid-template-columns: minmax(0, 1fr); } }
.map-stage { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; user-select: none; touch-action: none; }
.map-stage img { display: block; width: 100%; height: auto; pointer-events: none; }
.map-stage.placing { cursor: crosshair; outline: 2px dashed var(--amber); outline-offset: -2px; }
.map-pin { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; cursor: grab; touch-action: none; }
.map-pin:active { cursor: grabbing; }
.map-pin-label { background: var(--ink); color: #FFFFFF; font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.5); display: flex; align-items: center; gap: 0.35rem; }
.map-pin-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-4); }
.map-pin.open .map-pin-label::before { background: var(--amber); }
.map-pin-stem { width: 2px; height: 10px; background: var(--ink); }
.map-pin-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); border: 2px solid #FFFFFF; box-shadow: 0 0 0 1px var(--ink); margin-top: -2px; }
.map-pin.selected .map-pin-label { background: var(--amber); color: var(--ink); }
.map-pin.saving { opacity: 0.6; }
.map-empty { padding: 3rem 1.5rem; text-align: center; color: var(--text-3); }
.map-side { display: flex; flex-direction: column; gap: 0.75rem; }
.map-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.map-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border-subtle); font-size: 0.86rem; }
.map-item:last-child { border-bottom: 0; }
.map-item.selected { background: var(--sel-bg); }
.map-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; }
.map-item .btn { padding: 0.25rem 0.6rem; font-size: 0.76rem; }
.map-note { font-size: 0.8rem; color: var(--text-3); }

.tag-online { color: var(--success); background: var(--success-bg); }
.map-pin.online .map-pin-dot { background: var(--signal); animation: pin-live 1.8s ease-out infinite; }
.map-pin.online .map-pin-label::before { background: var(--signal); }
.map-pin.online .map-pin-label::after { content: "LIVE"; font-size: 0.6rem; letter-spacing: 0.06em; padding: 1px 5px; border-radius: 999px; background: var(--signal); color: var(--ink); }
@keyframes pin-live {
    from { box-shadow: 0 0 0 1px var(--ink), 0 0 0 0 rgba(126, 217, 87, 0.65); }
    to   { box-shadow: 0 0 0 1px var(--ink), 0 0 0 10px rgba(126, 217, 87, 0); }
}
@media (prefers-reduced-motion: reduce) { .map-pin.online .map-pin-dot { animation: none; } }

.map-pin.has-toast { z-index: 5; }
.map-pin.flash-granted .map-pin-dot { animation: scan-ok 1.5s ease-out; background: var(--signal); }
.map-pin.flash-denied .map-pin-dot { animation: scan-no 1.5s ease-out; background: var(--danger); }
@keyframes scan-ok {
    from { box-shadow: 0 0 0 1px var(--ink), 0 0 0 0 var(--signal); }
    to   { box-shadow: 0 0 0 1px var(--ink), 0 0 0 24px transparent; }
}
@keyframes scan-no {
    from { box-shadow: 0 0 0 1px var(--ink), 0 0 0 0 var(--danger); }
    to   { box-shadow: 0 0 0 1px var(--ink), 0 0 0 24px transparent; }
}
.map-pin.flash-granted .map-pin-label { background: var(--signal); color: var(--ink); }
.map-pin.flash-denied .map-pin-label { background: var(--danger); color: #FFFFFF; }
.map-pin-toast { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 10px; border-radius: var(--radius); font-size: 0.76rem; line-height: 1.25; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.6); animation: toast-in 0.2s ease-out; }
.map-pin-toast span { font-size: 0.68rem; opacity: 0.85; }
.map-pin-toast.granted { background: var(--signal); color: var(--ink); }
.map-pin-toast.denied { background: var(--danger); color: #FFFFFF; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.map-item.flash-granted { animation: row-ok 1.6s ease-out; }
.map-item.flash-denied { animation: row-no 1.6s ease-out; }
@keyframes row-ok { from { background: var(--success-bg); } to { background: transparent; } }
@keyframes row-no { from { background: var(--danger-bg); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
    .map-pin.flash-granted .map-pin-dot, .map-pin.flash-denied .map-pin-dot, .map-pin-toast, .map-item.flash-granted, .map-item.flash-denied { animation: none; }
}
.map-live { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 0.75rem 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.map-live-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.86rem; }
.map-live-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.map-live-row { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.5rem; padding: 0.4rem 0.5rem; border-radius: var(--radius); font-size: 0.84rem; background: var(--surface-3); border-left: 3px solid var(--text-4); }
.map-live-row.granted { border-left-color: var(--success); }
.map-live-row.denied { border-left-color: var(--danger); }
.map-live-time { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 0.78rem; grid-row: span 2; align-self: center; }
.map-live-row .map-note { grid-column: 2; }
[hidden] { display: none !important; }
@media (max-width: 520px) {
    .cp-rule { grid-template-columns: minmax(0, 1fr); }
    .cp-rule-tools { grid-row: auto; grid-column: 1; order: 3; }
}
.tag-admin { color: var(--sel-text); background: var(--sel-bg); }
/* ---- Legal links and skip link (shared across the Sparrow apps) ---- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 0.6rem 1rem; background: var(--surface); color: var(--text); border: 2px solid var(--amber); border-radius: var(--radius); font-weight: 700; text-decoration: none; }
.skip-link:focus { left: 1rem; top: 1rem; }
.demo-privacy { margin: 0; padding: 0 1.5rem 0.75rem; }

/* ---- Page footer: cookie note and legal links ---- */
.page-footer { margin-top: 3rem; padding: 1.1rem 0 0.4rem; border-top: 1px solid var(--border); }
.legal-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1.25rem; margin: 0; font-size: 0.9rem; color: var(--text-3); }
.legal-links a { color: var(--text-3); text-decoration: underline; text-decoration-color: var(--border); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.legal-links a:hover { color: var(--text); text-decoration-color: currentColor; }
.auth-body .page-footer { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 0.7rem 1.5rem; border-top: 0; justify-content: center; }
.auth-body .legal-links { justify-content: center; }

/* Sticky footer: on a short page the footer sits at the bottom of the screen, on a long one it follows the content. */
.layout-content { display: flex; flex-direction: column; }
.layout-content > * { flex-shrink: 0; }
.layout-content > .page-footer { margin-top: auto; }
.layout-content > :nth-last-child(2):not(.page-footer) { margin-bottom: 3rem; }

/* ---- Grid tools (sparrow-grid.js): column menu, filtered state, Export to Excel ---- */
table tr[hidden] { display: none; }

table th.gt-th { cursor: pointer; user-select: none; }
table th.gt-th::after { content: "\25BE"; margin-left: 0.35rem; font-size: 0.7rem; color: var(--text-4, #6B7076); opacity: 0.55; }
table th.gt-th:hover, table th.gt-th:focus-visible { color: var(--text, #16181B); }
table th.gt-th:hover::after, table th.gt-th:focus-visible::after { opacity: 1; }
table th.gt-th:focus-visible { outline: 2px solid var(--amber, #C8873A); outline-offset: -2px; }
table th.gt-asc::after { content: "\25B2"; opacity: 1; }
table th.gt-desc::after { content: "\25BC"; opacity: 1; }
table th.gt-filtered { color: var(--sel-text, #7A4A12); background: var(--sel-bg, #F7ECDD); box-shadow: inset 0 -2px 0 var(--amber, #C8873A); }
table th.gt-filtered::after { content: "\25BE"; color: var(--amber, #C8873A); opacity: 1; }

.gt-tools { display: inline-flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.gt-tools .btn { padding: 0.32rem 0.7rem; font-size: 0.8rem; }
.gt-tools .btn[hidden] { display: none; }
.gt-status { font-size: 0.8rem; font-weight: 600; color: var(--text-3, #676D74); white-space: nowrap; }
.grid-toolbar .gt-tools + .grid-count { margin-left: 0.6rem; }
.gt-more { font-size: 0.8rem; font-weight: 600; color: var(--sel-text, #7A4A12); }
.gt-tools { flex-wrap: wrap; }
.gt-bar { display: flex; justify-content: flex-end; margin: 0 0 0.5rem; }
/* the tools of a table without a toolbar of its own: the top row of the table's card, divided from the header by a line */
.gt-bar-attached { margin: 0; padding: 0.5rem 0.75rem; background: var(--surface, #fff); border-bottom: 1px solid var(--border, #E2DED6); position: sticky; left: 0; box-sizing: border-box; }

/* ---- Table toolbar: the search and the tools of a table sit in one bar joined to the top of the table's card ---- */
.grid { margin-bottom: 1rem; }
.grid-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
    padding: 0.6rem 0.75rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border-subtle, var(--border, #E2DED6));
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--card-shadow, none);
}
.grid-toolbar:has(+ .table-wrap) { border-bottom-color: var(--border, #E2DED6); border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0; }
.grid-toolbar + .table-wrap { border-top: none; border-radius: 0 0 var(--radius-lg, 12px) var(--radius-lg, 12px); }
.grid-search { flex: 1 1 220px; max-width: 340px; margin: 0; }
.grid-search .field-input { width: 100%; padding: 0.32rem 0.7rem; font-size: 0.8rem; }

.gt-menu {
    position: absolute;
    z-index: 1300;
    width: 260px;
    max-width: calc(100vw - 16px);
    padding: 0.6rem;
    background: var(--surface, #FFFFFF);
    color: var(--text-2, #3E4349);
    border: 1px solid var(--border, #E2DED6);
    border-radius: var(--radius-lg, 10px);
    box-shadow: 0 12px 32px rgba(18, 20, 23, 0.2);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}
.gt-sorts, .gt-foot { display: flex; gap: 0.4rem; }
.gt-sorts { margin-bottom: 0.5rem; }
.gt-foot { margin-top: 0.5rem; }
.gt-sorts button, .gt-foot button {
    flex: 1;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border, #E2DED6);
    border-radius: var(--radius, 6px);
    background: var(--surface, #FFFFFF);
    color: var(--text-2, #3E4349);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.gt-sorts button:hover, .gt-foot button:hover { border-color: var(--text-4, #6B7076); color: var(--text, #16181B); }
.gt-search {
    width: 100%;
    margin-bottom: 0.4rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--border, #E2DED6);
    border-radius: var(--radius, 6px);
    background: var(--surface, #FFFFFF);
    color: var(--text, #16181B);
    font: inherit;
}
.gt-search:focus { outline: 2px solid var(--amber, #C8873A); outline-offset: 0; }
.gt-help { margin: 0.3rem 0.1rem 0.45rem; font-size: 0.68rem; line-height: 1.35; color: var(--text-4, #6B7076); }
.gt-all, .gt-values label { display: flex; align-items: center; gap: 0.5rem; padding: 0.22rem 0.15rem; cursor: pointer; }
.gt-all { border-bottom: 1px solid var(--border-subtle, #ECE9E2); font-weight: 700; }
.gt-values { max-height: 220px; overflow: auto; }
.gt-values span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt-values small { margin-left: auto; color: var(--text-4, #6B7076); font-variant-numeric: tabular-nums; }
.gt-none { padding: 0.5rem 0.15rem; color: var(--text-4, #6B7076); }

/* Square checkboxes in the menu (the apps' toggle look is too heavy in a list). */
.gt-menu input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    display: inline-block;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    border-radius: 4px;
    border: 1.5px solid var(--text-4, #6B7076);
    background-color: var(--surface, #FFFFFF);
    background-image: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100%;
    cursor: pointer;
}
.gt-menu input[type="checkbox"]:checked {
    background-color: var(--amber, #C8873A);
    border-color: var(--amber, #C8873A);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}
.gt-menu input[type="checkbox"]:indeterminate {
    background-color: var(--amber, #C8873A);
    border-color: var(--amber, #C8873A);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 8h8'/%3E%3C/svg%3E");
}

/* SparrowNest design system: INFO ICON.  Source of truth: SparrowNestCompany/06-design/info/ (see ../info.md).
   Explanations are not printed on the page: a toned-down "i" sits next to the heading and opens a small card on hover or click.
   Uses the variables every Sparrow app has: --surface --border --text-2 --text-3 --text-4 --sel-bg --radius --sans --mono. */
.info-note:not(.info-shown) { display: none; }

.info-tip { position: relative; display: inline-flex; vertical-align: middle; margin-left: 0.45rem; text-transform: none; letter-spacing: normal; }
.info-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; padding: 0; margin: 0;
    border: 0; border-radius: 50%; background: transparent;
    color: var(--text-4); cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
}
.info-btn::before {
    content: ""; width: 16px; height: 16px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5'/%3E%3Ccircle cx='12' cy='7.7' r='0.7' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5'/%3E%3Ccircle cx='12' cy='7.7' r='0.7' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}
.info-tip:hover .info-btn, .info-tip.open .info-btn, .info-btn:focus-visible { color: var(--text-2); background: var(--sel-bg); }
.info-btn:focus-visible { outline: 2px solid var(--text-4); outline-offset: 1px; }

.info-pop {
    position: absolute; top: 100%; left: 0; z-index: 70;
    display: none; box-sizing: border-box; width: max-content; max-width: min(360px, 80vw);
    margin-top: 8px; padding: 0.65rem 0.85rem;
    background: var(--surface); color: var(--text-2);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    font: 400 0.8rem/1.5 var(--sans); text-align: left; white-space: normal; cursor: default;
}
.info-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px; }   /* keeps the hover while the mouse crosses the gap */
.info-pop strong, .info-pop b { font-weight: 700; color: var(--text); }
.info-pop code, .info-pop .chip {
    display: inline; padding: 0.05rem 0.3rem; border-radius: 4px; background: var(--surface-3, rgba(127, 127, 127, 0.12)); color: inherit;
    font-family: var(--mono, monospace); font-size: 0.74rem; line-height: 1.6; white-space: normal; overflow-wrap: anywhere;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.info-pop a { color: inherit; text-decoration: underline; }
.info-part { display: block; }
.info-part + .info-part { margin-top: 0.5rem; }
.info-tip:hover .info-pop, .info-tip.open .info-pop, .info-btn:focus-visible + .info-pop { display: block; }
.info-pop.info-pop-right { left: auto; right: 0; }

/* ---- User parameters page: settings as rows (name on the left, the control on the right); a change applies at once ---- */
.settings-card { max-width: 640px; background: var(--surface); border: 1px solid var(--border-subtle, var(--border)); border-radius: var(--radius-lg, 12px); box-shadow: var(--card-shadow, none); overflow: hidden; }
.settings-section { padding: 0.65rem 1.1rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); background: var(--surface-3, transparent); border-bottom: 1px solid var(--border); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; padding: 0.85rem 1.1rem; }
.setting-row + .setting-row { border-top: 1px solid var(--border-subtle, var(--border)); }
.setting-name { font-weight: 600; color: var(--text); }
.setting-control { display: inline-flex; align-items: center; margin: 0; }

/* ---- Pictures of people (the same pieces as the warehouse item pictures in SparrowERP) ---- */
.person-photo { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1rem; }
.person-photo-frame { width: 160px; height: 160px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-3); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.person-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-photo-empty { color: var(--text-3); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.person-photo-side { flex: 1 1 14rem; min-width: 0; }
.person-photo-hint { margin: 0.25rem 0 0.5rem; font-size: 0.8rem; color: var(--text-3); }
.person-photo-side .btn-panel { display: inline-flex; }
.person-photo-msg { margin-top: 0.6rem; font-size: 0.85rem; color: var(--text-3); min-height: 1.2em; }
.person-photo-msg.bad { color: var(--danger); }
.person-thumb { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; vertical-align: middle; margin-right: 0.6rem; border: 1px solid var(--border); background: var(--surface-3); }

/* The picture that appears next to the pointer when a row with a picture is hovered (wwwroot/js/photo-hover.js). */
.photo-pop { position: fixed; z-index: 60; pointer-events: none; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4); }
.photo-pop[hidden] { display: none; }
.photo-pop img { display: block; max-width: 320px; max-height: 320px; border-radius: 5px; }

/* The person who scanned, in the live view: a face on the checkpoint's pop-up and in the list of latest scans. */
.scan-face { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-3); align-self: center; grid-row: span 2; }
.scan-face-big { width: 64px; height: 64px; margin-bottom: 3px; grid-row: auto; border: 2px solid rgba(255, 255, 255, 0.85); }
.map-live-row:has(> .scan-face) { grid-template-columns: auto auto minmax(0, 1fr); }
.map-live-row:has(> .scan-face) .map-note { grid-column: 3; }
