/* ============================================================
   BAZAR PORTAL — Admin Panel Design System
   Konsept: Tünd göy kənar panel + isti krem məzmun
   Şriftlər: Sora (başlıqlar) + Plus Jakarta Sans (gövdə)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Dəyişənləri ─────────────────────────────────────── */
:root {
    --sidebar-bg:      #1C1033;
    --sidebar-hover:   rgba(255,255,255,0.07);
    --sidebar-active:  rgba(255,255,255,0.12);
    --sidebar-border:  rgba(255,255,255,0.06);
    --sidebar-text:    rgba(255,255,255,0.65);
    --sidebar-text-active: #fff;
    --sidebar-width:   260px;

    --accent:          #F0A500;
    --accent-hover:    #D4920A;
    --accent-light:    rgba(240,165,0,0.12);

    --bg-main:         #F7F4EF;
    --bg-card:         #FFFFFF;
    --bg-input:        #F9F7F4;

    --text-primary:    #1C1033;
    --text-secondary:  #6B6580;
    --text-muted:      #A09BB5;

    --border:          #EBE7E0;
    --shadow-sm:       0 1px 3px rgba(28,16,51,0.06), 0 1px 2px rgba(28,16,51,0.04);
    --shadow-md:       0 4px 16px rgba(28,16,51,0.08), 0 2px 6px rgba(28,16,51,0.05);
    --shadow-lg:       0 12px 40px rgba(28,16,51,0.12);

    --radius-sm:       8px;
    --radius-md:       12px;
    --radius-lg:       18px;

    --transition:      all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Sora', sans-serif;
    color: var(--text-primary);
    font-weight: 600;
}

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

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.sidebar-brand {
    padding: 28px 24px 24px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-brand-icon {
    width: 38px; height: 38px;
    background: var(--accent);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(240,165,0,0.35);
}

.sidebar-brand-title {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: 11px;
    color: var(--sidebar-text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 12px;
    scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sidebar-text);
    padding: 14px 12px 6px;
    opacity: 0.5;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    position: relative;
}

.sidebar-link:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }

.sidebar-link.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.sidebar-link-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 15px;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-link.active .sidebar-link-icon {
    background: var(--accent);
}

.sidebar-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 10px 12px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-avatar {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-footer-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer-role { font-size: 11px; color: var(--sidebar-text); }

.sidebar-logout {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: var(--sidebar-text);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    text-decoration: none;
}

.sidebar-logout:hover { background: rgba(255,80,80,0.2); color: #ff6b6b; }

/* ── Main Content ────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.topbar-title {
    font-family: 'Sora', sans-serif;
    font-size: 17px;
    font-weight: 600;
}

.topbar-right { display: flex; align-items: center; gap: 16px; }

.topbar-time { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ── Page Body ───────────────────────────────────────────── */
.page-body { padding: 32px; flex: 1; animation: fadeIn 0.3s ease; }

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-header h4 { font-size: 22px; font-weight: 700; }
.page-header p { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }

/* ── Stat Cards ──────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card:nth-child(1)::after { background: #6366F1; }
.stat-card:nth-child(2)::after { background: #10B981; }
.stat-card:nth-child(3)::after { background: var(--accent); }
.stat-card:nth-child(4)::after { background: #EC4899; }

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon-purple { background: rgba(99,102,241,0.1); }
.stat-icon-green  { background: rgba(16,185,129,0.1); }
.stat-icon-amber  { background: rgba(240,165,0,0.1); }
.stat-icon-pink   { background: rgba(236,72,153,0.1); }

.stat-value {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
}

.card:last-child { margin-bottom: 0; }

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-title {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.card-body { padding: 24px; }

/* ── Table ───────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

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

.data-table thead th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(28,16,51,0.02); }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: rgba(16,185,129,0.1); color: #059669; }
.badge-danger  { background: rgba(239,68,68,0.1);  color: #DC2626; }
.badge-warning { background: rgba(240,165,0,0.1);  color: #B45309; }
.badge-info    { background: rgba(59,130,246,0.1); color: #2563EB; }
.badge-muted   { background: rgba(107,101,128,0.1);color: #6B6580; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(240,165,0,0.3); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 14px rgba(240,165,0,0.4); color:#fff; text-decoration:none; }

.btn-secondary { background: var(--bg-main); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); color: var(--text-primary); text-decoration:none; }

.btn-success { background: #10B981; color: #fff; }
.btn-success:hover { background: #059669; color:#fff; text-decoration:none; }

.btn-danger { background: rgba(239,68,68,0.1); color: #DC2626; }
.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13.5px;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
    appearance: none;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px var(--accent-light);
}

textarea.form-control { resize: vertical; min-height: 90px; }

.form-row { display: grid; gap: 16px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.color-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    transition: var(--transition);
}

.color-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.color-swatch {
    width: 28px; height: 28px;
    border-radius: 6px;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.color-hex {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    font-weight: 500;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    border: 1.5px solid transparent;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); color: #047857; }
.alert-danger  { background: rgba(239,68,68,0.08);  border-color: rgba(239,68,68,0.2);  color: #B91C1C; }
.alert-warning { background: rgba(240,165,0,0.08);  border-color: rgba(240,165,0,0.25); color: #92400E; }

/* ── Utils ───────────────────────────────────────────────── */
.mb-0{margin-bottom:0}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:18px}.mb-4{margin-bottom:24px}
.mt-2{margin-top:12px}.mt-3{margin-top:18px}.mt-4{margin-top:24px}
.d-flex{display:flex}.align-center{align-items:center}.justify-between{justify-content:space-between}
.gap-2{gap:8px}.gap-3{gap:12px}.flex-1{flex:1}
.text-muted{color:var(--text-muted);font-size:12px}
.w-100{width:100%}

/* ── GİRİŞ SƏHİFƏSİ ─────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(240,165,0,0.12) 0%, transparent 70%);
    top: -100px; right: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
    bottom: -50px; left: -50px;
    border-radius: 50%;
    pointer-events: none;
}

.login-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 80px rgba(0,0,0,0.4);
    animation: fadeIn 0.4s ease;
}

.login-logo { text-align: center; margin-bottom: 36px; }

.login-logo-icon {
    width: 64px; height: 64px;
    background: var(--accent);
    border-radius: 18px;
    display: inline-grid;
    place-items: center;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(240,165,0,0.4);
    margin-bottom: 16px;
}

.login-logo-title {
    font-family: 'Sora', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.login-logo-sub { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 4px; }

.login-card .form-label { color: rgba(255,255,255,0.65); }

.login-card .form-control {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
}

.login-card .form-control::placeholder { color: rgba(255,255,255,0.3); }

.login-card .form-control:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240,165,0,0.2);
}

.login-btn {
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.03em;
    box-shadow: 0 4px 16px rgba(240,165,0,0.35);
    margin-top: 8px;
}

.login-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 24px rgba(240,165,0,0.5);
    transform: translateY(-1px);
}

.login-btn:active { transform: translateY(0); }

.login-card .alert-danger {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.25);
    color: #FCA5A5;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.empty-state-text { font-size: 13px; margin-top: 6px; }

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

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; }
    .form-row-2, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
    .page-body { padding: 20px 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}
