@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* --- Global Overrides --- */
body {
    background-color: #080b17 !important;
    color: #f8fafc !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    overflow-x: hidden;
}

.content-wrapper {
    background-color: #080b17 !important;
    color: #f8fafc !important;
    padding: 30px !important;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hide default AdminLTE navbar if desired, or style it to match the dark theme */
.main-header.navbar {
    background-color: #080b17 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    display: none !important; /* Hiding the default white navbar to match the image layout */
}

/* Ensure content-wrapper doesn't have top margin since navbar is hidden */
.content-wrapper {
    margin-top: 0 !important;
}

/* --- Sidebar Styling --- */
.main-sidebar {
    background-color: #0f1322 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-sidebar .brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 20px 15px !important;
}

.main-sidebar .brand-text {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    color: #ffffff !important;
    letter-spacing: -0.5px;
}

.sidebar {
    padding-left: 10px !important;
    padding-right: 10px !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Nav links styling */
.sidebar .nav-sidebar .nav-item {
    margin-bottom: 5px;
}

.sidebar .nav-sidebar .nav-link {
    border-radius: 10px !important;
    color: #8a90a6 !important;
    font-weight: 500;
    font-size: 14px !important;
    padding: 12px 15px !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.sidebar .nav-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.sidebar .nav-sidebar .nav-link i.nav-icon {
    font-size: 16px !important;
    margin-right: 12px !important;
    width: 20px;
    text-align: center;
    color: #8a90a6;
    transition: color 0.3s ease;
}

.sidebar .nav-sidebar .nav-link:hover i.nav-icon {
    color: #ffffff;
}

/* Active Nav Link (Dashboard) */
.sidebar .nav-sidebar .nav-item > .nav-link.active {
    background-color: #5c5fc8 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(92, 95, 200, 0.3) !important;
}

.sidebar .nav-sidebar .nav-item > .nav-link.active i.nav-icon {
    color: #ffffff !important;
}

/* Treeview/Dropdown navigation styling */
.nav-treeview {
    padding-left: 15px;
}

.nav-treeview .nav-link {
    font-size: 13px !important;
    padding: 8px 15px !important;
}

.nav-treeview .nav-link i.nav-icon {
    font-size: 10px !important;
}

/* Sidebar profile widget at bottom */
.sidebar {
    position: relative !important;
}

.sidebar nav {
    padding-bottom: 90px !important;
}

.sidebar-profile {
    padding: 20px 25px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    background-color: #0c0f1c !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
}

.sidebar-profile-info {
    display: flex;
    flex-direction: column;
}

.sidebar-profile-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.sidebar-profile-role {
    font-size: 10px;
    font-weight: 700;
    color: #8a90a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* --- Dashboard Content Layout --- */
.dashboard-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-top: 10px;
}

.dashboard-header-row h1, 
.dashboard-header-row h4 {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Premium Buttons styling */
.btn-premium {
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-premium-secondary {
    background-color: rgba(255, 255, 255, 0.07);
    color: #e2e8f0;
}

.btn-premium-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-premium-primary {
    background-color: #5c5fc8;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(92, 95, 200, 0.25);
}

.btn-premium-primary:hover {
    background-color: #4b4db2;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(92, 95, 200, 0.35);
}

.btn-premium-danger {
    background-color: rgba(255, 255, 255, 0.07);
    color: #ff4d4f;
    border: 1px solid rgba(255, 77, 79, 0.2);
}

.btn-premium-danger:hover {
    background-color: rgba(255, 77, 79, 0.1);
    color: #ff7875;
    transform: translateY(-2px);
}

/* --- Dashboard Grid Cards --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.premium-card {
    background-color: #1a203a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(800px circle at var(--x, 0) var(--y, 0), rgba(255,255,255,0.04), transparent 40%);
    z-index: 1;
    pointer-events: none;
}

.premium-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.premium-card-icon {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 24px;
    transition: transform 0.3s ease;
    z-index: 2;
}

.premium-card:hover .premium-card-icon {
    transform: scale(1.1);
}

/* Specific icon theme colors matching iOS style translucent design */
.premium-card-icon.theme-blue {
    background-color: rgba(0, 122, 255, 0.15);
    color: #007aff;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.05);
}

.premium-card-icon.theme-orange {
    background-color: rgba(255, 149, 0, 0.15);
    color: #ff9500;
    box-shadow: 0 0 20px rgba(255, 149, 0, 0.05);
}

.premium-card-icon.theme-purple {
    background-color: rgba(175, 82, 222, 0.15);
    color: #af52de;
    box-shadow: 0 0 20px rgba(175, 82, 222, 0.05);
}

.premium-card-icon.theme-green {
    background-color: rgba(52, 199, 89, 0.15);
    color: #34c759;
    box-shadow: 0 0 20px rgba(52, 199, 89, 0.05);
}

.premium-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    z-index: 2;
}

.premium-card-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #8a90a6;
    margin-bottom: 28px;
    flex-grow: 1;
    max-width: 210px;
    z-index: 2;
}

.premium-card-btn {
    font-size: 13px;
    font-weight: 600;
    color: #8a90a6;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 24px;
    border-radius: 20px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    z-index: 2;
}

.premium-card:hover .premium-card-btn {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

.premium-card-btn i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.premium-card:hover .premium-card-btn i {
    transform: translateX(4px);
}

/* Footer override to make it modern dark */
.main-footer {
    background-color: #080b17 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #8a90a6 !important;
    padding: 20px !important;
    font-size: 12px;
}

/* Hide standard scrollbars and use custom modern style */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #080b17;
}

::-webkit-scrollbar-thumb {
    background: #1e2640;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2b3559;
}

/* --- Mobile Bottom Navigation Overrides --- */
.bottom-nav {
    background-color: #0f1322 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.3) !important;
}

.bottom-nav a {
    color: #8a90a6 !important;
    transition: all 0.2s ease !important;
}

.bottom-nav a:hover, 
.bottom-nav a.active {
    color: #5c5fc8 !important;
}

/* --- Card & Form Styling Overrides --- */
.card {
    background-color: #1a203a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden;
    margin-bottom: 30px;
}

.card-header {
    background-color: #232a4f !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 20px 24px !important;
}

.card-header h3, 
.card-header .card-title {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.card-body {
    padding: 24px !important;
    color: #f8fafc !important;
}

.card-footer {
    background-color: #1b203c !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 20px 24px !important;
}

/* Form Controls */
label {
    color: #a5abc0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
    text-transform: capitalize;
}

.form-control {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    height: auto !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
}

.form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    opacity: 1 !important;
    cursor: text;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: #5c5fc8 !important;
    box-shadow: 0 0 0 3px rgba(92, 95, 200, 0.25) !important;
    color: #ffffff !important;
}

.form-control::placeholder {
    color: #555c70 !important;
}

select.form-control option {
    background-color: #12162a !important;
    color: #ffffff !important;
}

/* Input Type File Styling */
input[type="file"].form-control {
    padding: 6px 12px !important;
}

/* Horizontal line */
hr {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin: 25px 0 !important;
}

/* Page titles */
h3, h4, h5 {
    color: #ffffff !important;
    font-weight: 600 !important;
}

h5 {
    font-size: 16px !important;
    margin-bottom: 20px !important;
}

/* Custom Buttons overrides */
.btn-primary {
    background-color: #5c5fc8 !important;
    border-color: #5c5fc8 !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(92, 95, 200, 0.25) !important;
    transition: all 0.3s ease !important;
}

.btn-primary:hover {
    background-color: #4b4db2 !important;
    border-color: #4b4db2 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(92, 95, 200, 0.35) !important;
}

.btn-success {
    background-color: rgba(52, 199, 89, 0.15) !important;
    border: 1px solid rgba(52, 199, 89, 0.2) !important;
    color: #34c759 !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.btn-success:hover {
    background-color: rgba(52, 199, 89, 0.25) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.btn-danger {
    background-color: rgba(255, 77, 79, 0.15) !important;
    border: 1px solid rgba(255, 77, 79, 0.2) !important;
    color: #ff4d4f !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.btn-danger:hover {
    background-color: rgba(255, 77, 79, 0.25) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* Success alert override */
.alert-success {
    background-color: rgba(52, 199, 89, 0.15) !important;
    border: 1px solid rgba(52, 199, 89, 0.3) !important;
    color: #34c759 !important;
    border-radius: 10px !important;
    padding: 15px 20px !important;
    font-weight: 500 !important;
}

/* Danger alert override */
.alert-danger {
    background-color: rgba(255, 77, 79, 0.15) !important;
    border: 1px solid rgba(255, 77, 79, 0.3) !important;
    color: #ff4d4f !important;
    border-radius: 10px !important;
    padding: 15px 20px !important;
    font-weight: 500 !important;
}

/* Checkbox styling */
input[type="checkbox"] {
    accent-color: #5c5fc8 !important;
    width: 16px !important;
    height: 16px !important;
    vertical-align: middle !important;
    margin-right: 6px !important;
    cursor: pointer !important;
}

/* Breadcrumbs overrides */
.breadcrumb {
    background-color: transparent !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

.breadcrumb-item a {
    color: #8a90a6 !important;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #ffffff !important;
}

.breadcrumb-item.active {
    color: #ffffff !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #555c70 !important;
}

/* Table styling */
.table {
    color: #f8fafc !important;
    background-color: transparent !important;
}

.table-bordered {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.table-bordered th, 
.table-bordered td {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    vertical-align: middle !important;
    padding: 16px !important;
}

.table thead th {
    background-color: #1b203c !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.015) !important;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: transparent !important;
}

.table tbody tr:hover {
    background-color: rgba(92, 95, 200, 0.12) !important;
    border-left: 3px solid #5c5fc8 !important;
}

.table tbody tr:hover td {
    color: #ffffff !important;
}

/* Action button edit styling */
.btn-info {
    background-color: rgba(0, 122, 255, 0.15) !important;
    border: 1px solid rgba(0, 122, 255, 0.2) !important;
    color: #007aff !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.btn-info:hover {
    background-color: rgba(0, 122, 255, 0.25) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* Badges styling */
.badge {
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: rgba(52, 199, 89, 0.15) !important;
    color: #34c759 !important;
    border: 1px solid rgba(52, 199, 89, 0.2) !important;
}

.badge-secondary {
    background-color: rgba(142, 142, 147, 0.15) !important;
    color: #8e8e93 !important;
    border: 1px solid rgba(142, 142, 147, 0.2) !important;
}

.badge-warning {
    background-color: rgba(255, 149, 0, 0.15) !important;
    color: #ff9500 !important;
    border: 1px solid rgba(255, 149, 0, 0.2) !important;
}

.badge-info {
    background-color: rgba(0, 122, 255, 0.15) !important;
    color: #007aff !important;
    border: 1px solid rgba(0, 122, 255, 0.2) !important;
}

.badge-danger {
    background-color: rgba(255, 59, 48, 0.15) !important;
    color: #ff3b30 !important;
    border: 1px solid rgba(255, 59, 48, 0.2) !important;
}

/* DataTables wrapper customization */
.dataTables_wrapper {
    padding-top: 10px;
}

.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter, 
.dataTables_wrapper .dataTables_info, 
.dataTables_wrapper .dataTables_paginate {
    color: #a5abc0 !important;
    font-size: 13px !important;
    margin-bottom: 15px !important;
}

.dataTables_wrapper .dataTables_filter input {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 6px 12px 6px 32px !important;
    margin-left: 10px !important;
    outline: none !important;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%23a5abc0'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 10px center !important;
    background-size: 14px 14px !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #5c5fc8 !important;
    box-shadow: 0 0 0 3px rgba(92, 95, 200, 0.25) !important;
}

.dataTables_wrapper .dataTables_length select {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 6px 24px 6px 12px !important;
    outline: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_length select:focus {
    border-color: #5c5fc8 !important;
    box-shadow: 0 0 0 3px rgba(92, 95, 200, 0.25) !important;
}

.dataTables_wrapper .dataTables_length select option {
    background-color: #12162a !important;
    color: #ffffff !important;
}

/* ── DataTables Pagination ── No Box, Plain Text ── */

/* Kill ALL default shadows, outlines, borders from DataTables */
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .dataTables_paginate .paginate_button:focus,
.dataTables_wrapper .dataTables_paginate .paginate_button:active,
.dataTables_wrapper .dataTables_paginate .paginate_button a,
.dataTables_wrapper .dataTables_paginate .paginate_button a:focus,
.dataTables_wrapper .dataTables_paginate .paginate_button a:active {
    outline: none !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
    margin-top: 20px !important;
}

/* ── Base: NO box, NO background, NO border — plain text only ── */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 32px !important;
    height: 32px !important;
    padding: 0 6px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #555c70 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transform: none !important;
}

/* ── Hover: purple text only ── */
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: #5c5fc8 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ── Active / current page: purple text, bold ── */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #5c5fc8 !important;
    font-weight: 700 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ── Disabled ── */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #2e3352 !important;
    background: transparent !important;
    border: none !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.4 !important;
}

/* ── Previous («) and Next (») ── */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    font-size: 0 !important;
    min-width: 28px !important;
    padding: 0 4px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.previous::before {
    content: '\00AB' !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    color: inherit !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.next::after {
    content: '\00BB' !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    color: inherit !important;
}

/* ── Ellipsis ── */
.dataTables_wrapper .dataTables_paginate .ellipsis {
    color: #3d4260 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: default !important;
    font-size: 14px !important;
}
.dataTables_wrapper .dataTables_paginate .ellipsis:hover {
    color: #3d4260 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Remove DataTables sorting icons (triangles) */
table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::before,
table.dataTable thead th.sorting_desc::after,
table.dataTable thead td.sorting::before,
table.dataTable thead td.sorting::after,
table.dataTable thead td.sorting_asc::before,
table.dataTable thead td.sorting_asc::after,
table.dataTable thead td.sorting_desc::before,
table.dataTable thead td.sorting_desc::after {
    display: none !important;
    content: "" !important;
}

table.dataTable thead .sorting_desc_disabled {
    background-image: none !important;
    padding-right: 16px !important;
}

/* Dropdown Menu Premium styling */
.dropdown-menu {
    background-color: #1b203c !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    padding: 6px 0 !important;
}

.dropdown-item {
    color: #e2e8f0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    transition: all 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.dropdown-item.text-danger {
    color: #ff4d4f !important;
}

.dropdown-item.text-danger:hover {
    background-color: rgba(255, 77, 79, 0.1) !important;
    color: #ff7875 !important;
}

.dropdown-item.text-info {
    color: #007aff !important;
}

.dropdown-item.text-info:hover {
    background-color: rgba(0, 122, 255, 0.1) !important;
    color: #4da3ff !important;
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    margin: 4px 0 !important;
}

/* --- Mobile Friendly Layout Overrides --- */
@media (max-width: 767px) {
    /* Show and style navbar on mobile */
    .main-header.navbar {
        display: flex !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        z-index: 1030;
        background-color: #0f1322 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding: 0 15px !important;
        align-items: center;
    }
    
    .main-header.navbar .nav-link {
        color: #ffffff !important;
        display: flex;
        align-items: center;
        height: 100%;
    }
    
    /* Stack forms into single line inputs */
    .row {
        margin-right: -10px !important;
        margin-left: -10px !important;
    }
    
    .row > [class*="col-"] {
        padding-right: 10px !important;
        padding-left: 10px !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 12px !important;
    }
    
    /* Dynamic field rows */
    .field_row {
        padding: 12px !important;
        border-radius: 8px !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        background-color: rgba(255, 255, 255, 0.02) !important;
        margin-bottom: 15px !important;
    }

    .field_row > [class*="col-"] {
        margin-bottom: 8px !important;
    }
    
    .field_row > [class*="col-"]:last-child {
        margin-bottom: 0 !important;
    }

    /* Content Wrapper Padding & Independent Scrolling */
    .content-wrapper {
        margin-top: 56px !important;
        padding: 15px !important;
        height: calc(100vh - 56px - 65px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Card Padding on Mobile */
    .card-body {
        padding: 16px !important;
    }
    
    .card-header {
        padding: 15px 16px !important;
    }

    /* Table text alignment & actions */
    .table td, .table th {
        padding: 10px !important;
        font-size: 13px !important;
    }
    
    .dropdown .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Align search box to the right on mobile */
    .dataTables_wrapper .dataTables_filter {
        text-align: right !important;
        float: right !important;
        width: 100% !important;
        margin-top: 5px !important;
        margin-bottom: 15px !important;
    }
    .dataTables_wrapper .dataTables_filter input {
        width: calc(100% - 20px) !important;
        max-width: 200px !important;
        margin-left: 0 !important;
        display: inline-block !important;
    }

    /* Hide admin navbar image on mobile */
    .admin-navbar-img {
        display: none !important;
    }
}

/* --- Input Group and Button Append Styling Fixes --- */
.input-group .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group-append {
    display: flex;
}

.input-group-append .btn {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #a5abc0 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 16px !important;
    margin-left: -1px !important;
    transition: all 0.3s ease !important;
}

.input-group-append .btn:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.input-group-append .btn:first-child {
    border-radius: 0 !important;
}

.input-group-append .btn:last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* --- Autofill / Autocomplete input background override --- */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 0 1000px #1d223f !important;
}
/* --- DataTables search filter alignment --- */
.dataTables_wrapper .dataTables_filter {
    float: right !important;
    text-align: right !important;
}

@media (min-width: 768px) {
    .dataTables_wrapper .dataTables_filter {
        margin-right: 15px !important;
    }
}

/* --- Mobile Premium Card Scaling (Phone only) --- */
@media (max-width: 576px) {
    .premium-card {
        padding: 20px 15px !important;
        border-radius: 12px !important;
        margin-bottom: 15px !important;
    }
    .premium-card-icon {
        width: 55px !important;
        height: 55px !important;
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    .premium-card h3 {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }
    .premium-card p {
        font-size: 12px !important;
        margin-bottom: 15px !important;
        line-height: 1.4 !important;
    }
    .premium-card .btn-premium {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
}

/* ── Scrollable Table Container (replaces pagination) ── */
.table-scroll-container {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Sticky header stays visible while scrolling */
.table-scroll-container thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    background-color: #1b203c !important;
}

/* Custom scrollbar */
.table-scroll-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.table-scroll-container::-webkit-scrollbar-track {
    background: #0f1322;
    border-radius: 4px;
}
.table-scroll-container::-webkit-scrollbar-thumb {
    background: #2e3560;
    border-radius: 4px;
}
.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #5c5fc8;
}

