/* ── ADMIN PANEL CSS ────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --brand:      #7C3AED;
    --brand-dark: #5B21B6;
    --sidebar-bg: #1E1B4B;
}

* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; }

/* ── SIDEBAR ────────────────────────────────────────── */
.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255,255,255,0.05);
}

.nav-section {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6366f1;
    padding: 0.75rem 0.75rem 0.25rem;
    margin-top: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.625rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #c4b5fd;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-item:hover { background: #312E81; color: white; }
.nav-item.active { background: #4C1D95; color: white; font-weight: 600; }

.nav-icon { width: 1rem; height: 1rem; flex-shrink: 0; }

/* ── STAT CARDS ─────────────────────────────────────── */
.stat-card {
    border-radius: 1.25rem;
    padding: 1.25rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    width: 5rem;
    height: 5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.75rem; opacity: 0.85; margin-top: 0.25rem; font-weight: 500; }

/* ── STATUS BADGES ──────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.status-pending   { background: #FEF3C7; color: #92400E; }
.status-confirmed { background: #D1FAE5; color: #065F46; }
.status-cancelled { background: #FEE2E2; color: #991B1B; }
.status-active    { background: #D1FAE5; color: #065F46; }
.status-inactive  { background: #F3F4F6; color: #6B7280; }
.status-suspended { background: #FEE2E2; color: #991B1B; }
.status-processing{ background: #DBEAFE; color: #1E40AF; }
.status-shipped   { background: #EDE9FE; color: #5B21B6; }
.status-delivered { background: #D1FAE5; color: #065F46; }

/* ── TABLES ─────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6B7280;
    background: #F9FAFB;
    border-bottom: 1px solid #F0F0F0;
}
.admin-table td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid #F9FAFB;
    color: #374151;
}
.admin-table tr:hover td { background: #FAFAFA; }

/* ── FORMS ──────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}
.form-control {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1.5px solid #E5E7EB;
    border-radius: 0.6rem;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    outline: none;
    color: #1F2937;
    background: white;
}
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }

.form-section {
    background: white;
    border-radius: 1rem;
    border: 1px solid #E5E7EB;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.form-section-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #F3F4F6;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1F2937;
    background: #F9FAFB;
}
.form-section-body { padding: 1.25rem; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary   { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-secondary { background: #F3F4F6; color: #374151; }
.btn-secondary:hover { background: #E5E7EB; }
.btn-danger    { background: #FEE2E2; color: #DC2626; }
.btn-danger:hover { background: #FECACA; }
.btn-success   { background: #D1FAE5; color: #059669; }
.btn-success:hover { background: #A7F3D0; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.75rem; }

/* ── QUICK ACTION BUTTONS ────────────────────────────── */
.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.3rem;
}
.quick-action-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* ── IMAGE UPLOAD ────────────────────────────────────── */
.img-upload-area {
    border: 2px dashed #D1D5DB;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #F9FAFB;
}
.img-upload-area:hover { border-color: var(--brand); background: rgba(124,58,237,0.03); }
.img-upload-area.dragover { border-color: var(--brand); background: rgba(124,58,237,0.05); }

/* ── PAGINATION ─────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 0.35rem; }
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid #E5E7EB;
    color: #374151;
    text-decoration: none;
    background: white;
}
.page-btn:hover, .page-btn.active { background: var(--brand); color: white; border-color: var(--brand); }

/* ── TOGGLE SWITCH ──────────────────────────────────── */
.toggle { position: relative; display: inline-block; width: 3rem; height: 1.5rem; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #D1D5DB; border-radius: 9999px; transition: 0.3s;
}
.toggle-slider::before {
    content: ''; position: absolute; height: 1.1rem; width: 1.1rem;
    left: 0.25rem; bottom: 0.2rem; background: white;
    border-radius: 50%; transition: 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--brand); }
.toggle input:checked + .toggle-slider::before { transform: translateX(1.5rem); }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    #admin-main { margin-left: 0; }
}

/* ── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #F3F4F6; }
::-webkit-scrollbar-thumb { background: #9CA3AF; border-radius: 9999px; }

/* ── IMAGE GRID ─────────────────────────────────────── */
.img-thumb {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.2s;
}
.img-thumb:hover { transform: scale(1.05); }
