/* ===================================
   Admin Dashboard CSS
   =================================== */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --navbar-height: 70px;
    --sidebar-bg: #2d3748;
    --sidebar-hover: #374151;
    --text-muted: #6c757d;
    --border-color: #e2e8f0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* ===================================
   Wrapper & Layout
   =================================== */

.wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    padding: 30px;
    margin-top: var(--navbar-height);
}

/* ===================================
   Sidebar
   =================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.sidebar-header .brand i {
    font-size: 28px;
    color: var(--primary-color);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    display: none;
}

.sidebar-user {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    font-size: 40px;
    color: var(--primary-color);
}

.user-info h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.user-info small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: white;
}

.sidebar-nav .nav-link.active {
    background: var(--sidebar-hover);
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-nav .nav-link i {
    font-size: 20px;
    width: 24px;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 20px;
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================================
   Top Navbar
   =================================== */

.top-navbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--navbar-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    transition: left 0.3s ease;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 30px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    color: #333;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-right .nav-link {
    position: relative;
    color: #333;
    font-size: 20px;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.navbar-right .nav-link:hover {
    background: #f8f9fa;
}

.navbar-right .nav-link .badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px !important;
}

/* ===================================
   Footer
   =================================== */

.admin-footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 20px 30px;
    margin-top: auto;
}

.admin-footer p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===================================
   Content Styles
   =================================== */

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.page-header .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    font-weight: 600;
    font-size: 16px;
}

.card-body {
    padding: 20px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.stat-card h3 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
}

.stat-card i {
    font-size: 48px;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* ===================================
   Buttons
   =================================== */

.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ===================================
   Tables
   =================================== */

.table {
    background: white;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--text-muted);
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* ===================================
   Forms
   =================================== */

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ===================================
   Badges
   =================================== */

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 992px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-navbar {
        left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .content-wrapper {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .navbar-content {
        padding: 0 15px;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .page-title {
        font-size: 18px;
    }
}

/* ===================================
   Utilities
   =================================== */

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: var(--primary-color) !important;
}

.position-relative {
    position: relative;
}
