/* ===== Admin Panel CSS ===== */
:root {
    --gold-500: #d4af37;
    --gold-600: #b8860b;
    --black: #000;
    --white: #fff;
    --zinc-50: #fafafa;
    --zinc-100: #f4f4f5;
    --zinc-200: #e4e4e7;
    --zinc-300: #d4d4d8;
    --zinc-400: #a1a1aa;
    --zinc-500: #71717a;
    --zinc-600: #52525b;
    --zinc-700: #3f3f46;
    --zinc-800: #27272a;
    --zinc-900: #18181b;
    --red-500: #ef4444;
    --green-500: #22c55e;
    --blue-500: #3b82f6;
}

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

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--zinc-800);
    background: var(--zinc-100);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--zinc-900) 0%, var(--zinc-800) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-box {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold-500);
    letter-spacing: 0.1em;
}

.login-header p {
    color: var(--zinc-500);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--zinc-700);
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--zinc-400);
}

.input-icon input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1px solid var(--zinc-300);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.input-icon input:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: var(--zinc-800);
}

.btn-gold {
    background: var(--gold-500);
    color: var(--black);
}

.btn-gold:hover {
    background: var(--gold-600);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--zinc-300);
    color: var(--zinc-700);
}

.btn-outline:hover {
    background: var(--zinc-100);
}

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

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

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--zinc-200);
    text-align: center;
    font-size: 0.75rem;
    color: var(--zinc-500);
}

.login-footer code {
    background: var(--zinc-100);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: monospace;
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background: #fef2f2;
    color: var(--red-500);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--green-500);
    border: 1px solid #bbf7d0;
}

/* ===== Admin Layout ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--zinc-900);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--zinc-800);
}

.sidebar-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-500);
    letter-spacing: 0.1em;
}

.sidebar-logo span {
    display: block;
    font-size: 0.625rem;
    color: var(--zinc-500);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--zinc-400);
    transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    background: var(--zinc-800);
    color: var(--white);
}

.nav-item.active {
    border-left: 3px solid var(--gold-500);
}

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

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--zinc-800);
    margin-top: auto;
}

.sidebar-footer a {
    color: var(--zinc-500);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-footer a:hover {
    color: var(--gold-500);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ===== Cards ===== */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--zinc-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
}

.card-body {
    padding: 1.5rem;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.gold {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-600);
}

.stat-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green-500);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-500);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-500);
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--zinc-900);
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--zinc-500);
    margin-top: 0.25rem;
}

/* ===== Table ===== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--zinc-200);
}

th {
    font-weight: 600;
    color: var(--zinc-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--zinc-50);
}

td {
    vertical-align: middle;
}

.table-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 50px;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.action-btn.edit {
    background: var(--zinc-100);
    color: var(--zinc-600);
}

.action-btn.edit:hover {
    background: var(--blue-500);
    color: var(--white);
}

.action-btn.delete {
    background: var(--zinc-100);
    color: var(--zinc-600);
}

.action-btn.delete:hover {
    background: var(--red-500);
    color: var(--white);
}

/* ===== Forms ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--zinc-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--zinc-300);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

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

.form-hint {
    font-size: 0.75rem;
    color: var(--zinc-500);
    margin-top: 0.25rem;
}

/* ===== Image Upload ===== */
.image-upload {
    border: 2px dashed var(--zinc-300);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload:hover {
    border-color: var(--gold-500);
    background: rgba(212, 175, 55, 0.05);
}

.image-upload i {
    font-size: 2rem;
    color: var(--zinc-400);
    margin-bottom: 0.75rem;
}

.image-upload p {
    color: var(--zinc-600);
    margin-bottom: 0.5rem;
}

.image-upload span {
    font-size: 0.75rem;
    color: var(--zinc-400);
}

.image-preview {
    margin-top: 1rem;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* ===== Checkbox ===== */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold-500);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--zinc-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-weight: 600;
}

.modal-close {
    font-size: 1.25rem;
    color: var(--zinc-500);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--zinc-200);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--zinc-500);
}

.empty-state i {
    font-size: 3rem;
    color: var(--zinc-300);
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
