/* Admin Panel CSS */

:root {
    --admin-primary: #0d6efd;
    --admin-secondary: #6c757d;
    --admin-success: #198754;
    --admin-danger: #dc3545;
    --admin-warning: #ffc107;
    --admin-info: #0dcaf0;
    --admin-dark: #212529;
    --admin-light: #f8f9fa;
    --sidebar-width: 250px;
}

/* Login Page */
body.bg-light {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.card {
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--admin-primary), #0056b3) !important;
}

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--admin-dark);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.admin-sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.5rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
    border-left: 3px solid var(--admin-primary);
}

.sidebar-menu .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
}

.sidebar-menu .nav-item.has-submenu > .nav-link::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.sidebar-menu .nav-item.has-submenu.show > .nav-link::after {
    transform: rotate(180deg);
}

.sidebar-submenu {
    background: rgba(0,0,0,0.2);
    padding: 0;
}

.sidebar-submenu .nav-link {
    padding-left: 3rem;
    font-size: 0.9rem;
}

/* Main Content */
.admin-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
}

.admin-content.full-width {
    margin-left: 0;
}

/* Admin Header */
.admin-header {
    background: white;
    border-bottom: 1px solid #dee2e6;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.admin-header .navbar {
    padding: 0.5rem 1.5rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--admin-dark);
    margin-right: 1rem;
}

.admin-breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.admin-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    font-weight: bold;
}

/* Admin Main Content */
.admin-main {
    padding: 2rem 1.5rem;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: var(--admin-dark);
}

.page-header p {
    margin: 0.5rem 0 0 0;
    color: var(--admin-secondary);
}

/* Stats Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.bg-primary { background: var(--admin-primary); }
.stat-icon.bg-success { background: var(--admin-success); }
.stat-icon.bg-warning { background: var(--admin-warning); }
.stat-icon.bg-info { background: var(--admin-info); }

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.stat-label {
    color: var(--admin-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Data Tables */
.table-responsive {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table {
    margin: 0;
}

.table th {
    background: var(--admin-light);
    border-top: none;
    font-weight: 600;
    color: var(--admin-dark);
}

.table td {
    vertical-align: middle;
}

.table .badge {
    font-size: 0.75rem;
}

/* Action Buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin: 0 0.1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--admin-dark);
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: var(--admin-primary);
}

.image-upload-area.dragover {
    border-color: var(--admin-success);
    background: rgba(25, 135, 84, 0.1);
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    margin-top: 1rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card .card-body {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* Dark Mode (Future) */
.admin-dark-mode {
    --admin-light: #2d3748;
    --admin-dark: #1a202c;
}

.admin-dark-mode .admin-content {
    background: var(--admin-dark);
    color: white;
}

.admin-dark-mode .card {
    background: var(--admin-light);
    color: white;
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}