/* =========================================================
   SITE.CSS
   Cleaned and consolidated
   ========================================================= */

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* =========================================================
   BASE
   ========================================================= */

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
}

:root {
    --admin-background: #f5f7fa;
    --admin-surface: #ffffff;
    --admin-surface-hover: #f8fafc;
    --admin-border: #e5e9ef;
    --admin-border-strong: #d8dee7;
    --admin-text: #172033;
    --admin-muted: #6b7585;
    --admin-subtle: #94a0b2;
    --admin-nav: #172033;
    --admin-nav-hover: #253149;
    --admin-primary: #2563eb;
    --admin-primary-hover: #1d4ed8;
    --admin-primary-light: #eff6ff;
    --admin-success: #15803d;
    --admin-success-bg: #ecfdf3;
    --admin-danger: #dc2626;
    --admin-danger-bg: #fef2f2;
    --admin-warning: #b45309;
    --admin-warning-bg: #fffbeb;
    --admin-radius-sm: 8px;
    --admin-radius: 14px;
    --admin-radius-lg: 20px;
    --admin-shadow: 0 1px 2px rgba(16, 24, 40, 0.03), 0 5px 20px rgba(16, 24, 40, 0.04);
}


/* =========================================================
   PUBLIC LAYOUT
   ========================================================= */

.public-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

    .public-body main {
        flex: 1;
    }

.public-footer {
    padding: 20px 0;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}


/* =========================================================
   ADMIN LAYOUT
   ========================================================= */

.admin-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--admin-background);
    color: var(--admin-text);
}


/* =========================================================
   ADMIN NAVBAR
   ========================================================= */

.admin-navbar {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: var(--admin-nav);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}


.admin-navbar-inner {
    width: min( 1440px, calc(100% - 48px) );
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}


/* =========================================================
   BRAND
   ========================================================= */

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
    color: #ffffff;
    text-decoration: none;
}


    .admin-brand:hover {
        color: #ffffff;
        text-decoration: none;
    }


.admin-brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: var(--admin-primary);
    font-size: 18px;
    font-weight: 800;
}


.admin-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}


    .admin-brand-text strong {
        color: #ffffff;
        font-size: 15px;
        font-weight: 700;
    }


    .admin-brand-text small {
        margin-top: 3px;
        color: #98a3b5;
        font-size: 11px;
        font-weight: 500;
    }


/* =========================================================
   NAVIGATION CONTAINER
   ========================================================= */

.admin-navbar-collapse {
    flex: 1;
    display: flex;
    align-items: center;
    margin-left: 42px;
}


/* =========================================================
   NAV LINKS
   ========================================================= */

.admin-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}


.admin-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: 8px;
    color: #b7c0ce;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}


    .admin-nav-link:hover {
        color: #ffffff;
        background: var(--admin-nav-hover);
        text-decoration: none;
    }


    .admin-nav-link.active {
        color: #ffffff;
        background: rgba( 255, 255, 255, 0.10 );
    }


/* =========================================================
   ACCOUNT
   ========================================================= */

.admin-account {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}


.admin-account-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: right;
}


.admin-account-label {
    color: #8d99aa;
    font-size: 10px;
}


.admin-account-details strong {
    margin-top: 2px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}


.admin-signout-button {
    padding: 7px 12px;
    color: #d5dbe4;
    background: transparent;
    border: 1px solid #3d485d;
    font-size: 12px;
}


    .admin-signout-button:hover {
        color: #ffffff;
        background: #263249;
        border-color: #536079;
    }


/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.admin-mobile-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    padding: 8px;
    margin-left: auto;
    border: 0;
    border-radius: 8px;
    background: rgba( 255, 255, 255, 0.08 );
    cursor: pointer;
}


    .admin-mobile-menu-button:hover {
        background: rgba( 255, 255, 255, 0.14 );
    }


    .admin-mobile-menu-button span {
        display: block;
        width: 100%;
        height: 2px;
        margin: 4px 0;
        border-radius: 999px;
        background: #ffffff;
    }


/* =========================================================
   ADMIN NAV MOBILE
   ========================================================= */

@media (max-width: 800px) {

    .admin-navbar-inner {
        width: min( 100% - 28px, 1440px );
        min-height: 62px;
        flex-wrap: wrap;
    }


    .admin-mobile-menu-button {
        display: block;
    }


    .admin-navbar-collapse {
        display: none;
        flex-basis: 100%;
        width: 100%;
        margin-left: 0;
        padding: 12px 0 18px;
    }


        .admin-navbar-collapse.show {
            display: flex;
            flex-direction: column;
            align-items: stretch;
        }


    .admin-nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }


    .admin-nav-link {
        width: 100%;
        padding: 11px 12px;
    }


    .admin-account {
        width: 100%;
        justify-content: space-between;
        margin: 14px 0 0;
        padding-top: 14px;
        border-top: 1px solid #313d52;
    }


    .admin-account-details {
        text-align: left;
    }
}



/* =========================================================
   PAGE HEADER
   ========================================================= */

.admin-page-header {
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
}

.admin-page-header-inner {
    width: min(1440px, calc(100% - 48px));
    min-height: 108px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.admin-page-heading h1 {
    margin: 0;
    color: var(--admin-text);
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.admin-page-heading p {
    margin: 6px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
}

.admin-page-header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.admin-main {
    width: min(1440px, calc(100% - 48px));
    flex: 1;
    margin: 0 auto;
    padding: 28px 0 60px;
}

.admin-footer {
    padding: 22px 0;
    color: var(--admin-muted);
    background: var(--admin-background);
    border-top: 1px solid var(--admin-border);
}

.admin-footer-inner {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 12px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.admin-body .btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

.admin-body .btn-primary,
.login-page .btn-primary {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
}

    .admin-body .btn-primary:hover,
    .login-page .btn-primary:hover {
        background: var(--admin-primary-hover);
        border-color: var(--admin-primary-hover);
    }

.admin-body .btn-outline-primary {
    color: var(--admin-primary);
    border-color: #bfd0f8;
}

    .admin-body .btn-outline-primary:hover {
        color: #ffffff;
        background: var(--admin-primary);
        border-color: var(--admin-primary);
    }


/* =========================================================
   PANELS
   ========================================================= */

.admin-panel {
    padding: 24px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

    .admin-panel + .admin-panel {
        margin-top: 20px;
    }

.admin-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

    .admin-panel-header h2 {
        margin: 0;
        color: var(--admin-text);
        font-size: 16px;
        font-weight: 700;
        letter-spacing: -0.015em;
    }

    .admin-panel-header p {
        margin: 5px 0 0;
        color: var(--admin-muted);
        font-size: 12px;
    }

.admin-panel-empty {
    min-height: 260px;
    display: grid;
    place-content: center;
    padding: 30px;
    text-align: center;
}

    .admin-panel-empty h3 {
        margin: 0 0 7px;
        font-size: 16px;
    }

    .admin-panel-empty p {
        margin: 0;
        color: var(--admin-muted);
        font-size: 13px;
    }


/* =========================================================
   EVENT SELECTOR
   ========================================================= */

.admin-event-selector-panel {
    margin-bottom: 20px;
}

.event-selector-row {
    display: flex;
    gap: 10px;
}

.admin-event-select {
    max-width: 520px;
}


/* =========================================================
   STATS
   ========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stats-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    min-height: 142px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.stat-card-primary {
    background: linear-gradient( 145deg, #ffffff 0%, #f5f8ff 100% );
    border-color: #cad9fb;
}

.stat-label {
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-number {
    color: var(--admin-text);
    font-size: 34px;
    line-height: 1;
    font-weight: 750;
    letter-spacing: -0.04em;
}

.stat-value {
    color: var(--admin-text);
    font-size: 20px;
    font-weight: 700;
}

.stat-card small {
    color: var(--admin-muted);
    font-size: 11px;
}

.stat-card-bottom {
    display: flex;
    flex-direction: column;
    gap: 11px;
}


/* =========================================================
   STATUS
   ========================================================= */

.status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.status-live {
    color: #166534;
    background: #dcfce7;
}

    .status-live::before {
        content: "";
        width: 6px;
        height: 6px;
        margin-right: 6px;
        border-radius: 50%;
        background: #22c55e;
    }

.status-upcoming {
    color: #92400e;
    background: #fef3c7;
}

.status-finished {
    color: #475569;
    background: #eef2f7;
}

.status-neutral {
    color: #475569;
    background: #eef2f7;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 330px;
}

.chart-container-results {
    height: 300px;
}

.tally-list {
    margin-top: 20px;
    border-top: 1px solid var(--admin-border);
}

.tally-row,
.result-tally-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 46px;
    border-bottom: 1px solid var(--admin-border);
    font-size: 13px;
}

.result-tally-name {
    display: flex;
    align-items: center;
    gap: 9px;
}

    .result-tally-name span {
        color: var(--admin-muted);
        font-size: 11px;
    }


/* =========================================================
   MANAGE EVENT ACTIONS
   ========================================================= */

.admin-action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.admin-action-item {
    width: 100%;
    display: grid;
    grid-template-columns: 42px 1fr 32px;
    align-items: center;
    gap: 13px;
    padding: 14px 15px;
    color: var(--admin-text);
    background: #ffffff;
    border: 1px solid #d6dce5;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}


    .admin-action-item:hover {
        color: var(--admin-text);
        background: #f8fbff;
        border-color: var(--admin-primary);
        box-shadow: 0 5px 14px rgba(37, 99, 235, 0.10);
        transform: translateY(-1px);
        text-decoration: none;
    }


/* ICON */

.admin-action-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--admin-primary);
    background: var(--admin-primary-light);
    border: 1px solid #d7e3ff;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
}


/* TEXT */

.admin-action-item > div:nth-child(2) {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.admin-action-item strong {
    display: block;
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 700;
}


.admin-action-item > div:nth-child(2) > span {
    display: block;
    color: var(--admin-muted);
    font-size: 10px;
    line-height: 1.4;
}


/* ARROW */

.admin-action-arrow {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    justify-self: end;
    color: var(--admin-primary);
    background: #f1f5ff;
    border-radius: 7px;
    font-size: 17px;
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}


.admin-action-item:hover
.admin-action-arrow {
    color: #ffffff;
    background: var(--admin-primary);
    transform: translateX(2px);
}


/* =========================================================
   MANAGE EVENT MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .admin-action-item {
        grid-template-columns: 40px 1fr 30px;
        padding: 13px;
        gap: 11px;
    }


    .admin-action-icon {
        width: 40px;
        height: 40px;
    }
}


/* =========================================================
   DANGER ZONE
   ========================================================= */

.admin-danger-panel {
    border-color: #fecaca;
}

.danger-zone-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
}

    .danger-zone-row strong {
        font-size: 13px;
    }

    .danger-zone-row p {
        margin: 4px 0 0;
        color: var(--admin-muted);
        font-size: 12px;
    }


/* =========================================================
   RESULTS
   ========================================================= */

.results-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(330px, 0.8fr);
    gap: 20px;
    margin-bottom: 20px;
}

.prize-panel {
    height: fit-content;
}

.leader-summary {
    padding: 24px;
    text-align: center;
    border: 1px solid #dbe5fb;
    border-radius: 12px;
    background: linear-gradient( 145deg, #f8faff, #ffffff );
}

    .leader-summary h3 {
        margin: 8px 0 4px;
        font-size: 22px;
        font-weight: 750;
    }

    .leader-summary p {
        margin: 8px 0;
    }

.prize-description {
    margin: 18px 0;
    color: var(--admin-muted);
    font-size: 12px;
    line-height: 1.6;
}

.winner-eyebrow {
    display: block;
    color: var(--admin-primary);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.winner-result {
    margin-top: 18px;
    padding: 22px;
    text-align: center;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #f0fdf4;
}

.winner-result-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin: 0 auto 10px;
    color: #ffffff;
    border-radius: 50%;
    background: #16a34a;
}

.winner-result h3 {
    margin: 7px 0 2px;
    font-size: 20px;
}

.winner-email {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--admin-primary);
    font-size: 12px;
}

.winner-detail {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 9px 0;
    text-align: left;
    border-top: 1px solid #dcfce7;
    font-size: 11px;
}

    .winner-detail span {
        color: var(--admin-muted);
    }


/* =========================================================
   VOTE TABLE
   ========================================================= */

.votes-table-panel {
    margin-top: 0;
}

.votes-table-header {
    align-items: center;
}

.vote-count-badge {
    padding: 5px 9px;
    border-radius: 999px;
    color: #475569;
    background: #eef2f7;
    font-size: 11px;
    font-weight: 700;
}

.vote-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 220px;
    gap: 10px;
    margin-bottom: 18px;
}

.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

    .admin-table thead th {
        padding: 10px 13px;
        color: var(--admin-muted);
        background: #fafbfc;
        border-top: 1px solid var(--admin-border);
        border-bottom: 1px solid var(--admin-border);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .admin-table tbody td {
        padding: 13px;
        border-bottom: 1px solid var(--admin-border);
        color: var(--admin-text);
        font-size: 12px;
        vertical-align: middle;
    }

    .admin-table tbody tr:hover {
        background: #fafbfc;
    }

.table-action-column {
    width: 90px;
    text-align: right !important;
}

.table-email {
    color: var(--admin-text);
    text-decoration: none;
}

    .table-email:hover {
        color: var(--admin-primary);
    }

.choice-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    color: #334155;
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 600;
}

.table-delete-button,
.choice-remove-button {
    padding: 4px 7px;
    color: var(--admin-danger);
    background: transparent;
    border: 0;
    font-size: 11px;
    font-weight: 650;
}

    .table-delete-button:hover,
    .choice-remove-button:hover {
        text-decoration: underline;
    }

.table-empty-message {
    padding: 30px;
    color: var(--admin-muted);
    text-align: center;
    font-size: 12px;
}


/* =========================================================
   FORMS
   ========================================================= */

.admin-form-layout {
    display: grid;
    gap: 20px;
}

.admin-form-panel {
    width: min(800px, 100%);
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-field {
    display: flex;
    flex-direction: column;
}

    .admin-field label {
        margin-bottom: 7px;
        color: var(--admin-text);
        font-size: 12px;
        font-weight: 650;
    }

    .admin-field .form-control,
    .admin-field .form-select,
    .admin-event-select,
    .vote-filters .form-control,
    .vote-filters .form-select {
        min-height: 42px;
        border-color: var(--admin-border-strong);
        border-radius: 8px;
        font-size: 13px;
    }

        .admin-field .form-control:focus,
        .admin-field .form-select:focus,
        .admin-event-select:focus,
        .vote-filters .form-control:focus,
        .vote-filters .form-select:focus {
            border-color: #8fb0f5;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
        }

.admin-number-input {
    max-width: 160px;
}

.field-help {
    margin-top: 6px;
    color: var(--admin-muted);
    font-size: 11px;
}


/* =========================================================
   SETTINGS
   ========================================================= */

.setting-row {
    min-height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    border-bottom: 1px solid var(--admin-border);
}

    .setting-row:last-child {
        border-bottom: 0;
    }

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .setting-info strong {
        font-size: 12px;
    }

    .setting-info span {
        color: var(--admin-muted);
        font-size: 11px;
    }

.setting-dependent-field {
    padding: 20px 0 5px;
}

.setting-options {
    margin-top: 8px;
    padding-left: 18px;
    border-left: 2px solid #e2e8f0;
}

.setting-row-nested {
    min-height: 75px;
}

.settings-choice-link {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

    .settings-choice-link div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .settings-choice-link strong {
        font-size: 12px;
    }

    .settings-choice-link span {
        color: var(--admin-muted);
        font-size: 11px;
    }


/* Switch */

.admin-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

    .admin-switch input {
        width: 0;
        height: 0;
        opacity: 0;
    }

.admin-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: 0.2s;
}

    .admin-switch-slider::before {
        content: "";
        position: absolute;
        width: 18px;
        height: 18px;
        left: 3px;
        top: 3px;
        border-radius: 50%;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.20);
        transition: 0.2s;
    }

.admin-switch input:checked + .admin-switch-slider {
    background: var(--admin-primary);
}

    .admin-switch input:checked + .admin-switch-slider::before {
        transform: translateX(18px);
    }


/* =========================================================
   CHOICES
   ========================================================= */

.choices-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
    gap: 20px;
}

.choices-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.choice-editor-row {
    display: grid;
    grid-template-columns: 38px 1fr 70px;
    align-items: center;
    gap: 10px;
}

.choice-order {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--admin-muted);
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 700;
}

.import-warning {
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #fde68a;
    border-radius: 9px;
    color: #92400e;
    background: #fffbeb;
}

    .import-warning strong {
        font-size: 12px;
    }

    .import-warning p {
        margin: 5px 0 0;
        font-size: 11px;
    }





/* =========================================================
   CHOICE BULK PASTE
   ========================================================= */

.choices-bottom-actions {
    display: flex;
    justify-content: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--admin-border);
}

.paste-choices-textarea {
    min-height: 260px !important;
    resize: vertical;
    line-height: 1.6;
    font-family: inherit;
}

.paste-choice-example {
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: 9px;
    background: #f8fafc;
}

    .paste-choice-example > span {
        display: block;
        padding: 8px 12px;
        color: var(--admin-muted);
        border-bottom: 1px solid var(--admin-border);
        background: #f1f5f9;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .paste-choice-example pre {
        margin: 0;
        padding: 13px;
        color: var(--admin-text);
        background: transparent;
        font-family: inherit;
        font-size: 12px;
        line-height: 1.7;
        white-space: pre-wrap;
    }

.paste-summary {
    margin: 12px 0;
    padding: 9px 11px;
    color: #475569;
    border-radius: 7px;
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 600;
}

.paste-summary-success {
    color: #166534;
    background: #ecfdf3;
}

.paste-help {
    margin-top: 20px;
    padding-top: 18px;
    color: var(--admin-muted);
    border-top: 1px solid var(--admin-border);
}

    .paste-help strong {
        color: var(--admin-text);
        font-size: 11px;
    }

    .paste-help p {
        margin: 6px 0 0;
        font-size: 11px;
        line-height: 1.6;
    }


/* =========================================================
   MESSAGES
   ========================================================= */

.admin-alert {
    padding: 13px 15px;
    margin-bottom: 20px;
    border-radius: 9px;
    border: 1px solid;
}

    .admin-alert > div {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .admin-alert strong {
        font-size: 12px;
    }

    .admin-alert span {
        font-size: 11px;
    }

.admin-alert-success {
    color: #166534;
    background: var(--admin-success-bg);
    border-color: #bbf7d0;
}

.admin-alert-danger {
    color: #991b1b;
    background: var(--admin-danger-bg);
    border-color: #fecaca;
}

.admin-inline-message,
.admin-inline-error {
    padding: 10px 12px;
    margin-top: 14px;
    border-radius: 7px;
    font-size: 11px;
}

.admin-inline-success {
    color: #166534;
    background: var(--admin-success-bg);
}

.admin-inline-error {
    color: #991b1b;
    background: var(--admin-danger-bg);
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.admin-empty-state {
    min-height: 420px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 50px;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #ccd3dc;
    border-radius: var(--admin-radius);
}

.admin-empty-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 15px;
    border-radius: 12px;
    color: var(--admin-primary);
    background: var(--admin-primary-light);
    font-size: 24px;
}

.admin-empty-state h2 {
    margin: 0 0 7px;
    font-size: 18px;
}

.admin-empty-state p {
    max-width: 420px;
    margin: 0 0 18px;
    color: var(--admin-muted);
    font-size: 12px;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-page {
    min-height: calc(100vh - 65px);
    display: grid;
    place-items: center;
    padding: 40px 20px;
    background: radial-gradient( circle at top right, #e8efff 0, transparent 35% ), #f5f7fa;
}

.login-card {
    width: min(100%, 420px);
    padding: 34px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.login-brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: var(--admin-primary);
    font-weight: 800;
}

.login-brand > div:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.login-brand strong {
    font-size: 14px;
}

.login-brand span {
    margin-top: 2px;
    color: var(--admin-muted);
    font-size: 10px;
}

.login-heading {
    margin-bottom: 24px;
}

    .login-heading h1 {
        margin: 0;
        font-size: 27px;
        font-weight: 750;
        letter-spacing: -0.04em;
    }

    .login-heading p {
        margin: 7px 0 0;
        color: var(--admin-muted);
        font-size: 12px;
    }

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .results-grid,
    .choices-layout {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 800px) {

    .admin-navbar-inner {
        width: min(100% - 28px, 1440px);
        min-height: 62px;
        flex-wrap: wrap;
    }

    .admin-mobile-menu-button {
        display: block;
    }

    .admin-navbar-collapse {
        display: none;
        flex-basis: 100%;
        width: 100%;
        margin: 0;
        padding: 12px 0 18px;
    }

        .admin-navbar-collapse.show {
            display: flex;
            flex-direction: column;
            align-items: stretch;
        }

    .admin-nav {
        flex-direction: column;
    }

    .admin-nav-link {
        padding: 10px 11px;
    }

    .admin-account {
        justify-content: space-between;
        margin: 14px 0 0;
        padding-top: 14px;
        border-top: 1px solid #313d52;
    }

    .admin-account-details {
        text-align: left;
    }

    .admin-page-header-inner {
        width: min(100% - 28px, 1440px);
        min-height: auto;
        padding: 22px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-page-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-main {
        width: min(100% - 28px, 1440px);
        padding-top: 20px;
    }

    .admin-footer-inner {
        width: min(100% - 28px, 1440px);
    }

    .admin-page-heading h1 {
        font-size: 22px;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 600px) {

    .stats-grid,
    .stats-grid-three {
        grid-template-columns: 1fr;
    }

    .event-selector-row {
        flex-direction: column;
    }

    .admin-event-select {
        max-width: none;
    }

    .admin-panel {
        padding: 18px;
        border-radius: 11px;
    }

    .admin-page-header-actions .btn {
        flex: 1;
    }

    .vote-filters {
        grid-template-columns: 1fr;
    }

    .danger-zone-row,
    .settings-choice-link {
        align-items: stretch;
        flex-direction: column;
    }

    .choice-editor-row {
        grid-template-columns: 30px 1fr;
    }

    .choice-remove-button {
        grid-column: 2;
        width: fit-content;
        padding-left: 0;
    }

    .setting-row {
        gap: 14px;
    }

    .chart-container {
        height: 280px;
    }

    .admin-footer-inner {
        flex-direction: column;
        gap: 4px;
    }

    .login-card {
        padding: 25px;
    }
}


/* =========================================================
   ADMIN USERS
   ========================================================= */

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}


.admin-user-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--admin-primary);
    background: var(--admin-primary-light);
    font-size: 13px;
    font-weight: 750;
}


.admin-user-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.admin-user-name {
    display: flex;
    align-items: center;
    gap: 7px;
}


    .admin-user-name strong {
        font-size: 12px;
    }


.current-user-badge {
    display: inline-flex;
    padding: 2px 6px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


.primary-admin-label {
    color: var(--admin-muted);
    font-size: 10px;
}


.user-status-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}


.user-status-active {
    color: #166534;
    background: #dcfce7;
}


.user-status-primary {
    color: #1e40af;
    background: #dbeafe;
}


.table-action-muted {
    color: var(--admin-muted);
    font-size: 10px;
}


.admin-users-help {
    margin-top: 20px;
}


.admin-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}


.admin-info-item {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: #fafbfc;
}


    .admin-info-item strong {
        color: var(--admin-text);
        font-size: 11px;
    }


    .admin-info-item span {
        color: var(--admin-muted);
        font-size: 10px;
        line-height: 1.5;
    }


@media (max-width: 800px) {

    .admin-info-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   EVENT SELECTION PAGE
   ========================================================= */

.event-selection-page {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 50px;
    padding-bottom: 70px;
}


.event-selection-content {
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* =========================================================
   LOGO
   ========================================================= */

.event-selection-logo {
    display: block;
    width: min(100%, 400px);
    height: auto;
    margin: 0 auto 38px;
}


/* =========================================================
   HEADING
   ========================================================= */

.event-selection-heading {
    width: 100%;
    margin-bottom: 26px;
    text-align: center;
}


    .event-selection-heading h1 {
        margin: 0;
        color: #172033;
        font-size: 30px;
        font-weight: 700;
        letter-spacing: -0.025em;
    }


    .event-selection-heading p {
        margin: 8px 0 0;
        color: #667085;
        font-size: 14px;
    }


/* =========================================================
   EVENT LIST
   ========================================================= */

.event-selection-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.event-selection-button {
    width: 100%;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    color: #172033;
    background: #ffffff;
    border: 2px solid #00aeef;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.07);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}


    .event-selection-button:hover {
        color: #172033;
        background: #f8fcff;
        box-shadow: 0 8px 20px rgba(16, 24, 40, 0.10);
        transform: translateY(-2px);
        text-decoration: none;
    }


.event-selection-name {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    text-align: left;
}


.event-selection-arrow {
    flex-shrink: 0;
    color: #00aeef;
    font-size: 25px;
    font-weight: 400;
    transition: transform 0.15s ease;
}


.event-selection-button:hover
.event-selection-arrow {
    transform: translateX(4px);
}


/* =========================================================
   NO EVENTS STATE
   ========================================================= */

.no-events-card {
    width: 100%;
    max-width: 540px;
    padding: 42px 38px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e2e7ee;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(16, 24, 40, 0.07);
}


.no-events-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 50%;
}


    .no-events-icon svg {
        width: 30px;
        height: 30px;
    }


.no-events-label {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 10px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


.no-events-card h1 {
    margin: 0;
    color: #172033;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.025em;
}


.no-events-card p {
    max-width: 390px;
    margin: 11px auto 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   EVENT SELECTION MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .event-selection-page {
        min-height: calc(100vh - 80px);
        padding-top: 30px;
        padding-bottom: 40px;
    }


    .event-selection-content {
        max-width: 100%;
    }


    .event-selection-logo {
        width: min(82%, 340px);
        margin-bottom: 30px;
    }


    .event-selection-heading h1 {
        font-size: 26px;
    }


    .event-selection-button {
        min-height: 72px;
        padding: 16px 18px;
    }


    .event-selection-name {
        font-size: 17px;
    }


    .no-events-card {
        padding: 34px 22px;
    }


        .no-events-card h1 {
            font-size: 22px;
        }


    .no-events-icon {
        width: 60px;
        height: 60px;
    }
}



/* =========================================================
   VOTE HOME
   ========================================================= */

.vote-home-page {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px 70px;
}


.vote-home-content {
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* LOGO */

.vote-home-logo {
    display: block;
    width: min(100%, 400px);
    height: auto;
    margin: 0 auto 38px;
}


/* =========================================================
   OPEN STATE
   ========================================================= */

.vote-home-heading {
    width: 100%;
    margin-bottom: 26px;
    text-align: center;
}


.vote-home-status {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


.vote-home-status-open {
    color: #166534;
    background: #dcfce7;
}


.vote-home-heading h1 {
    margin: 0;
    color: #172033;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.025em;
}


.vote-home-heading p {
    margin: 9px 0 0;
    color: #667085;
    font-size: 14px;
}


/* VOTE BUTTON */

.vote-home-button {
    width: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px 30px;
    color: #ffffff;
    background: #198754;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(25, 135, 84, 0.20);
    font-size: 34px;
    font-weight: 750;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}


    .vote-home-button:hover {
        color: #ffffff;
        background: #157347;
        box-shadow: 0 12px 30px rgba(25, 135, 84, 0.26);
        transform: translateY(-2px);
        text-decoration: none;
    }


.vote-home-button-arrow {
    font-size: 32px;
    transition: transform 0.15s ease;
}


.vote-home-button:hover
.vote-home-button-arrow {
    transform: translateX(5px);
}


/* =========================================================
   CLOSED STATE
   ========================================================= */

.voting-closed-card {
    width: 100%;
    max-width: 540px;
    padding: 42px 38px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e2e7ee;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(16, 24, 40, 0.07);
}


.voting-closed-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 50%;
}


    .voting-closed-icon svg {
        width: 30px;
        height: 30px;
    }


.voting-closed-label {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 10px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


.voting-closed-card h1 {
    margin: 0;
    color: #172033;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.025em;
}


.voting-closed-event {
    margin: 7px 0 0 !important;
    color: #344054 !important;
    font-size: 14px !important;
    font-weight: 700;
}


.voting-closed-card > p:not(.voting-closed-event) {
    max-width: 390px;
    margin: 10px auto 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
}


/* OPEN DATE */

.voting-date-box {
    max-width: 350px;
    margin: 24px auto 0;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}


    .voting-date-box span {
        color: #64748b;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }


    .voting-date-box strong {
        margin-top: 3px;
        color: #172033;
        font-size: 13px;
    }


    .voting-date-box small {
        color: #667085;
        font-size: 12px;
    }


/* BACK LINK */

.voting-back-link {
    display: inline-block;
    margin-top: 25px;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}


    .voting-back-link:hover {
        color: #2563eb;
        text-decoration: none;
    }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .vote-home-page {
        min-height: calc(100vh - 80px);
        padding: 30px 14px 40px;
    }


    .vote-home-logo {
        width: min(82%, 340px);
        margin-bottom: 30px;
    }


    .vote-home-heading h1 {
        font-size: 27px;
    }


    .vote-home-button {
        min-height: 100px;
        padding: 20px;
        font-size: 27px;
    }


    .voting-closed-card {
        padding: 34px 22px;
    }


        .voting-closed-card h1 {
            font-size: 22px;
        }


    .voting-closed-icon {
        width: 60px;
        height: 60px;
    }
}
