@font-face {
    font-family: "InterVariable";
    src: url("/fonts/InterVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "InterVariable";
    src: url("/fonts/InterVariable-Italic.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --bg-dark: #222326;
    --panel-bg: rgba(30, 32, 36, 0.58);
    --panel-border: rgba(255, 255, 255, 0.14);
    --panel-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --text-main: #f2f2f2;
    --text-muted: rgba(255, 255, 255, 0.72);
    --accent: #a8a8ad;
    --accent-strong: #d4d4d8;
    --menu-bg: rgba(28, 30, 34, 0.78);
    --backdrop-blur: 18px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --header-pad: 1.25rem;
}

html, body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: "InterVariable", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
    background: var(--bg-dark);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    pointer-events: none;
}

.site-header-home {
    --header-chip-bg: rgba(28, 30, 34, 0.30);
}

.site-header-standard {
    --header-chip-bg: rgba(28, 30, 34, 0.45);
}

.site-header-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--header-pad);
    pointer-events: auto;
    gap: 1rem;
}

.site-main {
    min-height: 100vh;
}

.page-home .site-main {
    min-height: 100vh;
}

.home-hero {
    min-height: 100vh;
    background-image: url('/img/douglasbuchanan.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-color: #000;
}

.menu-toggle {
    width: 52px;
    height: 52px;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    background: rgba(28, 30, 34, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--panel-shadow);
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 14px;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

    .menu-toggle:hover {
        transform: translateY(-1px);
        background: rgba(40, 42, 46, 0.65);
        border-color: rgba(255, 255, 255, 0.22);
    }

    .menu-toggle span {
        display: block;
        height: 2px;
        border-radius: 999px;
        background: var(--accent-strong);
    }

.site-menu {
    position: absolute;
    top: calc(var(--header-pad) + 60px);
    right: var(--header-pad);
    width: min(280px, calc(100vw - 2rem));
}

.site-menu-panel {
    background: var(--menu-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--panel-shadow);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    padding: 0.75rem;
}

.site-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

    .site-menu-nav a,
    .menu-link-button {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 0.9rem 1rem;
        border: 0;
        border-radius: var(--radius-md);
        background: transparent;
        color: var(--text-main);
        text-align: left;
        cursor: pointer;
        transition: background 0.16s ease, color 0.16s ease;
    }

        .site-menu-nav a:hover,
        .menu-link-button:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

.menu-logout-form {
    margin: 0;
}

.app-shell {
    min-height: 100vh;
    padding: 7rem 1.5rem 2rem;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 30%), linear-gradient(180deg, #1f2125 0%, #262a31 100%);
}

.glass-card,
.glass-panel,
.glass-modal {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--panel-shadow);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
}

.glass-card {
    padding: 1.5rem;
}

.hero-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
}

.eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.page-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.05;
}

.page-subtitle {
    margin-top: 1rem;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 55ch;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.glass-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.8rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.12);
    color: #fff;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

    .glass-button:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,0.18);
        border-color: rgba(255,255,255,0.2);
    }

    .glass-button.ghost {
        background: transparent;
    }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .site-header-inner {
        padding: 1rem;
    }

    .site-menu {
        right: 1rem;
        top: 4.5rem;
    }

    .hero-card {
        padding: 1.4rem;
    }
}



.page-title-sm {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.form-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem;
}

.app-form {
    margin-top: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    min-height: 46px;
    padding: 0.82rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

    .form-input::placeholder,
    .form-textarea::placeholder {
        color: rgba(255, 255, 255, 0.45);
    }

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        border-color: rgba(255, 255, 255, 0.26);
        background: rgba(255, 255, 255, 0.11);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
    }

.form-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.15rem;
    margin-bottom: 1.15rem;
}

.checkbox-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-main);
    cursor: pointer;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #cfcfd4;
}

.validation-summary {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 120, 120, 0.3);
    background: rgba(140, 30, 30, 0.24);
    color: #ffd6d6;
}

    .validation-summary:empty {
        display: none;
    }

.field-validation {
    font-size: 0.86rem;
    color: #ffd6d6;
}

.field-help {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.panel-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.button-row-tight {
    margin-top: 0;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 18px;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

    .app-table thead th {
        text-align: left;
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.72);
        padding: 1rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .app-table tbody td {
        padding: 1rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.94);
        vertical-align: middle;
    }

    .app-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.04);
    }

    .app-table tbody tr:last-child td {
        border-bottom: 0;
    }

.actions-col {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.08);
    transition: background 0.16s ease, transform 0.16s ease;
}

    .table-action-link:hover {
        background: rgba(255,255,255,0.14);
        transform: translateY(-1px);
    }

.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.status-chip-on {
    background: rgba(60, 160, 100, 0.18);
    border-color: rgba(60, 160, 100, 0.28);
    color: #d6ffe5;
}

.status-chip-off {
    background: rgba(160, 80, 80, 0.18);
    border-color: rgba(160, 80, 80, 0.28);
    color: #ffdede;
}

.status-chip-admin {
    background: rgba(120, 120, 255, 0.16);
    border-color: rgba(120, 120, 255, 0.24);
    color: #e2e4ff;
}

.status-chip-muted {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.82);
}

.empty-state-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem !important;
}

@media (max-width: 860px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .panel-header-row {
        flex-direction: column;
        align-items: stretch;
    }
}


.menu-user-block {
    padding: 0.85rem 1rem 0.75rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.menu-user-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.menu-user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}





.site-header-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--header-pad);
    pointer-events: auto;
    gap: 1rem;
}

.site-header-left {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    flex: 1 1 auto;
}

.header-user-block {
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--header-chip-bg, rgba(28, 30, 34, 0.45));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--panel-shadow);
    max-width: min(52vw, 420px);
}

.header-user-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
    line-height: 1.1;
}

.header-user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .header-user-block {
        padding: 0.45rem 0.75rem;
        max-width: calc(100vw - 110px);
    }

    .header-user-label {
        font-size: 0.62rem;
    }

    .header-user-name {
        font-size: 0.82rem;
    }
}