:root {
    --admin-bg-start: #f6f8fb;
    --admin-bg-end: #ebeff5;
    --admin-surface: #ffffff;
    --admin-surface-alt: #f5f7fb;
    --admin-border: #d7dfeb;
    --admin-text: #172033;
    --admin-muted: #68758b;
    --admin-brand: #1f3a5f;
    --admin-brand-deep: #10203a;
    --admin-accent: #c6924d;
    --admin-brand-rgb: 31, 58, 95;
    --admin-accent-rgb: 198, 146, 77;
    --admin-sidebar-glass: rgba(255, 255, 255, 0.84);
    --admin-topbar-glass: rgba(247, 249, 252, 0.9);
    --admin-glow-one: rgba(31, 58, 95, 0.14);
    --admin-glow-two: rgba(198, 146, 77, 0.12);
    --admin-sidebar-width: 280px;
    --admin-topbar-height: 76px;
}

body {
    font-family: 'Manrope', sans-serif;
}

body.admin-layout,
body.admin-auth-body {
    background:
        radial-gradient(circle at top right, var(--admin-glow-two), transparent 18%),
        radial-gradient(circle at top left, var(--admin-glow-one), transparent 24%),
        linear-gradient(180deg, var(--admin-bg-start) 0%, var(--admin-bg-end) 100%);
    color: var(--admin-text);
}

html.admin-dark-mode body.admin-layout,
html.admin-dark-mode body.admin-auth-body {
    background:
        radial-gradient(circle at top right, var(--admin-glow-two), transparent 18%),
        radial-gradient(circle at top left, var(--admin-glow-one), transparent 24%),
        linear-gradient(180deg, var(--admin-bg-start) 0%, var(--admin-bg-end) 100%);
    color: var(--admin-text);
}

body.admin-layout.dark-mode,
body.admin-auth-body.dark-mode {
    background:
        radial-gradient(circle at top right, var(--admin-glow-two), transparent 18%),
        radial-gradient(circle at top left, var(--admin-glow-one), transparent 24%),
        linear-gradient(180deg, var(--admin-bg-start) 0%, var(--admin-bg-end) 100%);
}

.admin-crud-modal .modal-content {
    background: var(--admin-surface);
    color: var(--admin-text);
    border: 1px solid rgba(var(--admin-brand-rgb), 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.admin-crud-modal .modal-header,
.admin-crud-modal .modal-footer {
    background: color-mix(in srgb, var(--admin-surface) 82%, var(--admin-brand) 18%);
    border-color: rgba(var(--admin-brand-rgb), 0.14);
}

.admin-crud-modal .btn-close {
    filter: var(--admin-close-filter, none);
}

.admin-crud-tabs {
    border-bottom: 1px solid rgba(var(--admin-brand-rgb), 0.12);
    padding-bottom: 0.85rem;
}

.admin-crud-tabs .nav-link {
    border: 1px solid var(--admin-border);
    background: var(--admin-surface-alt);
    color: var(--admin-text);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-crud-tabs .nav-link:hover,
.admin-crud-tabs .nav-link:focus-visible {
    background: rgba(var(--admin-brand-rgb), 0.08);
    border-color: rgba(var(--admin-brand-rgb), 0.2);
    color: var(--admin-text);
    box-shadow: 0 0 0 0.2rem rgba(var(--admin-brand-rgb), 0.12);
    transform: translateY(-1px);
}

.admin-crud-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--admin-brand) 0%, var(--admin-accent) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 24px rgba(var(--admin-brand-rgb), 0.22);
}

.admin-crud-tab-shell {
    --admin-crud-tab-min-height: 29rem;
    min-height: var(--admin-crud-tab-min-height);
}

.admin-crud-tab-shell .tab-pane {
    min-height: var(--admin-crud-tab-min-height);
    padding: 0.35rem 0 0.5rem;
}

.admin-crud-tab-shell .tab-pane.fade:not(.show) {
    min-height: 0;
}

.admin-crud-attachment-surface {
    background: var(--admin-surface-alt);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

.admin-crud-selected-file {
    background: rgba(var(--admin-brand-rgb), 0.08) !important;
    color: var(--admin-text) !important;
    border: 1px solid rgba(var(--admin-brand-rgb), 0.16) !important;
    font-weight: 500;
}

.admin-crud-attachment-item {
    background: color-mix(in srgb, var(--admin-surface) 76%, var(--admin-surface-alt) 24%);
    border: 1px solid var(--admin-border);
}

.admin-crud-attachment-item a {
    color: var(--admin-brand-deep);
}

.admin-help-trigger {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border-color: rgba(var(--admin-brand-rgb), 0.18);
    color: var(--admin-brand-deep);
    background: color-mix(in srgb, var(--admin-surface) 72%, var(--admin-brand) 28%);
    box-shadow: 0 10px 22px rgba(var(--admin-brand-rgb), 0.08);
}

.admin-help-trigger:hover,
.admin-help-trigger:focus-visible {
    color: #fff;
    background: linear-gradient(135deg, var(--admin-brand) 0%, var(--admin-accent) 100%);
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(var(--admin-brand-rgb), 0.18);
}

html.admin-dark-mode {
    --admin-close-filter: invert(1) grayscale(100%) brightness(200%);
}

html.admin-dark-mode .admin-crud-modal .modal-content,
body.admin-layout.dark-mode .admin-crud-modal .modal-content {
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

html.admin-dark-mode .admin-crud-tabs .nav-link.active,
body.admin-layout.dark-mode .admin-crud-tabs .nav-link.active {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (max-width: 991.98px) {
    .admin-crud-tab-shell {
        --admin-crud-tab-min-height: 24rem;
    }
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: var(--admin-sidebar-glass);
    border-inline-end: 1px solid var(--admin-border);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-padding-block: 1.5rem;
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 1040;
}

.sidebar-menu {
    padding-bottom: 2.75rem !important;
}

.menu-link.active,
.menu-group-toggle.is-active,
.menu-subgroup-toggle.is-active {
    scroll-margin-block: 1.5rem;
}

.sidebar-search-shell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0.3rem 0.45rem 0.3rem 0.85rem;
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--admin-surface) 72%, var(--admin-surface-alt) 28%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-search-icon {
    flex: 0 0 auto;
    color: var(--admin-muted);
    font-size: 0.92rem;
}

.sidebar-search-input {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-inline: 0 !important;
    min-height: 2rem !important;
}

.sidebar-search-input::placeholder {
    color: var(--admin-muted);
    opacity: 0.85;
}

.sidebar-search-clear {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-muted);
    text-decoration: none;
    border-radius: 999px;
}

.sidebar-search-clear:hover,
.sidebar-search-clear:focus-visible {
    color: var(--admin-text);
    background: rgba(var(--admin-brand-rgb), 0.08);
}

.sidebar-search-hidden {
    display: none !important;
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
    background: var(--admin-topbar-glass);
    border-bottom: 1px solid var(--admin-border);
}

.admin-content {
    flex: 1;
}

.admin-content > .page-title,
.admin-content > .page-eyebrow {
    display: block;
    margin-bottom: 1rem;
}

.admin-content > .page-title {
    margin-bottom: 1.5rem;
}

.admin-footer {
    border-top: 1px solid var(--admin-border);
    color: var(--admin-muted);
}

.sidebar-brand-mark,
.page-eyebrow,
.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-brand-mark {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--admin-brand) 0%, #355a89 56%, var(--admin-accent) 100%);
    color: #fff;
    border-radius: 1rem;
    box-shadow: 0 16px 34px rgba(var(--admin-brand-rgb), 0.24);
}

.page-eyebrow,
.eyebrow {
    padding: 0.45rem 0.85rem;
    background: rgba(var(--admin-brand-rgb), 0.12);
    color: var(--admin-brand-deep);
}

.menu-group + .menu-group {
    margin-top: 0.55rem;
}

.menu-group {
    padding: 0.14rem;
    background: rgba(var(--admin-brand-rgb), 0.04);
    border: 1px solid rgba(var(--admin-brand-rgb), 0.06);
}

.menu-caption {
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--admin-brand-deep);
    margin-bottom: 0;
}

.menu-subcaption {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--admin-muted);
}

.menu-group,
.menu-subgroup {
    border-radius: 1rem;
}

.menu-group-toggle,
.menu-subgroup-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.56rem 0.78rem;
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    border-radius: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.menu-group-toggle {
    padding: 0.52rem 0.68rem;
}

.menu-subgroup-toggle {
    margin-top: 0.18rem;
    padding: 0.46rem 0.68rem;
    border-radius: 0.85rem;
}

.menu-subgroup {
    margin-top: 0.22rem;
    padding-inline-start: 0.45rem;
    border-inline-start: 1px dashed rgba(var(--admin-brand-rgb), 0.14);
}

.menu-group-toggle:hover,
.menu-group-toggle.is-open,
.menu-group-toggle.is-active,
.menu-subgroup-toggle:hover,
.menu-subgroup-toggle.is-open,
.menu-subgroup-toggle.is-active {
    color: var(--admin-text);
    background: rgba(var(--admin-brand-rgb), 0.08);
    box-shadow: inset 0 0 0 1px rgba(var(--admin-brand-rgb), 0.05);
}

.menu-group-toggle.is-active,
.menu-subgroup-toggle.is-active {
    background: rgba(var(--admin-brand-rgb), 0.12);
    color: var(--admin-brand-deep);
}

.menu-group-toggle .menu-toggle-icon {
    width: 1.9rem;
    height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    background: rgba(var(--admin-brand-rgb), 0.1);
    color: var(--admin-brand-deep);
}

.menu-subgroup-toggle .menu-toggle-icon {
    font-size: 0.86rem;
    opacity: 0.8;
}

.menu-toggle-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.68rem;
}

.menu-toggle-icon {
    flex: 0 0 auto;
    font-size: 1rem;
}

.menu-toggle-arrow {
    flex: 0 0 auto;
    font-size: 0.82rem;
    transition: transform 0.22s ease;
}

.menu-group-toggle.is-open .menu-toggle-arrow,
.menu-subgroup-toggle.is-open .menu-toggle-arrow {
    transform: rotate(180deg);
}

.menu-group-body,
.menu-subgroup-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.28s ease, opacity 0.2s ease, margin 0.2s ease;
}

.menu-group-body.is-open,
.menu-subgroup-body.is-open {
    opacity: 1;
}

.menu-group-body {
    margin-top: 0;
}

.menu-group-body.is-open {
    margin-top: 0.2rem;
}

.menu-subgroup-body {
    padding-inline-start: 0.65rem;
}

.menu-subgroup-body .menu-link {
    margin-bottom: 0.16rem;
}

.menu-group-body > .menu-link {
    margin-inline-start: 0.35rem;
}

.form-label,
.form-check-label,
.modal-title,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label,
.text-muted,
small.text-muted,
.small.text-muted,
.form-text {
    color: var(--admin-muted) !important;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.5rem 0.78rem;
    margin-bottom: 0.16rem;
    border-radius: 0.82rem;
    color: var(--admin-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.menu-link i {
    font-size: 0.8rem;
    opacity: 0.78;
}

.menu-link span {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.menu-subgroup-body .menu-link {
    position: relative;
    padding-inline-start: 0.92rem;
}

.menu-subgroup-body .menu-link::before {
    content: '';
    position: absolute;
    inset-inline-start: -0.1rem;
    top: 50%;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(var(--admin-brand-rgb), 0.3);
    transform: translateY(-50%);
}

.menu-link:hover,
.menu-link.active {
    color: var(--admin-text);
    background: rgba(var(--admin-brand-rgb), 0.1);
    box-shadow: inset 0 0 0 1px rgba(var(--admin-brand-rgb), 0.05);
}

.menu-link.active {
    color: var(--admin-brand-deep);
    background: linear-gradient(90deg, rgba(var(--admin-brand-rgb), 0.2) 0%, rgba(var(--admin-brand-rgb), 0.1) 100%);
    box-shadow: inset 3px 0 0 var(--admin-brand), inset 0 0 0 1px rgba(var(--admin-brand-rgb), 0.08);
}

.menu-link.active i,
.menu-link.active span {
    color: var(--admin-brand-deep);
    opacity: 1;
}

.menu-subgroup-body .menu-link.active::before {
    background: var(--admin-brand);
    box-shadow: 0 0 0 0.18rem rgba(var(--admin-brand-rgb), 0.12);
}

.stat-card,
.card,
.modal-content,
.auth-card,
.dt-button,
.table,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.admin-topbar .btn,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.form-control,
.form-select {
    background-color: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

.form-control:focus,
.form-select:focus,
.admin-topbar .btn:focus,
.admin-topbar .btn:active,
.theme-preset-card:focus,
.theme-preset-card:focus-visible,
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    color: var(--admin-text);
    background-color: var(--admin-surface-alt);
    border-color: rgba(var(--admin-brand-rgb), 0.4);
    box-shadow: 0 0 0 0.18rem rgba(var(--admin-brand-rgb), 0.14);
    outline: 0;
}

.input-group-auth:focus-within {
    background: var(--admin-surface-alt);
    border-color: rgba(var(--admin-brand-rgb), 0.4);
    box-shadow: 0 0 0 0.18rem rgba(var(--admin-brand-rgb), 0.14);
}

.form-check-input {
    background-color: var(--admin-surface);
    border-color: var(--admin-border);
}

.form-check-input:focus {
    border-color: rgba(var(--admin-brand-rgb), 0.42);
    box-shadow: 0 0 0 0.18rem rgba(var(--admin-brand-rgb), 0.14);
}

.form-check-input:checked {
    background-color: var(--admin-brand);
    border-color: var(--admin-brand);
}

.table {
    --bs-table-color: var(--admin-text);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--admin-border);
    --bs-table-striped-bg: rgba(var(--admin-brand-rgb), 0.04);
    --bs-table-striped-color: var(--admin-text);
    --bs-table-hover-bg: rgba(var(--admin-brand-rgb), 0.07);
    --bs-table-hover-color: var(--admin-text);
    margin-bottom: 0;
}

.table thead th {
    color: var(--admin-brand-deep);
    border-bottom-color: var(--admin-border);
    background: rgba(var(--admin-brand-rgb), 0.05);
}

.table td,
.table th {
    border-color: var(--admin-border);
}

.dataTables_wrapper .dataTables_processing {
    background: var(--admin-surface);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
}

.dataTables_wrapper .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 4;
}

.dataTables_wrapper .dt-button {
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: var(--admin-surface-alt) !important;
    color: var(--admin-brand) !important;
    border: 1px solid var(--admin-border) !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dt-button:hover,
.dataTables_wrapper .dt-button:focus {
    background: rgba(var(--admin-brand-rgb), 0.1) !important;
    color: var(--admin-brand-deep) !important;
    border-color: rgba(var(--admin-brand-rgb), 0.25) !important;
}

.dataTables_wrapper .dt-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

div.dt-button-collection {
    min-width: 14rem !important;
    padding: 0.35rem 0 !important;
    border: 1px solid var(--admin-border) !important;
    border-radius: 1rem !important;
    background: var(--admin-surface) !important;
    box-shadow: 0 24px 48px rgba(23, 32, 51, 0.18) !important;
    z-index: 1085 !important;
}

div.dt-button-collection .dt-button {
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 0.8rem 1rem;
    justify-content: space-between;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--admin-text) !important;
    box-shadow: none !important;
}

div.dt-button-collection .dt-button span {
    display: block;
    width: 100%;
    font-size: 0.92rem;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
}

div.dt-button-collection .dt-button:hover,
div.dt-button-collection .dt-button:focus {
    background: rgba(var(--admin-brand-rgb), 0.08) !important;
    color: var(--admin-brand-deep) !important;
}

div.dt-button-collection .dt-button.active,
div.dt-button-collection .dt-button.buttons-columnVisibility.active {
    background: rgba(var(--admin-brand-rgb), 0.12) !important;
    color: var(--admin-brand-deep) !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    color: var(--admin-text);
    background: var(--admin-surface-alt);
}

.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid var(--admin-border) !important;
    color: var(--admin-text) !important;
    background: var(--admin-surface) !important;
    border-radius: 0.8rem;
    margin-left: 0.35rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: #fff !important;
    border-color: rgba(var(--admin-brand-rgb), 0.45) !important;
    background: linear-gradient(135deg, var(--admin-brand), var(--admin-accent)) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.55;
    color: var(--admin-muted) !important;
    background: var(--admin-surface-alt) !important;
}

.stat-card {
    border-radius: 1.4rem;
    padding: 1.5rem;
    box-shadow: 0 20px 44px rgba(23, 32, 51, 0.08);
    height: 100%;
}

.stat-card span {
    display: block;
    color: var(--admin-muted);
    margin-bottom: 0.75rem;
}

.stat-card strong {
    font-size: 2rem;
}

.auth-card,
.card,
.modal-content {
    border-radius: 1.5rem;
    border: 1px solid var(--admin-border);
    box-shadow: 0 24px 64px rgba(23, 32, 51, 0.08);
}

.modal {
    --bs-modal-margin: 1rem;
}

.modal-dialog {
    margin-top: max(1rem, env(safe-area-inset-top));
    margin-bottom: max(1rem, env(safe-area-inset-bottom));
}

.modal-dialog.modal-dialog-scrollable {
    height: calc(100% - 2rem);
}

.modal-dialog.modal-dialog-scrollable .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
    background: var(--admin-surface);
}

.modal-dialog.modal-dialog-scrollable .modal-content > .modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.modal-dialog.modal-dialog-scrollable .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-bottom: 1.5rem;
}

.modal-header,
.modal-footer {
    background: linear-gradient(180deg, rgba(var(--admin-brand-rgb), 0.05), rgba(var(--admin-brand-rgb), 0.02));
    border-color: var(--admin-border);
}

.modal-header {
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}

.modal-footer {
    border-bottom-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 0.75rem;
    box-shadow: 0 -12px 24px rgba(23, 32, 51, 0.06);
}

.modal-footer .btn {
    min-width: 7rem;
}

.offcanvas-header,
.offcanvas-body {
    background: var(--admin-surface);
    color: var(--admin-text);
}

.auth-panel {
    background: linear-gradient(180deg, var(--admin-brand) 0%, var(--admin-accent) 100%);
    color: #fff;
}

.auth-stage {
    min-height: 600px;
}

.auth-showcase,
.auth-form-card {
    border-radius: 2rem;
}

.auth-showcase {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(var(--admin-accent-rgb), 0.22), transparent 26%),
        linear-gradient(145deg, #0f1d33 0%, #183153 48%, #274872 100%);
    color: #f8fbff;
    box-shadow: 0 34px 80px rgba(16, 32, 58, 0.28);
}

.auth-showcase::before,
.auth-showcase::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
}

.auth-showcase::before {
    width: 220px;
    height: 220px;
    background: rgba(var(--admin-accent-rgb), 0.18);
    top: -60px;
    right: -40px;
}

.auth-showcase::after {
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.06);
    bottom: -120px;
    left: -80px;
}

.auth-showcase-inner {
    position: relative;
    z-index: 1;
    padding: 1.8rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-showcase-eyebrow {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.auth-showcase-title {
    font-size: clamp(1.9rem, 3vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    max-width: 13ch;
}

.auth-showcase-copy {
    max-width: 54ch;
    color: rgba(244, 247, 252, 0.82);
    font-size: 0.98rem;
}

.auth-feature-list {
    display: grid;
    gap: 0.75rem;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.8rem 0.9rem;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(250, 252, 255, 0.9);
    font-size: 0.95rem;
}

.auth-feature-item i {
    font-size: 1.1rem;
    color: #f6d4a3;
    margin-top: 0.1rem;
}

.auth-showcase-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0.85rem;
}

.auth-showcase-card {
    border-radius: 1.4rem;
    min-height: 112px;
}

.auth-showcase-card-primary {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-showcase-card-primary small {
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-showcase-card-primary strong {
    font-size: 1.2rem;
    margin: 0.25rem 0;
}

.auth-showcase-card-primary span {
    color: rgba(255, 255, 255, 0.78);
}

.auth-showcase-card-muted {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-showcase-card-accent {
    grid-column: span 2;
    min-height: 90px;
    background: linear-gradient(135deg, rgba(var(--admin-accent-rgb), 0.95), rgba(255, 255, 255, 0.22));
    opacity: 0.9;
}

.auth-form-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
}

html.admin-dark-mode body.admin-auth-body .auth-form-card,
body.admin-auth-body.dark-mode .auth-form-card {
    background: rgba(15, 23, 36, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
}

html.admin-dark-mode body.admin-auth-body .auth-showcase,
body.admin-auth-body.dark-mode .auth-showcase {
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
}

.auth-form-head h2 {
    font-size: 1.7rem;
    letter-spacing: -0.03em;
}

.input-group-auth {
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    overflow: hidden;
    background: var(--admin-surface-alt);
}

.input-group-auth .input-group-text {
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    padding-inline: 1rem 0.7rem;
}

.input-group-auth .form-control {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding-block: 0.9rem;
}

.input-group-auth:has(.form-control.is-invalid) {
    border-color: var(--bs-danger);
}

.auth-support-text {
    color: var(--admin-muted);
    font-size: 0.86rem;
}

.topbar-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-brand {
    background: linear-gradient(135deg, var(--admin-brand), var(--admin-accent));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 30px rgba(var(--admin-brand-rgb), 0.24);
}

.btn-brand:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--admin-brand-deep), #2f527d);
}

.btn-logout {
    background: linear-gradient(135deg, rgba(var(--admin-brand-rgb), 0.12), rgba(var(--admin-accent-rgb), 0.18));
    border: 1px solid rgba(var(--admin-brand-rgb), 0.16);
    color: var(--admin-brand-deep);
    font-weight: 600;
}

.btn-logout:hover,
.btn-logout:focus,
.btn-logout:active {
    color: #fff;
    background: linear-gradient(135deg, var(--admin-brand), var(--admin-accent));
    border-color: transparent;
    box-shadow: 0 0 0 0.18rem rgba(var(--admin-brand-rgb), 0.14);
}

.checkbox-grid .form-check {
    padding: 1rem 1.25rem 1rem 3rem;
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    background: var(--admin-surface-alt);
}

.theme-customizer {
    background: var(--admin-surface);
    color: var(--admin-text);
}

.theme-panel-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--admin-muted);
    margin-bottom: 0.9rem;
}

.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.theme-preset-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface-alt);
    color: var(--admin-text);
    text-align: start;
}

.theme-preset-card.active {
    border-color: rgba(var(--admin-brand-rgb), 0.45);
    box-shadow: 0 0 0 2px rgba(var(--admin-brand-rgb), 0.14);
}

.theme-preset-swatches {
    display: flex;
    gap: 0.45rem;
}

.theme-preset-swatches span {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.theme-color-stack {
    display: grid;
    gap: 0.9rem;
}

.theme-color-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface-alt);
}

.theme-color-field span {
    font-weight: 600;
}

.theme-color-field input[type='color'] {
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.invalid-feedback {
    display: block;
}

.table-responsive {
    min-width: 0;
    min-height: calc(3.25rem + (10 * 3.35rem));
    overflow-x: auto;
    overflow-y: visible;
}

body.admin-layout,
body.admin-auth-body {
    font-size: 0.925rem;
}

body.admin-layout .admin-topbar,
body.admin-auth-body .admin-topbar {
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

body.admin-layout .admin-content,
body.admin-auth-body .auth-shell {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

body.admin-layout .card-body,
body.admin-layout .offcanvas-body,
body.admin-auth-body .auth-card .p-4,
body.admin-auth-body .auth-card .p-lg-4 {
    padding: 1rem !important;
}

body.admin-layout .page-eyebrow,
body.admin-layout .eyebrow,
body.admin-auth-body .eyebrow {
    padding: 0.3rem 0.65rem;
    font-size: 0.7rem;
}

body.admin-layout .page-title,
body.admin-auth-body .auth-showcase-title,
body.admin-auth-body .auth-form-head h2 {
    font-size: clamp(1.7rem, 2vw, 2.15rem);
    margin-bottom: 1rem;
}

body.admin-layout .h4,
body.admin-layout h2,
body.admin-layout h5,
body.admin-auth-body h1,
body.admin-auth-body h2,
body.admin-auth-body h5 {
    margin-bottom: 0.6rem;
}

body.admin-layout .btn,
body.admin-layout .form-control,
body.admin-layout .form-select,
body.admin-layout .input-group-text,
body.admin-layout .dataTables_wrapper .dt-button,
body.admin-layout .dataTables_wrapper .dataTables_filter input,
body.admin-layout .dataTables_wrapper .dataTables_length select,
body.admin-auth-body .btn,
body.admin-auth-body .form-control,
body.admin-auth-body .form-select,
body.admin-auth-body .input-group-text {
    min-height: 2.2rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    font-size: 0.9rem;
}

body.admin-layout .topbar-icon,
body.admin-layout .dataTables_wrapper .dt-button {
    width: 2.2rem;
    height: 2.2rem;
}

body.admin-layout div.dt-button-collection .dt-button,
body.admin-auth-body div.dt-button-collection .dt-button {
    width: 100%;
    height: auto;
}

body.admin-layout .table th,
body.admin-layout .table td {
    padding: 0.58rem 0.7rem;
    font-size: 0.89rem;
}

body.admin-layout .dataTables_wrapper .dataTables_info,
body.admin-layout .dataTables_wrapper .dataTables_filter,
body.admin-layout .dataTables_wrapper .dataTables_length,
body.admin-layout .form-label,
body.admin-layout .form-check-label,
body.admin-auth-body .form-label,
body.admin-auth-body .form-check-label {
    font-size: 0.87rem;
}

body.admin-layout .row,
body.admin-auth-body .row {
    --bs-gutter-y: 0.75rem;
}

body.admin-layout .modal-header,
body.admin-layout .modal-body,
body.admin-layout .modal-footer,
body.admin-auth-body .auth-showcase,
body.admin-auth-body .auth-form-card {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.dataTables_wrapper .dt-buttons .btn,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    margin-bottom: 0.5rem;
}

.toast {
    background: var(--admin-surface);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

.jconfirm .jconfirm-bg {
    background-color: rgba(15, 23, 42, 0.42);
}

.jconfirm .jconfirm-box,
.jconfirm .jconfirm-title-c,
.jconfirm .jconfirm-content,
.jconfirm .jconfirm-buttons {
    color: var(--admin-text) !important;
}

.jconfirm .jconfirm-box {
    background: var(--admin-surface) !important;
    border: 1px solid var(--admin-border) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 24px 64px rgba(23, 32, 51, 0.16) !important;
    overflow: hidden;
    position: relative;
}

.jconfirm .jconfirm-box::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 0.38rem;
    background: linear-gradient(90deg, var(--admin-accent), #f3c623) !important;
}

.jconfirm .jconfirm-title-c {
    margin: 0 !important;
    padding: 1.6rem 3rem 0.8rem 1.4rem !important;
    background: transparent !important;
    color: var(--admin-text) !important;
    border-radius: 0 !important;
    box-shadow: none;
}

.jconfirm .jconfirm-title-c .jconfirm-title {
    color: inherit !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
}

.jconfirm .admin-confirm-title {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.jconfirm .admin-confirm-title__icon {
    color: var(--admin-accent) !important;
    font-size: 1.25rem;
    line-height: 1;
}

.jconfirm .admin-confirm-title__text {
    font-size: 1.05rem;
}

.jconfirm .jconfirm-content {
    padding: 0 1.4rem 1.25rem !important;
    color: var(--admin-muted) !important;
}

.jconfirm .jconfirm-closeIcon {
    top: 0.9rem !important;
    right: 1rem !important;
    width: 2rem !important;
    height: 2rem !important;
    line-height: 2rem !important;
    color: var(--admin-muted) !important;
    font-size: 1.7rem !important;
    border-radius: 999px !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.jconfirm .jconfirm-closeIcon:hover {
    background: var(--admin-surface-alt) !important;
    color: var(--admin-text) !important;
}

.jconfirm .jconfirm-buttons {
    padding: 0 1.4rem 1.4rem !important;
}

.jconfirm .jconfirm-buttons button {
    border-radius: 0.8rem !important;
    border: 1px solid var(--admin-border) !important;
    box-shadow: none !important;
    text-transform: none !important;
    font-weight: 600 !important;
    min-width: 5.5rem !important;
    padding-inline: 1.15rem !important;
}

.jconfirm .btn-default {
    background: var(--admin-surface-alt) !important;
    color: var(--admin-text) !important;
}

.jconfirm .btn-blue,
.jconfirm .btn-red,
.jconfirm .btn-green,
.jconfirm .btn-orange,
.jconfirm .btn-purple,
.jconfirm .btn-dark {
    background: linear-gradient(135deg, var(--admin-brand), var(--admin-accent)) !important;
    color: #fff !important;
    border-color: transparent !important;
}

body.admin-layout.dark-mode .page-eyebrow,
body.admin-layout.dark-mode .eyebrow,
body.admin-auth-body.dark-mode .eyebrow {
    background: rgba(var(--admin-brand-rgb), 0.18);
    color: var(--admin-brand-deep);
}

body.admin-layout.dark-mode .table thead th,
body.admin-layout.dark-mode .card-header {
    background: rgba(255, 255, 255, 0.03);
}

body.admin-layout.dark-mode .modal-header,
body.admin-layout.dark-mode .modal-footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

body.admin-layout.dark-mode .btn-close {
    filter: invert(1) grayscale(100%);
}

body.admin-layout.dark-mode .form-control::placeholder,
body.admin-auth-body.dark-mode .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

body.admin-layout.dark-mode .jconfirm .jconfirm-bg {
    background-color: rgba(3, 7, 18, 0.68);
}

body.admin-layout.dark-mode .jconfirm .jconfirm-box,
body.admin-layout.dark-mode .jconfirm .jconfirm-title-c,
body.admin-layout.dark-mode .jconfirm .jconfirm-content,
body.admin-layout.dark-mode .jconfirm .jconfirm-buttons,
body.admin-layout.dark-mode .jconfirm .btn-default {
    background: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

body.admin-layout.dark-mode .jconfirm .jconfirm-content {
    color: var(--admin-muted) !important;
}

body.admin-layout.dark-mode .form-control,
body.admin-layout.dark-mode .form-select,
body.admin-layout.dark-mode .dataTables_wrapper .dataTables_filter input,
body.admin-layout.dark-mode .dataTables_wrapper .dataTables_length select,
body.admin-layout.dark-mode .input-group-auth,
body.admin-layout.dark-mode .input-group-auth .form-control,
body.admin-layout.dark-mode .input-group-auth .input-group-text,
body.admin-auth-body.dark-mode .form-control,
body.admin-auth-body.dark-mode .form-select,
body.admin-auth-body.dark-mode .input-group-auth,
body.admin-auth-body.dark-mode .input-group-auth .form-control,
body.admin-auth-body.dark-mode .input-group-auth .input-group-text,
body.admin-layout.dark-mode .theme-preset-card,
body.admin-layout.dark-mode .theme-color-field,
body.admin-layout.dark-mode .offcanvas-header,
body.admin-layout.dark-mode .offcanvas-body,
body.admin-layout.dark-mode .admin-topbar .btn,
body.admin-layout.dark-mode .btn-logout,
body.admin-layout.dark-mode .dataTables_wrapper .dt-button,
body.admin-layout.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: var(--admin-surface) !important;
    color: var(--admin-text) !important;
}

body.admin-layout.dark-mode div.dt-button-collection {
    background: var(--admin-surface) !important;
    border-color: var(--admin-border) !important;
}

body.admin-layout.dark-mode div.dt-button-collection .dt-button {
    background: transparent !important;
    color: var(--admin-text) !important;
}

body.admin-layout.dark-mode div.dt-button-collection .dt-button:hover,
body.admin-layout.dark-mode div.dt-button-collection .dt-button:focus,
body.admin-layout.dark-mode div.dt-button-collection .dt-button.active,
body.admin-layout.dark-mode div.dt-button-collection .dt-button.buttons-columnVisibility.active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--admin-brand-deep) !important;
}

body.admin-layout.dark-mode .form-control:focus,
body.admin-layout.dark-mode .form-select:focus,
body.admin-layout.dark-mode .dataTables_wrapper .dataTables_filter input:focus,
body.admin-layout.dark-mode .dataTables_wrapper .dataTables_length select:focus,
body.admin-layout.dark-mode .admin-topbar .btn:focus,
body.admin-layout.dark-mode .btn-logout:focus,
body.admin-layout.dark-mode .theme-preset-card:focus,
body.admin-layout.dark-mode .theme-preset-card:focus-visible,
body.admin-layout.dark-mode .input-group-auth:focus-within,
body.admin-auth-body.dark-mode .form-control:focus,
body.admin-auth-body.dark-mode .form-select:focus,
body.admin-auth-body.dark-mode .input-group-auth:focus-within {
    background-color: var(--admin-surface-alt) !important;
    color: var(--admin-text) !important;
}

body.admin-layout.sidebar-collapsed .admin-sidebar {
    width: 92px;
}

body.admin-layout.sidebar-collapsed .menu-link span,
body.admin-layout.sidebar-collapsed .menu-subcaption,
body.admin-layout.sidebar-collapsed .menu-caption,
body.admin-layout.sidebar-collapsed .sidebar-brand strong,
body.admin-layout.sidebar-collapsed .sidebar-brand small,
body.admin-layout.sidebar-collapsed .sidebar-search {
    display: none;
}

body.admin-layout.sidebar-collapsed .menu-toggle-arrow {
    display: none;
}

body.admin-layout.sidebar-collapsed .menu-group-body,
body.admin-layout.sidebar-collapsed .menu-subgroup-body {
    max-height: none !important;
    opacity: 1;
    overflow: visible;
}

body.admin-layout.sidebar-collapsed .menu-group-toggle,
body.admin-layout.sidebar-collapsed .menu-subgroup-toggle,
body.admin-layout.sidebar-collapsed .menu-link {
    justify-content: center;
    padding-inline: 0.7rem;
}

body.admin-layout.sidebar-collapsed .menu-toggle-main {
    justify-content: center;
}

body.admin-layout.sidebar-collapsed .menu-subgroup-body {
    padding-inline-start: 0;
}

body.admin-layout[data-rtl='true'] {
    direction: rtl;
}

body.admin-layout[data-rtl='true'] .admin-sidebar {
    border-inline-end: 0;
    border-inline-start: 1px solid var(--admin-border);
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        inset-inline-start: 0;
        transform: translateX(-100%);
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    }

    body.admin-layout.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    body.admin-layout[data-rtl='true'] .admin-sidebar {
        transform: translateX(100%);
        inset-inline-end: 0;
        inset-inline-start: auto;
    }

    body.admin-layout[data-rtl='true'].sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .theme-preset-grid {
        grid-template-columns: 1fr;
    }

    .auth-stage {
        min-height: auto;
    }

    .auth-showcase-inner {
        padding: 1.35rem;
    }
}
