/* Final contrast and account controls. Loaded after the legacy theme rules. */
:root:not([data-theme="light"]) .login-form-panel {
    --text: #f4f8fc;
    --text-soft: #d5e1ec;
    --text-muted: #a9bacb;
    --border: rgba(125, 157, 186, 0.34);
    background:
        radial-gradient(circle at 100% 0%, rgba(53, 211, 154, 0.12), transparent 42%),
        linear-gradient(155deg, #10283a 0%, #091a2e 72%);
    border-color: rgba(87, 129, 160, 0.42);
    color: var(--text);
}

:root:not([data-theme="light"]) .login-form-panel :is(.form-headline, h2, label, .field-label) {
    color: #f7fafc !important;
}

:root:not([data-theme="light"]) .login-form-panel :is(.form-sub, p, small, .form-footnote, i, em) {
    color: #b6c6d5 !important;
}

:root:not([data-theme="light"]) .login-form-panel .form-eyebrow {
    color: #c8ff53 !important;
    background: rgba(106, 196, 57, 0.16);
    border-color: rgba(139, 221, 70, 0.34);
}

:root:not([data-theme="light"]) .login-form-panel .auth-meta-note {
    color: #dce7f0 !important;
    background: rgba(25, 67, 78, 0.72);
    border-color: rgba(53, 211, 154, 0.28);
}

:root:not([data-theme="light"]) .login-form-panel .field-input {
    color: #f7fafc;
    background: rgba(5, 19, 35, 0.78);
    border-color: rgba(198, 218, 234, 0.78);
}

:root:not([data-theme="light"]) .login-form-panel .field-input::placeholder {
    color: #9fb1c3;
}

:root:not([data-theme="light"]) .login-form-panel :is(.form-link-row a, .auth-secondary-btn) {
    color: #d8a349 !important;
}

:root:not([data-theme="light"]) .login-form-panel .auth-secondary-btn {
    background: rgba(53, 211, 154, 0.08);
    border-color: rgba(53, 211, 154, 0.3);
}

:root:not([data-theme="light"]) .public-audience-list h3 {
    color: #f7fafc !important;
}

:root:not([data-theme="light"]) .public-audience-list li {
    color: #c7d5e2 !important;
}

:root[data-theme="light"] .public-audience-list h3 {
    color: #76501f !important;
}

:root[data-theme="light"] .public-audience-list li {
    color: #25374a !important;
}

.admin-premium-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 156px;
}

.admin-premium-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card-alt, rgba(132, 149, 167, 0.18));
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.admin-premium-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, background 0.2s ease;
}

.admin-premium-switch[aria-checked="true"] {
    background: rgba(53, 211, 154, 0.22);
    border-color: rgba(53, 211, 154, 0.62);
}

.admin-premium-switch[aria-checked="true"]::after {
    transform: translateX(20px);
    background: #35d39a;
}

.admin-premium-switch:focus-visible {
    outline: 3px solid rgba(53, 211, 154, 0.28);
    outline-offset: 2px;
}

.admin-premium-copy {
    display: grid;
    gap: 2px;
    line-height: 1.2;
}

.admin-premium-copy strong {
    color: var(--text);
    font-size: 0.78rem;
}

.admin-premium-copy small {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.premium-modal-note {
    padding: 13px 14px;
    border: 1px solid rgba(53, 211, 154, 0.24);
    border-radius: 15px;
    background: rgba(53, 211, 154, 0.07);
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.55;
}

@media (max-width: 767px) {
    .admin-premium-control {
        justify-content: flex-start;
        min-width: 0;
        max-width: 100%;
        flex-wrap: wrap;
    }
}

/* ── RESPONSIVE & FORM SELECT FIXES (MOBILE & DESKTOP) ──────────────────── */

/* Prevent <select> disclosure arrow from wrapping to a second line in Chromium */
select.uk-select,
.uk-select:not([multiple]):not([size]),
select.field-input {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.25 !important;
}

/* Role badge legibility on white table & card surfaces */
:root:not([data-theme="light"]) .table-wrap .badge-rol,
:root:not([data-theme="light"]) .card .badge-rol,
:root[data-theme="light"] .badge-rol {
    background: rgba(8, 127, 98, 0.14);
    border: 1px solid rgba(8, 127, 98, 0.30);
    color: #065f46 !important;
}

@media (max-width: 1100px) {
    .public-hero-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 20px;
    }

    .marketing-panel,
    .login-form-panel,
    #public-auth-panel {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

@media (max-width: 767px) {
    .theme-switcher {
        bottom: 10px !important;
        left: 10px !important;
    }

    .theme-toggle {
        min-height: 36px !important;
        padding: 5px 6px !important;
        gap: 0 !important;
        opacity: 0.92;
    }

    .theme-toggle-track {
        width: 44px !important;
        height: 24px !important;
    }

    .theme-toggle-thumb {
        width: 18px !important;
        height: 18px !important;
    }

    .theme-toggle.is-light .theme-toggle-thumb {
        transform: translateX(20px) !important;
    }

    .theme-toggle-label {
        display: none !important;
    }

    .fab-wrap {
        bottom: 12px !important;
        right: 12px !important;
    }

    .fab-btn {
        width: 46px !important;
        height: 46px !important;
        font-size: 1.35rem !important;
    }

    .admin-stat-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .stewardship-branches {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .stewardship-branch {
        min-width: 0;
        padding: 10px 6px;
    }
}

