/* Dash UI Complete Styles for PHP - Based on original theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css');
@import url('fonts/feather-icons/feather.css');

/* Bootstrap 5 variables override */
:root {
    --primary: #0a2d5e;
    --primary-dark: #081f42;
    --secondary: #6c757d;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --font-family-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-family-sans-serif);
    background-color: #f5f7fb;
    margin: 0;
    font-size: 0.875rem;
    color: #5c6c8a;
    line-height: 1.5;
}

/* Layout */
.wrapper { display: flex; min-height: 100vh; }
.main-content { flex: 1; padding: 20px; margin-left: 250px; transition: margin-left 0.3s ease; }
.sidebar { 
    width: 250px; 
    background: #0a2d5e; 
    color: white; 
    position: fixed; 
    height: 100vh; 
    overflow-y: auto;
    z-index: 1000;
    transition: margin-left 0.3s ease;
}
.sidebar.collapsed { margin-left: -250px; }
.sidebar-brand { padding: 20px; font-size: 1.2rem; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-nav { padding: 10px 0; }
.sidebar-nav .nav-item { padding: 8px 20px; }
.sidebar-nav .nav-link { 
    color: rgba(255,255,255,0.8); 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 10px 15px; 
    border-radius: 6px; 
    transition: all 0.3s ease; 
}
.sidebar-nav .nav-link:hover, 
.sidebar-nav .nav-link.active { 
    background: rgba(255,255,255,0.1); 
    color: white; 
}
.sidebar-nav .nav-link i { width: 20px; text-align: center; }

/* Topbar */
.topbar { 
    background: white; 
    padding: 15px 30px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
}
.topbar .toggle-sidebar { cursor: pointer; font-size: 1.2rem; color: #5c6c8a; }
.topbar .toggle-sidebar:hover { color: #0a2d5e; }

/* Cards */
.card { 
    background: white; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    border: none; 
    margin-bottom: 20px; 
}
.card-header { 
    background: transparent; 
    border-bottom: 1px solid #e9ecef; 
    padding: 15px 20px; 
    font-weight: 600; 
    color: #0a2d5e;
}
.card-body { padding: 20px; }

/* Stat Cards */
.stat-card { text-align: center; padding: 25px; }
.stat-card .stat-icon { font-size: 2rem; margin-bottom: 10px; color: #0a2d5e; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; color: #0a2d5e; }
.stat-card .stat-label { font-size: 0.85rem; color: #6c757d; }

/* Tables */
.table { width: 100%; margin-bottom: 1rem; color: #5c6c8a; }
.table th { 
    background: #f8f9fa; 
    padding: 12px 15px; 
    font-weight: 600; 
    border-bottom: 2px solid #e9ecef; 
    color: #0a2d5e; 
}
.table td { padding: 12px 15px; vertical-align: middle; border-bottom: 1px solid #e9ecef; }
.table-hover tbody tr:hover { background-color: rgba(10, 45, 94, 0.05); }
.table-sm td, .table-sm th { padding: 8px 10px; }

/* Buttons */
.btn { 
    padding: 8px 16px; 
    border-radius: 6px; 
    font-size: 0.875rem; 
    font-weight: 500; 
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}
.btn-primary { background: #0a2d5e; color: white; }
.btn-primary:hover { background: #081f42; color: white; }
.btn-success { background: #198754; color: white; }
.btn-success:hover { background: #146c43; color: white; }
.btn-warning { background: #ffc107; border-color: #ffc107; color: #000; }
.btn-warning:hover { background: #ffca2c; color: #000; }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #b02a37; color: white; }
.btn-info { background: #0dcaf0; color: white; }
.btn-info:hover { background: #31d2f2; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5c636a; color: white; }
.btn-sm { padding: 5px 10px; font-size: 0.75rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.w-100 { width: 100%; }
.d-grid { display: grid; }
.gap-2 { gap: 0.5rem; }

/* Badges */
.badge { 
    padding: 5px 10px; 
    border-radius: 4px; 
    font-size: 0.75rem; 
    font-weight: 600; 
    display: inline-block;
}
.bg-success { background: #198754 !important; color: white !important; }
.bg-warning { background: #ffc107 !important; color: #000 !important; }
.bg-danger { background: #dc3545 !important; color: white !important; }
.bg-info { background: #0dcaf0 !important; color: white !important; }
.bg-secondary { background: #6c757d !important; color: white !important; }

/* Forms */
.form-control { 
    padding: 10px 15px; 
    border-radius: 6px; 
    border: 1px solid #dee2e6; 
    width: 100%; 
    font-size: 0.875rem;
    font-family: var(--font-family-sans-serif);
    transition: border-color 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: #0a2d5e;
    box-shadow: 0 0 0 0.2rem rgba(10, 45, 94, 0.25);
}
.form-label { 
    margin-bottom: 0.5rem; 
    font-weight: 500; 
    color: #0a2d5e; 
    display: block;
}
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 1rem; }

/* Alerts */
.alert { 
    padding: 15px 20px; 
    border-radius: 6px; 
    margin-bottom: 1rem; 
    border: 1px solid transparent;
}
.alert-danger { background: #f8d7da; color: #842029; border-color: #f5c2c7; }
.alert-success { background: #d1e7dd; color: #0f5132; border-color: #badbcc; }
.alert-warning { background: #fff3cd; color: #664d03; border-color: #ffecb5; }
.alert-info { background: #cff4fc; color: #055160; border-color: #b6effb; }

/* Login */
.login-container { 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: linear-gradient(135deg, #0a2d5e 0%, #1a4a8a 100%); 
    padding: 20px;
}
.login-card { 
    width: 100%; 
    max-width: 400px; 
    background: white; 
    border-radius: 10px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); 
    overflow: hidden;
}
.login-header { 
    background: #0a2d5e; 
    color: white; 
    padding: 30px; 
    text-align: center; 
}
.login-header h3 { margin: 10px 0 5px; }
.login-header p { margin: 0; opacity: 0.8; }
.login-body { padding: 30px; }

/* Utility */
.d-flex { display: flex; }
.gap-1 { gap: 0.25rem; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-white { color: white !important; }
.text-muted { color: #6c757d !important; }
.text-success { color: #198754 !important; }
.fw-bold { font-weight: 700 !important; }
.mb-0 { margin-bottom: 0 !important; }
.ms-3 { margin-left: 1rem !important; }
.me-3 { margin-right: 1rem !important; }
.p-0 { padding: 0 !important; }
.small { font-size: 0.875em; }

/* Row/Col */
.row { display: flex; flex-wrap: wrap; margin: -10px; }
.col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 10px; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; padding: 10px; }
.col-lg-8 { flex: 0 0 66.667%; max-width: 66.667%; padding: 10px; }
.col-xl-3 { flex: 0 0 25%; max-width: 25%; padding: 10px; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 10px; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 10px; }

/* Table responsive */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Max heights */
.max-height-400 { max-height: 400px; overflow-y: auto; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { margin-left: -250px; }
    .sidebar.active { margin-left: 0; }
    .main-content { margin-left: 0 !important; padding: 10px; }
    .mobile-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 999; }
    .mobile-overlay.active { display: block; }
    .col-lg-4, .col-lg-6, .col-lg-8, .col-xl-3, .col-md-6 { flex: 0 0 100%; max-width: 100%; }
    .topbar { padding: 10px 15px; }
    .card-body { padding: 15px; }
    .stat-card { padding: 15px; }
    .stat-card .stat-value { font-size: 1.4rem; }
}
