/*
 * ShackTac SSO theme, based on the forums.dslyecxi.com palette.
 * Colours: background #272727, panels #3f3d33, navbar #574f42,
 * borders #6d6352, links/accents #fdc100, text #ffffff.
 *
 * The palette is unchanged; this layer adds modern spacing, radii,
 * elevation, focus states and transitions on top of Tailwind/Bootstrap.
 */
:root {
    --st-bg: #272727;
    --st-panel: #3f3d33;
    --st-panel-dark: #2e2c26;
    --st-nav: #574f42;
    --st-border: #6d6352;
    --st-text: #ffffff;
    --st-muted: #c0c0c0;
    --st-link: #fdc100;
    --st-link-hover: #ffd84a;
    --st-danger: #f4939a;
    --st-on-accent: #1c1a14;

    /* Derived tokens: the same palette at lower intensity. */
    --st-border-soft: rgba(109, 99, 82, 0.55);
    --st-accent-soft: rgba(253, 193, 0, 0.12);
    --st-accent-ring: rgba(253, 193, 0, 0.35);
    --st-hover: rgba(255, 255, 255, 0.04);

    --st-radius-sm: 6px;
    --st-radius: 10px;
    --st-radius-lg: 14px;
    --st-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.55);
    --st-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
    --st-ease: 150ms cubic-bezier(0.2, 0, 0, 1);
    --st-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --st-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

html {
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--st-bg);
    background-image: radial-gradient(1200px 480px at 50% -200px, rgba(87, 79, 66, 0.45), transparent 70%);
    background-repeat: no-repeat;
    color: var(--st-text);
    font-family: var(--st-font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--st-link);
    color: var(--st-on-accent);
}

a {
    color: var(--st-link);
    text-decoration: none;
    transition: color var(--st-ease), background-color var(--st-ease), border-color var(--st-ease);
}

a,
button {
    -webkit-tap-highlight-color: rgba(253, 193, 0, 0.2);
}

a:hover,
a:focus {
    color: var(--st-link-hover);
}

:focus-visible {
    outline: 2px solid var(--st-link);
    outline-offset: 2px;
    border-radius: var(--st-radius-sm);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--st-text);
    letter-spacing: -0.015em;
    line-height: 1.25;
}

hr {
    border: 0;
    border-top: 1px solid var(--st-border-soft);
    opacity: 1;
}

code,
pre,
kbd {
    font-family: var(--st-mono);
}

code {
    color: var(--st-link);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--st-border-soft);
    border-radius: var(--st-radius-sm);
    padding: 0.1em 0.4em;
    font-size: 0.875em;
}

* {
    scrollbar-color: var(--st-border) transparent;
}

/* Brand header ------------------------------------------------------------ */
.st-masthead,
.st-admin-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(56, 54, 48, 0.82);
    background-image: linear-gradient(rgba(78, 76, 68, 0.9), rgba(56, 54, 48, 0.9));
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--st-border-soft);
    box-shadow: 0 6px 20px -14px rgba(0, 0, 0, 0.8);
}

.st-masthead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    min-height: 64px;
    padding: 0.625rem 1.5rem;
}

.st-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.st-brand img {
    height: 36px;
    width: auto;
}

.st-brand-text {
    color: var(--st-link);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(253, 193, 0, 0.45);
    border-radius: 999px;
    line-height: 1;
}

.min-vh-100 {
    min-height: calc(100vh - 64px) !important;
}

@media (max-width: 480px) {
    .st-masthead {
        min-height: 56px;
        padding: 0.5rem 1rem;
    }

    .st-brand img {
        height: 30px;
    }

    .min-vh-100 {
        min-height: calc(100vh - 56px) !important;
    }
}

/* Navigation -------------------------------------------------------------- */
.st-nav-link {
    color: var(--st-muted) !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: color var(--st-ease), background-color var(--st-ease);
}

.st-nav-link:hover,
.st-nav-link:focus-visible {
    color: var(--st-text) !important;
    background-color: rgba(255, 255, 255, 0.06);
}

.st-nav-link[aria-current="page"] {
    color: var(--st-link) !important;
    background-color: var(--st-accent-soft) !important;
    box-shadow: inset 0 0 0 1px rgba(253, 193, 0, 0.25);
}

nav[aria-label="Account"] .st-nav-link {
    padding: 0.4rem 0.6rem;
}

nav[aria-label="Account"] button {
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--st-ease), color var(--st-ease);
}

nav[aria-label="Account"] button:hover {
    background-color: rgba(224, 108, 117, 0.12);
}

nav[aria-label="Breadcrumb"] ol {
    color: var(--st-muted);
}

/* Flash messages (admin layout) ----------------------------------------- */
.st-flash {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 1rem auto 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--st-border-soft);
    border-left-width: 3px;
    border-radius: var(--st-radius);
    font-size: 0.925rem;
}

/* Tailwind utility overrides --------------------------------------------- */
.bg-white {
    background-color: var(--st-panel) !important;
}

nav.bg-white {
    background-color: var(--st-nav) !important;
}

.bg-gray-100 {
    background-color: var(--st-bg) !important;
}

body.bg-gray-100 {
    background-color: var(--st-bg) !important;
}

.bg-gray-50 {
    background-color: var(--st-panel-dark) !important;
}

.bg-gray-200 {
    background-color: var(--st-panel) !important;
}

.hover\:bg-gray-200:hover {
    background-color: var(--st-nav) !important;
}

.hover\:bg-gray-50:hover {
    background-color: #45423a !important;
}

.bg-blue-100 {
    background-color: var(--st-accent-soft) !important;
}

.bg-yellow-50 {
    background-color: #4a3d1a !important;
}

.border-yellow-400 {
    border-color: var(--st-link) !important;
}

.border-yellow-200 {
    border-color: #7d672a !important;
}

.text-yellow-900,
.text-yellow-800 {
    color: #ffe6a3 !important;
}

.text-gray-300 {
    color: var(--st-muted) !important;
}

.text-green-600 {
    color: #8fbf6a !important;
}

.bg-light {
    background-color: var(--st-panel) !important;
}

.border-gray-100,
.border-gray-200,
.border-gray-300,
.divide-y > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--st-border-soft) !important;
}

.text-gray-900,
.text-gray-800,
.text-gray-700,
.text-gray-600 {
    color: var(--st-text) !important;
}

.text-gray-500,
.text-gray-400,
.text-muted,
.form-text,
.small,
small {
    color: var(--st-muted) !important;
}

.text-blue-600,
.text-blue-700,
.text-blue-900,
.text-blue-800 {
    color: var(--st-link) !important;
}

.bg-green-100 {
    background-color: #263d24 !important;
}

.border-green-200 {
    border-color: #456b3e !important;
}

.text-green-700,
.text-green-800,
.text-green-900 {
    color: #c6e6b4 !important;
}

.bg-red-100 {
    background-color: #4a2326 !important;
}

.border-red-200 {
    border-color: #7d3a3f !important;
}

.text-red-800,
.text-red-900 {
    color: #ffb4b4 !important;
}

.border-yellow-300 {
    border-color: #7d672a !important;
}

.hover\:text-blue-900:hover,
.hover\:text-gray-900:hover {
    color: var(--st-link-hover) !important;
}

.hover\:text-red-900:hover,
.hover\:text-red-800:hover {
    color: #ffb4b4 !important;
}

.hover\:text-green-900:hover {
    color: #c6e6b4 !important;
}

.bg-blue-600 {
    background-color: var(--st-link) !important;
    color: var(--st-on-accent) !important;
    font-weight: 600;
}

.hover\:bg-blue-700:hover {
    background-color: var(--st-link-hover) !important;
    color: var(--st-on-accent) !important;
}

.text-red-500,
.text-red-600 {
    color: var(--st-danger) !important;
}

/* Surfaces: softer corners, quiet elevation. */
.rounded-lg,
.rounded-xl {
    border-radius: var(--st-radius-lg) !important;
}

.rounded {
    border-radius: 8px !important;
}

.shadow,
.shadow-sm,
.shadow-md {
    box-shadow: var(--st-shadow) !important;
}

.bg-white.rounded-lg,
.bg-gray-50.rounded-lg {
    border: 1px solid var(--st-border-soft);
}

a.bg-white.rounded-lg,
a.bg-gray-50.rounded-lg {
    transition: transform var(--st-ease), border-color var(--st-ease), background-color var(--st-ease);
}

a.bg-white.rounded-lg:hover,
a.bg-gray-50.rounded-lg:hover {
    transform: translateY(-1px);
    border-color: rgba(253, 193, 0, 0.45);
}

/* Rows in lists get a gentle hover. */
.divide-y > [wire\:key]:hover,
.divide-y > div:hover,
tbody tr:hover > * {
    background-color: var(--st-hover);
}

/* Buttons and button-like links built from Tailwind utilities. */
button.rounded,
a.rounded.px-4,
button.px-4,
.bg-blue-600 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 600;
    transition: background-color var(--st-ease), border-color var(--st-ease), color var(--st-ease), transform var(--st-ease), box-shadow var(--st-ease);
}

.bg-blue-600 {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 1px 2px rgba(0, 0, 0, 0.35);
}

.bg-blue-600:active,
button.rounded:active,
.btn:active {
    transform: translateY(1px);
}

a.border.rounded:hover,
button.border.rounded:hover {
    border-color: var(--st-link) !important;
    color: var(--st-link) !important;
}

/* Status pills (small rounded labels). */
span.text-xs.rounded,
span.text-xs.rounded-full,
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    padding: 0.2rem 0.6rem !important;
}

/* Bootstrap components ---------------------------------------------------- */
.card,
.list-group-item,
.dropdown-menu,
.modal-content {
    background-color: var(--st-panel);
    border-color: var(--st-border-soft);
    color: var(--st-text);
}

.card {
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow-lg) !important;
    overflow: hidden;
}

.card-header,
.card-footer,
.dropdown-divider {
    background-color: var(--st-panel-dark);
    border-color: var(--st-border-soft);
    color: var(--st-text);
}

.card-header {
    font-weight: 600;
}

.dropdown-menu,
.modal-content {
    border-radius: var(--st-radius);
    box-shadow: var(--st-shadow-lg);
}

.dropdown-item {
    color: var(--st-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--st-nav);
    color: var(--st-link);
}

.list-group-item:first-child {
    border-top-left-radius: var(--st-radius);
    border-top-right-radius: var(--st-radius);
}

.list-group-item:last-child {
    border-bottom-left-radius: var(--st-radius);
    border-bottom-right-radius: var(--st-radius);
}

.navbar {
    background-color: var(--st-nav) !important;
    border-color: var(--st-border) !important;
}

/* Forms ------------------------------------------------------------------- */
.form-label,
.form-check-label,
label {
    color: var(--st-text);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.form-control,
.form-select,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
    background-color: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--st-border);
    border-radius: 8px;
    color: var(--st-text);
    transition: border-color var(--st-ease), box-shadow var(--st-ease), background-color var(--st-ease);
}

.form-control,
.form-select {
    padding: 0.55rem 0.8rem;
}

.form-control:hover,
.form-select:hover,
input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
    border-color: #8a7d67;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--st-text);
    border-color: var(--st-link);
    box-shadow: 0 0 0 3px var(--st-accent-ring);
    outline: none;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #b3ab9b;
}

input[type="checkbox"],
input[type="radio"],
.form-check-input {
    accent-color: var(--st-link);
}

.form-check-input {
    background-color: rgba(0, 0, 0, 0.22);
    border-color: var(--st-border);
}

.form-check-input:checked {
    background-color: var(--st-link);
    border-color: var(--st-link);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px var(--st-accent-ring);
    border-color: var(--st-link);
}

/* Bootstrap buttons ------------------------------------------------------- */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    transition: background-color var(--st-ease), border-color var(--st-ease), color var(--st-ease), transform var(--st-ease), box-shadow var(--st-ease);
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
}

.btn-primary {
    --bs-btn-color: var(--st-on-accent);
    --bs-btn-bg: var(--st-link);
    --bs-btn-border-color: var(--st-link);
    --bs-btn-hover-color: var(--st-on-accent);
    --bs-btn-hover-bg: var(--st-link-hover);
    --bs-btn-hover-border-color: var(--st-link-hover);
    --bs-btn-focus-shadow-rgb: 253, 193, 0;
    --bs-btn-active-color: var(--st-on-accent);
    --bs-btn-active-bg: var(--st-link-hover);
    --bs-btn-active-border-color: var(--st-link);
    --bs-btn-disabled-color: var(--st-on-accent);
    --bs-btn-disabled-bg: var(--st-link);
    --bs-btn-disabled-border-color: var(--st-link);
    background-color: var(--st-link);
    border-color: var(--st-link);
    color: var(--st-on-accent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 1px 2px rgba(0, 0, 0, 0.35);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible,
.btn-primary:active,
.btn-primary.active,
.btn-primary.show,
.btn-primary:first-child:active,
:not(.btn-check) + .btn-primary:active {
    background-color: var(--st-link-hover) !important;
    border-color: var(--st-link-hover) !important;
    color: var(--st-on-accent) !important;
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 3px var(--st-accent-ring) !important;
}

.btn-outline-primary {
    --bs-btn-color: var(--st-link);
    --bs-btn-border-color: rgba(253, 193, 0, 0.6);
    --bs-btn-hover-color: var(--st-on-accent);
    --bs-btn-hover-bg: var(--st-link);
    --bs-btn-hover-border-color: var(--st-link);
    --bs-btn-focus-shadow-rgb: 253, 193, 0;
    --bs-btn-active-color: var(--st-on-accent);
    --bs-btn-active-bg: var(--st-link);
    --bs-btn-active-border-color: var(--st-link);
    --bs-btn-disabled-color: var(--st-link);
    --bs-btn-disabled-border-color: var(--st-link);
    border-color: rgba(253, 193, 0, 0.6);
    color: var(--st-link);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--st-link) !important;
    border-color: var(--st-link) !important;
    color: var(--st-on-accent) !important;
}

.btn-outline-primary:focus,
.btn-outline-primary:focus-visible,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary.show,
.btn-outline-primary:first-child:active,
:not(.btn-check) + .btn-outline-primary:active {
    background-color: var(--st-link) !important;
    border-color: var(--st-link) !important;
    color: var(--st-on-accent) !important;
    box-shadow: 0 0 0 3px var(--st-accent-ring) !important;
}

.btn-outline-secondary {
    border-color: var(--st-border);
    color: var(--st-text);
}

.btn-outline-secondary:hover {
    background-color: var(--st-nav);
    border-color: var(--st-border);
    color: var(--st-text);
}

.btn-danger {
    background-color: #8f333b;
    border-color: #a83f48;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #a83f48;
    border-color: #b84a53;
    color: #ffffff;
}

.btn-outline-danger {
    border-color: rgba(224, 108, 117, 0.6);
    color: var(--st-danger);
}

.btn-outline-danger:hover {
    background-color: #8f333b;
    border-color: #a83f48;
    color: #ffffff;
}

/* Alerts ------------------------------------------------------------------ */
.alert {
    border-radius: var(--st-radius);
    border-left-width: 3px;
    padding: 0.75rem 1rem;
    font-size: 0.925rem;
}

.alert-danger {
    background-color: #4a2326;
    border-color: #7d3a3f;
    border-left-color: var(--st-danger);
    color: #ffb4b4;
}

.alert-success {
    background-color: #263d24;
    border-color: #456b3e;
    border-left-color: #8fbf6a;
    color: #c6e6b4;
}

.alert-warning {
    background-color: #4a3d1a;
    border-color: #7d672a;
    border-left-color: var(--st-link);
    color: #ffe6a3;
}

.alert-info {
    background-color: #24333f;
    border-color: #3f5d70;
    border-left-color: #6fa8cc;
    color: #b7d9ee;
}

/* Tables ------------------------------------------------------------------ */
.table,
table {
    color: var(--st-text);
}

.table > :not(caption) > * > * {
    background-color: transparent;
    border-color: var(--st-border-soft);
    color: var(--st-text);
    padding: 0.7rem 0.85rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    color: var(--st-text);
}

thead th,
.table > thead > tr > th {
    color: var(--st-muted) !important;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Pagination -------------------------------------------------------------- */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    background-color: var(--st-panel);
    border-color: var(--st-border-soft);
    border-radius: 8px !important;
    color: var(--st-text);
}

.pagination .page-link:hover {
    background-color: var(--st-nav);
    color: var(--st-link);
}

.pagination .active > .page-link {
    background-color: var(--st-link);
    border-color: var(--st-link);
    color: var(--st-on-accent);
}

.invalid-feedback {
    color: #ffb4b4;
}

.is-invalid {
    border-color: #a83f48 !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(224, 108, 117, 0.3) !important;
}

.st-card-accent {
    border-top: 3px solid var(--st-link) !important;
}

/* Standalone auth cards: the first card on a centred page gets the accent. */
.min-vh-100 .card {
    border-top: 3px solid var(--st-link);
}

.min-vh-100 .card h1 {
    letter-spacing: -0.02em;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* Account and MFA components --------------------------------------------- */
.st-auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 0.9rem;
    border-radius: 14px;
    color: var(--st-link);
    background: var(--st-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(253, 193, 0, 0.3);
}

.st-mfa-panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.st-otp-input {
    font-family: var(--st-mono);
    font-size: 1.35rem !important;
    letter-spacing: 0.3em;
    text-align: center;
}

.st-otp-input::placeholder {
    letter-spacing: 0.2em;
    opacity: 0.45;
}

.st-mfa-alt-heading {
    color: var(--st-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.st-mfa-alt li + li {
    margin-top: 0.4rem;
}

.st-mfa-option,
.st-row-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.85rem;
    color: var(--st-text);
    border: 1px solid var(--st-border-soft);
    border-radius: var(--st-radius);
    background: rgba(0, 0, 0, 0.12);
}

.st-row-link {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 1rem 1.25rem;
}

.st-mfa-option:hover,
.st-mfa-option:focus-visible,
.st-row-link:hover,
.st-row-link:focus-visible {
    color: var(--st-text);
    border-color: rgba(253, 193, 0, 0.5);
    background: var(--st-hover);
}

.st-mfa-option-icon {
    display: inline-flex;
    flex: none;
    color: var(--st-link);
}

.st-mfa-option-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.st-mfa-option-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.st-mfa-option-hint {
    color: var(--st-muted);
    font-size: 0.8rem;
}

.st-mfa-option-chevron {
    color: var(--st-muted);
    font-size: 1.4rem;
    line-height: 1;
}

.st-back-link {
    display: inline-block;
    color: var(--st-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.st-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.st-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.st-status-on {
    color: #c6e6b4;
    background: #263d24;
    box-shadow: inset 0 0 0 1px #456b3e;
}

.st-status-off {
    color: #ffb4b4;
    background: #4a2326;
    box-shadow: inset 0 0 0 1px #7d3a3f;
}

.st-method-list .st-method + .st-method {
    border-top: 1px solid var(--st-border-soft);
}

.st-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
}

.st-method-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--st-link);
    background: var(--st-accent-soft);
}

.st-method-body {
    flex: 1;
    min-width: 0;
}

.st-method-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.st-method-desc {
    color: var(--st-muted);
    font-size: 0.875rem;
    margin: 0.2rem 0 0;
}

.st-method-action {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.st-pill {
    display: inline-flex;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--st-muted);
    box-shadow: inset 0 0 0 1px var(--st-border);
}

.st-pill-on {
    color: #c6e6b4;
    background: #263d24;
    box-shadow: none;
}

.st-pill-warn {
    color: #ffe6a3;
    background: #4a3d1a;
    box-shadow: none;
}

.st-sublist {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    border: 1px solid var(--st-border-soft);
    border-radius: var(--st-radius);
}

.st-sublist li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
}

.st-sublist li + li {
    border-top: 1px solid var(--st-border-soft);
}

.st-sublist-name {
    font-size: 0.9rem;
}

/* Inline confirm: a button that reveals a password field. */
.st-confirm {
    position: relative;
}

.st-confirm > summary {
    list-style: none;
}

.st-confirm > summary::-webkit-details-marker {
    display: none;
}

.st-confirm[open] > summary {
    display: none;
}

.st-confirm-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.st-confirm-form .form-control {
    min-width: 13rem;
}

.st-codes-card {
    border-color: rgba(253, 193, 0, 0.45) !important;
}

.st-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.4rem;
}

.st-codes-grid code {
    display: block;
    text-align: center;
    padding: 0.4rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

@media (max-width: 576px) {
    .st-method {
        flex-wrap: wrap;
    }

    .st-method-action {
        width: 100%;
        align-items: stretch;
        padding-left: calc(40px + 1rem);
    }

    .st-confirm-form {
        flex-wrap: wrap;
    }

    .st-confirm-form .form-control {
        min-width: 0;
        flex: 1 1 100%;
    }
}

/* Admin shell: sidebar + top bar ----------------------------------------- */
.st-skip-link {
    position: absolute;
    left: -9999px;
    top: 0.5rem;
    z-index: 100;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    background: var(--st-link);
    color: var(--st-on-accent);
    font-weight: 600;
}

.st-skip-link:focus {
    left: 0.5rem;
    color: var(--st-on-accent);
}

.st-admin-shell {
    display: flex;
    min-height: 100vh;
}

.st-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    flex: none;
    width: 240px;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(78, 76, 68, 0.55), rgba(46, 44, 38, 0.85));
    border-right: 1px solid var(--st-border-soft);
}

.st-sidebar-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem 1rem;
    border-bottom: 1px solid var(--st-border-soft);
}

.st-sidebar-brand .st-brand img {
    height: 32px;
}

.st-sidebar-tag {
    color: var(--st-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.st-sidebar-nav {
    flex: 1;
    padding: 0.5rem 0.75rem 1rem;
}

.st-sidebar-section {
    margin: 1rem 0.6rem 0.35rem;
    color: #b3ab9b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.st-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.65rem;
    margin-bottom: 1px;
    font-size: 0.9rem;
}

.st-sidebar-link svg {
    flex: none;
    opacity: 0.8;
}

.st-sidebar-link[aria-current="page"] svg {
    opacity: 1;
}

.st-sidebar-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--st-border-soft);
}

.st-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.st-sidebar-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
}

.st-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--st-link);
    color: var(--st-on-accent);
    font-size: 0.8rem;
    font-weight: 700;
}

.st-admin-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.st-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.5rem 1.5rem;
    background: rgba(39, 39, 39, 0.82);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--st-border-soft);
}

.st-topbar-crumbs {
    flex: 1;
    min-width: 0;
}

.st-topbar nav[aria-label="Account"] {
    margin-left: 0;
}

.st-topbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--st-border-soft);
    border-radius: 8px;
    background: transparent;
    color: var(--st-text);
    cursor: pointer;
}

.st-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
}

.st-crumbs li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--st-muted);
}

.st-crumbs li + li::before {
    content: "/";
    color: #6d6352;
}

.st-crumbs a {
    color: var(--st-muted);
}

.st-crumbs a:hover {
    color: var(--st-link);
}

.st-crumbs [aria-current="page"] {
    color: var(--st-text);
    font-weight: 500;
}

.st-admin-content-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.5rem 1.5rem 3rem;
}

.st-admin-content:focus {
    outline: none;
}

/* Admin pages wrap their content in .p-6; trim the outer gutter. */
.st-admin-content > .p-6,
.st-admin-content > div > .p-6 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.st-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.55);
}

@media (max-width: 1023px) {
    .st-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
        box-shadow: var(--st-shadow-lg);
        background: #2e2c26;
    }

    .st-sidebar.is-open {
        transform: none;
    }

    .st-topbar-toggle {
        display: inline-flex;
    }

    .st-topbar,
    .st-admin-content-wrap {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 640px) {
    .st-topbar nav[aria-label="Account"] a {
        display: none;
    }
}

/* Row actions in admin lists: compact ghost buttons instead of bare links. */
.st-admin .divide-y > * > .shrink-0 > a,
.st-admin .divide-y > * > .shrink-0 > button,
.st-admin td:last-child > a.text-blue-600,
.st-admin td:last-child > button {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    font-weight: 500;
    line-height: 1.3;
    transition: background-color var(--st-ease), border-color var(--st-ease), color var(--st-ease);
}

.st-admin .divide-y > * > .shrink-0 > a:hover,
.st-admin .divide-y > * > .shrink-0 > button:hover,
.st-admin td:last-child > a.text-blue-600:hover,
.st-admin td:last-child > button:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--st-border-soft);
}

.st-admin .divide-y > * > .shrink-0 > .text-red-600:hover,
.st-admin td:last-child > .text-red-600:hover {
    background: rgba(224, 108, 117, 0.12);
    border-color: rgba(224, 108, 117, 0.35);
}

.st-admin .divide-y > * > .shrink-0 {
    gap: 0.25rem !important;
}

.st-admin .divide-y > * > .shrink-0 > span {
    padding: 0.3rem 0.65rem;
    color: #b3ab9b;
    font-size: 0.8rem;
}

/* Page headers in admin views. */
.st-admin-content h1.text-2xl {
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

/* Admin editing components ----------------------------------------------- */
.st-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.st-page-head h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.st-page-head p {
    color: var(--st-muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.st-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.st-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.st-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--st-border);
    background: transparent;
    color: var(--st-text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--st-ease), border-color var(--st-ease), color var(--st-ease), transform var(--st-ease);
}

.st-btn:hover {
    border-color: var(--st-link);
    color: var(--st-link);
}

.st-btn:active {
    transform: translateY(1px);
}

.st-btn-primary {
    background: var(--st-link);
    border-color: var(--st-link);
    color: var(--st-on-accent) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 1px 2px rgba(0, 0, 0, 0.35);
}

.st-btn-primary:hover {
    background: var(--st-link-hover);
    border-color: var(--st-link-hover);
}

.st-btn-danger {
    border-color: rgba(224, 108, 117, 0.55);
    color: var(--st-danger);
}

.st-btn-danger:hover {
    background: #8f333b;
    border-color: #a83f48;
    color: #ffffff;
}

.st-btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
}

.st-btn-ghost {
    border-color: transparent;
}

.st-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.st-card {
    background: var(--st-panel);
    border: 1px solid var(--st-border-soft);
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow);
}

.st-stack > * + * {
    margin-top: 1.25rem;
}

.st-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--st-border-soft);
}

.st-card-head h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.st-card-head p {
    color: var(--st-muted);
    font-size: 0.825rem;
    margin: 0.15rem 0 0;
}

.st-card-body {
    padding: 1.25rem;
}

.st-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--st-border-soft);
    background: rgba(0, 0, 0, 0.12);
    border-radius: 0 0 var(--st-radius-lg) var(--st-radius-lg);
}

.st-sticky-foot {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: 1.25rem;
    border: 1px solid var(--st-border-soft);
    border-radius: var(--st-radius-lg);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    background: rgba(46, 44, 38, 0.92);
    box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, 0.8);
}

.st-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.1rem 1.25rem;
}

.st-layout-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .st-layout-aside {
        grid-template-columns: minmax(0, 1fr);
    }
}

.st-field + .st-field {
    margin-top: 1.1rem;
}

.st-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--st-text);
}

.st-optional {
    color: #b3ab9b;
    font-weight: 500;
}

.st-help {
    margin-top: 0.35rem;
    color: var(--st-muted);
    font-size: 0.8rem;
}

.st-error {
    margin-top: 0.35rem;
    color: #ffb4b4;
    font-size: 0.8rem;
}

.st-input {
    display: block;
    width: 100%;
    padding: 0.55rem 0.8rem;
    font: inherit;
    font-size: 0.925rem;
}

.st-mono {
    font-family: var(--st-mono);
    font-size: 0.85rem;
}

textarea.st-input {
    resize: vertical;
    min-height: 2.75rem;
}

/* Toggle switch. */
.st-switch {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.st-switch > input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.st-switch-track {
    position: relative;
    flex: none;
    width: 38px;
    height: 22px;
    margin-top: 1px;
    border-radius: 999px;
    background: #4d4a40;
    box-shadow: inset 0 0 0 1px var(--st-border);
    transition: background-color var(--st-ease);
}

.st-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d6d0c4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: transform var(--st-ease), background-color var(--st-ease);
}

.st-switch > input:checked + .st-switch-track {
    background: var(--st-link);
    box-shadow: none;
}

.st-switch > input:checked + .st-switch-track::after {
    transform: translateX(16px);
    background: var(--st-on-accent);
}

.st-switch > input:focus-visible + .st-switch-track {
    box-shadow: 0 0 0 3px var(--st-accent-ring);
}

.st-switch > input:disabled + .st-switch-track {
    opacity: 0.5;
}

.st-switch-text strong {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.st-switch-text span {
    display: block;
    color: var(--st-muted);
    font-size: 0.8rem;
    margin-top: 0.1rem;
}

.st-switch-list > .st-switch + .st-switch {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--st-border-soft);
}

/* Choice cards (radio/checkbox tiles). */
.st-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.6rem;
}

.st-choice {
    position: relative;
    display: flex;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    background: rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: border-color var(--st-ease), background-color var(--st-ease), box-shadow var(--st-ease);
}

.st-choice:hover {
    border-color: #8a7d67;
}

.st-choice > input {
    margin-top: 0.2rem;
    flex: none;
}

.st-choice:has(input:checked) {
    border-color: var(--st-link);
    background: var(--st-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(253, 193, 0, 0.35);
}

.st-choice:has(input:disabled) {
    opacity: 0.55;
    cursor: not-allowed;
}

.st-choice:has(input:focus-visible) {
    box-shadow: 0 0 0 3px var(--st-accent-ring);
}

.st-choice-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.st-choice-desc {
    display: block;
    color: var(--st-muted);
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.st-choice-code {
    display: block;
    color: #b3ab9b;
    font-family: var(--st-mono);
    font-size: 0.72rem;
    margin-top: 0.15rem;
    word-break: break-all;
}

/* Compact checkbox chips. */
.st-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.st-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--st-border);
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: border-color var(--st-ease), background-color var(--st-ease), color var(--st-ease);
}

.st-chip > input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.st-chip::before {
    content: "+";
    color: var(--st-muted);
    font-weight: 700;
}

.st-chip:has(input:checked) {
    border-color: var(--st-link);
    background: var(--st-accent-soft);
    color: var(--st-link);
}

.st-chip:has(input:checked)::before {
    content: "\2713";
    color: var(--st-link);
}

.st-chip:has(input:focus-visible) {
    box-shadow: 0 0 0 3px var(--st-accent-ring);
}

.st-chip:has(input:disabled) {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Definition lists for detail pages. */
.st-dl {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    margin: 0;
}

.st-dl > dt,
.st-dl > dd {
    margin: 0;
    padding: 0.7rem 0;
    border-top: 1px solid var(--st-border-soft);
}

.st-dl > dt:first-of-type,
.st-dl > dt:first-of-type + dd {
    border-top: 0;
    padding-top: 0;
}

.st-dl > dt {
    color: var(--st-muted);
    font-size: 0.85rem;
}

.st-dl > dd {
    font-size: 0.9rem;
    word-break: break-word;
}

@media (max-width: 640px) {
    .st-dl {
        grid-template-columns: minmax(0, 1fr);
    }

    .st-dl > dd {
        border-top: 0;
        padding-top: 0;
    }
}

.st-copy {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.st-copy code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.4rem 0.6rem;
}

.st-list-plain {
    list-style: none;
    margin: 0;
    padding: 0;
}

.st-list-plain li + li {
    margin-top: 0.3rem;
}

.st-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--st-muted);
    font-size: 0.9rem;
}

.st-swatch {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    vertical-align: -0.1em;
}

.st-member-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
}

.st-member-row + .st-member-row {
    border-top: 1px solid var(--st-border-soft);
}

.st-member-row:hover {
    background: var(--st-hover);
}

.st-member-meta {
    flex: 1;
    min-width: 0;
}

.st-member-meta strong {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.st-member-meta span {
    display: block;
    color: var(--st-muted);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.st-danger-zone {
    border-color: rgba(224, 108, 117, 0.4);
}

.st-danger-zone .st-card-head h2 {
    color: var(--st-danger);
}

.st-perm-category + .st-perm-category {
    margin-top: 1.1rem;
}

.st-perm-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.st-perm-category-head h3 {
    margin: 0;
    color: var(--st-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.st-link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--st-link);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.st-link-btn:hover {
    color: var(--st-link-hover);
    text-decoration: underline;
}

/* Full-page permission editor: selected rows stand out. */
label[data-permission] {
    border: 1px solid transparent;
    transition: border-color var(--st-ease), background-color var(--st-ease);
}

label[data-permission]:has(input:checked) {
    border-color: rgba(253, 193, 0, 0.45);
    background: var(--st-accent-soft) !important;
}

.st-layout-aside aside .st-dl {
    grid-template-columns: 7.5rem minmax(0, 1fr);
}

/* Consent, device and sign-out pages -------------------------------------- */
.st-app-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--st-nav), var(--st-panel-dark));
    box-shadow: inset 0 0 0 1px var(--st-border), var(--st-shadow);
    color: var(--st-link);
    font-size: 1.5rem;
    font-weight: 700;
}

.st-auth-title {
    margin: 0 0 0.35rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.st-scope-list {
    margin: 1.5rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--st-border-soft);
    border-radius: var(--st-radius);
    background: rgba(0, 0, 0, 0.14);
}

.st-scope {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.925rem;
}

.st-list-plain .st-scope + .st-scope {
    margin-top: 0.7rem;
}

.st-scope-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 0.05rem;
    border-radius: 50%;
    background: var(--st-accent-soft);
    color: var(--st-link);
}

code.st-scope-code {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0 0.35rem;
    font-size: 0.72rem;
    color: #b3ab9b;
    background: transparent;
}

.st-auth-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.st-auth-actions > * {
    flex: 1;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.st-device-code {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px dashed rgba(253, 193, 0, 0.5);
    border-radius: var(--st-radius);
    color: var(--st-link);
    font-family: var(--st-mono);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.st-device-input {
    font-family: var(--st-mono);
    font-size: 1.35rem !important;
    letter-spacing: 0.2em;
    text-align: center;
    text-transform: uppercase;
}

/* Numbered setup steps (authenticator setup). */
.st-steps {
    list-style: none;
    counter-reset: st-step;
    margin: 0;
    padding: 0;
}

.st-steps > li {
    position: relative;
    counter-increment: st-step;
    padding-left: 2.4rem;
}

.st-steps > li + li {
    margin-top: 1.4rem;
}

.st-steps > li::before {
    content: counter(st-step);
    position: absolute;
    left: 0;
    top: -0.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--st-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(253, 193, 0, 0.4);
    color: var(--st-link);
    font-size: 0.8rem;
    font-weight: 700;
}

.st-step-title {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.st-qr {
    display: inline-block;
    padding: 0.75rem;
    border-radius: var(--st-radius);
    background: #ffffff;
    line-height: 0;
}

/* Admin dashboard: needs-attention rows. */
.st-attention-row + .st-attention-row {
    border-top: 1px solid var(--st-border-soft);
}

.st-attention-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    min-width: 2.4rem;
    height: 2.4rem;
    padding: 0 0.5rem;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
}

.st-attention-danger {
    background: #4a2326;
    color: #ffb4b4;
    box-shadow: inset 0 0 0 1px #7d3a3f;
}

.st-attention-warn {
    background: #4a3d1a;
    color: #ffe6a3;
    box-shadow: inset 0 0 0 1px #7d672a;
}

/* Bulk selection in admin lists. */
.st-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--st-border-soft);
    background: rgba(0, 0, 0, 0.1);
}

.st-bulk-bar.is-active {
    position: sticky;
    top: 56px;
    z-index: 6;
    background: #3a3729;
    box-shadow: inset 3px 0 0 var(--st-link);
}

.st-row-selected {
    background: var(--st-accent-soft) !important;
}

/* Audit log: active filter chips and the collapsible filter panel. */
.st-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(253, 193, 0, 0.5);
    border-radius: 999px;
    background: var(--st-accent-soft);
    color: var(--st-link);
    font-size: 0.82rem;
    font-weight: 500;
}

.st-filter-chip:hover {
    border-color: var(--st-link);
    color: var(--st-link-hover);
}

.st-filter-panel > summary {
    list-style: none;
}

.st-filter-panel > summary::-webkit-details-marker {
    display: none;
}

.st-filter-panel > summary::after {
    content: "\203A";
    color: var(--st-muted);
    font-size: 1.3rem;
    line-height: 1;
    transition: transform var(--st-ease);
}

.st-filter-panel[open] > summary::after {
    transform: rotate(90deg);
}

/* Small layout helpers (instead of inline styles). */
.st-form-width { max-width: 52rem; }
.st-form-width-sm { max-width: 44rem; }
.st-section { border-top: 1px solid var(--st-border-soft); }
.st-summary { cursor: pointer; list-style: none; }
.st-summary::-webkit-details-marker { display: none; }
summary.st-card-head { border-bottom: 0; }
.st-scroll-list { max-height: 20rem; overflow-y: auto; }
.st-card-foot.st-foot-start { justify-content: flex-start; }
.st-avatar-lg { width: 52px; height: 52px; font-size: 1.3rem; }
.st-app-badge-sm { width: 38px; height: 38px; margin: 0; border-radius: 10px; font-size: 1rem; }
.st-pill { white-space: nowrap; }
.st-break { overflow-wrap: anywhere; white-space: normal; }
.st-color-input { flex: none; width: 2.75rem; height: 2.5rem; padding: 0.15rem; border-radius: 8px; cursor: pointer; }
.st-search-sm { max-width: 16rem; }
