/**
 * Shared DataTable styles
 * Import on any page that renders a DataTable:
 *   <link rel="stylesheet" href="{{ asset('css/datatable.css') }}">
 *
 * ─── ZERO CONFIGURATION ────────────────────────────────────────────────────
 * The DataTables library automatically adds the class  .dataTable  to every
 * initialized <table> and wraps it in a  <div class="dataTables_wrapper">.
 *
 * Rules here target those two classes — so ANY table initialized with
 * DataTables (regardless of its ID or custom class) gets the glass styles
 * automatically. No per-table CSS is needed.
 *
 * Legacy IDs kept as thin aliases at the bottom for backward compat.
 * ───────────────────────────────────────────────────────────────────────────
 */

/* ════════════════════════════════════════════════════════════════════
   UNIVERSAL RULES — target the classes DataTables adds automatically
   ════════════════════════════════════════════════════════════════════ */

/* ── Table & cells ─────────────────────────────────────────────────── */
.dataTable,
.dataTable th,
.dataTable td {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: transparent !important;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.dataTable thead tr th {
    background: rgba(255, 255, 255, 0.10) !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ── Body cells ─────────────────────────────────────────────────────── */
.dataTable tbody tr td {
    vertical-align: middle;
    font-size: 13px;
}

/* ── Zebra striping ─────────────────────────────────────────────────── */
.dataTable tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.04) !important;
}
.dataTable tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.09) !important;
}

/* ── Hover ──────────────────────────────────────────────────────────── */
.dataTable tbody tr:hover td {
    background: rgba(255, 255, 255, 0.16) !important;
}

/* ── Bottom border ──────────────────────────────────────────────────── */
.dataTable.no-footer {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* ── Totals footer row (tfoot / .footer-total / .bg-gray) ───────────── */
.dataTable tfoot tr,
.dataTable tfoot tr.bg-gray,
.dataTable tfoot tr.footer-total {
    background: rgba(255, 255, 255, 0.10) !important;
    border-top: 2px solid rgba(255, 255, 255, 0.20) !important;
}
.dataTable tfoot tr td,
.dataTable tfoot tr th {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    padding: 10px 12px !important;
}

/* ── Toolbar labels (info / length / search) ────────────────────────── */
.dataTables_wrapper {
    position: relative;
}

.dataTables_wrapper.dt-lazy-loading {
    min-height: 220px;
}

.dataTables_wrapper.dt-lazy-loading .dataTable,
.dataTables_wrapper.dt-lazy-loading .dataTables_info,
.dataTables_wrapper.dt-lazy-loading .dataTables_length,
.dataTables_wrapper.dt-lazy-loading .dataTables_filter,
.dataTables_wrapper.dt-lazy-loading .dt-buttons,
.dataTables_wrapper.dt-lazy-loading .dataTables_paginate {
    visibility: hidden;
}

.dataTables_wrapper.dt-lazy-loading::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    bottom: 12px;
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.08) 20%,
            rgba(255, 255, 255, 0.18) 50%,
            rgba(255, 255, 255, 0.08) 80%
        ) 0 0 / 220% 100%,
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.06) 0,
            rgba(255, 255, 255, 0.06) 24px,
            transparent 24px,
            transparent 44px
        );
    pointer-events: none;
    z-index: 9998;
    animation: dt-lazy-shimmer 1.25s linear infinite;
}

@keyframes dt-lazy-shimmer {
    0% {
        background-position: 220% 0, 0 0;
    }
    100% {
        background-position: -20% 0, 0 0;
    }
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter label {
    color: rgba(255, 255, 255, 0.75) !important;
}

.dataTables_wrapper .dt-buttons {
    margin-bottom: 18px !important;
}

/* ── Search input ───────────────────────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 6px;
}

/* ── Page-length select ─────────────────────────────────────────────── */
.dataTables_wrapper .dataTables_length select {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 6px;
}

/* ── Processing overlay ─────────────────────────────────────────────── */
.dataTables_processing {
    position: absolute !important;
    z-index: 9999 !important;
    background: rgba(10, 40, 98, 0.85) !important;
    color: #fff !important;
}

/* ── Pagination ─────────────────────────────────────────────────────── */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 12px;
}

.dataTables_wrapper .dataTables_paginate ul.pagination {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dataTables_wrapper .dataTables_paginate ul.pagination > li {
    margin: 0;
}

.dataTables_wrapper .dataTables_paginate ul.pagination > li > a,
.dataTables_wrapper .dataTables_paginate ul.pagination > li > span {
    display: inline-block;
    min-width: 34px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 999px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    box-shadow: none !important;
    text-decoration: none !important;
}

.dataTables_wrapper .dataTables_paginate ul.pagination > li > a:hover,
.dataTables_wrapper .dataTables_paginate ul.pagination > li > span:hover {
    background: rgba(255, 255, 255, 0.20) !important;
    border-color: rgba(255, 255, 255, 0.32) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate ul.pagination > li.active > a,
.dataTables_wrapper .dataTables_paginate ul.pagination > li.active > span {
    background: rgba(255, 255, 255, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.40) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate ul.pagination > li.disabled > a,
.dataTables_wrapper .dataTables_paginate ul.pagination > li.disabled > span {
    opacity: 0.35 !important;
    pointer-events: none;
}

/* ── Global glass tabs ─────────────────────────────────────────────── */
body .content .nav-tabs-custom {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

body .content .nav-tabs-custom > .nav-tabs,
body .content .nav-tabs:not(.control-sidebar-tabs) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: transparent !important;
    margin-left: 12px !important;
    margin-inline-start: 12px !important;
}

body .content .nav-tabs-custom > .nav-tabs > li,
body .content .nav-tabs:not(.control-sidebar-tabs) > li {
    margin-right: 8px !important;
    border-top: 0 !important;
}

body .content .nav-tabs-custom > .nav-tabs > li > a,
body .content .nav-tabs:not(.control-sidebar-tabs) > li > a {
    color: rgba(255, 255, 255, 0.84) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 999px !important;
    margin: 8px 0 !important;
    padding: 9px 14px !important;
    line-height: 1.2 !important;
    transition: all 0.2s ease;
}

body .content .nav-tabs-custom > .nav-tabs > li > a:hover,
body .content .nav-tabs:not(.control-sidebar-tabs) > li > a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.24) !important;
}

body .content .nav-tabs-custom > .nav-tabs > li.active > a,
body .content .nav-tabs-custom > .nav-tabs > li.active > a:focus,
body .content .nav-tabs-custom > .nav-tabs > li.active > a:hover,
body .content .nav-tabs:not(.control-sidebar-tabs) > li.active > a,
body .content .nav-tabs:not(.control-sidebar-tabs) > li.active > a:focus,
body .content .nav-tabs:not(.control-sidebar-tabs) > li.active > a:hover {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(5, 16, 52, 0.6), rgba(5, 16, 52, 0.5)) !important;
    border-color: rgba(129, 165, 255, 0.34) !important;
}

body .content .nav-tabs-custom > .tab-content {
    background: transparent !important;
    border-bottom-left-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
}

