/* =========================================================
   SIPRO ADMIN - GLOBAL SCI-FI DESIGN SYSTEM
   ========================================================= */

:root {
    --bg-color: #f8fafc;
    --sidebar-bg: #0f172a;
    --panel-bg: rgba(255, 255, 255, 0.75);
    --panel-border: rgba(255, 255, 255, 0.6);
    
    --neon-blue: #3b82f6;
    --neon-blue-light: #60a5fa;
    --neon-cyan: #0ea5e9;
    --neon-green: #10b981;
    --neon-orange: #f59e0b;
    --neon-red: #ef4444;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    --card-radius: 16px;
    --btn-radius: 8px;
    --font-family: 'Inter', -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: url('bg.png') center center fixed !important;
    background-size: cover !important;
    background-color: var(--bg-color) !important;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================================
   LOGIN SCREEN (PREMIUM SCI-FI)
   ========================================================= */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    position: relative;
    overflow: hidden;
}

/* Sci-fi Grid Overlay */
.login-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
    pointer-events: none;
}

/* Ambient glow */
.login-body::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: var(--card-radius);
    text-align: center;
    background: linear-gradient(180deg, rgba(15,23,42,0.8), rgba(2,5,16,0.95));
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 30px rgba(56, 189, 248, 0.1);
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 1;
    overflow: hidden;
    animation: bootUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Corner bracket accents */
.login-container::before, .login-container::after {
    content: ''; position: absolute; width: 40px; height: 40px; pointer-events: none; z-index: 2;
}
.login-container::before {
    top: 0; left: 0; border-top: 2px solid var(--neon-cyan); border-left: 2px solid var(--neon-cyan); border-radius: var(--card-radius) 0 0 0;
}
.login-container::after {
    bottom: 0; right: 0; border-bottom: 2px solid var(--neon-cyan); border-right: 2px solid var(--neon-cyan); border-radius: 0 0 var(--card-radius) 0;
}

@keyframes bootUp {
    0% { transform: scale(0.95) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Scanning line effect */
.login-container .scan-line {
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(56,189,248,0.8), transparent);
    box-shadow: 0 0 10px rgba(56,189,248,0.5);
    z-index: 10;
    opacity: 0.5;
    animation: scan 3s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { top: 100%; opacity: 0; }
}

.login-header h2 { font-size: 28px; margin-bottom: 8px; font-weight: 800; color: white; letter-spacing: 2px; text-transform: uppercase; }
.login-header p { color: var(--text-muted); font-size: 11px; margin-bottom: 30px; text-transform: uppercase; letter-spacing: 2px; }
.login-icon { font-size: 64px; color: var(--neon-cyan); margin-bottom: 15px; filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.6)); animation: hoverFloat 3s ease-in-out infinite; }

@keyframes hoverFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.form-group { margin-bottom: 24px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-size: 11px; color: var(--neon-cyan); text-transform: uppercase; font-weight: 700; letter-spacing: 1.5px; opacity: 0.8; }

.input-icon-wrapper { position: relative; display: flex; align-items: center; }
.input-icon-wrapper i { position: absolute; left: 16px; color: var(--text-muted); font-size: 20px; z-index: 2; transition: 0.3s; }
.input-icon-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--btn-radius);
    color: var(--text-main);
    font-size: 14px;
    font-family: monospace;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}
.input-icon-wrapper input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(2, 6, 23, 0.8);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2), inset 0 0 10px rgba(56, 189, 248, 0.1);
}
.input-icon-wrapper input:focus + i, .input-icon-wrapper input:not(:placeholder-shown) + i {
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 5px var(--neon-cyan));
}

/* =========================================================
   BUTTONS & ALERTS
   ========================================================= */
.btn {
    padding: 12px 20px;
    border-radius: var(--btn-radius);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}
.btn-block { width: 100%; }

.btn-primary {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
    color: white;
    border: 1px solid #3b82f6;
    box-shadow: 0 0 15px rgba(37,99,235,0.3);
}
.btn-primary:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 25px rgba(37,99,235,0.5);
    transform: translateY(-1px);
}

.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--neon-red); border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); box-shadow: 0 0 15px rgba(239, 68, 68, 0.3); }

/* Sci-Fi specific buttons */
.btn-export {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: flex; align-items: center; gap: 6px;
}
.btn-export:hover { background: rgba(16, 185, 129, 0.2); box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
.btn-full {
    width: 100%; background: transparent; border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted);
    padding: 12px; border-radius: 8px; cursor: pointer; transition: 0.3s; font-size: 12px;
}
.btn-full:hover { background: rgba(255,255,255,0.05); color: white; border-color: rgba(255,255,255,0.2); }

.alert { padding: 12px; border-radius: var(--btn-radius); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.alert-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

/* =========================================================
   APP LAYOUT (Sidebar moved to sidebar.php inline)
   ========================================================= */
.app-container { display: flex; width: 100%; min-height: 100vh; overflow-x: hidden; }
.main-content { flex: 1; min-width: 0; padding: 0 32px 32px 32px; background: transparent; min-height: 100vh; }

/* Top Navbar */
.top-navbar { display: flex; justify-content: flex-end; align-items: center; padding: 16px 0; gap: 20px; margin-bottom: 10px; }
.search-bar { position: relative; width: 300px; }
.search-bar input { width: 100%; padding: 10px 15px 10px 40px; background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.05); border-radius: 20px; color: var(--text-main); font-size: 13px; outline: none; transition: border 0.3s; }
.search-bar input:focus { border-color: rgba(37, 99, 235, 0.5); }
.search-bar i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 16px; }
.nav-icons { display: flex; align-items: center; gap: 15px; }
.nav-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.03); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 18px; position: relative; cursor: pointer; transition: all 0.2s; }
.nav-icon:hover { color: var(--text-main); background: rgba(0,0,0,0.05); }
.nav-badge { position: absolute; top: -2px; right: -2px; background: var(--neon-blue); color: white; font-size: 10px; font-weight: bold; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: #333; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Page Header */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; }
.page-header h1 { font-size: 26px; font-weight: 700; margin: 0 0 4px 0; letter-spacing: -0.5px; color: var(--text-main); }
.page-header p { color: var(--text-muted); font-size: 12px; margin: 0; }
.total-badge { background: rgba(37, 99, 235, 0.05); border: 1px solid rgba(37, 99, 235, 0.2); padding: 8px 16px; border-radius: 8px; color: var(--text-main); display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; backdrop-filter: blur(8px); }
.total-badge i { color: var(--neon-cyan); font-size: 16px; }

/* =========================================================
   SCI-FI PANELS & CARDS
   ========================================================= */
.panel {
    background: var(--panel-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    border: 1px solid var(--panel-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-width: 0; max-width: 100%;
}
/* Optional accent panel */
.panel.accented { border: 1px solid rgba(37,99,235,0.3); box-shadow: 0 15px 35px rgba(0,0,0,0.05), inset 0 0 30px rgba(37,99,235,0.05); }

.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-title { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--text-main); text-transform: uppercase; margin: 0; display: flex; align-items: center; gap: 8px; }
.panel-title i { color: var(--neon-cyan); font-size: 14px; }

/* Dashboard KPI Cards (with corner brackets) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.kpi-card {
    background: var(--panel-bg);
    padding: 24px; display: flex; align-items: center; gap: 24px;
    position: relative; z-index: 1; border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.kpi-card::before, .kpi-card::after { content: ''; position: absolute; width: 30px; height: 30px; pointer-events: none; z-index: 2; }
        
.kpi-card.blue { box-shadow: 0 0 20px rgba(37, 99, 235, 0.1), inset 0 0 30px rgba(37, 99, 235, 0.1); border: 1px solid rgba(37, 99, 235, 0.2); }
.kpi-card.blue::before { top: -1px; left: -1px; border-top: 3px solid #60a5fa; border-left: 3px solid #60a5fa; border-radius: 12px 0 0 0; box-shadow: inset 5px 5px 10px rgba(96,165,250,0.2); }
.kpi-card.blue::after { bottom: -1px; right: -1px; border-bottom: 3px solid #60a5fa; border-right: 3px solid #60a5fa; border-radius: 0 0 12px 0; box-shadow: inset -5px -5px 10px rgba(96,165,250,0.2); }

.kpi-card.green { box-shadow: 0 0 20px rgba(16, 185, 129, 0.1), inset 0 0 30px rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); }
.kpi-card.green::before { top: -1px; left: -1px; border-top: 3px solid #34d399; border-left: 3px solid #34d399; border-radius: 12px 0 0 0; }
.kpi-card.green::after { bottom: -1px; right: -1px; border-bottom: 3px solid #34d399; border-right: 3px solid #34d399; border-radius: 0 0 12px 0; }

.kpi-card.orange { box-shadow: 0 0 20px rgba(245, 158, 11, 0.1), inset 0 0 30px rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); }
.kpi-card.orange::before { top: -1px; left: -1px; border-top: 3px solid #fbbf24; border-left: 3px solid #fbbf24; border-radius: 12px 0 0 0; }
.kpi-card.orange::after { bottom: -1px; right: -1px; border-bottom: 3px solid #fbbf24; border-right: 3px solid #fbbf24; border-radius: 0 0 12px 0; }

.kpi-card.purple { box-shadow: 0 0 20px rgba(139, 92, 246, 0.1), inset 0 0 30px rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.2); }
.kpi-card.purple::before { top: -1px; left: -1px; border-top: 3px solid #a78bfa; border-left: 3px solid #a78bfa; border-radius: 12px 0 0 0; }
.kpi-card.purple::after { bottom: -1px; right: -1px; border-bottom: 3px solid #a78bfa; border-right: 3px solid #a78bfa; border-radius: 0 0 12px 0; }

.hex-icon { position: relative; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; }
.hex-icon svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; fill: transparent; stroke-width: 1.5; }
.hex-icon i { position: relative; z-index: 2; font-size: 24px; }
        
.kpi-card.blue .hex-icon i { color: #60a5fa; }
.kpi-card.blue .hex-icon svg { stroke: var(--neon-blue); filter: drop-shadow(0 0 5px var(--neon-blue)); }
.kpi-card.green .hex-icon i { color: #34d399; }
.kpi-card.green .hex-icon svg { stroke: var(--neon-green); filter: drop-shadow(0 0 5px var(--neon-green)); }
.kpi-card.orange .hex-icon i { color: #fbbf24; }
.kpi-card.orange .hex-icon svg { stroke: var(--neon-orange); filter: drop-shadow(0 0 5px var(--neon-orange)); }
.kpi-card.purple .hex-icon i { color: #a78bfa; }
.kpi-card.purple .hex-icon svg { stroke: #8b5cf6; filter: drop-shadow(0 0 5px #8b5cf6); }

.kpi-content { display: flex; flex-direction: column; justify-content: center; }
.kpi-content h3 { font-size: 32px; font-weight: 700; margin: 0; line-height: 1; color: var(--text-main); }
.kpi-content p { font-size: 11px; font-weight: 700; margin: 8px 0 2px 0; letter-spacing: 1.5px; color: var(--text-muted); text-transform: uppercase; }
.kpi-content small { font-size: 10px; color: var(--text-muted); }


/* =========================================================
   TABLES
   ========================================================= */
.table-container { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0 4px; }
th {
    font-size: 9px; color: var(--text-muted); text-transform: uppercase; font-weight: 700;
    letter-spacing: 1px; padding: 10px 15px; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.05);
}
td {
    padding: 12px 15px; background: rgba(0,0,0,0.01); font-size: 11px;
    color: var(--text-main); vertical-align: middle; transition: background 0.2s;
}
tr td:first-child { border-radius: 6px 0 0 6px; }
tr td:last-child { border-radius: 0 6px 6px 0; }
tr:hover td { background: rgba(0,0,0,0.03); }

.badge { padding: 4px 10px; border-radius: 20px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-success { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid rgba(16,185,129,0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #b45309; border: 1px solid rgba(245,158,11,0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #b91c1c; border: 1px solid rgba(239,68,68,0.3); }

/* Action Pill Buttons in Tables */
.action-btns { display: flex; gap: 6px; }
.btn-action {
    width: 28px; height: 22px; border-radius: 6px; border: 1px solid transparent;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    background: rgba(0,0,0,0.04); transition: all 0.2s; font-size: 13px;
}
.btn-action.view { color: #2563eb; background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.2); }
.btn-action.edit { color: #d97706; background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.2); }
.btn-action.delete { color: #dc2626; background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); }
.btn-action:hover { filter: brightness(0.9); transform: scale(1.05); }

/* Pagination Mockup Style */
.pagination {
    display: flex; justify-content: flex-start; align-items: center;
    margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.03); position: relative;
}
.page-num-text { color: var(--text-muted); font-size: 10px; }
.pagination-controls {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; background: rgba(0,0,0,0.2); padding: 4px;
    border-radius: 6px; border: 1px solid rgba(255,255,255,0.05);
}
.pagination-controls button {
    background: transparent; border: none; color: var(--text-muted);
    width: 24px; height: 24px; border-radius: 4px; cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
}
.pagination-controls button.active { background: rgba(37,99,235,0.1); color: #2563eb; border: 1px solid rgba(37,99,235,0.3); font-weight: bold; }
.pagination-controls button:hover:not(.active):not(:disabled) { background: rgba(0,0,0,0.05); color: var(--text-main); }
.pagination-controls button:disabled { opacity: 0.3; cursor: not-allowed; }


/* =========================================================
   MODALS
   ========================================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 5, 16, 0.8); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal {
    width: 100%; max-width: 500px; padding: 30px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: 0 10px 50px rgba(0,0,0,0.2);
    border-radius: 16px; transform: translateY(20px); transition: transform 0.3s ease;
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 15px; }
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--text-main); letter-spacing: 0.5px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.modal-header h3 i { color: var(--neon-cyan); font-size: 20px; }
.close-modal { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; transition: 0.2s; }
.close-modal:hover { color: var(--neon-red); }

/* Common UI Utilities */
.photo-box { background: rgba(0,0,0,0.03); padding: 15px; border-radius: 12px; text-align: center; border: 1px solid rgba(0,0,0,0.05); margin-bottom: 15px; }
.photo-box img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid rgba(0,0,0,0.1); }
.custom-select { background: rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.1); color: var(--text-main); font-size: 10px; padding: 6px 10px; border-radius: 6px; outline: none; cursor: pointer; }
.custom-select:focus { border-color: var(--neon-cyan); }

/* =========================================================
   RESPONSIVENESS (MOBILE & TABLET)
   ========================================================= */

/* Tablet (Max 1024px) */
@media (max-width: 1024px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .details-grid { grid-template-columns: 1fr !important; }
    .main-content { padding: 0 20px 20px 20px; }
    .search-bar { width: 250px; }
}

/* Mobile (Max 768px) */
@media (max-width: 768px) {
    /* Stack container vertically */
    .app-container { flex-direction: column; }
    
    /* Drawer Sidebar */
    .futuristic-sidebar {
        position: fixed !important;
        top: 0; left: 0; bottom: 0;
        height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 9999 !important;
    }
    
    /* When sidebar is open */
    .sidebar-open .futuristic-sidebar {
        transform: translateX(0);
    }
    
    /* Overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
        z-index: 9998;
    }
    .sidebar-open .sidebar-overlay {
        display: block;
    }
    
    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center; justify-content: center;
        background: transparent; border: none; color: white;
        font-size: 24px; cursor: pointer;
        padding: 5px; margin-right: 15px;
    }

    /* Main content padding adjustment for mobile */
    .main-content { padding: 15px 15px 30px 15px; width: 100%; overflow-x: hidden; } 
    
    /* Fix mobile background fixed bug */
    body { background-attachment: scroll !important; }
    
    /* Navbar adjustments */
    .top-navbar { justify-content: flex-end; gap: 10px; width: 100%; }
    .search-bar { width: 180px; }
    
    /* KPIs and Layouts */
    .dashboard-grid { grid-template-columns: 1fr !important; }
    .kpi-grid { grid-template-columns: 1fr !important; }
    .page-header h1 { font-size: 20px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .total-badge { align-self: flex-start; }
    
    /* Modals */
    .modal { padding: 20px; margin: 10px; width: 95%; max-height: 85vh; overflow-y: auto; }
    
    /* Tables */
    .panel-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .search-box { width: 100%; }
    .search-box input { width: 100%; }
    
    /* Make table horizontally scrollable */
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 700px; } /* Ensure it doesn't squish too much */
}

/* Small Mobile (Max 480px) */
@media (max-width: 480px) {
    .nav-avatar { width: 30px; height: 30px; }
    .nav-icon { width: 30px; height: 30px; font-size: 16px; }
    .search-bar input { font-size: 12px; padding-left: 35px; }
    .search-bar i { font-size: 14px; left: 12px; }
}
