/* ==========================================================================
   SERVER ADMIN GLASS THEME (v11.0 - PROFESSIONAL POLISH)
   ========================================================================== */
:root {
    /* Deep Space Background */
    --glass-bg: rgba(15, 23, 42, 0.70); /* Translucent again for Glass effect */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    
    /* Branding */
    --accent-color: #818cf8;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    
    /* Typography */
    --text-main: #f8fafc; /* Soft White */
    --text-muted: #94a3b8;
    --font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: #020617;
    /* High-Quality Mesh Gradient */
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- PROFESSIONAL GLASS PANELS --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    color: var(--text-main);
}

/* ==========================================
   1. REFINED SIDEBAR (Sleek & Functional)
   ========================================== */
#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: rgba(15, 23, 42, 0.6); /* Semi-transparent */
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    top: 0;
    left: 0;
    margin-left: 0 !important; /* Default Open */
}

#content {
    width: calc(100% - 260px) !important;
    margin-left: 260px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}

/* Toggle Logic */
#sidebar.active { margin-left: -260px !important; }
#content.active { margin-left: 0 !important; width: 100% !important; }

@media (max-width: 768px) {
    #sidebar { margin-left: -260px !important; }
    #content { width: 100% !important; margin-left: 0 !important; }
    #sidebar.active { margin-left: 0 !important; }
    #content.active { opacity: 0.5; pointer-events: none; }
}

/* Sidebar Links - Pill Shape */
#sidebar ul.components { padding: 20px 12px; }
#sidebar ul li a {
    padding: 12px 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    border-radius: 12px; /* Pill shape */
    margin-bottom: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

#sidebar ul li a:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(4px);
}

#sidebar ul li a.active {
    background: var(--accent-gradient) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); /* Soft Glow */
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
}

#sidebar ul li a i { width: 25px; margin-right: 10px; font-size: 1.1rem; text-align: center; }

/* ==========================================
   2. PROFESSIONAL DATA TABLES
   ========================================== */
/* Container Reset */
.table-responsive {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: transparent;
}

table.dataTable {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
}

/* Header Styling */
table.dataTable thead th {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-bottom: 2px solid rgba(255,255,255,0.2) !important;
    padding: 16px 12px !important;
}

/* Row Styling */
table.dataTable tbody tr {
    background-color: rgba(15, 23, 42, 0.9) !important; 
    color: #ffffff !important;
}

table.dataTable tbody td {
    background-color: transparent !important;
    color: #ffffff !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
    vertical-align: middle;
}

/* Striping & Hover */
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(2, 6, 23, 0.95) !important; /* Almost Black */
}

table.dataTable > tbody > tr:hover {
    background-color: rgba(79, 70, 229, 0.6) !important; /* Visible Indigo */
    box-shadow: inset 4px 0 0 #818cf8; /* Accent border on left */
    transition: background-color 0.15s ease-in-out;
}
table.dataTable tbody tr > .sorting_1,
table.dataTable tbody tr > .sorting_2,
table.dataTable tbody tr > .sorting_3 {
    background-color: transparent !important; /* Remove the light grey highlight */
    color: #ffffff !important;
    box-shadow: none !important;
}
table.dataTable > tbody > tr:hover > .sorting_1 {
    background-color: transparent !important;
}
/* Search Input styling */
.dataTables_filter input {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important; /* Rounded pill search */
    padding: 6px 15px !important;
    color: #fff !important;
    transition: all 0.2s;
}
.dataTables_filter input:focus {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
}

/* Pagination */
.dataTables_wrapper .dataTables_info { color: var(--text-muted) !important; font-size: 0.85rem; }
.page-item .page-link {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 6px;
    margin: 0 2px;
}
.page-item.active .page-link {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* ==========================================
   3. MODAL REFINEMENTS
   ========================================== */
.modal-content {
    background-color: #0f172a !important; /* Solid dark for readability */
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* Modal Tables (License Usage) */
.modal-content .table {
    background-color: #0f172a !important;
}
.modal-content .table thead th {
    background-color: #1e293b !important;
}
.modal-content .table tbody td {
    color: #cbd5e1 !important;
    border-color: rgba(255,255,255,0.1);
}

/* ==========================================
   4. UI ELEMENTS (Toggles, Inputs, Buttons)
   ========================================== */
/* Inputs */
.form-control-glass, select, textarea {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    border-radius: 8px;
    padding: 10px 12px;
}
.form-control-glass:focus {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: var(--accent-color) !important;
}

/* Visible Toggles */
.form-check.form-switch { padding-left: 2.8em; margin-bottom: 0.5rem; }
.form-check-input {
    background-color: #475569 !important; /* Slate Grey OFF */
    border-color: #64748b !important;
    height: 1.4em; width: 2.6em;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}
.form-check-input:checked {
    background-color: #10b981 !important; /* Emerald Green ON */
    border-color: #10b981 !important;
}

/* Buttons */
.btn-glass {
    background: var(--accent-gradient);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}
.btn-glass:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.btn-glass-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff !important;
    border-radius: 8px;
}
.btn-glass-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* Dropdowns */
.dropdown-menu {
    background-color: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px;
}
.dropdown-item {
    color: #e2e8f0 !important;
    border-radius: 6px;
    padding: 8px 12px;
}
.dropdown-item:hover {
    background-color: var(--accent-color) !important;
    color: #fff !important;
}