/* ───────────────────────────────────────────────
   LOCAL FONTS (self-hosted, Google Fonts'siz)
   Mobil tarmoqda tashqi CDN'ga bog'liqlikni yo'qotish uchun.
   ─────────────────────────────────────────────── */
/* latin-ext */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Outfit-600-latin-ext.6a2414e384c3.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Outfit-600-latin.fdf9c509a809.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Outfit-600-latin-ext.6a2414e384c3.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Outfit-600-latin.fdf9c509a809.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/Outfit-600-latin-ext.6a2414e384c3.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/Outfit-600-latin.fdf9c509a809.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-cyrillic-ext.fc53fed22c66.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-vietnamese.c5c239782d4c.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-latin-ext.341687eeeb6a.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-latin.7660bd9909fb.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-cyrillic-ext.fc53fed22c66.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-vietnamese.c5c239782d4c.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-latin-ext.341687eeeb6a.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-latin.7660bd9909fb.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-cyrillic-ext.fc53fed22c66.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-vietnamese.c5c239782d4c.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-latin-ext.341687eeeb6a.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-latin.7660bd9909fb.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-cyrillic-ext.fc53fed22c66.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-vietnamese.c5c239782d4c.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-latin-ext.341687eeeb6a.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/PlusJakartaSans-400-latin.7660bd9909fb.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
    --bg-main:          #0b0c10;
    --bg-sidebar:       #12131c;
    --bg-card:          rgba(22, 23, 34, 0.75);
    --bg-card-hover:    rgba(30, 31, 46, 0.92);
    --bg-input:         rgba(255, 255, 255, 0.03);
    --bg-input-focus:   rgba(99, 102, 241, 0.06);

    --accent:           #6366f1;
    --accent-light:     #818cf8;
    --accent-glow:      rgba(99, 102, 241, 0.3);
    --accent-hover:     #4f46e5;

    --success:          #10b981;
    --success-glow:     rgba(16, 185, 129, 0.2);
    --warning:          #f59e0b;
    --warning-glow:     rgba(245, 158, 11, 0.2);
    --danger:           #ef4444;
    --danger-glow:      rgba(239, 68, 68, 0.2);
    --info:             #06b6d4;
    --info-glow:        rgba(6, 182, 212, 0.2);

    --text-primary:     #f1f5f9;
    --text-secondary:   #94a3b8;
    --text-muted:       #64748b;

    --border-color:     rgba(255, 255, 255, 0.08);
    --border-hover:     rgba(255, 255, 255, 0.16);
    --border-focus:     rgba(99, 102, 241, 0.5);

    --shadow-sm:        0 2px 8px -1px rgba(0, 0, 0, 0.4);
    --shadow-md:        0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg:        0 12px 40px -4px rgba(0, 0, 0, 0.7);
    --glass-shadow:     0 8px 32px rgba(0, 0, 0, 0.37);

    --radius-xs:        6px;
    --radius-sm:        10px;
    --radius-md:        14px;
    --radius-lg:        20px;
    --radius-xl:        28px;

    --sidebar-width:            260px;
    --sidebar-collapsed-width:  80px;
    --header-height:            68px;

    --transition-fast:   0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.32s cubic-bezier(0.4, 0, 0.2, 1);

    --input-h-sm: 38px;
    --input-h-md: 46px;
    --input-h-lg: 52px;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    animation: pageIn .3s ease both;
}

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

::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════
   LAYOUT SHELL
═══════════════════════════════════════════════ */
.app-container { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    position: fixed; height: 100vh; z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex; align-items: center;
    padding: 0 22px; border-bottom: 1px solid var(--border-color);
    gap: 12px; flex-shrink: 0;
}

.brand-logo {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--info));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 20px;
    box-shadow: 0 0 18px var(--accent-glow);
    font-family: 'Outfit', sans-serif; flex-shrink: 0;
}

.brand-name {
    font-size: 20px; font-weight: 700;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: .4px;
}

.sidebar-menu {
    flex: 1; padding: 20px 14px;
    list-style: none;
    display: flex; flex-direction: column; gap: 3px;
    overflow-y: auto;
}

.menu-section-label {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); padding: 12px 12px 6px;
}

.menu-item a {
    display: flex; align-items: center;
    padding: 11px 14px; border-radius: var(--radius-md);
    color: var(--text-secondary);
    gap: 12px; font-weight: 500; font-size: 14px;
    transition: var(--transition-fast); position: relative;
}

.menu-item a i { font-size: 17px; width: 20px; text-align: center; transition: var(--transition-fast); }

.menu-item:hover a { color: var(--text-primary); background: rgba(255,255,255,0.04); }

.menu-item.active a {
    background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(99,102,241,0.06));
    border: 1px solid rgba(99,102,241,0.28);
    color: #fff;
}

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

.menu-item.active a i { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }

.sidebar-footer {
    padding: 14px; border-top: 1px solid var(--border-color); flex-shrink: 0;
}

.user-profile {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-md);
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border-color); margin-bottom: 10px;
}

.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 13px; flex-shrink: 0;
}

.user-info   { display: flex; flex-direction: column; overflow: hidden; }
.user-name   { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.user-role   { font-size: 11px; color: var(--text-muted); }

.logout-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px; border-radius: var(--radius-sm);
    color: var(--danger); background: rgba(239,68,68,0.05);
    border: 1px solid rgba(239,68,68,0.12);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: var(--transition-fast);
}
.logout-btn:hover { background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.3); }

/* ── Main ── */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1; display: flex; flex-direction: column;
    height: 100vh; height: 100dvh; overflow: hidden;
    min-width: 0; transition: var(--transition-smooth);
}

header {
    height: var(--header-height); flex-shrink: 0;
    background: rgba(18,19,28,0.88);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 30px;
    position: sticky; top: 0; z-index: 90;
}

.header-title-area h1 { font-size: 19px; font-weight: 700; font-family: 'Outfit', sans-serif; letter-spacing: -.3px; }
.header-actions { display: flex; align-items: center; gap: 14px; }

.header-clock {
    font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
    padding: 6px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); letter-spacing: .3px;
}

.header-shortcut-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }

.kbd {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 2px 7px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12); border-bottom-width: 2px;
    border-radius: 5px; font-size: 11px; font-weight: 600;
    color: var(--text-secondary); font-family: monospace;
}

.content-container { padding: 26px 30px; flex: 1; overflow-y: auto; min-height: 0; }

/* ── Sidebar toggle control (desktop: collapse, mobile: drawer) ── */
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.header-title-area { min-width: 0; }

.mobile-menu-btn {
    display: inline-flex;
    width: 42px; height: 42px; flex-shrink: 0;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary); font-size: 18px; cursor: pointer;
    transition: var(--transition-fast);
}
.mobile-menu-btn:hover  { background: rgba(255,255,255,0.1); border-color: var(--border-hover); }
.mobile-menu-btn:active { transform: scale(0.94); }

/* ── Collapsed sidebar (desktop icon-rail) ── */
@media (min-width: 769px) {
    .app-container.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-width); }
    .app-container.sidebar-collapsed .main-wrapper { margin-left: var(--sidebar-collapsed-width); }

    .app-container.sidebar-collapsed .brand-name,
    .app-container.sidebar-collapsed .menu-item-text,
    .app-container.sidebar-collapsed .user-info,
    .app-container.sidebar-collapsed .logout-btn span {
        opacity: 0; width: 0; overflow: hidden; white-space: nowrap; pointer-events: none;
    }
    .app-container.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; gap: 0; }
    .app-container.sidebar-collapsed .menu-item a { justify-content: center; padding: 11px; gap: 0; }
    .app-container.sidebar-collapsed .menu-item a i { width: auto; }
    .app-container.sidebar-collapsed .user-profile { justify-content: center; padding: 10px; }
    .app-container.sidebar-collapsed .logout-btn { padding: 10px; gap: 0; }
}

.sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0; pointer-events: none;
    transition: opacity var(--transition-fast);
}
.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

body.no-scroll { overflow: hidden; }
/* Mobil menyu (drawer) ochilganda fon kontenti ham scroll bo'lmasin */
body.no-scroll .content-container { overflow: hidden; }

/* ═══════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--glass-shadow);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card-header {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 14px; margin-bottom: 20px;
}
.card-title { display: flex; align-items: center; gap: 10px; }
.card-title h2 { margin-bottom: 0; }
.card-divider { height: 1px; background: var(--border-color); margin: 20px 0; }

/* ═══════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════ */
h2, h3, h4 { font-family: 'Outfit', sans-serif; color: #fff; }
h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }

.page-subtitle { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 11px 20px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 600;
    cursor: pointer; border: none;
    transition: var(--transition-fast);
    white-space: nowrap; line-height: 1;
    position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white; box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(99,102,241,0.5); }

.btn-success { background: var(--success); color: white; box-shadow: 0 4px 14px var(--success-glow); }
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--success-glow); }

.btn-danger  { background: var(--danger);  color: white; box-shadow: 0 4px 14px var(--danger-glow); }
.btn-danger:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px var(--danger-glow); }

.btn-warning { background: var(--warning); color: #1a1a1a; box-shadow: 0 4px 14px var(--warning-glow); }
.btn-warning:hover { transform: translateY(-1px); }

.btn-secondary {
    background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: var(--text-primary);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--border-hover); }

.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); border-color: var(--border-color); }

.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-sm); }
.btn-icon.btn-sm { width: 34px; height: 34px; border-radius: var(--radius-xs); }

.btn.is-loading { pointer-events: none; opacity: .72; }
.btn.is-loading::after {
    content: ''; width: 15px; height: 15px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: spin .7s linear infinite; margin-left: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════ */
.form-group {
    display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px;
}
.form-group:last-child { margin-bottom: 0; }

.form-group label {
    font-size: 12.5px; font-weight: 600;
    color: var(--text-secondary); letter-spacing: .2px;
}

.form-control,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    height: var(--input-h-md);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14.5px;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-appearance: none;
}

textarea, textarea.form-control { height: auto; }

.form-control:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12), 0 0 14px rgba(99,102,241,0.08);
}

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

/* Premium select */
select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23a5b4fc' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 1.1rem;
    padding-right: 42px !important;
    background-color: rgba(22,23,34,0.88) !important;
    cursor: pointer;
}
select:hover { border-color: var(--border-hover); background-color: rgba(30,31,46,0.95) !important; }
select option { background-color: var(--bg-sidebar); color: var(--text-primary); font-size: 14px; }

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

/* ── Search Box ── */
.search-box {
    position: relative; display: flex; align-items: center;
}

.search-box .search-icon {
    position: absolute; left: 16px;
    color: var(--text-muted); font-size: 14px;
    pointer-events: none; z-index: 1;
    transition: color var(--transition-fast);
}
.search-box:focus-within .search-icon { color: var(--accent); }

.search-box input {
    padding-left: 44px !important;
    padding-right: 42px !important;
    height: var(--input-h-lg) !important;
    font-size: 15px !important;
    border-radius: 50px !important;
    width: 100%;
}

.search-box .search-clear {
    position: absolute; right: 14px;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.07); border-radius: 50%;
    color: var(--text-muted); font-size: 11px;
    cursor: pointer; opacity: 0;
    transition: opacity var(--transition-fast), background var(--transition-fast); z-index: 1;
}
.search-box input:not(:placeholder-shown) + .search-clear { opacity: 1; }
.search-box .search-clear:hover { background: rgba(255,255,255,0.16); color: var(--text-primary); }

/* ── Input Group ── */
.input-group { display: flex; align-items: stretch; }
.input-group .form-control,
.input-group input { border-radius: var(--radius-md) 0 0 var(--radius-md) !important; border-right: none; }
.input-group .btn  { border-radius: 0 var(--radius-md) var(--radius-md) 0; flex-shrink: 0; }
.input-group.pill .form-control,
.input-group.pill input { border-radius: 50px 0 0 50px !important; }
.input-group.pill .btn { border-radius: 0 50px 50px 0; }

/* ── Scanner Input ── */
.scanner-input-wrap { position: relative; display: flex; align-items: center; }
.scanner-input-wrap input {
    padding-left: 46px !important; padding-right: 14px !important;
    height: var(--input-h-lg) !important; font-size: 14.5px !important;
    font-family: monospace;
    border-color: rgba(99,102,241,0.25) !important;
}
.scanner-input-wrap:focus-within input { border-color: var(--border-focus) !important; }
.scanner-icon { position: absolute; left: 15px; color: var(--accent); font-size: 17px; pointer-events: none; z-index: 1; }
.scanner-pulse { animation: pulse 2.2s ease infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* ═══════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════ */
.table-wrapper {
    overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-color);
}

table { width: 100%; border-collapse: collapse; text-align: left; }

th {
    padding: 13px 18px;
    background: rgba(255,255,255,0.025);
    color: var(--text-muted);
    font-weight: 600; font-size: 11.5px;
    text-transform: uppercase; letter-spacing: .7px;
    border-bottom: 1px solid var(--border-color); white-space: nowrap;
}

td {
    padding: 14px 18px; font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.035);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition-fast); }
tbody tr:hover td { background: rgba(99,102,241,0.04); }

.empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 56px 24px; gap: 14px; text-align: center;
}
.empty-state-icon {
    width: 60px; height: 60px; border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--text-muted);
}
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.empty-state-desc  { font-size: 13px; color: var(--text-muted); max-width: 300px; line-height: 1.6; }

/* ═══════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════ */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
}
.badge-success { background: rgba(16,185,129,0.14); color: #34d399; border: 1px solid rgba(16,185,129,0.22); }
.badge-warning { background: rgba(245,158,11,0.14); color: #fbbf24; border: 1px solid rgba(245,158,11,0.22); }
.badge-danger  { background: rgba(239,68,68,0.14);  color: #f87171; border: 1px solid rgba(239,68,68,0.22); }
.badge-info    { background: rgba(6,182,212,0.14);  color: #22d3ee; border: 1px solid rgba(6,182,212,0.22); }
.badge-purple  { background: rgba(99,102,241,0.14); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.22); }
.badge-muted   { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-color); }
/* "Boshqa do'kon tovari" (konsignatsiya) belgisi — amber tus, diqqat tortadi */
.badge-consignment { background: rgba(245,158,11,0.16); color: #fbbf24; border: 1px solid rgba(245,158,11,0.35); }

/* ═══════════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════════ */
.grid-cols-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-cols-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-cols-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-cols-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }

.stat-card    { display: flex; align-items: center; justify-content: space-between; }
.stat-content { display: flex; flex-direction: column; gap: 4px; }
.stat-label   { font-size: 12.5px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.stat-value   { font-size: 26px; font-weight: 800; font-family: 'Outfit', sans-serif; color: #fff; line-height: 1.1; }
.stat-sub     { font-size: 11px; color: var(--text-muted); }
.stat-icon {
    width: 50px; height: 50px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-icon.purple { background: rgba(99,102,241,0.12); color: var(--accent); border: 1px solid rgba(99,102,241,0.2); }
.stat-icon.emerald{ background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.stat-icon.orange { background: rgba(245,158,11,0.12); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.stat-icon.red    { background: rgba(239,68,68,0.12);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.2); }
.stat-icon.cyan   { background: rgba(6,182,212,0.12);  color: var(--info);    border: 1px solid rgba(6,182,212,0.2); }

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */
.modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity var(--transition-fast); padding: 20px;
}
.modal.open { opacity: 1; pointer-events: auto; }

.modal-content {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 540px;
    max-height: 92vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.94) translateY(12px);
    transition: transform var(--transition-smooth);
}
.modal.open .modal-content { transform: scale(1) translateY(0); }

.modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; background: var(--bg-sidebar); z-index: 1;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-close {
    width: 30px; height: 30px; border-radius: var(--radius-xs);
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 18px; color: var(--text-secondary);
    transition: var(--transition-fast);
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }

.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 10px; }

/* ═══════════════════════════════════════════════
   ALERTS & TOASTS
═══════════════════════════════════════════════ */
.alerts-wrapper { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }

.alert-banner {
    padding: 13px 18px; border-radius: var(--radius-md);
    display: flex; align-items: center; gap: 12px;
    font-size: 13.5px; font-weight: 500;
    animation: slideDown .3s ease both;
}

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

.alert-banner-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); color: #34d399; }
.alert-banner-danger  { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.25);  color: #f87171; }
.alert-banner-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); color: #fbbf24; }
.alert-banner-info    { background: rgba(6,182,212,0.1);  border: 1px solid rgba(6,182,212,0.25);  color: #22d3ee; }

/* Toast */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none; width: 340px;
}

.toast {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-md);
    background: rgba(18,19,28,0.98);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.55);
    pointer-events: auto;
    animation: toastIn .32s cubic-bezier(.34,1.56,.64,1) both;
    position: relative; overflow: hidden;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(44px) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
.toast.toast-out { animation: toastOut .22s ease forwards; }
@keyframes toastOut {
    to { opacity: 0; transform: translateX(44px) scale(0.94); }
}

.toast-icon  { font-size: 17px; margin-top: 1px; flex-shrink: 0; }
.toast-body  { flex: 1; min-width: 0; }
.toast-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.toast-msg   { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.toast-close { font-size: 14px; color: var(--text-muted); cursor: pointer; flex-shrink: 0; margin-top: 1px; }
.toast-close:hover { color: var(--text-primary); }

.toast-progress     { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.toast-progress-bar { height: 100%; animation: shrink linear both; }
@keyframes shrink { from { width: 100%; } to { width: 0%; } }

.toast.toast-success .toast-icon, .toast.toast-success .toast-title { color: #34d399; }
.toast.toast-success { border-color: rgba(16,185,129,0.3); }
.toast.toast-success .toast-progress-bar { background: var(--success); }

.toast.toast-danger  .toast-icon, .toast.toast-danger  .toast-title { color: #f87171; }
.toast.toast-danger  { border-color: rgba(239,68,68,0.3); }
.toast.toast-danger  .toast-progress-bar { background: var(--danger); }

.toast.toast-warning .toast-icon, .toast.toast-warning .toast-title { color: #fbbf24; }
.toast.toast-warning { border-color: rgba(245,158,11,0.3); }
.toast.toast-warning .toast-progress-bar { background: var(--warning); }

.toast.toast-info    .toast-icon, .toast.toast-info    .toast-title { color: #22d3ee; }
.toast.toast-info    { border-color: rgba(6,182,212,0.3); }
.toast.toast-info    .toast-progress-bar { background: var(--info); }

/* ═══════════════════════════════════════════════
   POS LAYOUT
═══════════════════════════════════════════════ */
.pos-container {
    display: grid; grid-template-columns: 1fr 420px;
    gap: 22px;
    height: calc(100vh - var(--header-height) - 56px);
    overflow: hidden;
}
.pos-catalog { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding-right: 6px; }
.pos-search-filter { display: flex; gap: 10px; }

.pos-categories-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 3px 0; }
.pos-tab {
    padding: 8px 16px; background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: var(--transition-fast);
}
.pos-tab.active, .pos-tab:hover { background: var(--accent); color: white; border-color: var(--accent); box-shadow: 0 4px 12px var(--accent-glow); }

.pos-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 14px; }

.product-card {
    background: rgba(22,23,34,0.6); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); overflow: hidden; cursor: pointer;
    transition: var(--transition-smooth);
    display: flex; flex-direction: column; position: relative;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(99,102,241,0.12); }

.product-img-wrapper {
    height: 115px;
    background: linear-gradient(135deg, rgba(255,255,255,0.01), rgba(255,255,255,0.04));
    display: flex; align-items: center; justify-content: center;
    position: relative; border-bottom: 1px solid var(--border-color);
}
.product-img-placeholder { font-size: 28px; color: var(--text-muted); }
.product-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.product-badge-cat {
    position: absolute; top: 7px; left: 7px;
    background: rgba(0,0,0,0.65); padding: 3px 8px;
    border-radius: 4px; font-size: 9.5px; font-weight: 600;
}
/* POS kartada "boshqa do'kon" belgisi — kassir darhol ko'rishi uchun */
.product-badge-consignment {
    position: absolute; top: 7px; right: 7px;
    background: rgba(245,158,11,0.92); color: #1a1205;
    padding: 3px 8px; border-radius: 4px; font-size: 9.5px; font-weight: 800;
    letter-spacing: .2px; box-shadow: 0 2px 8px rgba(245,158,11,0.35);
}
/* Savat qatoridagi kichik belgi */
.cart-item-consignment {
    display: inline-block; margin-top: 2px;
    color: #fbbf24; font-size: 11px; font-weight: 700;
}
.pos-cart-panel.has-consignment { border-color: rgba(245,158,11,0.5); }
.product-card-body    { padding: 11px 12px; display: flex; flex-direction: column; flex: 1; gap: 5px; }
.product-card-name    { font-size: 13.5px; font-weight: 600; color: white; line-height: 1.3; min-height: 34px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-price   { font-size: 14.5px; font-weight: 800; color: var(--accent); font-family: 'Outfit', sans-serif; }
.product-card-footer  { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--border-color); padding-top: 7px; margin-top: auto; }
.product-card-stock   { font-size: 10.5px; color: var(--text-secondary); }

.pos-cart-panel {
    background: var(--bg-sidebar); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex; flex-direction: column; height: 100%;
    box-shadow: var(--shadow-lg); overflow: hidden;
}
.pos-cart-header   { padding: 18px 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.pos-cart-items    { flex: 1 1 auto; min-height: 180px; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.cart-item         { background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 13px 15px; display: flex; flex-direction: column; gap: 10px; transition: border-color var(--transition-fast), background var(--transition-fast); }
.cart-item:hover   { border-color: var(--border-hover); background: rgba(255,255,255,0.05); }
.cart-item-top     { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cart-item-info    { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-item-title   { font-size: 14.5px; font-weight: 600; color: white; line-height: 1.35; }
.cart-item-unit    { font-size: 12px; color: var(--text-muted); }
.cart-item-remove  { cursor: pointer; color: var(--text-muted); font-size: 16px; flex-shrink: 0; padding: 2px; transition: color var(--transition-fast); }
.cart-item-remove:hover { color: var(--danger); }
.cart-item-row     { display: flex; justify-content: space-between; align-items: center; }
.cart-item-quantity{ display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,0.25); border: 1px solid var(--border-color); border-radius: 8px; padding: 3px; }
.qty-btn           { width: 32px; height: 32px; border-radius: 6px; background: rgba(255,255,255,0.07); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; font-weight: bold; user-select: none; transition: background var(--transition-fast); }
.qty-btn:hover     { background: var(--accent); color: white; }
.qty-val           { font-size: 15px; font-weight: 700; min-width: 30px; text-align: center; }
.cart-item-price   { font-size: 16px; font-weight: 800; color: var(--accent); font-family: 'Outfit', sans-serif; }

.pos-cart-footer   { padding: 16px 20px; border-top: 1px solid var(--border-color); background: rgba(0,0,0,0.2); display: flex; flex-direction: column; gap: 9px; flex-shrink: 0; }
.cart-totals-row   { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-secondary); }
.cart-totals-row.grand-total { font-size: 19px; font-weight: 800; color: white; border-top: 1px solid var(--border-color); padding-top: 12px; margin-top: 2px; font-family: 'Outfit', sans-serif; }

/* ═══════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════ */
.login-body {
    background: radial-gradient(circle at 15% 25%, rgba(99,102,241,.12) 0%, transparent 60%),
                radial-gradient(circle at 85% 75%, rgba(6,182,212,.08) 0%, transparent 55%),
                var(--bg-main);
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px;
}

.login-card {
    width: 100%; max-width: 430px;
    background: rgba(22,23,34,0.5);
    backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--radius-xl); padding: 44px 40px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
    display: flex; flex-direction: column; gap: 24px;
    animation: pageIn .5s ease both;
}
.login-logo-area { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.login-desc { font-size: 13.5px; color: var(--text-secondary); }

/* ═══════════════════════════════════════════════
   SCANNER & INFO BOXES
═══════════════════════════════════════════════ */
.scan-indicator    { margin-top: 8px; padding: 8px 15px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; transition: opacity .3s; }
.scan-ok  { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--success); }
.scan-err { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }

.info-box { padding: 16px 18px; border-radius: var(--radius-md); font-size: 13px; color: var(--text-secondary); line-height: 1.75; }
.info-box.accent { background: rgba(99,102,241,0.07); border: 1px solid rgba(99,102,241,0.2); }
.info-box.success{ background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.18); }
.info-box.warning{ background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2); }
.info-box h3 { font-size: 13.5px; margin-bottom: 8px; }

.section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .7px;
    color: var(--text-muted); margin-bottom: 12px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, var(--border-color), transparent); }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1280px) { .grid-cols-4 { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 1024px) {
    /* POS ustunlar stack bo'ladi — sahifa tabiiy scroll qiladi, savat to'liq ko'rinadi */
    .pos-container { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .pos-cart-panel { height: auto; }
    .pos-cart-items { min-height: 320px; max-height: 60vh; }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* ── Sidebar → off-canvas drawer ── */
    :root { --header-height: 58px; }

    .sidebar {
        width: min(82vw, 300px);
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }

    .mobile-menu-btn      { display: inline-flex; }
    .header-shortcut-hint { display: none; }
    .header-clock         { display: none; }
    header { padding: 0 14px; }
    .header-title-area h1 {
        font-size: 17px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }

    /* ── Layout spacing ── */
    .content-container { padding: 16px 14px; }
    .grid-cols-4, .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr; gap: 14px; }
    .toast-container { width: auto; left: 14px; right: 14px; }
    .form-row-2 { grid-template-columns: 1fr; }

    /* ── Inputs: qulay o'lcham + iOS zoom oldini olish (>=16px) ── */
    .form-control, input[type="text"], input[type="number"],
    input[type="email"], input[type="password"], input[type="tel"],
    select, textarea { font-size: 16px; }

    /* ── Qidiruv/filtr toolbar: ustun bo'lib, to'liq kenglik ── */
    /* min-width:0 — flex elementlar kontentdan tor bo'lib siqilsin (toshib chiqmasin) */
    form[method="get"] { width: 100%; flex-wrap: wrap; }
    form[method="get"] .input-group,
    form[method="get"] .input-group.pill { width: 100%; min-width: 0; }
    form[method="get"] .search-box { flex: 1 1 auto; min-width: 0; }
    form[method="get"] .search-box input[type="text"] { width: 100% !important; min-width: 0; }
    form[method="get"] select { width: 100% !important; flex: 1 1 100%; min-width: 0; }

    /* ── POS ── */
    .pos-cart-panel { height: auto; }
    .pos-cart-items { min-height: 300px; max-height: 55vh; }
    .pos-products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* ── Modal: deyarli to'liq ekran ── */
    .modal { padding: 12px; }
    .modal-content { max-width: 100%; max-height: 94vh; }
    .modal-header { padding: 16px 18px; }
}

@media (max-width: 480px) {
    .content-container { padding: 14px 12px; }
    .stat-value { font-size: 22px; }
    .stat-icon  { width: 44px; height: 44px; font-size: 19px; }
    h2 { font-size: 18px; }
    .pos-products-grid { gap: 8px; }
}

/* Custom responsive tweaks for small laptop screens and heights */
@media (max-width: 1400px) {
    .pos-container { grid-template-columns: 1fr 370px; gap: 14px; }
    .pos-products-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; }
    .product-img-wrapper { height: 100px; }
    .product-card-body { padding: 8px 10px; gap: 4px; }
    .product-card-name { font-size: 12.5px; min-height: 30px; -webkit-line-clamp: 2; }
    .product-card-price { font-size: 13.5px; }
    .product-card-stock { font-size: 10px; }
}

@media (max-height: 850px) {
    .pos-container { gap: 12px; }
    .pos-cart-header { padding: 10px 16px; }
    .pos-cart-items { padding: 10px 12px; gap: 8px; min-height: 80px; }
    .cart-item { padding: 10px 12px; gap: 8px; }
    .cart-item-title { font-size: 13px; }
    .cart-item-unit { font-size: 11px; }
    .qty-btn { width: 28px; height: 28px; font-size: 16px; }
    .qty-val { font-size: 13.5px; min-width: 24px; }
    .cart-item-price { font-size: 14px; }
    .pos-cart-footer { padding: 12px 16px; gap: 6px; }
    .cart-totals-row.grand-total { font-size: 16px; padding-top: 8px; margin-top: 2px; }
}

/* ═══════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════ */
.pagination {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 14px;
    margin-top: 20px; padding-top: 18px;
    border-top: 1px solid var(--border-color);
}
.pagination-info { font-size: 13px; color: var(--text-muted); }
.pagination-info strong { color: var(--text-secondary); }
.pagination-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.page-btn {
    display: inline-flex; align-items: center; gap: 5px;
    min-width: 38px; height: 38px; padding: 0 12px;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13.5px; font-weight: 600;
    cursor: pointer; transition: var(--transition-fast);
    user-select: none;
}
.page-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--border-hover); color: var(--text-primary); }
.page-btn.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.9), rgba(99,102,241,0.7));
    border-color: var(--accent); color: #fff;
    box-shadow: 0 0 14px var(--accent-glow);
    cursor: default;
}
.page-btn.disabled {
    opacity: .38; cursor: not-allowed;
    background: rgba(255,255,255,0.02);
}
.page-btn.disabled:hover { background: rgba(255,255,255,0.02); border-color: var(--border-color); color: var(--text-secondary); }

@media (max-width: 640px) {
    .pagination { justify-content: center; }
    .page-btn { min-width: 34px; height: 34px; padding: 0 9px; font-size: 12.5px; }
}

