/*
 * Modern admin bridge for the Tailwind/Flowbite reskin.
 * Keeps legacy Twig markup functional while shared templates are migrated.
 */
:root {
    --admin-bg: #f8fafc;
    --admin-surface: #ffffff;
    --admin-sidebar: #020617;
    --admin-sidebar-muted: #94a3b8;
    --admin-text: #0f172a;
    --admin-muted: #64748b;
    --admin-border: #e2e8f0;
    --admin-primary: #4f46e5;
    --admin-primary-hover: #4338ca;
    --admin-success: #059669;
    --admin-warning: #d97706;
    --admin-danger: #e11d48;
}

html,
body {
    min-height: 100%;
}

body.admin-modern,
body.login {
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-modern *,
.admin-modern *::before,
.admin-modern *::after {
    box-sizing: border-box;
}

.admin-modern a {
    color: inherit;
    text-decoration: none;
}

.admin-modern a:hover,
.admin-modern a:focus {
    color: inherit;
    text-decoration: none;
}

.admin-modern .container.body,
.admin-modern .main_container {
    min-height: 100vh;
    max-width: none;
    width: 100%;
}

.admin-modern .left_col.menu_fixed {
    background: var(--admin-sidebar);
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    bottom: 0;
    color: #e2e8f0;
    left: 0;
    overflow-y: auto;
    position: fixed;
    top: 0;
    width: 18rem;
    z-index: 1040;
}

.admin-modern .left_col.scroll-view {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1rem;
    width: auto !important;
}

.admin-modern .nav_title {
    background: transparent;
    border: 0 !important;
    height: auto;
    margin-bottom: 1rem;
    width: auto;
}

.admin-modern .site_title {
    align-items: center;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 1rem;
    color: #fff;
    display: flex;
    font-size: 1rem;
    font-weight: 700;
    gap: 0.75rem;
    height: auto;
    padding: 0.875rem 1rem;
}

.admin-modern .header_search {
    margin: 0 0 1rem;
    position: relative;
}

.admin-modern .header_search .form-control,
.admin-modern .header_search input {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.875rem;
    box-shadow: none;
    color: #fff;
    height: auto;
    padding: 0.75rem 0.875rem;
    width: 100%;
}

.admin-modern .header_search input::placeholder {
    color: #94a3b8;
}

.admin-modern .quick_search_results {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
    color: var(--admin-text);
    left: 0;
    max-height: min(34rem, calc(100vh - 8rem));
    overflow: auto;
    padding: 1rem;
    position: fixed;
    right: 1rem;
    top: 5rem;
    width: min(42rem, calc(100vw - 2rem));
    z-index: 1060;
}

.admin-modern .quick_search_results .title {
    border: 0;
    color: var(--admin-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0.75rem 0 0.5rem;
    padding: 0;
    text-transform: uppercase;
}

.admin-modern .quick_search_results ul {
    display: grid;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-modern .quick_search_results a {
    border-radius: 0.75rem;
    color: var(--admin-text);
    display: block;
    padding: 0.65rem 0.75rem;
}

.admin-modern .quick_search_results a:hover,
.admin-modern .quick_search_results li.highlight a {
    background: #eef2ff;
    color: #3730a3;
}

.admin-modern #quick_search_results_backdrop {
    background: rgba(15, 23, 42, 0.5);
    bottom: 0;
    left: 0;
    opacity: 1;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1050;
}

.admin-modern .quick_links_wrapper ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-modern #sidebar-menu {
    flex: 1;
}

.admin-modern .menu_section {
    margin-bottom: 1.25rem;
}

.admin-modern .menu_section h3 {
    color: var(--admin-sidebar-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 1.25rem 0 0.5rem;
    text-transform: uppercase;
}

.admin-modern .side-menu,
.admin-modern .child_menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-modern .child_menu {
    display: none;
}

.admin-modern .side-menu li.active > .child_menu,
.admin-modern .side-menu li.current-page > .child_menu {
    display: block;
}

.admin-modern .side-menu > li {
    margin: 0.15rem 0;
}

.admin-modern .side-menu a {
    align-items: center;
    border-radius: 0.8rem;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    font-size: 0.875rem;
    gap: 0.65rem;
    justify-content: flex-start;
    line-height: 1.35;
    padding: 0.65rem 0.75rem;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-modern .side-menu a:hover,
.admin-modern .side-menu li.active > a,
.admin-modern .side-menu li.current-page > a {
    background: rgba(79, 70, 229, 0.18);
    color: #fff;
}

.admin-modern .side-menu a:hover {
    transform: translateX(2px);
}

.admin-modern .child_menu {
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    margin-left: 1rem;
    padding: 0.25rem 0 0.35rem 0.5rem;
}

.admin-modern .child_menu a {
    color: #94a3b8;
    font-size: 0.82rem;
    padding: 0.5rem 0.65rem;
}

.admin-modern .fa-chevron-down,
.admin-modern .fa-angle-down {
    margin-left: auto;
}

.admin-modern .sidebar-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 1rem;
    padding-top: 1rem;
}

.admin-modern .sidebar-footer a {
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.8rem;
    color: #cbd5e1;
    display: flex;
    justify-content: center;
    min-height: 2.5rem;
}

.admin-modern .sidebar-footer a:hover {
    background: rgba(79, 70, 229, 0.22);
    color: #fff;
}

.admin-modern .top_nav {
    background: rgba(248, 250, 252, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--admin-border);
    left: 18rem;
    min-height: 4rem;
    position: sticky;
    right: 0;
    top: 0;
    z-index: 1030;
}

.admin-modern .nav_menu {
    align-items: center;
    background: transparent;
    border: 0;
    display: flex;
    justify-content: space-between;
    margin: 0;
    min-height: 4rem;
    padding: 0 1.5rem;
}

.admin-modern .nav_menu nav {
    align-items: center;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.admin-modern .nav.toggle {
    float: none;
    margin: 0;
    padding: 0;
    width: auto;
}

.admin-modern #menu_toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 0.85rem;
    color: var(--admin-text);
    display: inline-flex;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.admin-modern .navbar-right {
    display: flex;
    float: none !important;
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-modern .navbar-right > li {
    position: relative;
}

.admin-modern .user-profile {
    align-items: center;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    color: var(--admin-text) !important;
    display: flex !important;
    gap: 0.65rem;
    padding: 0.35rem 0.85rem 0.35rem 0.35rem !important;
}

.admin-modern .user-profile img {
    border-radius: 999px;
    height: 2rem;
    margin: 0;
    width: 2rem;
}

.admin-modern #dropdown-usermenu,
.admin-modern .dropdown-menu {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 0.9rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
    margin-top: 0.75rem;
    min-width: 14rem;
    padding: 0.45rem;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1080;
}

.admin-modern .dropdown-menu {
    display: none;
}

.admin-modern .open > .dropdown-menu,
.admin-modern .dropdown-menu.show {
    display: block;
}

.admin-modern #dropdown-usermenu a,
.admin-modern .dropdown-menu a {
    align-items: center;
    border-radius: 0.65rem;
    color: var(--admin-text);
    display: flex;
    flex-direction: row;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.admin-modern #dropdown-usermenu a:hover,
.admin-modern .dropdown-menu a:hover {
    background: #eef2ff;
    color: #3730a3;
}

.admin-modern .right_col {
    background: transparent;
    margin-left: 18rem;
    min-height: calc(100vh - 8rem);
    padding: 1.5rem;
    width: calc(100% - 18rem);
}

.admin-modern .right_col > div,
.admin-modern .right_col .row,
.admin-modern .right_col .col-md-12,
.admin-modern .right_col .col-sm-12,
.admin-modern .right_col .col-xs-12 {
    max-width: none;
    width: 100%;
}

.admin-modern footer {
    background: transparent;
    border-top: 1px solid var(--admin-border);
    color: var(--admin-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8rem;
    gap: 0.75rem;
    justify-content: space-between;
    margin-left: 18rem;
    padding: 1.25rem 1.5rem;
}

.admin-modern footer .pull-left {
    margin-left: auto;
    text-align: right;
}

.admin-modern .page-title {
    margin: 0 0 1rem;
}

.admin-modern .page-title h3,
.admin-modern .title_left h3 {
    color: var(--admin-text);
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.admin-modern .row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-left: 0;
    margin-right: 0;
}

.admin-modern [class*="col-md-"],
.admin-modern [class*="col-sm-"],
.admin-modern [class*="col-xs-"],
.admin-modern .col_12,
.admin-modern .col_8,
.admin-modern .col_4 {
    float: none;
    min-height: 1px;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

.admin-modern .col-md-12,
.admin-modern .col-sm-12,
.admin-modern .col-xs-12,
.admin-modern .col_12 {
    flex: 1 1 100%;
}

.admin-modern .col-md-8,
.admin-modern .col-sm-8,
.admin-modern .col_8 {
    flex: 1 1 min(100%, 42rem);
}

.admin-modern .col-md-6,
.admin-modern .col-sm-6 {
    flex: 1 1 min(100%, 32rem);
}

.admin-modern .col-md-4,
.admin-modern .col-sm-4,
.admin-modern .col_4 {
    flex: 1 1 min(100%, 22rem);
}

.admin-modern .col-md-3,
.admin-modern .col-sm-3 {
    flex: 1 1 min(100%, 16rem);
}

.admin-modern .x_panel,
.admin-modern .widget_inside,
.admin-modern .panel,
.admin-modern .well {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    color: var(--admin-text);
    margin-bottom: 1rem;
    padding: 1rem;
}

.admin-modern .x_title,
.admin-modern .panel-heading {
    border-bottom: 1px solid var(--admin-border);
    margin: -1rem -1rem 1rem;
    padding: 1rem;
}

.admin-modern .x_title h2,
.admin-modern .x_title h3,
.admin-modern .panel-title {
    color: var(--admin-text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.admin-modern .x_title small {
    color: var(--admin-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.admin-modern .x_content {
    color: var(--admin-text);
    padding: 0;
}

.admin-modern .tile_stats_count {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    flex: 1 1 min(100%, 14rem);
    margin: 0;
    padding: 1rem;
}

.admin-modern .tile_stats_count a {
    display: block;
}

.admin-modern .count_top {
    color: var(--admin-muted);
    display: flex;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 0.45rem;
    text-transform: uppercase;
}

.admin-modern .count {
    color: var(--admin-primary);
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0.45rem;
}

.admin-modern .form-control,
.admin-modern input[type="text"],
.admin-modern input[type="email"],
.admin-modern input[type="number"],
.admin-modern input[type="password"],
.admin-modern input[type="url"],
.admin-modern input[type="search"],
.admin-modern select,
.admin-modern textarea {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    box-shadow: none;
    color: var(--admin-text);
    display: block;
    font-size: 0.875rem;
    min-height: 2.55rem;
    padding: 0.625rem 0.8rem;
    width: 100%;
}

.admin-modern select,
.admin-modern .form-control:is(select) {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem 1rem;
    padding-right: 2.5rem;
}

.admin-modern select[multiple],
.admin-modern select[size]:not([size="1"]) {
    appearance: auto;
    background-image: none;
    padding-right: 0.8rem;
}

.admin-modern input:focus,
.admin-modern select:focus,
.admin-modern textarea:focus,
.admin-modern .form-control:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
    outline: 0;
}

/* Tailwind-style joined controls (replaces Bootstrap .input-group) */
.admin-modern .admin-tw-join {
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.admin-modern .admin-tw-join:focus-within {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.22);
}

.admin-modern .admin-tw-join > * + * {
    border-left: 1px solid var(--admin-border);
}

.admin-modern .admin-tw-join-addon,
.admin-modern .admin-tw-join .admin-tw-join-addon,
.admin-modern .admin-tw-join .input-group-addon {
    align-items: center;
    background: #f8fafc;
    color: #475569;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 0 0.65rem;
    white-space: nowrap;
}

.admin-modern .admin-tw-join-btn,
.admin-modern .admin-tw-join .admin-tw-join-btn,
.admin-modern .admin-tw-join .input-group-btn {
    align-items: stretch;
    display: inline-flex;
    flex: 0 0 auto;
}

.admin-modern .admin-tw-join .form-control,
.admin-modern .admin-tw-join select.form-control,
.admin-modern .admin-tw-join textarea.form-control,
.admin-modern .admin-tw-join input.form-control,
.admin-modern .admin-tw-join input[type="text"],
.admin-modern .admin-tw-join input[type="number"],
.admin-modern .admin-tw-join input[type="password"],
.admin-modern .admin-tw-join input[type="email"],
.admin-modern .admin-tw-join input.small,
.admin-modern .admin-tw-join select {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

.admin-modern .admin-tw-join .form-control:focus,
.admin-modern .admin-tw-join select:focus,
.admin-modern .admin-tw-join textarea:focus,
.admin-modern .admin-tw-join input:focus {
    border-color: transparent !important;
    box-shadow: none !important;
}

.admin-modern .admin-tw-join .btn,
.admin-modern .admin-tw-join button.btn {
    border: 0;
    border-radius: 0;
    flex: 0 0 auto;
    margin: 0;
    min-height: 2.55rem;
}

.admin-modern .admin-tw-join input[type="checkbox"] {
    margin: 0;
}

.admin-modern label,
.admin-modern .control-label {
    color: #334155;
    font-size: 0.875rem;
    font-weight: 700;
}

.admin-modern .form-group,
.admin-modern .form > .clearfix {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.admin-modern .btn,
.admin-modern button,
.admin-modern input[type="submit"],
.admin-modern input[type="button"],
.admin-modern .button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 700;
    gap: 0.45rem;
    justify-content: center;
    line-height: 1.25;
    min-height: 2.5rem;
    padding: 0.6rem 1rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-modern .btn:hover,
.admin-modern button:hover,
.admin-modern input[type="submit"]:hover,
.admin-modern input[type="button"]:hover,
.admin-modern .button:hover {
    transform: translateY(-1px);
}

.admin-modern .btn-primary,
.admin-modern .button.blue,
.admin-modern .submit {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: #fff;
}

.admin-modern .btn-primary:hover,
.admin-modern .button.blue:hover,
.admin-modern .submit:hover {
    background: var(--admin-primary-hover);
    border-color: var(--admin-primary-hover);
    color: #fff;
}

.admin-modern .btn-default,
.admin-modern .btn-secondary,
.admin-modern .grey,
.admin-modern .button.grey {
    background: #fff;
    border-color: var(--admin-border);
    color: var(--admin-text);
}

.admin-modern .btn-danger,
.admin-modern .button.red {
    background: var(--admin-danger);
    border-color: var(--admin-danger);
    color: #fff;
}

.admin-modern .table,
.admin-modern table {
    background: #fff;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--admin-text);
    font-size: 0.875rem;
    width: 100%;
}

.admin-modern table thead th,
.admin-modern .table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--admin-border);
    color: #475569;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.85rem;
    text-transform: uppercase;
}

.admin-modern table tbody td,
.admin-modern .table tbody td {
    border-bottom: 1px solid #f1f5f9;
    padding: 0.85rem;
    vertical-align: middle;
}

.admin-modern table tbody tr:hover {
    background: #f8fafc;
}

.admin-modern .dataTables_wrapper {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
}

.admin-modern .dataTables_length,
.admin-modern .dataTables_filter,
.admin-modern .dt-buttons,
.admin-modern .dataTables_info,
.admin-modern .dataTables_paginate {
    margin: 0.5rem 0;
}

.admin-modern .dt-buttons {
    order: 1;
}

.admin-modern .dataTables_filter {
    order: 2;
}

.admin-modern .dataTables_length {
    margin-left: auto;
    order: 3;
    text-align: right !important;
}

.admin-modern .dataTables_wrapper table.dataTable,
.admin-modern .dataTables_wrapper .dataTables_scroll {
    flex: 1 0 100%;
    order: 10;
}

.admin-modern .dataTables_info {
    flex: 1 0 100%;
    order: 20;
    text-align: center !important;
}

.admin-modern .dataTables_paginate {
    display: flex;
    flex: 1 0 100%;
    justify-content: center;
    margin-left: 0;
    order: 21;
    text-align: center !important;
    width: 100%;
}

.admin-modern .dataTables_wrapper > .row,
.admin-modern .dataTables_wrapper .row {
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.admin-modern .dataTables_wrapper > .row:first-child {
    justify-content: flex-start;
}

.admin-modern .dataTables_wrapper .col-sm-6,
.admin-modern .dataTables_wrapper .col-md-6,
.admin-modern .dataTables_wrapper .col-xs-12 {
    flex: 1 1 auto;
    width: auto;
}

.admin-modern .dataTables_wrapper .row > [class*="col-"]:has(.dataTables_length) {
    flex: 0 0 auto;
    margin-left: auto;
    order: 99;
}

.admin-modern .dataTables_wrapper .row > [class*="col-"]:has(.dataTables_filter),
.admin-modern .dataTables_wrapper .row > [class*="col-"]:has(.dt-buttons) {
    flex: 0 1 auto;
}

.admin-modern .dataTables_filter {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-start;
    text-align: left !important;
    width: auto;
}

.admin-modern .dataTables_filter label,
.admin-modern .dataTables_length label {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    white-space: nowrap;
}

.admin-modern .dataTables_length label {
    justify-content: flex-end;
}

.admin-modern .dataTables_filter input,
.admin-modern .dataTables_filter select,
.admin-modern .dataTables_filter .form-control {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 5rem;
    width: auto;
}

.admin-modern .dataTables_filter input[type="text"],
.admin-modern .dataTables_filter input[type="search"] {
    min-width: 9rem;
}

.admin-modern .dt-buttons .btn,
.admin-modern .dt-button {
    background: #fff !important;
    border: 1px solid var(--admin-border) !important;
    border-radius: 0.65rem !important;
    color: var(--admin-text) !important;
    margin-right: 0.35rem;
    padding: 0.45rem 0.65rem !important;
}

.admin-modern .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    list-style: none;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
}

.admin-modern .pagination a,
.admin-modern .pagination span {
    border: 1px solid var(--admin-border);
    border-radius: 0.65rem;
    color: var(--admin-text);
    display: block;
    padding: 0.45rem 0.7rem;
}

.admin-modern .pagination .active a,
.admin-modern .paginate_button.active a {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: #fff;
}

.admin-modern .dtLoading::after {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 1rem;
    color: var(--admin-primary);
    content: "Loading...";
    display: flex;
    font-weight: 800;
    inset: 0;
    justify-content: center;
    position: absolute;
    z-index: 10;
}

.admin-modern .modal {
    align-items: center;
    background: rgba(15, 23, 42, 0.58);
    bottom: 0;
    display: none !important;
    justify-content: center;
    left: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1070;
}

.admin-modern .modal.fade.in,
.admin-modern .modal.in,
.admin-modern .modal.show,
.admin-modern .modal:not(.fade)[style*="display: block"] {
    display: flex !important;
}

.admin-modern #genericModalContainer:not(.hidden) {
    display: flex !important;
}

.admin-modern .modal-backdrop {
    background: rgba(15, 23, 42, 0.58);
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1060;
}

.admin-modern .modal-backdrop.fade {
    opacity: 0;
}

.admin-modern .modal-backdrop.in,
.admin-modern .modal-backdrop.show {
    opacity: 1;
}

.admin-modern .modal-dialog {
    margin: auto;
    max-height: calc(100vh - 2rem);
    max-width: min(48rem, calc(100vw - 2rem));
    pointer-events: auto;
    width: 100%;
}

.admin-modern .modal-lg {
    max-width: min(56rem, calc(100vw - 2rem));
}

.admin-modern .modal-content {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.25rem;
    box-shadow: 0 30px 100px rgba(15, 23, 42, 0.32);
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

.admin-modern .modal-header {
    align-items: center;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    justify-content: flex-end;
    min-height: 3.5rem;
    padding: 0.75rem 1rem;
}

.admin-modern .modal-footer {
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--admin-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 1rem;
}

.admin-modern .modal-body {
    max-height: calc(100vh - 10rem);
    overflow: auto;
    padding: 1rem;
}

.admin-modern .modal-body > .x_panel,
.admin-modern .modal-body .x_panel.basic_modal,
.admin-modern .modal-body .basic_modal {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

.admin-modern .modal-body .x_title {
    margin: 0 0 1rem;
    padding: 0 0 1rem;
}

.admin-modern .admin-modal-loading {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 8rem;
    width: 100%;
}

.admin-modern .admin-spinner {
    animation: adminSpin 0.75s linear infinite;
    border: 3px solid #e0e7ff;
    border-radius: 999px;
    border-top-color: var(--admin-primary);
    display: inline-block;
    height: 2.25rem;
    width: 2.25rem;
}

.admin-modern .sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@keyframes adminSpin {
    to {
        transform: rotate(360deg);
    }
}

.admin-modern .close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0.65rem;
    color: var(--admin-muted);
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    min-height: auto;
    padding: 0.25rem;
    width: 2.25rem;
}

.admin-modern .close:hover {
    background: #f1f5f9;
    color: var(--admin-text);
    transform: none;
}

/* Tailwind-oriented admin tabs ([data-admin-tabs] + [data-admin-tab]) */
.admin-modern [data-admin-tabs] .admin-tw-tab-btn {
    background: #f8fafc;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
    color: #64748b;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: -1px;
    padding: 0.5rem 0.85rem;
    position: relative;
    z-index: 0;
}

.admin-modern [data-admin-tabs] .admin-tw-tab-btn:hover[aria-selected="false"] {
    background: #fff;
    color: #0f172a;
}

.admin-modern [data-admin-tabs] .admin-tw-tab-btn[aria-selected="true"] {
    background: #fff;
    border-color: #e2e8f0;
    border-bottom-color: #fff;
    box-shadow: 0 1px 0 0 #fff;
    color: #4338ca;
    z-index: 1;
}

.admin-modern [data-admin-tabs] [role="tabpanel"] {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0.75rem 0.75rem 0.75rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
    margin-top: -1px;
    padding: 1rem;
}

.admin-modern .alert,
.admin-modern .ui-pnotify {
    border-radius: 0.85rem;
}

.ui-pnotify,
.ui-pnotify-modal-overlay,
.ui-pnotify-closer,
.ui-pnotify-sticker,
.admin-modern .ui-pnotify,
.admin-modern .ui-pnotify-modal-overlay {
    z-index: 2147483000 !important;
}

.ui-pnotify,
.admin-modern .ui-pnotify {
    max-width: min(24rem, calc(100vw - 2rem));
    position: fixed !important;
}

#adminToastLayer {
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: 2147483000 !important;
}

#adminToastLayer .ui-pnotify {
    pointer-events: auto;
    z-index: 2147483000 !important;
}

.ui-pnotify .ui-pnotify-container,
.admin-modern .ui-pnotify .ui-pnotify-container {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.85rem;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.24);
    color: #fff;
    overflow: hidden;
    padding: 1rem;
    position: relative;
    z-index: 2147483001 !important;
}

.ui-pnotify.admin-toast-on-top,
.admin-modern .ui-pnotify.admin-toast-on-top {
    width: min(24rem, calc(100vw - 2rem)) !important;
}

.ui-pnotify.admin-toast-on-top .ui-pnotify-title,
.admin-modern .ui-pnotify.admin-toast-on-top .ui-pnotify-title {
    align-items: center;
    color: #fff;
    display: flex;
    font-size: 0.95rem;
    font-weight: 800;
    gap: 0.65rem;
    line-height: 1.25;
    margin: 0 1.75rem 0.35rem 0;
}

.ui-pnotify.admin-toast-on-top .ui-pnotify-text,
.admin-modern .ui-pnotify.admin-toast-on-top .ui-pnotify-text {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.875rem;
    line-height: 1.45;
    margin-left: 2rem;
}

.ui-pnotify.admin-toast-on-top .admin-toast-icon,
.admin-modern .ui-pnotify.admin-toast-on-top .admin-toast-icon {
    flex: 0 0 auto;
    height: 1.35rem;
    width: 1.35rem;
}

.ui-pnotify.admin-toast-error .ui-pnotify-container,
.admin-modern .ui-pnotify.admin-toast-error .ui-pnotify-container {
    background: #9f1239;
    border-color: rgba(251, 113, 133, 0.55);
}

.ui-pnotify.admin-toast-success .ui-pnotify-container,
.admin-modern .ui-pnotify.admin-toast-success .ui-pnotify-container {
    background: #047857;
    border-color: rgba(52, 211, 153, 0.55);
}

.ui-pnotify.admin-toast-info .ui-pnotify-container,
.admin-modern .ui-pnotify.admin-toast-info .ui-pnotify-container {
    background: #1d4ed8;
    border-color: rgba(96, 165, 250, 0.55);
}

.ui-pnotify.admin-toast-on-top .ui-pnotify-closer,
.ui-pnotify.admin-toast-on-top .ui-pnotify-sticker,
.admin-modern .ui-pnotify.admin-toast-on-top .ui-pnotify-closer,
.admin-modern .ui-pnotify.admin-toast-on-top .ui-pnotify-sticker {
    color: rgba(255, 255, 255, 0.88);
    top: 0.85rem;
}

.ui-pnotify.admin-toast-on-top .ui-pnotify-closer:hover,
.ui-pnotify.admin-toast-on-top .ui-pnotify-sticker:hover,
.admin-modern .ui-pnotify.admin-toast-on-top .ui-pnotify-closer:hover,
.admin-modern .ui-pnotify.admin-toast-on-top .ui-pnotify-sticker:hover {
    color: #fff;
}

.admin-modern .label,
.admin-modern .badge {
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
}

.admin-modern .align-left {
    text-align: left;
}

.admin-modern .center {
    text-align: center;
}

.admin-modern .pull-left,
.admin-modern .pull-right {
    float: none !important;
}

.admin-modern .clearfix::after {
    clear: both;
    content: "";
    display: table;
}

.admin-modern .admin-svg-wrap {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    line-height: 1;
    vertical-align: middle;
}

.admin-modern .admin-icon,
.admin-modern .admin-svg-icon {
    display: inline-block;
    flex-shrink: 0;
    height: 1.1rem;
    max-width: none;
    vertical-align: middle;
    width: 1.1rem;
}

.admin-modern .file-listing-view {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    line-height: 1.25;
    vertical-align: middle;
}

.admin-modern .file-listing-view a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Row-hover affordances for admin tables (icons stay inline; Tailwind preflight makes raw SVG block). */
.admin-modern table.table-striped tbody tr .fa-search,
.admin-modern table.table-striped tbody tr .admin-row-search-icon {
    display: none !important;
    vertical-align: middle;
}

.admin-modern table.table-striped tbody tr:hover .fa-search,
.admin-modern table.table-striped tbody tr:hover .admin-row-search-icon {
    align-items: center;
    display: inline-flex !important;
}

.admin-modern table.table-striped tbody tr .first-download-icon {
    display: none !important;
}

.admin-modern table.table-striped tbody tr:hover .first-download-icon {
    align-items: center;
    display: inline-flex !important;
}

.admin-modern .btn-group {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    vertical-align: middle;
}

.admin-modern .btn-group > .btn,
.admin-modern .btn-group > a.btn {
    float: none;
}

.admin-modern .login_wrapper {
    margin: 0 auto;
    max-width: 28rem;
    padding: 4rem 1rem;
}

.admin-modern .login_content,
body.login .login_content {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 1.25rem;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
    padding: 2rem;
}

.admin-modern .login_content h1,
body.login .login_content h1 {
    color: var(--admin-text);
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 1.25rem;
}

@media (max-width: 1023px) {
    .admin-modern .left_col.menu_fixed {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .admin-modern.nav-sm .left_col.menu_fixed,
    .admin-modern.mobile-sidebar-open .left_col.menu_fixed {
        transform: translateX(0);
    }

    .admin-modern .top_nav,
    .admin-modern .right_col,
    .admin-modern footer {
        left: 0;
        margin-left: 0;
    }

    .admin-modern .right_col {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .admin-modern .nav_menu {
        padding: 0 1rem;
    }

    .admin-modern .user-profile {
        max-width: 12rem;
    }

    .admin-modern .quick_search_results {
        left: 0.75rem;
        right: 0.75rem;
        top: 4.5rem;
        width: auto;
    }

    .admin-modern .quick_links_wrapper ul {
        grid-template-columns: 1fr;
    }

    .admin-modern footer {
        display: block;
    }
}
