/* ============================================================
   Street Food — qayta dizayn (2026)
   ------------------------------------------------------------
   BO'LIMLAR (qidirish uchun belgilangan sarlavhalar):
     :root .............. dizayn tokenlari (rang, radius, soya)
     Header / Hero ...... sayt sarlavhasi va banner
     Menyu .............. mahsulot kartalari (mijoz)
     Savatcha / Modal ... mijoz savati, zakaz formasi
     Tugmalar ........... .btn-primary / .ghost-btn / .btn-danger
     Auth / Admin ....... login, admin ro'yxatlari, formalar
     Responsiv .......... media so'rovlar (mijoz)
     Mobil qulaylik ..... telefon uchun moslashtirish
     Kassa (POS) ........ admin/pos sahifasi
     Reports / Audit .... hisobot va jurnal
   ============================================================ */
:root {
    --brand: #ff5424;
    --brand-d: #dc3d12;
    --brand-soft: #fff0e9;
    --ink: #1c1c20;
    --muted: #727580;
    --bg: #f7f4f0;
    --surface: #ffffff;
    --line: #e9e3dc;

    --green: #15a35a;
    --red: #e23b3b;
    --blue: #3b6ef5;
    --amber: #ef9a1a;
    --cyan: #0aa6c0;

    --radius: 22px;
    --radius-sm: 14px;
    --shadow-sm: 0 5px 18px rgba(36, 29, 23, .065);
    --shadow: 0 18px 40px -20px rgba(36, 29, 23, .3);
    --shadow-lg: 0 30px 80px -28px rgba(20, 17, 14, .42);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* Ikonkalar matn bilan tekislash */
.icon { display: inline-block; vertical-align: -0.18em; flex: 0 0 auto; }

/* ---------- Header ---------- */
.site-header {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; height: 72px;
}
.logo {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 19px; font-weight: 800; letter-spacing: -.035em; white-space: nowrap;
}
.logo-badge {
    width: 38px; height: 38px; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #ff8d4c);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 9px 20px -7px rgba(255, 84, 36, .7);
}
.nav-links { display: flex; gap: 2px; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav-links a {
    color: #696c76; font-weight: 700; font-size: 13px;
    padding: 8px 12px; border-radius: 999px; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.nav-links a:hover { color: var(--brand-d); background: var(--brand-soft); }

.cart-btn {
    background: var(--ink); color: #fff; border: none;
    min-height: 44px; padding: 9px 10px 9px 15px; border-radius: 999px; font-weight: 700; font-size: 13px;
    cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
    white-space: nowrap; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.cart-btn:hover { background: #070708; transform: translateY(-2px); box-shadow: 0 10px 25px -14px rgba(0,0,0,.8); }
.cart-count {
    background: var(--brand); color: #fff; border-radius: 999px;
    min-width: 26px; height: 26px; display: inline-flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 800; padding: 0 6px;
}

/* ---------- Hero ---------- */
.hero {
    color: #fff; position: relative; padding: 20px 0 14px;
}
.hero-inner {
    min-height: 510px; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
    align-items: center; gap: 54px; padding: 52px 58px; position: relative; isolation: isolate;
    overflow: hidden; border-radius: 32px; background:
        radial-gradient(600px 360px at 82% 18%, rgba(255, 105, 54, .24), transparent 66%),
        radial-gradient(440px 300px at 6% 110%, rgba(255, 84, 36, .14), transparent 72%),
        #1c1c20;
    box-shadow: 0 28px 70px -38px rgba(22, 18, 14, .7);
}
.hero-inner::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 54px 54px; mask-image: linear-gradient(90deg, transparent, #000 50%, #000); }
.hero-text { min-width: 0; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .13); color: #f4eee9;
    padding: 7px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
    margin-bottom: 18px; backdrop-filter: blur(10px);
}
.hero-eyebrow .icon { color: #ff8a5c; }
.hero-text h1 { max-width: 640px; font-size: clamp(39px, 4.2vw, 58px); line-height: 1.02; letter-spacing: -.052em; margin-bottom: 18px; text-wrap: balance; }
.hero-text p { max-width: 565px; color: #c9c7c7; font-size: 15.5px; line-height: 1.7; margin-bottom: 24px; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-primary.hero-btn {
    width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--brand); color: #fff; padding: 14px 21px; font-size: 14px; border-radius: 13px;
    box-shadow: 0 16px 34px -16px rgba(255, 84, 36, .95);
}
.btn-primary.hero-btn:hover { background: #ff6337; color: #fff; transform: translateY(-2px); }
.hero-hours { display: inline-flex; align-items: center; gap: 8px; color: #b8b5b3; font-size: 12.5px; font-weight: 600; }
.hero-hours i { width: 8px; height: 8px; border-radius: 999px; background: #49cf7e; box-shadow: 0 0 0 5px rgba(73,207,126,.12); }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 500px; margin-top: 30px; }
.stat {
    background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 13px; padding: 12px 14px; text-align: left; min-width: 0;
}
.stat strong { display: block; color: #fff; font-size: 19px; line-height: 1.15; font-weight: 800; }
.stat span { color: #9f9c9a; font-size: 10.5px; font-weight: 600; }

.hero-visual { position: relative; min-width: 0; min-height: 384px; display: grid; place-items: center; }
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.11); border-radius: 999px; }
.hero-orbit-one { width: 350px; height: 350px; }
.hero-orbit-two { width: 280px; height: 280px; border-color: rgba(255,84,36,.25); }
.featured-card { position: relative; z-index: 2; width: min(310px, 84%); padding: 16px; overflow: hidden; color: var(--ink); background: #fff9f5; border: 1px solid rgba(255,255,255,.7); border-radius: 25px; box-shadow: 0 32px 60px -25px rgba(0,0,0,.65); transform: rotate(-2deg); }
.featured-kicker { display: inline-flex; padding: 5px 9px; color: var(--brand-d); background: var(--brand-soft); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.featured-media { position: relative; height: 205px; margin: 10px 0 13px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--brand); background: radial-gradient(circle at 50% 42%, #fff 0 17%, #ffe8dc 18% 52%, #ffd5c1 53% 54%, transparent 55%); border-radius: 18px; }
.featured-media::before { content: ""; position: absolute; width: 176px; height: 176px; border-radius: 50%; background: rgba(255,84,36,.055); }
.featured-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.featured-media .icon { position: relative; z-index: 1; filter: drop-shadow(0 18px 18px rgba(220,61,18,.16)); }
.featured-copy { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.featured-copy > div { min-width: 0; }
.featured-copy span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.featured-copy strong { display: block; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.featured-copy b { flex: 0 0 auto; font-size: 14px; color: var(--brand-d); }
.hero-float { position: absolute; z-index: 3; display: flex; align-items: center; padding: 10px 12px; color: var(--ink); background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 18px 40px -20px rgba(0,0,0,.75); backdrop-filter: blur(12px); }
.hero-float-delivery { left: 0; bottom: 58px; gap: 9px; transform: rotate(2deg); }
.hero-float-delivery > span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--brand-d); background: var(--brand-soft); border-radius: 10px; }
.hero-float strong, .hero-float small { display: block; }
.hero-float-delivery strong { font-size: 11.5px; }
.hero-float small { color: var(--muted); font-size: 9.5px; }
.hero-float-rating { top: 48px; right: 0; display: grid; grid-template-columns: auto auto; column-gap: 7px; transform: rotate(3deg); }
.hero-float-rating strong { grid-row: 1 / 3; align-self: center; font-size: 24px; }
.hero-float-rating span { color: #ff9d2e; font-size: 10px; letter-spacing: .04em; }

/* ---------- Kategoriya pill nav ---------- */
.catbar {
    position: sticky; top: 72px; z-index: 40;
    background: rgba(247, 244, 240, .9);
    backdrop-filter: blur(14px); border-bottom: 1px solid rgba(233,227,220,.85);
}
.catbar-inner { display: flex; gap: 8px; padding-top: 11px; padding-bottom: 11px; overflow-x: auto; }
.cat-pill {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    background: rgba(255,255,255,.88); border: 1px solid var(--line); color: var(--ink);
    padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 12.5px;
    box-shadow: 0 4px 14px rgba(36,29,23,.04); transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.cat-pill:hover { border-color: var(--ink); background: var(--ink); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.cat-pill .icon { color: var(--brand); }
.cat-pill:hover .icon { color: #ff8762; }

/* ---------- Menyu (ixcham — ekranda ko'proq mahsulot) ---------- */
.menu-category { padding: 38px 0 4px; scroll-margin-top: 144px; }
.category-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 22px; font-weight: 800; letter-spacing: -.035em; margin-bottom: 18px;
}
.cat-title-ic {
    color: var(--brand); background: var(--brand-soft);
    padding: 8px; border-radius: 11px; width: 36px; height: 36px;
}
.category-count {
    font-size: 11px; font-weight: 800; color: var(--muted);
    background: rgba(255,255,255,.8); border: 1px solid var(--line);
    padding: 4px 9px; border-radius: 999px; margin-left: auto;
}

.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 17px;
}
.product-card {
    position: relative; overflow: hidden; background: var(--surface); border: 1px solid rgba(233,227,220,.92); border-radius: 20px;
    box-shadow: var(--shadow-sm); padding: 11px; cursor: pointer;
    display: flex; flex-direction: column; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px -25px rgba(36,29,23,.38); border-color: #ead7cd; }
.product-media {
    position: relative; height: 154px; border-radius: 15px; margin-bottom: 13px; overflow: hidden;
    background: radial-gradient(circle at 50% 44%, #fff 0 14%, #fff2eb 15% 48%, #ffe8df 49% 50%, #fff4ef 51%);
    display: flex; align-items: center; justify-content: center;
}
.product-media::before, .product-media::after { content: ""; position: absolute; border-radius: 999px; border: 1px solid rgba(255,84,36,.12); }
.product-media::before { width: 112px; height: 112px; }
.product-media::after { width: 142px; height: 142px; }
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-media .product-ic { position: relative; z-index: 1; color: var(--brand-d); filter: drop-shadow(0 14px 13px rgba(220,61,18,.12)); }
.product-media .product-ic .icon { width: 56px; height: 56px; stroke-width: 1.55; }
.product-body { display: flex; flex-direction: column; flex: 1; }
.product-name { padding: 0 3px; font-size: 15.5px; font-weight: 800; margin-bottom: 4px; line-height: 1.3; letter-spacing: -.018em; }
.product-desc {
    padding: 0 3px; color: var(--muted); font-size: 12px; line-height: 1.5; flex: 1; margin-bottom: 13px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 3px 3px; }
.product-price { font-weight: 800; font-size: 15.5px; letter-spacing: -.02em; white-space: nowrap; }

.add-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--ink); color: #fff;
    border: 1.5px solid var(--ink); border-radius: 999px;
    padding: 7px 12px; font-weight: 800; font-size: 12.5px; cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.add-btn:hover, .add-btn.added { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(255,84,36,.85); }

/* Kartadagi miqdor o'zgartirgich (Qo'shish bosilgach paydo bo'ladi) */
.product-action { display: inline-flex; }
.qty-stepper {
    display: inline-flex; align-items: center; gap: 2px;
    background: linear-gradient(135deg, var(--brand), #ff7a33); border-radius: 999px; padding: 4px;
    box-shadow: 0 8px 18px -8px rgba(255, 90, 31, .75);
    animation: pop .15s ease;
}
@keyframes pop { from { transform: scale(.9); } to { transform: scale(1); } }
.qty-stepper .qty-btn {
    width: 30px; height: 30px; border: none; border-radius: 999px;
    background: rgba(255, 255, 255, .22); color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.qty-stepper .qty-btn:hover { background: rgba(255, 255, 255, .42); }
.qty-stepper .qty-val { min-width: 26px; text-align: center; color: #fff; font-weight: 800; font-size: 15px; }

/* ---------- Savatcha paneli ---------- */
.cart-overlay {
    position: fixed; inset: 0; background: rgba(20, 14, 8, .5);
    opacity: 0; visibility: hidden; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; z-index: 90;
}
.cart-overlay.show { opacity: 1; visibility: visible; }
.cart-panel {
    position: fixed; top: 0; right: 0; width: 400px; max-width: 92vw; height: 100vh;
    background: var(--surface); box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    z-index: 100; display: flex; flex-direction: column;
}
.cart-panel.open { transform: translateX(0); }
.cart-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.cart-head h2 { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; }
.icon-btn {
    background: var(--bg); border: none; width: 38px; height: 38px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--muted); transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.icon-btn:hover { background: #f1e3da; color: var(--ink); }

.cart-items { flex: 1; overflow-y: auto; padding: 10px 18px; }
.cart-empty {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    color: var(--muted); text-align: center; padding: 60px 0;
}
.cart-empty-ic { color: #d9d2c8; }

.cart-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 0; border-bottom: 1px solid var(--line);
}
.ci-name { font-weight: 600; font-size: 15px; }
.ci-price { color: var(--muted); font-size: 13px; }
.ci-controls { display: flex; align-items: center; gap: 6px; }
.qty-btn {
    width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line);
    background: var(--bg); cursor: pointer; color: var(--ink);
    display: inline-flex; align-items: center; justify-content: center; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.qty-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.ci-qty { min-width: 24px; text-align: center; font-weight: 700; }
.ci-remove {
    width: 30px; height: 30px; border-radius: 9px; border: none; background: none;
    cursor: pointer; color: #c9b9ae; display: inline-flex; align-items: center; justify-content: center;
}
.ci-remove:hover { color: var(--red); background: #fdeaea; }

.cart-footer { padding: 18px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.cart-note { display: flex; align-items: center; gap: 6px; color: var(--red); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.cart-note .icon { flex: 0 0 auto; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 16px; }
.cart-total strong { font-size: 22px; font-weight: 800; }

/* ---------- Tugmalar ---------- */
.btn-primary {
    width: 100%; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--brand), #ff7a33); color: #fff;
    padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 700;
    font-family: inherit; box-shadow: 0 10px 22px -10px rgba(255, 90, 31, .8); transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(255, 90, 31, .9); }
.btn-primary:disabled { background: #e7d3c8; color: #fff; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-primary.sm, .btn-danger.sm {
    width: auto; padding: 9px 16px; font-size: 13.5px; border-radius: 10px;
}
.btn-danger {
    border: none; cursor: pointer; background: #fdeaea; color: var(--red);
    padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 13.5px; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.btn-danger:hover { background: var(--red); color: #fff; }
.ghost-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: var(--surface);
    padding: 7px 12px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: 13px; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.ghost-btn:hover { border-color: var(--brand); color: var(--brand-d); }

/* Yangi ombor/invoice ekranlari uchun umumiy admin komponentlari */
.panel {
    background: var(--surface); border: 1px solid rgba(239,233,225,.95); border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(35,25,15,.055); padding: 22px; margin-bottom: 20px; overflow-x: auto;
}
.panel h2 { font-size: 17px; line-height: 1.3; margin-bottom: 16px; color: var(--ink); letter-spacing: -.01em; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea {
    width: 100%; min-height: 42px; border: 1.5px solid var(--line); border-radius: 10px;
    padding: 10px 12px; background: #fdfbf9; color: var(--ink); font: inherit; font-weight: 500;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
    outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft);
}
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-d); background: var(--brand-soft); }
.data-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.data-table td { color: var(--ink); }
.data-table tbody tr:hover, .data-table tr:hover { background: #fffaf6; }
.data-table a { color: var(--brand-d); font-weight: 700; }
.muted { color: var(--muted); }
.invoice-row, .recipe-row, .erow { margin-bottom: 10px; }
.admin-main > h1 { max-width: 1180px; margin-left: auto; margin-right: auto; }
.admin-main > .panel, .admin-main > .sub-nav { max-width: 1180px; margin-left: auto; margin-right: auto; }
.panel form { min-width: 0; }
.panel .btn-primary, .panel .btn-secondary { white-space: nowrap; }
.data-table td:last-child { white-space: nowrap; }
.data-table td .ghost-btn + .ghost-btn,.data-table td .ghost-btn + .btn-danger,.data-table td .btn-danger + .ghost-btn { margin-left: 6px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
button, a, input, select, textarea { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: rgba(255, 90, 31, .14); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(255,90,31,.35); outline-offset: 2px; }
.skip-link { position: fixed; top: max(8px, env(safe-area-inset-top)); left: 12px; z-index: 1000; padding: 10px 14px; color: #fff; background: var(--ink); border-radius: 9px; transform: translateY(-160%); transition: transform .15s ease; }
.skip-link:focus { transform: translateY(0); }
.admin-toast { position: fixed; z-index: 450; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 36px)); display: flex; align-items: flex-start; gap: 9px; padding: 13px 15px; color: #087a3e; background: #effbf4; border: 1px solid #bce8ce; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 700; }
.admin-toast.error { color: #a62232; background: #fff2f3; border-color: #f3c2c8; }
.management-table tbody tr, .data-table tbody tr, .prod-card, .order-card { content-visibility: auto; contain-intrinsic-size: auto 58px; }
@media (max-width: 700px) {
    .panel { padding: 14px; border-radius: 14px; }
    .form-grid { grid-template-columns: 1fr; gap: 11px; }
    .data-table { min-width: 560px; }
    .page-head { gap: 10px; flex-wrap: wrap; }
}

/* ---------- Modal ---------- */
/* z-index 300 — mobil sidebar drawer (200) va gamburger (150) dan ham baland turishi shart */
.modal {
    position: fixed; inset: 0; background: rgba(20, 14, 8, .55);
    display: none; align-items: center; justify-content: center; z-index: 300; padding: 16px;
    overscroll-behavior: contain;
}
.modal.open { display: flex; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    background: var(--surface); border-radius: var(--radius);
    width: 460px; max-width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-box-wide { width: min(760px, 100%); }
.page-actions, .modal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal-actions { justify-content: space-between; margin-top: 4px; }
.invoice-entry { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(110px, .7fr) minmax(120px, .8fr) auto; gap: 10px; align-items: end; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fdfbf9; }
.invoice-entry label { min-width: 0; }
.invoice-page .admin-main { background: linear-gradient(180deg, #fff9f5 0, var(--bg) 260px); }
.invoice-hero { max-width: 1180px; margin: 0 auto 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 8px 2px; }
.invoice-hero-copy { min-width: 0; }
.invoice-hero h1 { margin: 5px 0 7px; font-size: clamp(24px, 3vw, 34px); text-wrap: balance; }
.invoice-hero p { color: var(--muted); font-size: 14px; }
.invoice-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-d); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.invoice-summary { max-width: 1180px; margin: 0 auto 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.invoice-stat { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 17px 18px; background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); }
.invoice-stat-icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.invoice-stat-icon.orange { color: var(--brand-d); background: var(--brand-soft); }
.invoice-stat-icon.green { color: var(--green); background: #e9f8f0; }
.invoice-stat-icon.blue { color: var(--blue); background: #edf2ff; }
.invoice-stat div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.invoice-stat div > span { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.invoice-stat strong { color: var(--ink); font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-list-card { max-width: 1180px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.invoice-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.invoice-toolbar h2 { font-size: 17px; margin-bottom: 3px; }
.invoice-toolbar p { color: var(--muted); font-size: 12.5px; }
.invoice-branch-label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.invoice-branch-label select { min-width: 180px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 34px 9px 11px; background: #fdfbf9; color: var(--ink); font: inherit; cursor: pointer; }
.invoice-table-wrap { overflow-x: auto; }
.invoice-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
.invoice-table th { padding: 11px 18px; color: var(--muted); background: #fdfbf9; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.invoice-table td { padding: 14px 18px; border-top: 1px solid var(--line); color: var(--ink); }
.invoice-table tbody tr:hover { background: #fffaf6; }
.invoice-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.invoice-number { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; }
.invoice-number span { width: 29px; height: 29px; display: inline-flex; align-items: center; justify-content: center; color: var(--brand-d); background: var(--brand-soft); border-radius: 8px; }
.invoice-number:hover { color: var(--brand-d); }
.invoice-date { color: var(--muted) !important; white-space: nowrap; }
.invoice-amount { font-weight: 800; white-space: nowrap; }
.invoice-open { width: 31px; height: 31px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 17px; }
.invoice-open:hover { border-color: var(--brand); color: var(--brand-d); background: var(--brand-soft); }
.invoice-empty { padding: 58px 20px; text-align: center; }
.invoice-empty > span { width: 58px; height: 58px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; color: var(--brand-d); background: var(--brand-soft); border-radius: 17px; }
.invoice-empty h3 { margin-bottom: 6px; font-size: 18px; }
.invoice-empty p { margin-bottom: 17px; color: var(--muted); font-size: 13px; }
.invoice-form-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.invoice-lines-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; }
.invoice-lines-head h3 { font-size: 15px; }
.invoice-lines-head p, .invoice-modal-note { color: var(--muted); font-size: 12px; }
.invoice-modal-note { display: inline-flex; align-items: center; gap: 6px; }
.invoice-back { display: inline-flex; margin-bottom: 7px; color: var(--brand-d); font-size: 12px; font-weight: 800; }
.invoice-document { max-width: 980px !important; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.invoice-document > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.invoice-document > header h2 { margin-top: 5px; font-size: 25px; }
.invoice-document > header > strong { color: var(--brand-d); font-size: 23px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-document-meta { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; padding: 20px 0; }
.invoice-document-meta > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.invoice-document-meta span { color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.invoice-document-meta strong { overflow-wrap: anywhere; font-size: 13px; }
.invoice-table tfoot td { padding: 16px 18px; border-top: 2px solid var(--ink); font-size: 15px; font-weight: 900; }
.recipe-workspace { max-width: 900px !important; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.recipe-workspace-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.recipe-workspace-head h2 { margin-top: 4px; font-size: 18px; }
.recipe-price { color: var(--muted); font-size: 12px; }
.recipe-price strong { margin-left: 4px; color: var(--ink); font-size: 14px; }
.recipe-workspace form { padding: 20px 22px; }
.recipe-edit-rows { display: flex; flex-direction: column; gap: 10px; }
.recipe-edit-row { display: grid; grid-template-columns: minmax(0,1fr) 150px auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fdfbf9; }
.recipe-edit-row label { min-width: 0; display: flex; flex-direction: column; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 800; }
.recipe-edit-row select,.recipe-edit-row input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
.recipe-edit-row select:focus,.recipe-edit-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.recipe-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
@media (max-width: 620px) {
    .invoice-entry { grid-template-columns: 1fr; }
    .invoice-entry .btn-danger { justify-self: end; }
    .modal-actions > * { width: 100%; justify-content: center; }
    .invoice-hero { align-items: stretch; flex-direction: column; }
    .invoice-hero .page-actions > * { flex: 1; justify-content: center; }
    .invoice-summary { grid-template-columns: 1fr; }
    .invoice-toolbar { align-items: stretch; flex-direction: column; }
    .invoice-branch-label { align-items: stretch; flex-direction: column; }
    .invoice-branch-label select { width: 100%; }
    .invoice-form-top { grid-template-columns: 1fr; }
    .invoice-document { padding: 18px 14px; }
    .invoice-document > header { flex-direction: column; }
    .invoice-document-meta { grid-template-columns: 1fr 1fr; }
    .recipe-workspace-head,.recipe-form-actions { align-items: stretch; flex-direction: column; }
    .recipe-edit-row { grid-template-columns: 1fr; }
    .recipe-edit-row .btn-danger { justify-self: end; }
    .recipe-form-actions > * { width: 100%; justify-content: center; }
}
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 19px; }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.modal-close:hover { color: var(--red); background: #fdeaea; }
.order-form { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.order-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; }
.order-form input, .order-form textarea {
    border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 13px;
    font-size: 15px; font-family: inherit; background: #fdfbf9; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.order-form input:focus, .order-form textarea:focus {
    outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft);
}

/* Manzil maydoni + joylashuv tugmasi */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field-label { font-weight: 600; font-size: 13.5px; }
.loc-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--brand-soft); color: var(--brand-d);
    border: 1px solid transparent; border-radius: 999px;
    padding: 5px 12px; font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.loc-btn:hover { background: var(--brand); color: #fff; }
.loc-btn:disabled { opacity: .6; cursor: progress; }
.loc-btn.active { background: var(--brand); color: #fff; }
.field-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Xarita tanlagich */
.map-wrap { display: none; flex-direction: column; gap: 6px; }
.map-wrap.open { display: flex; animation: fade .15s ease; }
.map-picker {
    height: 240px; width: 100%; border-radius: 12px;
    border: 1px solid var(--line); overflow: hidden; z-index: 0;
}
.map-hint { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.map-hint .icon { color: var(--brand); }
.leaflet-container { font-family: inherit; }

/* Forma select (filial) */
.order-form select {
    border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 13px;
    font-size: 15px; font-family: inherit; background: #fdfbf9; color: var(--ink);
    cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.order-form select:focus {
    outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft);
}

/* Admin: filial filtri va chipi */
.branch-filter { display: flex; align-items: center; gap: 10px; margin: -10px 0 22px; flex-wrap: wrap; }
.bf-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--muted); }
.bf-label .icon { color: var(--brand); }
.branch-filter select {
    border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
    font-size: 14px; font-family: inherit; background: var(--surface); color: var(--ink); cursor: pointer;
}
.order-branch {
    display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
    background: var(--brand-soft); color: var(--brand-d);
    padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
}
.order-branch .icon { color: var(--brand); }

/* ---------- Admin: Filiallar boshqaruvi ---------- */
.ghost-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.msg-banner {
    display: flex; align-items: center; gap: 8px;
    background: #e7f7ee; color: #15803d; border: 1px solid #bbe9cf;
    padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; margin-bottom: 20px;
}
.msg-banner.error { background: #fdeaea; color: #a52020; border-color: #f5c2c2; }

.branch-layout { display: grid; grid-template-columns: 390px 1fr; gap: 22px; align-items: start; }
.form-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 20px;
}
.form-card h2 { font-size: 18px; margin-bottom: 14px; }
.admin-form { display: flex; flex-direction: column; gap: 12px; }
.admin-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13.5px; }
.admin-form input[type=text], .admin-form input[type=number] {
    border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
    font-size: 14px; font-family: inherit; background: #fdfbf9; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.admin-form input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.form-row { display: flex; gap: 10px; }
.form-row label { flex: 1; }
.check-row { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); }
#branch-map { height: 220px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; z-index: 0; }

.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.branch-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 7px;
    border-top: 4px solid var(--brand);
}
.branch-card.inactive { opacity: .65; border-top-color: var(--muted); }
.branch-card h3 { font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badge-on  { background: var(--green); color: #fff; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-off { background: var(--muted); color: #fff; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.branch-meta { font-size: 12.5px; color: #404756; display: flex; flex-direction: column; gap: 3px; }
.branch-meta .icon { color: var(--muted); }
.branch-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.branch-actions .ghost-btn { padding: 7px 12px; font-size: 13px; }

@media (max-width: 860px) {
    .branch-layout { grid-template-columns: 1fr; }
}

/* Admin form: textarea / select / fayl */
.admin-form textarea, .admin-form select {
    border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
    font-size: 14px; font-family: inherit; background: #fdfbf9; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.admin-form textarea:focus, .admin-form select:focus {
    outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft);
}
.admin-form input[type=file] { font-size: 13px; padding: 8px; border: 1.5px dashed var(--line); border-radius: 10px; background: #fdfbf9; cursor: pointer; }
.cur-image { display: flex; align-items: center; gap: 12px; }
.cur-image img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* Ikonka pickeri (ko'rinishdan tanlash) */
.pick-field { display: flex; flex-direction: column; gap: 7px; }
.icon-picker {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
    max-height: 224px; overflow-y: auto; padding: 2px;
}
.icon-opt {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    padding: 10px 4px; border: 1.5px solid var(--line); border-radius: 12px;
    background: #fdfbf9; color: var(--muted); cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.icon-opt span { font-size: 9.5px; line-height: 1.1; text-align: center; }
.icon-opt:hover { border-color: var(--brand); color: var(--brand-d); background: var(--brand-soft); }
.icon-opt.selected {
    border-color: var(--brand); color: var(--brand-d);
    background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft);
}
@media (max-width: 520px) { .icon-picker { grid-template-columns: repeat(4, 1fr); } }

/* Admin sahifa sarlavhasi + qo'shish tugmasi */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.btn-primary.add-new { width: auto; padding: 9px 16px; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; }

/* Modal ichidagi admin forma */
.modal-box .admin-form { padding: 18px 22px 22px; }

/* Admin: mahsulotlar ro'yxati (ixcham) */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 10px; }
.prod-card {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-sm); padding: 10px;
}
.prod-card.inactive { opacity: .6; }
.prod-thumb {
    width: 48px; height: 48px; flex: 0 0 auto; border-radius: 10px; overflow: hidden;
    background: var(--brand-soft); color: var(--brand-d);
    display: flex; align-items: center; justify-content: center;
}
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-info { flex: 1; min-width: 0; }
.prod-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; row-gap: 4px; }
.prod-top strong { font-size: 14px; }
.prod-sub { color: var(--muted); font-size: 12px; margin: 1px 0 6px; }
.prod-sub strong { color: var(--brand-d); }
.prod-actions { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.prod-actions .ghost-btn { padding: 5px 8px; font-size: 11.5px; gap: 4px; }
.prod-actions .btn-danger.sm { padding: 5px 8px; }
.loc-status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; min-height: 16px; color: var(--muted); }
.loc-status.success { color: var(--green); font-weight: 600; }
.loc-status.error { color: var(--red); font-weight: 600; }
.loc-status a { color: inherit; text-decoration: underline; }
.map-link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: 13px; }
.map-link:hover { text-decoration: underline; }
.order-summary {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--brand-soft); padding: 14px 16px; border-radius: 12px; font-size: 16px;
}
.order-summary strong { font-size: 20px; font-weight: 800; color: var(--brand-d); }
.order-msg {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    text-align: center; font-size: 14px; min-height: 20px; font-weight: 600;
}
.order-msg.success { color: var(--green); }
.order-msg.error { color: var(--red); }

/* ---------- Mahsulot batafsil oynasi ---------- */
.detail-box { width: 480px; max-width: 100%; padding: 0; position: relative; }
.detail-x {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-sm);
}
.detail-x:hover { background: #fff; }
.detail-media {
    height: 230px; width: 100%; overflow: hidden;
    background: radial-gradient(circle at 50% 45%, #fff 0 14%, #fff0e8 15% 48%, #ffe5d8 49% 50%, #fff2ec 51%);
    display: flex; align-items: center; justify-content: center;
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-media .product-ic { color: var(--brand-d); }
.detail-media .icon { width: 88px; height: 88px; }
.detail-body { padding: 20px 24px 24px; }
.detail-cat {
    display: inline-block; background: var(--brand-soft); color: var(--brand-d);
    padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; margin-bottom: 10px;
}
.detail-body h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 8px; }
.detail-desc { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 18px; }
.detail-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-price { font-size: 24px; font-weight: 800; }
.detail-foot .add-btn { padding: 11px 20px; font-size: 15px; }
.detail-foot .qty-stepper { padding: 5px; }
.detail-foot .qty-stepper .qty-btn { width: 34px; height: 34px; }
.detail-foot .qty-stepper .qty-val { font-size: 16px; min-width: 30px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: #18181b; color: #aaa8a7; margin-top: 70px; padding: 36px 0; border-top: 4px solid var(--brand); }
.site-footer::after { content: ""; position: absolute; right: -90px; top: -130px; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; box-shadow: 0 0 0 48px rgba(255,255,255,.025), 0 0 0 96px rgba(255,255,255,.018); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer-logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 6px; }
.footer-logo .icon { color: #ff7650; }
.site-footer p { font-size: 13.5px; }
.admin-link { display: inline-flex; align-items: center; gap: 7px; color: #9aa3b2; font-size: 14px; }
.admin-link:hover { color: var(--brand); }

/* ============================================================
   Auth / Admin
   ============================================================ */
.auth-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
    background:
        radial-gradient(700px 460px at 22% 14%, rgba(255, 84, 36, .32), transparent 68%),
        radial-gradient(620px 420px at 85% 92%, rgba(255, 128, 75, .14), transparent 70%),
        #1a1a1e;
}
.auth-card {
    background: rgba(255,255,255,.98); border: 1px solid rgba(255,255,255,.72); border-radius: 24px; padding: 36px 32px;
    width: 390px; max-width: 100%; box-shadow: 0 34px 90px -34px rgba(0,0,0,.85);
    display: flex; flex-direction: column; gap: 14px;
}
.auth-logo {
    width: 58px; height: 58px; margin: 0 auto 2px; border-radius: 17px;
    background: linear-gradient(135deg, var(--brand), #ff8d4c); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px -8px rgba(255, 90, 31, .7);
}
.auth-card h1 { text-align: center; font-size: 23px; }
.auth-sub { text-align: center; color: var(--muted); margin-top: -8px; font-size: 14px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; }
.auth-card input {
    border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 13px;
    font-size: 15px; font-family: inherit; background: #fdfbf9; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.auth-card input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.alert-error { background: #fdeaea; color: #a52020; padding: 11px 13px; border-radius: 11px; font-size: 14px; text-align: center; }
.back-link { text-align: center; color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--brand); }

/* ============================================================
   Admin qobig'i (shell): chap tomonda qorong'i sidebar + o'ng tomonda
   och kontent — iiko uslubidagi boshqaruv paneli ko'rinishi.
   ============================================================ */
:root {
    --sb-bg: #161d2c;
    --sb-bg-2: #1c2438;
    --sb-hover: #232c42;
    --sb-active: #262f48;
    --sb-text: #8f9bb3;
    --sb-line: rgba(255, 255, 255, .08);
}
/* Ekran har doim aynan 100vh — sahifa (body) hech qachon o'zi scroll bo'lmaydi;
   faqat kerakli ichki qism (.admin-main) o'z ichida scroll bo'ladi. */
.admin-body { background: var(--bg); display: flex; height: 100vh; overflow: hidden; align-items: stretch; }

.sidebar {
    flex: 0 0 236px; width: 236px;
    background: var(--sb-bg); color: var(--sb-text);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    z-index: 60;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 18px; font-weight: 800; font-size: 16px; color: #fff;
    border-bottom: 1px solid var(--sb-line); flex: 0 0 auto;
}
.logo-toggle { border: 0; padding: 0; cursor: pointer; color: #fff; background: var(--sb-hover); }
.logo-toggle:hover { background: var(--brand); }
.sidebar-brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav { flex: 1 1 auto; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--sb-text); font-weight: 600; font-size: 13.5px;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; position: relative; white-space: nowrap;
}
.sidebar-link .icon { flex: 0 0 auto; }
.sidebar-link:hover { background: var(--sb-hover); color: #fff; }
.sidebar-link.active { background: var(--sb-active); color: #fff; }
.sidebar-link.active::before {
    content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--brand);
}
.sidebar-link .nav-alert { margin-left: auto; }
.sidebar-foot {
    flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
    padding: 12px 14px; border-top: 1px solid var(--sb-line);
}
.sidebar-user { display: flex; align-items: center; gap: 9px; flex: 1 1 auto; min-width: 0; }
.sidebar-user-ic {
    width: 32px; height: 32px; border-radius: 999px; flex: 0 0 auto;
    background: var(--sb-hover); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sidebar-user-info strong { color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span { font-size: 11px; color: var(--sb-text); }
.sidebar-logout {
    flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; color: var(--sb-text);
}
.sidebar-logout:hover { background: var(--sb-hover); color: #fff; }
.sidebar-toggle, .sidebar-overlay { display: none; }
.sidebar-collapsed .sidebar { flex-basis: 76px; width: 76px; }
.sidebar-collapsed .sidebar-brand { justify-content: center; padding-left: 10px; padding-right: 10px; }
.sidebar-collapsed .sidebar-brand-text, .sidebar-collapsed .sidebar-link span:not(.nav-alert), .sidebar-collapsed .sidebar-user-info { display: none; }
.sidebar-collapsed .sidebar-link { justify-content: center; padding-left: 10px; padding-right: 10px; }
.sidebar-collapsed .sidebar-link.active::before { left: -10px; }
.sidebar-collapsed .sidebar-foot { justify-content: center; padding-left: 10px; padding-right: 10px; }
.sidebar-collapsed .sidebar-user { flex: 0 0 auto; }
.sidebar-collapsed .sidebar-logout { display: none; }
.sidebar-collapsed .sidebar { overflow: visible; }
.sidebar-collapsed .sidebar-nav { overflow: visible; }
.sidebar-collapsed [data-tooltip] { position: relative; }
.sidebar-collapsed [data-tooltip]::after {
    content: attr(data-tooltip); position: absolute; left: calc(100% + 12px); top: 50%;
    transform: translateY(-50%) translateX(-4px); opacity: 0; pointer-events: none; z-index: 500;
    background: var(--ink); color: #fff; padding: 8px 11px; border-radius: 8px;
    font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow);
    transition: opacity .16s ease, transform .16s ease;
}
.sidebar-collapsed [data-tooltip]:hover::after, .sidebar-collapsed [data-tooltip]:focus-visible::after {
    opacity: 1; transform: translateY(-50%) translateX(0);
}
.sidebar-collapsed .logo-toggle::after { left: calc(100% + 10px); }

.admin-body .admin-main {
    flex: 1 1 auto; min-width: 0; max-width: none; margin: 0;
    height: 100vh; overflow-y: auto;
    padding: max(26px, env(safe-area-inset-top)) max(30px, env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) max(30px, env(safe-area-inset-left));
    overflow-x: hidden;
}
.admin-body .admin-main:not(.pos-main) > * { width: 100%; max-width: 1180px; margin-left: auto; margin-right: auto; }
.admin-main h1 { margin-bottom: 14px; font-size: 20px; letter-spacing: -.02em; }

/* Sahifa sarlavhasi (+ "Yangi ..." tugma) — ro'yxat pastda scroll bo'lganda ham doim ko'rinadi */
.admin-main .page-head {
    position: sticky; top: 0; z-index: 5; background: var(--bg);
    padding: 6px 0 12px; margin-bottom: 14px;
}
.page-head > div:first-child { min-width: 0; }
.page-head p { margin-top: 4px; line-height: 1.45; }
.page-head .btn-primary, .page-head .ghost-btn { flex: 0 0 auto; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.data-table th.table-actions { text-align: right; }
.ui-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.ui-status.active { color: #087a3e; background: #e9f8f0; }
.ui-status.inactive { color: #8a5560; background: #f6eef0; }
.ui-status.default { color: #087a3e; background: #e9f8f0; }
.ui-status.custom { color: #315ecb; background: #edf2ff; }
.modal-box { overscroll-behavior: contain; }
.modal-head > div { min-width: 0; }
.modal-head h2 { text-wrap: balance; }

/* Bir xil boshqaruv sahifalari */
.units-page .admin-main, .management-page .admin-main { background: linear-gradient(180deg, #fff9f5 0, var(--bg) 260px); }
.management-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 8px 2px; margin-bottom: 18px; }
.management-hero-copy { min-width: 0; }
.management-hero h1 { margin: 5px 0 7px; font-size: clamp(24px, 3vw, 34px); text-wrap: balance; }
.management-hero p { max-width: 650px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.management-eyebrow, .modal-eyebrow { display: inline-flex; align-items: center; color: var(--brand-d); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.modal-eyebrow.danger { color: #b52b39; }
.management-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.management-stat { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 17px 18px; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); }
.management-stat-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 12px; font-size: 18px; font-weight: 900; }
.management-stat-icon.orange { color: var(--brand-d); background: var(--brand-soft); }
.management-stat-icon.green { color: var(--green); background: #e9f8f0; }
.management-stat-icon.blue { color: var(--blue); background: #edf2ff; }
.management-stat-icon.red { color: var(--red); background: #fdeaea; }
.management-stat div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.management-stat div > span { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.management-stat strong { color: var(--ink); font-size: 20px; font-variant-numeric: tabular-nums; }
.management-list-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.management-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.management-toolbar h2 { margin-bottom: 3px; font-size: 17px; }
.management-toolbar p { color: var(--muted); font-size: 12.5px; }
.management-search { display: flex; align-items: center; gap: 7px; }
.management-search input { width: min(240px, 38vw); min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fdfbf9; color: var(--ink); font: inherit; }
.management-search input:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.management-count { flex: 0 0 auto; padding: 6px 10px; color: var(--brand-d); background: var(--brand-soft); border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.management-table-wrap { overflow-x: auto; }
.management-table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 13px; }
.management-table th { padding: 11px 18px; color: var(--muted); background: #fdfbf9; font-size: 10.5px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.management-table td { padding: 13px 18px; border-top: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.management-table tbody tr { transition: background-color .15s ease; }
.management-table tbody tr:hover { background: #fffaf6; }
.management-table th.table-actions { text-align: right; }
.management-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.unit-name { display: inline-flex; align-items: center; gap: 10px; }
.unit-name > span { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--brand-d); background: var(--brand-soft); border-radius: 9px; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.unit-name strong { font-size: 13px; }
.unit-short-name { display: inline-flex; padding: 4px 8px; color: var(--ink); background: #f5f2ef; border-radius: 7px; font-family: inherit; font-size: 12px; font-weight: 800; }
.protected-label { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.management-empty { padding: 58px 20px; text-align: center; }
.management-empty > span { width: 58px; height: 58px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; color: var(--brand-d); background: var(--brand-soft); border-radius: 17px; font-size: 22px; }
.management-empty h3 { margin-bottom: 6px; font-size: 18px; }
.management-empty p { margin-bottom: 17px; color: var(--muted); font-size: 13px; }
.form-help { margin-top: -4px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.modal-box-confirm { width: 430px; }
.modal-box-confirm .order-form > p { color: var(--muted); line-height: 1.6; }
.modal-box-confirm .order-form > p strong { color: var(--ink); }
.modal-open { overflow: hidden; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.pagination { display: flex; justify-content: center; gap: 6px; padding: 16px; border-top: 1px solid var(--line); }
.pagination a { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 800; }
.pagination a:hover, .pagination a.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.transfer-history { padding: 0; overflow: hidden; }
.transfer-history h2 { margin: 0; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.transfer-history-list { display: grid; }
.transfer-history-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.transfer-history-list > div:last-child { border-bottom: 0; }
.transfer-history-list span { color: var(--muted); }
.stock-quantity { font-variant-numeric: tabular-nums; }
.stock-quantity.low { display: inline-flex; padding: 4px 8px; color: var(--red); background: #fdeaea; border-radius: 7px; }
.supplier-phone { color: var(--blue); font-weight: 700; white-space: nowrap; }
.supplier-phone:hover { color: var(--brand-d); text-decoration: underline; text-underline-offset: 3px; }
.supplier-note { display: block; max-width: 280px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.semi-products-table { min-width: 900px; }
.suppliers-table { min-width: 820px; }
.recipe-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 8px 2px; }
.recipe-page-head > div { min-width: 0; }
.recipe-page-head .invoice-back { margin-bottom: 11px; }
.recipe-page-head .management-eyebrow { display: flex; width: max-content; }
.recipe-page-head h1 { margin: 5px 0 7px; font-size: clamp(24px, 3vw, 32px); text-wrap: balance; overflow-wrap: anywhere; }
.recipe-page-head p { max-width: 650px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.recipe-unit-badge { flex: 0 0 auto; padding: 9px 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); font-size: 12px; }
.recipe-unit-badge strong { margin-left: 4px; color: var(--ink); font-size: 13px; }
.remove-recipe-row:disabled { opacity: .38; cursor: not-allowed; }

/* Eski admin sahifalarini ham yangi ritmga moslash */
.admin-main > .page-head { min-height: 66px; border-bottom: 1px solid rgba(239,233,225,.9); }
.admin-main > .page-head h1 { font-size: clamp(22px, 2.4vw, 29px); text-wrap: balance; overflow-wrap: anywhere; }
.admin-main > .page-head p { max-width: 680px; font-size: 13.5px; }
.admin-main > .panel { border-radius: 18px; }
.data-table th { background: #fdfbf9; }
.data-table td { font-variant-numeric: tabular-nums; }

@media (max-width: 620px) {
    .management-hero { align-items: stretch; flex-direction: column; }
    .management-hero > .btn-primary { width: 100%; justify-content: center; }
    .management-summary { grid-template-columns: 1fr; }
    .management-toolbar { align-items: flex-start; flex-direction: column; }
    .management-search { width: 100%; }
    .management-search label, .management-search input { width: 100%; }
    .transfer-history-list > div { align-items: flex-start; flex-direction: column; gap: 4px; }
    .recipe-page-head { align-items: stretch; flex-direction: column; }
    .recipe-unit-badge { width: max-content; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tab {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
    padding: 7px 13px; font-weight: 600; font-size: 13px; color: var(--muted); transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.tab:hover { border-color: var(--brand); color: var(--brand-d); }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab .badge { background: rgba(0, 0, 0, .08); border-radius: 999px; padding: 1px 8px; font-size: 12px; min-width: 20px; text-align: center; }
.tab.active .badge { background: rgba(255, 255, 255, .22); }

.empty-state {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 48px; text-align: center; color: var(--muted); box-shadow: var(--shadow-sm);
}

/* Order cards (ixcham — ekranda ko'proq zakaz) */
.orders-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(284px, 1fr)); gap: 12px; }
.order-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-sm); padding: 13px 14px; display: flex; flex-direction: column; gap: 9px;
    position: relative; overflow: hidden;
}
.order-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.order-top { display: flex; align-items: center; justify-content: space-between; }
.order-id strong { font-size: 16px; }
.order-time { display: block; color: var(--muted); font-size: 11.5px; }

.status-badge { padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; }
.st-new { background: var(--blue); }
.st-preparing { background: var(--amber); }
.st-ready { background: var(--cyan); }
.st-delivered { background: var(--green); }
.st-cancelled { background: var(--muted); }

.order-customer { font-size: 13px; color: #404756; display: flex; flex-direction: column; gap: 4px; }
.order-customer a { color: var(--blue); }
.oc-ic { color: var(--muted); }
.order-comment { color: var(--amber); font-style: italic; }

.order-items {
    list-style: none; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
    padding: 9px 0; display: flex; flex-direction: column; gap: 5px;
}
.order-items li { display: flex; justify-content: space-between; font-size: 13px; }

.order-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; }
.order-total { font-size: 14px; }
.order-total strong { font-size: 16px; font-weight: 800; }
.order-buttons { display: flex; gap: 7px; flex-wrap: wrap; }
.inline { display: inline; }

/* ---------- Responsiv ---------- */
@media (max-width: 860px) {
    .sidebar-collapsed .sidebar { flex-basis: 240px; width: 240px; }
    .sidebar-collapsed .sidebar-brand { justify-content: flex-start; padding-left: 18px; padding-right: 18px; }
    .sidebar-collapsed .sidebar-brand-text, .sidebar-collapsed .sidebar-link span:not(.nav-alert), .sidebar-collapsed .sidebar-user-info { display: block; }
    .sidebar-collapsed .sidebar-link { justify-content: flex-start; padding-left: 12px; padding-right: 12px; }
    .sidebar-collapsed .sidebar-foot { justify-content: flex-start; padding-left: 14px; padding-right: 14px; }
    .sidebar-collapsed .sidebar-user { flex: 1 1 auto; }
    .sidebar-collapsed .sidebar-logout { display: inline-flex; }
    .nav-links { display: none; }
    .hero-inner { grid-template-columns: 1fr; min-height: 0; padding: 46px; }
    .hero-text { max-width: 650px; }
    .hero-text h1 { font-size: 45px; }
    .hero-stats { width: 100%; }
    .hero-visual { display: none; }
    .stat { flex: 1; min-width: 0; }
    .catbar { top: 72px; }
}
@media (max-width: 520px) {
    .cart-btn-label { display: none; }
    .header-inner { height: 62px; }
    .catbar { top: 62px; }
    .stat strong { font-size: 21px; }
}

/* ============================================================
   Mobil qulaylik (telefon) — overflow, tegish o'lchami, formalar
   ============================================================ */

/* Gorizontal siljishni butunlay to'xtatish */
html, body { overflow-x: hidden; }

/* Uzun nomlar/matn kartani kengaytirib yubormasligi uchun */
.product-name, .product-desc, .ci-name, .detail-body h2,
.prod-top strong, .order-customer { overflow-wrap: anywhere; }

/* Tap paytidagi kulrang chaqnashni olib tashlash */
* { -webkit-tap-highlight-color: transparent; }

/* Leaflet xaritalari barmoq harakatini o'zi boshqarsin (modal/sahifa scroll bilan urishmasin) */
.map-picker, #branch-map { touch-action: none; }

/* Kategoriya pill-navigatsiyasi: silliq scroll + snap (telefonda yagona navigatsiya) */
.catbar-inner {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 18px;
    padding-right: 26px;
}
.cat-pill { scroll-snap-align: start; }

/* ---- Telefon (<=560px) ---- */
@media (max-width: 560px) {
    /* iOS fokusda zoom qilmasligi uchun barcha forma maydonlari kamida 16px */
    .order-form input, .order-form textarea, .order-form select,
    .admin-form input, .admin-form textarea, .admin-form select,
    .auth-card input { font-size: 16px; }

    /* Savatcha va miqdor tugmalari — qulay tegish o'lchami (>=38px) */
    .qty-btn, .ci-remove { width: 40px; height: 40px; }
    .ci-controls { gap: 8px; }
    .qty-stepper { gap: 4px; }
    .qty-stepper .qty-btn { width: 38px; height: 38px; }

    /* Manzil: yorliq tepada, ikkala tugma to'liq qatorda va kattaroq */
    .field-top { flex-direction: column; align-items: stretch; gap: 8px; }
    .field-actions { width: 100%; }
    .field-actions .loc-btn { flex: 1; justify-content: center; padding: 10px 12px; font-size: 13.5px; }

    /* Xarita tanlagich — telefonda balandroq, qulay tanlash */
    .map-picker { height: 280px; }

    /* Savatcha paneli — to'liq kenglik, ixcham padding, nom ortib ketmasin */
    .cart-panel { max-width: 100vw; }
    .cart-head, .cart-footer { padding-left: 16px; padding-right: 16px; }
    .cart-items { padding-left: 14px; padding-right: 14px; }
    .ci-info { min-width: 0; }
    .ci-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* Menyu — telefonda ixcham gorizontal kartalar (rasm chapda, tez skan qilish) */
    .product-grid { grid-template-columns: 1fr; gap: 12px; }
    .product-card { flex-direction: row; align-items: center; gap: 12px; padding: 11px; border-radius: 17px; }
    .product-card:hover { transform: none; }
    .product-media { width: 88px; height: 88px; flex: 0 0 auto; margin-bottom: 0; border-radius: 13px; }
    .product-media::before { width: 66px; height: 66px; }
    .product-media::after { width: 80px; height: 80px; }
    .product-media .icon { width: 34px; height: 34px; }
    /* Kontent ustuni torayishi mumkin — "Qo'shish" tugma kartadan chiqib ketmasin */
    .product-body { min-width: 0; }
    .product-name { font-size: 15px; }
    .product-desc {
        font-size: 12.5px; margin-bottom: 8px;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .product-price { font-size: 15.5px; }
    /* Narx + tugma sig'masa, tugma keyingi qatorga tushadi (doim to'liq ko'rinadi) */
    .product-foot { flex-wrap: wrap; row-gap: 6px; }
    .add-btn { flex-shrink: 0; }

    /* Hero sarlavhasi tabiiy o'ralsin (qattiq <br> ni olib tashlaymiz) */
    .hero { padding: 10px 0 8px; }
    .hero-inner { padding: 34px 22px 28px; border-radius: 24px; }
    .hero-text h1 { font-size: 30px; line-height: 1.08; overflow-wrap: anywhere; }
    .hero-text h1 br { display: none; }
    .hero-text p { font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
    .hero-actions { align-items: stretch; flex-direction: column; gap: 13px; }
    .btn-primary.hero-btn { width: 100%; }
    .hero-hours { justify-content: center; }
    .hero-stats { margin-top: 24px; }
    .hero-stats { gap: 10px; }
    .stat { padding: 12px 8px; text-align: center; }
    .stat strong { font-size: 19px; }
    .stat span { font-size: 9.5px; }

    /* Kategoriya anchor sticky panellar ostiga kirib ketmasin */
    .menu-category { scroll-margin-top: 120px; }

    /* Batafsil oyna oyog'i — narx va tugma kerak bo'lsa qatorga bo'linsin */
    .detail-foot { flex-wrap: wrap; row-gap: 12px; }
    .detail-foot .add-btn { flex: 1; justify-content: center; }
    .detail-body { padding: 18px 16px 20px; }

    /* ---- Admin panel: sidebar mobil oynada tortiladigan panelga aylanadi ---- */
    .admin-body { display: block; }
    .sidebar {
        position: fixed; top: 0; left: 0; height: 100vh; width: 240px;
        transform: translateX(-100%); transition: transform .25s ease; z-index: 200;
    }
    .sidebar.open { transform: none; }
    .sidebar-toggle {
        display: flex; position: fixed; top: 14px; left: 14px; z-index: 150;
        width: 42px; height: 42px; border-radius: 11px; border: none; cursor: pointer;
        background: var(--sb-bg); color: #fff; align-items: center; justify-content: center;
        box-shadow: var(--shadow);
    }
    .sidebar-overlay {
        display: block; position: fixed; inset: 0; background: rgba(15, 12, 8, .5);
        opacity: 0; visibility: hidden; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; z-index: 190;
    }
    .sidebar-overlay.show { opacity: 1; visibility: visible; }
    .admin-body .admin-main { padding: 74px 16px 48px; }
    .admin-body .pos-main { padding-top: 70px; }
    .admin-main h1 { font-size: 22px; }
    /* Mobilda gamburger tugmasi bilan ustma-ust tushmasin — sarlavha oddiy oqimda qoladi */
    .admin-main .page-head { position: static; background: none; padding: 0 0 10px; }
    .orders-list, .prod-grid { grid-template-columns: 1fr; }
    .btn-primary.sm, .btn-danger.sm, .ghost-btn { min-height: 42px; }
    .order-buttons { width: 100%; }
    .order-buttons .inline { flex: 1; }
    .order-buttons .inline .btn-primary.sm,
    .order-buttons .inline .btn-danger.sm { width: 100%; }
    .branch-filter select { min-height: 42px; }
    #branch-map { height: 280px; }
}

/* ---- Juda tor telefonlar (<=400px): ikonka tanlagich 3 ustun, o'qiladigan yozuv ---- */
@media (max-width: 400px) {
    .icon-picker { grid-template-columns: repeat(3, 1fr); }
    .icon-opt span { font-size: 11px; }
    .icon-opt { padding: 12px 4px; }
}

/* ---- Ishchilar (staff) sahifasi ---- */
.role-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.role-chip.super  { background: var(--brand-soft); color: var(--brand-d); }
.role-chip.worker { background: #eef1f6; color: #5a6473; }
.prod-note { color: var(--muted); font-size: 12.5px; font-style: italic; }
.form-hint { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin: -2px 0 2px; }
.form-hint .icon { color: var(--brand); flex: 0 0 auto; margin-top: 2px; }
.branch-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.branch-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.branch-checks .check-row { font-size: 13.5px; }
.field-label small { color: var(--muted); font-weight: 500; }

/* ============================================================
   Kassa (POS)
   ============================================================ */
.container-wide { max-width: none; margin: 0; padding: 0; }
.admin-body .pos-main { flex: 1 1 auto; min-width: 0; max-width: none; margin: 0; padding: 14px 16px 14px; }

.pos-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.pos-bar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pos-cashier { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.pos-cashier .icon { color: var(--brand); }
.pos-branch-pick { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }
.pos-branch-pick select { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-family: inherit; font-size: 14px; background: var(--surface); color: var(--ink); cursor: pointer; }

.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.pos-pane { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; max-height: calc(100vh - 106px); min-height: 0; }

/* Kassa sahifasi — to'liq balandlik: panellar aynan qolgan joyni egallaydi, har biri ichida scroll */
@media (min-width: 881px) {
    .admin-body .pos-main {
        height: 100vh; overflow: hidden; display: flex; flex-direction: column;
    }
    .pos-page .pos-bar { flex: 0 0 auto; }
    .pos-page .pos-grid { flex: 1 1 auto; min-height: 0; align-items: stretch; }
    .pos-page .pos-pane { max-height: 100%; height: 100%; }
}

/* "Zakazlar" tab tugmasi + soni */
.pos-orders-toggle { display: inline-flex; align-items: center; gap: 7px; background: var(--ink); color: #fff; border: none; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; }
.pos-orders-toggle:hover { background: #000; transform: translateY(-1px); }
.pos-ord-count { background: #5a6473; color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; padding: 0 6px; }
.pos-ord-count.has { background: var(--brand); }

/* Zakazlar chekma (drawer) */
.pos-drawer-overlay { position: fixed; inset: 0; background: rgba(20, 14, 8, .5); opacity: 0; visibility: hidden; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; z-index: 90; }
.pos-drawer-overlay.show { opacity: 1; visibility: visible; }
.pos-drawer { position: fixed; top: 0; right: 0; width: 380px; max-width: 94vw; height: 100vh; background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .26s cubic-bezier(.4, 0, .2, 1); z-index: 100; display: flex; flex-direction: column; }
.pos-drawer.open { transform: translateX(0); }
.pos-orders-head-btns { display: flex; gap: 6px; }

/* Katalog */
.pos-catalog { overflow: hidden; }
.pos-cat-pills { display: flex; gap: 8px; padding: 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.pos-cat-pill { white-space: nowrap; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.pos-cat-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pos-prod-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.pos-cat-title { font-size: 15px; margin: 6px 2px 10px; }
.pos-prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; margin-bottom: 12px; }
.pos-prod { display: flex; flex-direction: column; justify-content: space-between; gap: 5px; min-height: 58px; text-align: left; border: 1.5px solid var(--line); background: #fffdfb; border-radius: 11px; padding: 9px 10px; cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; font-family: inherit; }
.pos-prod:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pos-prod:active { transform: scale(.97); }
.pos-prod-name { font-weight: 700; font-size: 13.5px; line-height: 1.25; color: var(--ink); }
.pos-prod-price { font-weight: 800; color: var(--brand-d); font-size: 13.5px; }

/* Chek — savat o'rtada cho'ziladi (scroll), to'lov + klaviatura + tugma pastda.
   Odatda faqat savat scroll bo'ladi; "Mijoz ma'lumoti" ochilib joy yetmasa — butun
   panel zaxira sifatida scroll bo'ladi (sticky yo'q, shuning uchun ustma-ust tushmaydi) */
.pos-ticket { padding: 10px; gap: 6px; overflow-y: auto; }
.pos-type { display: flex; gap: 6px; flex: 0 0 auto; }
.pos-type-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink); font-family: inherit; }
.pos-type-btn.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-d); }
/* Savat scroll bo'lganda × (o'chirish) tugmasi scroll paneli ostida qolmasin:
   o'ng tomonda gutter (joy) qoldiramiz */
.pos-cart { flex: 1 1 auto; min-height: 72px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 10px; scrollbar-gutter: stable; }
/* Ingichka, ko'rinadigan scroll panel (× tugmaga xalaqit bermaydi) */
.pos-cart::-webkit-scrollbar { width: 8px; }
.pos-cart::-webkit-scrollbar-thumb { background: #e0d6cc; border-radius: 999px; }
.pos-cart::-webkit-scrollbar-track { background: transparent; }
.pos-cart-empty { color: var(--muted); text-align: center; padding: 18px 0; font-size: 13.5px; }
.pos-ci { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.pos-ci-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.pos-ci-name { font-weight: 600; font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-ci-price { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.pos-ci-ctrl { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pos-ci-qty { min-width: 20px; text-align: center; font-weight: 700; font-size: 13.5px; }
.pos-ci-sum { min-width: 74px; text-align: right; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.pos-ci-rm { border: none; background: none; color: #c9b9ae; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.pos-ci-rm:hover { color: var(--red); }
.pos-ci .qty-btn { width: 28px; height: 28px; font-size: 16px; font-weight: 700; }

.pos-fields { display: flex; flex-direction: column; gap: 7px; }
.pos-fields input { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit; background: #fdfbf9; }
.pos-fields input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.pos-field-delivery { display: flex; flex-direction: column; gap: 7px; }
/* Doimo ko'rinadigan zakaz izohi */
.pos-comment { flex: 0 0 auto; width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; font-family: inherit; background: #fdfbf9; color: var(--ink); }
.pos-comment:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.pos-comment::placeholder { color: var(--muted); }

/* "Zakaz berish" — pastda, ixcham */
.pos-ticket #pos-submit { flex: 0 0 auto; padding: 12px; font-size: 14.5px; }

/* Yopiladigan "Mijoz ma'lumoti" bo'limi */
.pos-cust { border: 1px solid var(--line); border-radius: 10px; flex: 0 0 auto; }
.pos-cust > summary { list-style: none; cursor: pointer; padding: 8px 12px; font-weight: 700; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pos-cust > summary::-webkit-details-marker { display: none; }
.pos-cust > summary .icon { color: var(--brand); }
.pos-cust > summary::after { content: '+'; margin-left: auto; font-size: 18px; line-height: 1; font-weight: 800; }
.pos-cust[open] > summary::after { content: '−'; }
.pos-cust .pos-fields { padding: 0 10px 10px; }
.pos-fullpay { flex: 0 0 auto; padding: 9px 16px; font-weight: 800; font-size: 13.5px; background: var(--brand-soft); color: var(--brand-d); border: 1.5px solid var(--brand); border-radius: 10px; cursor: pointer; font-family: inherit; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; }
.pos-fullpay:hover { background: var(--brand); color: #fff; }

.pos-total { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: var(--brand-soft); border-radius: 10px; font-size: 14px; font-weight: 600; flex: 0 0 auto; }
.pos-total strong { font-size: 19px; font-weight: 800; color: var(--brand-d); }
.pos-pay { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.pos-pay-methods { display: flex; gap: 6px; }
.pos-pay-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink); font-family: inherit; }
.pos-pay-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pos-paid-row { display: flex; gap: 6px; }
.pos-paid-row input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit; background: #fdfbf9; }
.pos-change { font-weight: 700; font-size: 13px; color: var(--green); }
.pos-change:empty { display: none; }
.pos-msg { text-align: center; font-weight: 600; font-size: 13px; min-height: 16px; }
.pos-msg.success { color: var(--green); }
.pos-msg.error { color: var(--red); }

/* Raqamli klaviatura tugmasi (ko'rsatish/yashirish) */
.pos-kb-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1.5px dashed var(--line); background: var(--bg); color: var(--muted); border-radius: 10px; padding: 9px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.pos-kb-toggle:hover { border-color: var(--brand); color: var(--brand-d); }
.pos-kb-toggle.active { background: var(--brand-soft); border-style: solid; border-color: var(--brand); color: var(--brand-d); }

/* Raqamli klaviatura (doim ko'rinadi, ixcham) */
.pos-numpad { border: 1px solid var(--line); border-radius: 10px; padding: 5px; display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }
.pos-numpad-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.pos-numpad-head span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.pos-numpad-head .icon { color: var(--brand); }
.pos-numpad-target { background: var(--brand-soft); color: var(--brand-d); padding: 2px 12px; border-radius: 999px; font-weight: 700; }
/* 4 ustun: raqamlar + o'ng tomonda ⌫ / Tozalash (vertikal joy tejaladi) */
.pos-numpad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pos-numpad-keys button { padding: 5px 0; font-size: 16px; font-weight: 700; border: 1.5px solid var(--line); background: #fffdfb; border-radius: 9px; cursor: pointer; color: var(--ink); font-family: inherit; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease; }
.pos-numpad-keys button:hover { border-color: var(--brand); }
.pos-numpad-keys button:active { background: var(--brand-soft); transform: scale(.96); }
.pos-numpad-keys .np-fn { background: var(--bg); color: var(--muted); font-size: 15px; }
.np-clear { border: 1.5px solid var(--line); background: var(--bg); color: var(--red); border-radius: 9px; padding: 5px; font-weight: 700; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.np-clear:hover { background: #fdeaea; border-color: #f5c2c2; }

/* Jonli zakazlar */
.pos-orders-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pos-orders-head h3 { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; }
.pos-orders-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pos-order { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.pos-o-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pos-o-top strong { font-size: 15px; }
.otype { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-d); }
.otype .icon { color: inherit; }
.otype-pos { background: #eef1f6; color: #5a6473; }
.pos-o-time { margin-left: auto; color: var(--muted); font-size: 12px; }
.pos-o-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: #404756; }
.pos-o-meta .icon { color: var(--muted); }
.pos-o-items { list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 7px 0; }
.pos-o-items li { display: flex; justify-content: space-between; gap: 8px; }
.pos-o-pay { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.pay-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pay-paid { background: #e7f7ee; color: #15803d; }
.pay-partial { background: #fff3e0; color: #b25e00; }
.pay-unpaid { background: #f1f0ee; color: #6b7280; }
.pay-refunded { background: #fdeaea; color: #a52020; }
.pos-o-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-o-actions button { font-size: 12.5px; }

@media (max-width: 880px) {
    .pos-grid { grid-template-columns: 1fr; }
    .pos-pane { max-height: none; }
    .pos-prod-scroll { max-height: 380px; }
    .pos-cart { max-height: 260px; }
}

/* ============================================================
   Hisobotlar (super admin)
   ============================================================ */
.rep-periods { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-period {
    border: 1px solid var(--line); background: var(--surface); color: var(--muted);
    padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: 13px; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.rep-period:hover { border-color: var(--brand); color: var(--brand-d); }
.rep-period.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.rep-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 24px; }
.rep-stat {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-sm); padding: 14px 16px; display: flex; align-items: center; gap: 12px;
}
.rep-stat-ic {
    width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px;
    background: var(--brand-soft); color: var(--brand-d);
    display: inline-flex; align-items: center; justify-content: center;
}
.rep-stat-ic.green { background: #e7f7ee; color: #15803d; }
.rep-stat-ic.brand { background: var(--brand-soft); color: var(--brand-d); }
.rep-stat-ic.blue  { background: #e8eefc; color: var(--blue); }
.rep-stat strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.rep-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }

.rep-h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; margin: 8px 0 12px; }
.rep-h2 .icon { color: var(--brand); }

.rep-table-wrap {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-sm); overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.rep-table th, .rep-table td { padding: 11px 12px; text-align: right; white-space: nowrap; }
.rep-table thead th {
    background: #fbf6f1; color: var(--muted); font-weight: 700; font-size: 12px;
    border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
.rep-table .rep-tl { text-align: left; }
.rep-table tbody tr { border-bottom: 1px solid var(--line); }
.rep-table tbody tr:hover { background: #fdfbf9; }
.rep-table tbody td strong { font-size: 14px; }
.rep-bname { font-weight: 700; }
.rep-sub { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.rep-pos { color: var(--green); font-weight: 700; }
.rep-neg { color: var(--red); font-weight: 700; }
.rep-table tfoot td {
    background: #fbf6f1; font-weight: 800; border-top: 2px solid var(--line);
}
.rep-table tfoot .rep-tl { color: var(--ink); }
.rep-note { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; margin: 10px 2px 4px; }
.rep-note .icon { color: var(--brand); flex: 0 0 auto; margin-top: 2px; }

.rep-top {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-sm); padding: 6px 14px;
}
.rep-top-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rep-top-row:last-child { border-bottom: none; }
.rep-rank {
    width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px;
    background: var(--brand-soft); color: var(--brand-d); font-weight: 800; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
}
.rep-top-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-top-qty { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rep-top-rev { font-weight: 800; color: var(--brand-d); font-size: 13.5px; white-space: nowrap; min-width: 96px; text-align: right; }

@media (max-width: 560px) {
    .rep-periods { width: 100%; }
    .rep-period { flex: 1; text-align: center; }
    .rep-top-qty { display: none; }
}

/* Davr tanlash paneli (tayyor davrlar + ixtiyoriy sana oralig'i) */
.rep-active {
    display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
    font-weight: 700; font-size: 13px; background: var(--surface);
    border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
}
.rep-active .icon { color: var(--brand); }
.rep-filter {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-sm); padding: 12px 14px; margin-bottom: 20px;
}
.rep-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rep-range label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rep-range input[type=date] {
    border: 1.5px solid var(--line); border-radius: 9px; padding: 7px 10px;
    font-size: 13px; font-family: inherit; background: #fdfbf9; color: var(--ink); cursor: pointer;
}
.rep-range input[type=date]:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.rep-apply { cursor: pointer; }
.rep-clear { display: inline-flex; align-items: center; gap: 4px; color: var(--red); font-weight: 600; font-size: 12.5px; }
.rep-clear:hover { text-decoration: underline; }

/* Ulush bari */
.rep-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.rep-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #ff8a3d); border-radius: 999px; }
.rep-share { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.rep-share .rep-bar { flex: 1; min-width: 70px; }
.rep-share-pct { font-weight: 700; font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 38px; text-align: right; }
.rep-prod-table tbody .rep-rank { width: 22px; height: 22px; font-size: 11.5px; border-radius: 7px; }

/* Kategoriyalar bo'yicha kartalar */
.rep-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 8px; }
.rep-cat {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-sm); padding: 13px 15px; display: flex; flex-direction: column; gap: 4px;
}
.rep-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rep-cat-name { font-weight: 700; font-size: 14px; }
.rep-cat-pct { font-weight: 800; font-size: 13px; color: var(--brand-d); }
.rep-cat-rev { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.rep-cat-qty { color: var(--muted); font-size: 12px; margin-bottom: 4px; }

/* ============================================================
   Audit jurnali + super admin parol kartasi
   ============================================================ */
.pw-card { margin-bottom: 22px; max-width: 460px; }
.pw-card > summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.pw-card > summary::-webkit-details-marker { display: none; }
.pw-card > summary .icon { color: var(--brand); }
.pw-card[open] > summary { margin-bottom: 4px; }

.audit-list { display: flex; flex-direction: column; gap: 6px; }
.audit-row {
    display: grid; grid-template-columns: 150px 150px 160px 1fr 120px; gap: 10px; align-items: baseline;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    padding: 9px 12px; font-size: 13px; box-shadow: var(--shadow-sm);
}
.audit-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.audit-who { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.audit-who .icon { color: var(--muted); }
.audit-act { font-weight: 700; color: var(--brand-d); }
.audit-ent { color: #404756; }
.audit-det { color: var(--muted); }
.audit-ip { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
@media (max-width: 860px) {
    .audit-row { grid-template-columns: 1fr 1fr; }
    .audit-ip { text-align: left; }
}

/* ============================================================
   Sklad (masalliqlar) + Tex karta (retsept)
   ============================================================ */
.nav-alert {
    background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800;
    min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center;
}
.ghost-btn.warn { border-color: var(--amber); color: #b25e00; }
.ghost-btn.warn:hover { background: #fff3e0; }

.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.stock-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-sm); padding: 14px; display: flex; flex-direction: column; gap: 8px;
    border-top: 4px solid var(--green);
}
.stock-card.low { border-top-color: var(--red); }
.stock-card.inactive { opacity: .6; border-top-color: var(--muted); }
.stock-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stock-top strong { font-size: 15px; }
.stock-qty { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.stock-qty span { font-size: 14px; font-weight: 600; color: var(--muted); }
.stock-qty.low { color: var(--red); }
.stock-sub { font-size: 12.5px; color: var(--muted); }
.stock-move-form { display: flex; gap: 6px; align-items: center; }
.stock-move-form input[type=number] {
    flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 10px;
    font-size: 14px; font-family: inherit; background: #fdfbf9;
}
.stock-move-form select {
    border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 8px; font-family: inherit;
    font-size: 13px; background: var(--surface); cursor: pointer;
}
.stock-move-form .btn-primary.sm { padding: 8px 12px; }
.stock-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.stock-actions .ghost-btn { padding: 5px 9px; font-size: 12px; }
.stock-actions .btn-danger.sm { padding: 5px 9px; }

.stock-history { margin-top: 20px; }
.stock-history > summary {
    list-style: none; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted);
    display: inline-flex; align-items: center; gap: 8px;
}
.stock-history > summary::-webkit-details-marker { display: none; }
.stock-history > summary .icon { color: var(--brand); }

/* Nakladnoylar (kirim/chiqim hujjatlari) */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-sm); overflow: hidden;
}
.doc-card > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; flex-wrap: wrap;
}
.doc-card > summary::-webkit-details-marker { display: none; }
.doc-card[open] > summary { border-bottom: 1px solid var(--line); }
.doc-no { font-weight: 800; font-size: 14.5px; }
.doc-reason { font-size: 12.5px; font-weight: 700; color: var(--red); background: #fdeaea; padding: 3px 10px; border-radius: 999px; }
.doc-meta { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.doc-body { padding: 10px 16px 14px; }
.doc-note { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.doc-row {
    display: flex; justify-content: space-between; gap: 10px; padding: 6px 0;
    border-bottom: 1px dashed var(--line); font-size: 14px;
}
.doc-row:last-child { border-bottom: none; }

/* Moliya panorami: Foyda-Zarar (P&L) kartasi */
.pl-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 22px 24px; margin-bottom: 22px; max-width: none; width: 100%;
}
.pl-row {
    display: flex; justify-content: space-between; gap: 14px; padding: 9px 0;
    border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.pl-row span { color: var(--muted); }
.pl-row.pl-minus strong { color: var(--red); font-weight: 600; }
.pl-row.pl-sub { border-bottom: 1px solid var(--line); }
.pl-row.pl-sub span, .pl-row.pl-sub strong { color: var(--ink); font-weight: 800; }
.pl-row.pl-total { border-bottom: none; padding-top: 12px; font-size: 16px; }
.pl-row.pl-total span { font-weight: 800; color: var(--ink); }
.pl-row.pl-total.pos strong { color: var(--green); font-size: 19px; }
.pl-row.pl-total.neg strong { color: var(--red); font-size: 19px; }
@media (max-width: 560px) {
    .pl-card { padding: 18px 16px; }
    .pl-row { align-items: baseline; }
    .pl-row span { min-width: 0; overflow-wrap: anywhere; }
    .pl-row strong { white-space: nowrap; }
}

/* Tex karta moliyaviy jamlanmasi (porsiya tannarxi / marja) */
.recipe-cost {
    margin-top: 14px; padding: 12px 16px; border: 1px dashed var(--line); border-radius: 12px;
    background: #fdfbf9; display: flex; gap: 22px; flex-wrap: wrap; font-size: 13.5px;
}
.recipe-cost span { color: var(--muted); }
.recipe-cost strong { font-size: 15px; }

/* Tex karta */
.recipe-card { max-width: 640px; }
.recipe-rows { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.recipe-row { display: flex; gap: 8px; align-items: center; }
.recipe-row select {
    flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px;
    font-size: 14px; font-family: inherit; background: #fdfbf9; color: var(--ink); cursor: pointer;
}
.recipe-row input[type=number] {
    width: 110px; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px;
    font-size: 14px; font-family: inherit; background: #fdfbf9;
}
.recipe-row .btn-danger.sm { padding: 8px 12px; font-size: 16px; line-height: 1; }

/* Sklad bo'limi ichki tab-navigatsiyasi (Masalliqlar / Menyu / Kategoriyalar) */
.sub-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.sub-tab {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
    padding: 9px 16px; font-weight: 600; font-size: 14px; color: var(--muted); transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.sub-tab .icon { color: var(--brand); }
.sub-tab:hover { border-color: var(--brand); color: var(--brand-d); }
.sub-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.sub-tab.active .icon { color: #fff; }

/* ============================================================
   Kassa smenasi (Smena / Z-hisobot) — iiko uslubi
   ============================================================ */
.pos-bar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shift-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
    padding: 8px 14px; font-weight: 700; font-size: 13px; color: var(--ink);
    cursor: pointer; font-family: inherit; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}
.shift-pill:hover { border-color: var(--brand); }
.shift-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--muted); flex: 0 0 auto; }
.shift-pill.on .shift-dot { background: var(--green); box-shadow: 0 0 0 3px rgba(21, 163, 90, .18); }
.shift-pill.off .shift-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(226, 59, 59, .15); }
.shift-pill.off { border-color: var(--red); color: var(--red); }

.zrep-grid { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.zrep-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; font-size: 13.5px; color: var(--muted);
    background: var(--surface); border-bottom: 1px solid var(--line);
}
.zrep-row:last-child { border-bottom: none; }
.zrep-row strong { color: var(--ink); font-size: 14px; }
.zrep-row.zrep-total { background: var(--brand-soft); }
.zrep-row.zrep-total strong { color: var(--brand-d); font-size: 16px; font-weight: 800; }
#zrep-final { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
