/* Central Design System & Theme */
:root {
    /* Color Palette - Premium Tech Theme */
    --primary-bg: #071428;
    --sidebar-bg: #0b2440;
    --card-bg: rgba(11, 38, 86, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-cyan: #00eaff;
    --accent-blue: #2ea3ff;
    --accent-indigo: #6366f1;
    --text-primary: #e6f7ff;
    --text-secondary: #9fbfdc;
    --text-muted: rgba(159, 191, 220, 0.6);
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Layout Variables */
    --sidebar-width: 260px;
    --content-padding: 30px;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    /* Animation Speeds */
    --trans-fast: 0.15s;
    --trans-normal: 0.3s;
}

/* Global Styles */
* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(circle at top right, #0a1f3d, #061627);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 { color: #fff; margin-top: 0; letter-spacing: -0.02em; }
.page-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; background: linear-gradient(90deg, #fff, var(--text-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { 
    width: var(--sidebar-width); 
    background: var(--sidebar-bg); 
    border-right: 1px solid var(--glass-border);
    transition: all var(--trans-normal) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}
.main-content { 
    flex: 1; 
    padding: var(--content-padding); 
    background: transparent;
    transition: all var(--trans-normal) ease;
}

/* Sidebar Styling */
.sidebar .brand { padding: 30px 20px; border-bottom: 1px solid var(--glass-border); margin-bottom: 20px; }
.sidebar .logo-art { font-size: 1.1rem; font-weight: 800; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar .menu { padding: 0 10px; }
.sidebar .menu a { 
    display: flex; align-items: center; padding: 12px 16px; margin-bottom: 4px;
    color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-md);
    transition: all var(--trans-fast) ease; font-weight: 500;
}
.sidebar .menu a:hover { background: var(--glass-bg); color: #fff; transform: translateX(4px); }
.sidebar .menu a.active { background: linear-gradient(90deg, rgba(46, 163, 255, 0.2), rgba(46, 163, 255, 0.05)); color: var(--accent-cyan); border-left: 3px solid var(--accent-cyan); }
.sidebar .menu-group-title { padding: 20px 16px 8px; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    margin-bottom: 24px;
}

/* Premium Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: var(--radius-md); font-weight: 600;
    font-size: 0.9rem; cursor: pointer; transition: all var(--trans-fast) ease;
    border: 1px solid transparent; text-decoration: none;
}
.btn-primary { background: var(--accent-blue); color: #042033; border-color: rgba(255,255,255,0.1); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(46, 163, 255, 0.4); }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--glass-border); color: var(--text-secondary); }
.btn-outline:hover { background: var(--glass-bg); color: #fff; border-color: var(--text-primary); }

/* Form Elements */
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 12px 16px; background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border); border-radius: var(--radius-md);
    color: #fff; font-size: 0.95rem; transition: all var(--trans-fast) ease;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--accent-blue); background: rgba(0,0,0,0.3); box-shadow: 0 0 0 4px rgba(46, 163, 255, 0.1); }
label { display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }

/* Table Styles - Refined */
.table-responsive { width: 100%; overflow-x: auto; border-radius: var(--radius-md); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { background: rgba(255, 255, 255, 0.05); text-align: left; padding: 16px; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; color: var(--text-secondary); border-bottom: 2px solid var(--glass-border); }
td { padding: 16px; border-bottom: 1px solid var(--glass-border); font-size: 0.95rem; color: var(--text-primary); transition: background var(--trans-fast); }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Pagination Styling */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination .page-item {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md); background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--text-secondary); text-decoration: none; transition: all var(--trans-fast);
}
.pagination .page-item:hover { background: var(--accent-blue); color: #000; border-color: var(--accent-blue); }
.pagination .page-item.active { background: var(--accent-cyan); color: #000; font-weight: 700; border-color: var(--accent-cyan); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--primary-bg); }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.5s ease forwards; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    --sidebar-width: 80px;
    .sidebar .brand .title { display: none; }
    .sidebar .menu a span:not(.ic) { display: none; }
    .sidebar .menu-group-title { display: none; }
    .sidebar .menu a { justify-content: center; padding: 16px; }
}

@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--glass-border); }
    .sidebar .menu { display: flex; overflow-x: auto; padding: 10px; }
    .sidebar .menu a { margin-bottom: 0; margin-right: 8px; }
    .main-content { padding: 15px; }
    .page-title { font-size: 1.5rem; }
}
