:root {
    --admin-primary: #667eea;
    --admin-secondary: #764ba2;
    --admin-success: #00c9a7;
    --admin-warning: #f59e0b;
    --admin-danger: #ef4444;
    --admin-dark: #1e293b;
    --admin-sidebar: #0f172a;
    --admin-bg: #f1f5f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--admin-bg);
    color: #334155;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header img {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.8rem;
    color: var(--admin-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #64748b;
}

/* Admin Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--admin-sidebar);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-menu {
    padding: 1rem 0;
}

.menu-item {
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--admin-primary);
}

.menu-item i {
    width: 20px;
    font-size: 1.2rem;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

/* Top Bar */
.topbar {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    font-size: 1.8rem;
    color: var(--admin-dark);
}

.topbar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-secondary));
    color: white;
}

.stat-icon.success {
    background: rgba(0, 201, 167, 0.1);
    color: var(--admin-success);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--admin-warning);
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--admin-danger);
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--admin-dark);
    margin-bottom: 0.3rem;
}

.stat-info p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Table */
.table-container {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8fafc;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--admin-dark);
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

tr:hover {
    background: #f8fafc;
}

/* Buttons */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: var(--admin-success);
    color: white;
}

.btn-warning {
    background: var(--admin-warning);
    color: white;
}

.btn-danger {
    background: var(--admin-danger);
    color: white;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--admin-dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

/* File Upload */
.file-upload {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: var(--admin-primary);
    background: #f8fafc;
}

.file-upload input[type="file"] {
    display: none;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: rgba(0, 201, 167, 0.1);
    color: var(--admin-success);
    border-left: 4px solid var(--admin-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--admin-danger);
    border-left: 4px solid var(--admin-danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--admin-warning);
    border-left: 4px solid var(--admin-warning);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: #64748b;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(0, 201, 167, 0.1);
    color: var(--admin-success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--admin-danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--admin-warning);
}

/* Image Preview */
.image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
