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

:root {
    --primary-color: #13284B;
    --accent-color: #C8AE72;
    --light-color: #FAF8F4;
    --gray-color: #F2F4F7;
    --text-dark: #1A1A1A;
    --text-gray: #6B7280;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
}

body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    background-color: var(--gray-color);
    color: var(--text-dark);
    line-height: 1.6;
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1D3B6A 100%);
    color: white;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    right: 0;
}

.sidebar-header {
    margin-bottom: 40px;
    text-align: center;
    border-bottom: 2px solid rgba(200, 174, 114, 0.3);
    padding-bottom: 20px;
}

.sidebar-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--accent-color);
    color: white;
    transform: translateX(-5px);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-right: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-left h2 {
    color: var(--primary-color);
    font-size: 24px;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    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;
    color: white;
    font-size: 28px;
}

.stat-info h3 {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quick-actions h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Forms */
.form-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.form-container h3,
.form-container h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(200, 174, 114, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0d1e38;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #D97706;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header h3 {
    color: var(--primary-color);
    font-size: 20px;
}

/* Items List */
.items-list {
    display: grid;
    gap: 15px;
}

.item-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.item-card:hover {
    transform: translateX(-5px);
}

.item-info h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.item-info p {
    color: var(--text-gray);
    font-size: 14px;
}

.item-actions {
    display: flex;
    gap: 10px;
}

.item-actions .btn {
    padding: 8px 12px;
    font-size: 12px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-item-info {
    padding: 15px;
}

.gallery-item-info h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 14px;
}

.gallery-item-info p {
    color: var(--text-gray);
    font-size: 12px;
    margin-bottom: 10px;
}

.gallery-item-actions {
    display: flex;
    gap: 10px;
}

.gallery-item-actions .btn {
    flex: 1;
    padding: 8px;
    font-size: 12px;
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    text-align: center;
}

.close {
    color: var(--text-gray);
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--text-dark);
}

#alert-message {
    margin: 20px 0;
    color: var(--text-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
    }

    .main-content {
        margin-right: 0;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
