/* Admin CSS Variables - Redesign */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --sidebar-bg: #0B1B34;
    --sidebar-text: #c2c7d0;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active: #0d6efd;
    --text-main: #333333;
    --text-light: #777777;
    --text-muted: #999999;
    --bg-light: #F5F7FB;
    --white: #ffffff;
    --border-color: #eaeaea;
    --font-main: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --border-radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
ul { list-style: none; margin: 0; padding: 0; }
body { font-family: var(--font-main); background-color: var(--bg-light); color: var(--text-main); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
.text-primary { color: var(--primary-color) !important; }
.text-success { color: #198754 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; font-weight: 500; cursor: pointer; border: 1px solid transparent; font-size: 14px; transition: all 0.2s; }
.btn-primary { background: var(--primary-color); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); color: var(--white); }
.btn-outline-primary { background: transparent; border-color: var(--primary-color); color: var(--primary-color); }
.btn-outline-primary:hover { background: var(--primary-color); color: var(--white); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: #dc3545; color: white; }
.btn-info { background: #0dcaf0; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-outline-info { border: 1px solid #0dcaf0; color: #0dcaf0; background: transparent; }
.btn-outline-secondary { border: 1px solid #6c757d; color: #6c757d; background: transparent; }

/* Badges */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.bg-success { background-color: #d1e7dd; color: #0f5132; }
.bg-danger { background-color: #f8d7da; color: #842029; }
.bg-secondary { background-color: #e2e3e5; color: #41464b; }
.bg-warning { background-color: #fff3cd; color: #664d03; }

/* Layout Structure */
.admin-wrapper { display: flex; height: 100vh; overflow: hidden; }
.main-content-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Sidebar */
.sidebar { width: 260px; background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; flex-shrink: 0; transition: width 0.3s ease; overflow-y: auto; overflow-x: hidden; }
.sidebar.collapsed { width: 70px; }
.sidebar.collapsed .sidebar-header h2 { display: none; }
.sidebar.collapsed .sidebar-nav li a span { display: none; }
.sidebar-header { padding: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sidebar-header .logo-icon { width: 32px; height: 32px; background: var(--primary-color); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; }
.sidebar-header h2 { font-size: 18px; font-weight: 700; color: var(--white); line-height: 1.2; letter-spacing: -0.5px; }

.sidebar-nav { padding: 10px 0; flex: 1; margin: 0; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav li a { display: flex; align-items: center; padding: 12px 20px; font-size: 14px; color: var(--sidebar-text); transition: all 0.2s; border-left: 3px solid transparent; text-decoration: none; }
.sidebar-nav li a:hover { background: var(--sidebar-hover); color: var(--white); text-decoration: none; }
.sidebar-nav li a i { width: 20px; text-align: center; margin-right: 12px; font-size: 15px; }
.sidebar-nav li.active a { background: var(--sidebar-active); color: var(--white); border-left-color: var(--sidebar-active); border-radius: 0 25px 25px 0; margin-right: 15px; }
.nav-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 15px 0; }
.logout-link { color: #f87171 !important; }

/* Topbar */
.admin-topbar { height: 64px; background: var(--white); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 20px; }
.btn-toggle-sidebar { background: transparent; border: none; font-size: 18px; color: var(--text-light); cursor: pointer; padding: 5px; }
.search-bar { display: flex; align-items: center; background: var(--bg-light); padding: 8px 16px; border-radius: 20px; width: 300px; }
.search-bar i { color: var(--text-muted); margin-right: 10px; }
.search-bar input { border: none; background: transparent; outline: none; width: 100%; font-size: 14px; font-family: inherit; }
.notification-icon { position: relative; font-size: 18px; color: var(--text-light); cursor: pointer; }
.notification-icon .badge { position: absolute; top: -5px; right: -8px; background: var(--primary-color); color: white; font-size: 10px; padding: 2px 5px; border-radius: 10px; border: 2px solid white; }
.admin-profile { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.admin-profile .avatar { width: 36px; height: 36px; background: #0B1B34; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.admin-profile .info { display: flex; flex-direction: column; }
.admin-profile .name { font-size: 14px; font-weight: 600; color: var(--text-main); }
.admin-profile .role { font-size: 12px; color: var(--text-light); }

/* Main Content */
.main-content, .admin-main { flex: 1; overflow-y: auto; padding: 24px; background: var(--bg-light); height: 100%; }
.content-header { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; background: transparent; padding: 0; border: none; }
.content-header h1 { font-size: 24px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.content-header p { font-size: 14px; color: var(--text-light); margin: 0; }

/* Dashboard Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card { background: var(--white); padding: 20px; border-radius: var(--border-radius); box-shadow: var(--shadow-sm); display: flex; align-items: flex-start; justify-content: space-between; border: 1px solid var(--border-color); }
.stat-card .info h4 { font-size: 14px; color: var(--text-light); font-weight: 500; margin-bottom: 8px; }
.stat-card .info h2 { font-size: 28px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.stat-card .info p { font-size: 12px; font-weight: 500; }
.stat-card .icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-blue .icon { background: #e7f1ff; color: #0d6efd; }
.stat-green .icon { background: #e6f4ea; color: #198754; }
.stat-orange .icon { background: #fff3cd; color: #ffc107; }
.stat-purple .icon { background: #f3e8ff; color: #a855f7; }

/* Dashboard Sections */
.dashboard-sections { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.section-card { background: var(--white); border-radius: var(--border-radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); padding: 20px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header h3 { font-size: 16px; font-weight: 600; color: var(--text-main); }
.view-all { font-size: 13px; color: var(--primary-color); font-weight: 500; }

/* Tables */
.card { background: var(--white); border-radius: var(--border-radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); margin-bottom: 24px; overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border-color); background: var(--white); }
.card-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.card-body { padding: 20px; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.table th { background: #fafafa; font-weight: 600; color: var(--text-light); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.table tbody tr:hover { background: #fafafa; }
.table img { border-radius: 4px; box-shadow: var(--shadow-sm); }

/* Forms */
.form-group, .mb-3 { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-main); }
.form-control { width: 100%; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 6px; font-family: inherit; font-size: 14px; transition: border 0.2s; }
.form-control:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(13,110,253,0.1); }
textarea.form-control { min-height: 100px; resize: vertical; }

/* Responsive */
@media (max-width: 992px) {
    .dashboard-sections { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { position: fixed; height: 100vh; z-index: 1000; transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .search-bar { display: none; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Alert */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 24px; font-size: 14px; }
.alert-success { background: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }
.alert-danger { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }
