/* =========================================================
   AvtoStar — och, minimal uslub
   Bitta urg'u rangi (ko'k), oq fon, kulrang chiziqlar
   ========================================================= */

:root {
  --as-accent: #2563eb;
  --as-accent-soft: #eff4ff;
  --as-bg: #f7f8fa;
  --as-surface: #ffffff;
  --as-border: #e6e8ec;
  --as-text: #111827;
  --as-muted: #6b7280;
  --as-success: #16a34a;
  --as-success-soft: #ecfdf3;
  --as-warning: #b45309;
  --as-warning-soft: #fff7ed;
  --as-danger: #dc2626;
  --as-sidebar-width: 248px;

  /* Bootstrap'ni shu ranglarga moslaymiz */
  --bs-primary: var(--as-accent);
  --bs-primary-rgb: 37, 99, 235;
  --bs-body-color: var(--as-text);
  --bs-body-bg: var(--as-bg);
  --bs-border-color: var(--as-border);
  --bs-link-color: var(--as-accent);
  --bs-link-color-rgb: 37, 99, 235;
  --bs-border-radius: 10px;
}

html { font-size: 15px; }

body {
  background: var(--as-bg);
  color: var(--as-text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.icon { flex-shrink: 0; vertical-align: -0.2em; }
.text-muted { color: var(--as-muted) !important; }
.tabular { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Tugmalar va formalar ---------- */

.btn { border-radius: 8px; font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; justify-content: center; }
.btn-primary { --bs-btn-bg: var(--as-accent); --bs-btn-border-color: var(--as-accent); --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8; --bs-btn-active-bg: #1e40af; }
.btn-outline-primary { --bs-btn-color: var(--as-accent); --bs-btn-border-color: var(--as-accent); --bs-btn-hover-bg: var(--as-accent); --bs-btn-hover-border-color: var(--as-accent); }
.btn-light { --bs-btn-bg: var(--as-surface); --bs-btn-border-color: var(--as-border); --bs-btn-hover-bg: #f3f4f6; --bs-btn-hover-border-color: var(--as-border); }
.btn-icon { width: 34px; height: 34px; padding: 0; }

.form-control, .form-select { border-color: var(--as-border); border-radius: 8px; }
.form-control:focus, .form-select:focus, .form-check-input:focus, .btn:focus-visible {
  border-color: var(--as-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.form-check-input:checked { background-color: var(--as-accent); border-color: var(--as-accent); }
.form-label { font-weight: 500; font-size: .9rem; margin-bottom: .35rem; }

/* ---------- Kartochkalar ---------- */

.card-flat {
  background: var(--as-surface);
  border: 1px solid var(--as-border);
  border-radius: 12px;
}
.card-flat > .card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--as-border);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap;
}
.card-flat > .card-body { padding: 1.25rem; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.5rem; font-weight: 600; margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--as-muted); }

/* ---------- Statistik kartochkalar ---------- */

.stat {
  background: var(--as-surface);
  border: 1px solid var(--as-border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  height: 100%;
}
.stat-label { color: var(--as-muted); font-size: .85rem; margin-bottom: .35rem; }
.stat-value { font-size: 1.5rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-hint { color: var(--as-muted); font-size: .8rem; margin-top: .35rem; }

/* ---------- Jadvallar ---------- */

.table-flat { margin: 0; --bs-table-bg: transparent; }
.table-flat > thead th {
  font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .03em;
  color: var(--as-muted); border-bottom: 1px solid var(--as-border); padding: .75rem 1.25rem; white-space: nowrap;
}
.table-flat > tbody td { padding: .8rem 1.25rem; border-color: var(--as-border); vertical-align: middle; }
.table-flat > tbody tr:last-child td { border-bottom: 0; }
.table-flat > tbody tr.is-muted td { color: var(--as-muted); }

/* ---------- Belgilar (badge) ---------- */

.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 500; white-space: nowrap; }
.pill-success { background: var(--as-success-soft); color: var(--as-success); }
.pill-warning { background: var(--as-warning-soft); color: var(--as-warning); }
.pill-muted { background: #f3f4f6; color: var(--as-muted); }
.pill-accent { background: var(--as-accent-soft); color: var(--as-accent); }

/* ---------- Bo'sh holat ---------- */

.empty { text-align: center; padding: 3rem 1rem; color: var(--as-muted); }
.empty .icon { color: #c4c8cf; margin-bottom: .75rem; }
.empty h3 { font-size: 1.05rem; color: var(--as-text); font-weight: 600; }

/* =========================================================
   Login / kabinet sahifalari uchun yuqori panel
   ========================================================= */

.topbar {
  background: var(--as-surface);
  border-bottom: 1px solid var(--as-border);
  height: 60px;
  display: flex; align-items: center;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--as-text); text-decoration: none; font-size: 1.05rem; }
.brand:hover { color: var(--as-text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--as-accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
}

.auth-wrap { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 420px; background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 14px; padding: 2rem; }
.auth-card h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: .25rem; }

.user-chip { display: inline-flex; align-items: center; gap: .6rem; color: var(--as-text); text-decoration: none; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--as-accent-soft); color: var(--as-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .85rem;
}

/* ---------- Shop kartochkalari (Mening shoplarim) ---------- */

.shop-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 12px;
  padding: 1.25rem; height: 100%;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.shop-card:hover { border-color: var(--as-accent); box-shadow: 0 4px 16px rgba(17, 24, 39, .06); color: inherit; transform: translateY(-1px); }
.shop-card .shop-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--as-accent-soft); color: var(--as-accent); display: inline-flex; align-items: center; justify-content: center; }
.shop-card h3 { font-size: 1.05rem; font-weight: 600; margin: .9rem 0 .25rem; }
.shop-card .meta { color: var(--as-muted); font-size: .88rem; display: flex; align-items: center; gap: .35rem; }
.shop-card .foot { border-top: 1px solid var(--as-border); margin-top: 1rem; padding-top: .8rem; display: flex; justify-content: space-between; font-size: .88rem; }

.shop-card-new {
  border-style: dashed; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--as-muted); min-height: 180px;
}
.shop-card-new:hover { color: var(--as-accent); }

/* =========================================================
   Shop ichi: sidebar + kontent
   ========================================================= */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--as-sidebar-width);
  background: var(--as-surface);
  border-right: 1px solid var(--as-border);
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column;
  z-index: 1030;
}
.sidebar-head { height: 60px; padding: 0 1.1rem; display: flex; align-items: center; border-bottom: 1px solid var(--as-border); }

.shop-switch { padding: .9rem .75rem .5rem; }
.shop-switch .dropdown-toggle {
  width: 100%; text-align: left; background: var(--as-bg); border: 1px solid var(--as-border);
  border-radius: 10px; padding: .55rem .75rem; display: flex; align-items: center; gap: .6rem;
}
.shop-switch .dropdown-toggle::after { margin-left: auto; }
.shop-switch .name { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-switch .dropdown-menu { width: calc(var(--as-sidebar-width) - 1.5rem); }

.nav-side { list-style: none; margin: 0; padding: .5rem .75rem; flex: 1; }
.nav-side .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--as-muted); padding: .9rem .6rem .4rem; }
.nav-side a {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .7rem; border-radius: 8px;
  color: #374151; text-decoration: none; font-weight: 500; font-size: .93rem;
}
.nav-side a:hover { background: var(--as-bg); color: var(--as-text); }
.nav-side a.active { background: var(--as-accent-soft); color: var(--as-accent); }

.sidebar-foot { border-top: 1px solid var(--as-border); padding: .75rem; }
.sidebar-foot a { display: flex; align-items: center; gap: .6rem; color: var(--as-muted); text-decoration: none; padding: .5rem .6rem; border-radius: 8px; font-size: .9rem; }
.sidebar-foot a:hover { background: var(--as-bg); color: var(--as-text); }

.main { flex: 1; margin-left: var(--as-sidebar-width); min-width: 0; }
.main-head {
  height: 60px; background: var(--as-surface); border-bottom: 1px solid var(--as-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 1.75rem;
  position: sticky; top: 0; z-index: 1020;
}
/* Kontent butun kenglikni egallaydi (menyu yig'ilganda ham, katta ekranda ham o'ngda bo'sh joy qolmaydi) */
.main-body { padding: 1.75rem; }

.sidebar-toggle { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(17, 24, 39, .15); }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(17, 24, 39, .25); z-index: 1025; }
  .main { margin-left: 0; }
  .main-head { padding: 0 1rem; }
  .main-body { padding: 1.25rem 1rem; }
  .sidebar-toggle { display: inline-flex; }
}

/* ---------- Davomat jadvali ---------- */

.date-nav { display: inline-flex; align-items: center; gap: .5rem; }
.date-nav .date-title { font-weight: 600; min-width: 190px; text-align: center; }

/* Katta "keldi" tugmachasi */
.presence { position: relative; display: inline-flex; }
.presence input { position: absolute; opacity: 0; pointer-events: none; }
.presence > span {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--as-border);
  font-size: .85rem; font-weight: 500; color: var(--as-muted); cursor: pointer; user-select: none;
  background: var(--as-surface); min-width: 96px; justify-content: center;
}
.presence > span .on { display: none; }
.presence input:checked + span { background: var(--as-success-soft); border-color: #bbf7d0; color: var(--as-success); }
.presence input:checked + span .on { display: inline; }
.presence input:checked + span .off { display: none; }
.presence input:focus-visible + span { box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
.presence input:disabled + span { cursor: not-allowed; opacity: .6; }

.sticky-actions {
  position: sticky; bottom: 0;
  background: linear-gradient(to top, var(--as-bg) 70%, transparent);
  padding: 1rem 0 .25rem; display: flex; justify-content: flex-end; gap: .5rem;
}

/* Bootstrap alertlarini yumshatamiz */
.alert { border-radius: 10px; border: 1px solid transparent; }
.alert-success { background: var(--as-success-soft); border-color: #bbf7d0; color: #166534; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: var(--as-accent-soft); border-color: #dbe5ff; color: #1e40af; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ---------- Ikonka qutichalari ---------- */

.shop-icon-sm, .shop-icon-lg {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--as-accent-soft); color: var(--as-accent);
}
.shop-icon-sm { width: 30px; height: 30px; border-radius: 8px; }
.shop-icon-lg { width: 48px; height: 48px; border-radius: 12px; }

.pill-danger { background: #fef2f2; color: var(--as-danger); }
.product-link:hover { color: var(--as-accent) !important; text-decoration: underline !important; }

/* ---------- Dollar kursi (shop tepasida) ---------- */

.rate-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 999px;
  padding: .3rem .6rem .3rem .85rem; font-size: .88rem; color: var(--as-text);
}
.rate-chip:hover { border-color: var(--as-accent); }
.rate-chip-label { color: var(--as-muted); }
.rate-chip.is-warning { border-color: #fed7aa; background: var(--as-warning-soft); }
.rate-chip.is-empty { border-color: #fecaca; background: #fef2f2; color: var(--as-danger); }
.rate-menu { width: 340px; padding: 1rem; border-color: var(--as-border); border-radius: 12px; }
.rate-option { border: 1px solid var(--as-border); border-radius: 10px; padding: .75rem .85rem; margin-top: .6rem; }
.rate-option.is-active { border-color: var(--as-accent); background: var(--as-accent-soft); }
.rate-option form { margin: 0; }
@media (max-width: 575.98px) {
  .rate-chip-label, .rate-chip .pill { display: none; }
  .rate-menu { width: calc(100vw - 2rem); }
}

/* ---------- Tablar ---------- */

.tabs { list-style: none; display: flex; gap: .25rem; margin: 0 0 1rem; padding: 0; box-shadow: inset 0 -1px 0 var(--as-border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem .9rem; color: var(--as-muted); text-decoration: none; font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--as-text); }
.tabs a.active { color: var(--as-accent); border-bottom-color: var(--as-accent); }

/* ---------- Filtrlar va sahifalash ---------- */

.card-head.filters { justify-content: flex-start; margin: 0; }
.filter-select { width: auto; max-width: 220px; }
@media (max-width: 575.98px) { .filter-select { max-width: none; flex: 1 1 45%; } }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .85rem 1.25rem; border-top: 1px solid var(--as-border); }

/* ---------- Qidiruv qatori ---------- */

.search-box { position: relative; flex: 1 1 260px; max-width: 420px; margin: 0; }
@media (max-width: 575.98px) { .search-box { max-width: none; flex-basis: 100%; } }

/* Jadval qatoridagi amallar: kompyuterda yonma-yon, telefonda ustma-ust */
.row-actions { display: inline-flex; gap: .25rem; justify-content: flex-end; }
.row-actions form { margin: 0; }
@media (max-width: 575.98px) { .row-actions { flex-direction: column; align-items: stretch; } }
.search-box .search-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--as-muted); display: inline-flex; pointer-events: none; }
.search-box .form-control { padding-left: 2.25rem; }

/* ---------- Kategoriyalar daraxti ---------- */

.tree-wrap { padding: .75rem; }
.tree { list-style: none; margin: 0; padding: 0; }
/* Ichki daraja: chapdan chiziq bilan suriladi */
.tree .tree { margin-left: 1.3rem; padding-left: .9rem; border-left: 1px dashed var(--as-border); }

.tree-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .65rem; border-radius: 8px; min-height: 44px;
}
.tree-row:hover { background: var(--as-bg); }
.tree-icon { color: var(--as-accent); display: inline-flex; }
.tree-name { font-weight: 500; }
.tree-count { color: var(--as-muted); font-size: .8rem; white-space: nowrap; }
.tree-row.is-archived .tree-name,
.tree-row.is-archived .tree-icon { color: var(--as-muted); }

/* Amallar sichqoncha ustiga kelganda ko'rinadi, telefonda doim ko'rinadi */
.tree-actions { margin-left: auto; display: flex; gap: .25rem; flex-shrink: 0; opacity: 0; transition: opacity .12s; }
.tree-actions form { margin: 0; }
.tree-row:hover .tree-actions,
.tree-row:focus-within .tree-actions { opacity: 1; }
@media (hover: none) { .tree-actions { opacity: 1; } }

/* Telefonda amallar nom ostida alohida qatorga tushadi va doim ko'rinadi */
@media (max-width: 767.98px) {
  .tree-wrap { padding: .5rem; }
  .tree .tree { margin-left: .85rem; padding-left: .6rem; }
  .tree-row { flex-wrap: wrap; row-gap: .35rem; }
  .tree-actions { opacity: 1; margin-left: 0; width: 100%; padding-left: 1.75rem; flex-wrap: wrap; }
}

/* ---------- Telefon ekranlari ---------- */

@media (max-width: 575.98px) {
  .table-flat > thead th,
  .table-flat > tbody td { padding: .65rem .6rem; }
  .table-flat > thead th:first-child,
  .table-flat > tbody td:first-child { padding-left: 1rem; }
  .table-flat > thead th:last-child,
  .table-flat > tbody td:last-child { padding-right: 1rem; }
  .table-flat .avatar { display: none; }
  .presence > span { min-width: 82px; padding: .35rem .6rem; }
  .card-flat > .card-head { padding: .85rem 1rem; }
  .page-head h1 { font-size: 1.3rem; }
}

/* ---------- Sotuvlar ---------- */

.stat-value-sm { font-size: 1.15rem; }
a.stat-link { color: inherit; text-decoration: none; transition: border-color .12s; }
a.stat-link:hover { border-color: var(--as-accent); }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--as-bg); }
.avatar-lg { width: 48px; height: 48px; font-size: 1.1rem; }
.min-w-0 { min-width: 0; }

/* Kassa: qidiruv natijalari ochiladigan ro'yxat */
.pos-search { max-width: none; }
.search-box .pos-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, .1); max-height: 360px; overflow-y: auto; padding: .25rem;
}
.pos-result { padding: .55rem .7rem; border-radius: 8px; cursor: pointer; }
.pos-result.active, .pos-result:hover { background: var(--as-accent-soft); }
.pos-result.disabled { cursor: default; opacity: .55; background: none; }

/* Savat: ixcham ustunlar, nomi kengroq */
.cart-table > thead th, .cart-table > tbody td { padding-left: .5rem; padding-right: .5rem; }
.cart-table > thead th:first-child, .cart-table > tbody td:first-child { padding-left: 1.25rem; min-width: 170px; }
.cart-table > thead th:last-child, .cart-table > tbody td:last-child { padding-right: 1rem; width: 1%; }
.cart-table .cart-qty { width: 70px; }
.cart-table .cart-price { width: 96px; margin-left: auto; }
.qty-box { display: inline-flex; align-items: center; gap: .35rem; }

/* To'lov paneli: katta ekranda yon tomonda qotib turadi */
@media (min-width: 992px) { .pos-summary { position: sticky; top: 1rem; } }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .3rem 0; }
.sum-row-lg { font-size: 1.15rem; font-weight: 600; }
.pay-row .pay-label { width: 110px; gap: .4rem; }
.customer-chip {
  display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem;
  border: 1px solid var(--as-border); border-radius: 10px; background: var(--as-bg);
}
.customer-chip[hidden], .search-box[hidden] { display: none; }
.receipt-totals { max-width: 360px; margin-left: auto; }


/* Telefonda savat qatori kartochka bo'ladi: nomi tepada, miqdor | narx | jami | x pastda */
@media (max-width: 575.98px) {
  .cart-table thead { display: none; }
  .cart-table > tbody > tr {
    display: grid; grid-template-columns: auto auto 1fr auto; align-items: center;
    gap: .45rem .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--as-border);
  }
  .cart-table > tbody > tr:last-child { border-bottom: 0; }
  .cart-table > tbody > tr > td { display: block; padding: 0 !important; border: 0; min-width: 0 !important; width: auto !important; }
  .cart-table > tbody > tr > td:first-child { grid-column: 1 / -1; text-align: left; }
  .cart-table .cart-qty { width: 60px; }
  .cart-table .cart-price { width: 88px; }
}

/* ---------- Qaytarish ---------- */

/* Ixcham ustunlar: hammasi sig'ishi uchun */
.return-table > thead th, .return-table > tbody td { padding-left: .5rem; padding-right: .5rem; }
.return-table > thead th:first-child, .return-table > tbody td:first-child { padding-left: 1.25rem; width: 1%; }
.return-table > thead th:last-child, .return-table > tbody td:last-child { padding-right: 1.25rem; }
.return-table .line-qty { width: 70px; }
.return-table .form-select { min-width: 104px; }
.return-table tr.is-selected td { background: var(--as-accent-soft); }
.return-entry { padding: 1rem 1.25rem; border-top: 1px solid var(--as-border); }
.return-entry:first-of-type { border-top: 0; }
.return-items { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .35rem; }
.return-items li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* Telefonda qaytarish qatori: nomi va narxi tepada, miqdor | holati pastda */
@media (max-width: 575.98px) {
  .return-table thead { display: none; }
  .return-table > tbody > tr {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center;
    gap: .45rem .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--as-border);
  }
  .return-table > tbody > tr > td { display: block; padding: 0 !important; border: 0; width: auto !important; }
  .return-table > tbody > tr > td:nth-child(2) { grid-column: 2 / -1; }
  .return-table > tbody > tr > td:nth-child(3) { grid-column: 1 / 3; text-align: left !important; }
  .return-table > tbody > tr > td:nth-child(4) { grid-column: 3; }
}

/* ---------- Xodim statistikasi: yillik kalendar ---------- */

.table-flat > tfoot td { padding: .8rem 1.25rem; border-top: 1px solid var(--as-border); border-bottom: 0; }
.cal-legend { display: flex; gap: 1rem; flex-wrap: wrap; }
.cal-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.cal-dot { width: 12px; height: 12px; border-radius: 3px; background: #f3f4f6; border: 1px solid var(--as-border); display: inline-block; }
.cal-dot.is-present { background: var(--as-success-soft); border-color: #86efac; }
.cal-dot.is-absent { background: #fef2f2; border-color: #fca5a5; }

.cal-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem; }
.cal-month.is-future { opacity: .45; }
.cal-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-head { text-align: center; font-size: .7rem; color: var(--as-muted); padding-bottom: 2px; }
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: .75rem; border-radius: 6px; background: #f3f4f6; color: var(--as-muted);
  font-variant-numeric: tabular-nums; cursor: default;
}
.cal-day.is-present { background: var(--as-success-soft); color: var(--as-success); font-weight: 600; }
.cal-day.is-absent { background: #fef2f2; color: var(--as-danger); font-weight: 600; }
.cal-day.is-future { background: transparent; color: #c4c8cf; }
.cal-day.is-today { box-shadow: 0 0 0 2px var(--as-accent); }

/* ---------- Mahsulot: ustama va kam qolganlar ---------- */

.sale-price-box {
  display: flex; flex-direction: column; justify-content: center; min-height: 38px;
  padding: .3rem .75rem; border: 1px dashed var(--as-border); border-radius: 8px; background: var(--as-bg);
}
.product-table tr.is-low td { background: #fffbeb; }
.pill-low { background: #fef3c7; color: #92400e; }
.nav-badge {
  margin-left: auto; min-width: 22px; padding: 0 .4rem; border-radius: 999px;
  background: #fef3c7; color: #92400e; font-size: .72rem; font-weight: 600; text-align: center; line-height: 1.6;
}

/* ---------- Zakaz: kam qolganlar taklifi ---------- */

.suggest-list { list-style: none; margin: 0; padding: .25rem 0; max-height: 420px; overflow-y: auto; }
.suggest-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 1.25rem; border-top: 1px solid var(--as-border); }
.suggest-list li:first-child { border-top: 0; }
.suggest-list li.is-added { opacity: .45; }
.suggest-list li.is-added .suggest-add { pointer-events: none; }

/* ---------- Zakaz: yetkazib beruvchi kodi va katalog ---------- */

/* Yetkazib beruvchi kodi: zakazda har qatorning boshida (yetkazib beruvchi shu kod bo'yicha yig'adi) */
.code-tag {
  display: inline-block; padding: .05rem .4rem; border-radius: 6px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--as-bg); border: 1px solid var(--as-border); font-size: .85em;
}
.catalog-wrap { max-height: 520px; overflow-y: auto; }
.catalog-table thead th { position: sticky; top: 0; background: var(--as-surface, #fff); z-index: 1; }
.catalog-table tr.is-low > td { background: #fffbeb; }

/* Zakazda tovari kelgan qatorning narxi qulflangan */
.cart-table .line-cost[readonly] { background: transparent; border-color: transparent; box-shadow: none; }

/* ---------- Ijarachilar va xarajatlar ---------- */

.nav-badge-danger { background: #fee2e2; color: #b91c1c; }

/* Kechikkan ijarachi qatori va oy */
.table-flat tr.is-overdue > td { background: #fef2f2; }

/* Oyma-oy ijara: har oy kartochka */
.rent-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; padding: 1rem 1.25rem; }
.rent-month { border: 1px solid var(--as-border); border-radius: 10px; padding: .55rem .7rem; background: var(--as-surface); }
.rent-month.is-paid { border-color: #bbf7d0; background: #f0fdf4; }
.rent-month.is-partial { border-color: #fde68a; background: #fffbeb; }
.rent-month.is-overdue { border-color: #fecaca; background: #fef2f2; }
.rent-month .rm-title { font-weight: 600; font-size: .9rem; }
.rent-month .rm-bar { height: 4px; border-radius: 2px; background: var(--as-border); margin: .4rem 0 .3rem; overflow: hidden; }
.rent-month .rm-bar > span { display: block; height: 100%; background: #16a34a; }
.rent-month.is-partial .rm-bar > span, .rent-month.is-overdue .rm-bar > span { background: #d97706; }

/* Xarajatlar hisobotidagi nom bo'yicha chiziqlar */
.expense-bars { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; }
.expense-bars li { padding: .35rem 0; }
.expense-bars .eb-bar { height: 6px; border-radius: 3px; background: var(--as-bg); overflow: hidden; margin-top: .25rem; }
.expense-bars .eb-bar > span { display: block; height: 100%; background: var(--as-accent); }

/* ---------- Menyu: skroll, yig'iladigan bo'limlar, ikonkalarga yig'ish ---------- */

/* Bandlar ko'p bo'lsa menyu o'zi aylanadi: pastdagilari (Xarajatlar, Sozlamalar) yashirinmaydi */
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--as-border); border-radius: 3px; }
.sidebar-head { justify-content: space-between; gap: .5rem; }
.sidebar-collapse { color: var(--as-muted); }
.sidebar-collapse .icon { transition: transform .2s; }

/* Bo'lim sarlavhasi: bosilsa yig'iladi */
.nav-group-head {
  display: flex; align-items: center; gap: .4rem; width: 100%; background: none; border: 0; text-align: left;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--as-muted);
  padding: .75rem .6rem .35rem; border-radius: 6px; cursor: pointer;
}
.nav-group-head:hover { color: var(--as-text); }
.nav-group-head .nav-group-chevron { margin-left: auto; display: inline-flex; transition: transform .15s; transform: rotate(90deg); }
.nav-group.is-closed .nav-group-chevron { transform: none; }
.nav-group.is-closed .nav-group-items { display: none; }
.nav-group-items { list-style: none; margin: 0; padding: 0; }
/* Ichidagi ogohlantirish sarlavhada faqat bo'lim yig'ilganda */
.nav-group-badge { display: none; margin-left: .25rem; text-transform: none; letter-spacing: 0; }
.nav-group.is-closed .nav-group-badge { display: inline-block; }
.nav-group.is-closed .nav-group-badge + .nav-group-badge { margin-left: 0; }
.nav-side a { padding: .5rem .7rem; }
.nav-side a .nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 991.98px) {
  .sidebar-collapse { display: none; }
}

/* Kompyuterda ikonkalarga yig'ilgan menyu: tor chiziq, matnlar yashirin, sarlavha o'rniga ajratuvchi chiziq */
@media (min-width: 992px) {
  .sidebar { transition: width .2s; }
  .main { transition: margin-left .2s; }

  html.sidebar-collapsed { --as-sidebar-width: 68px; }
  html.sidebar-collapsed .sidebar .nav-text { display: none; }
  html.sidebar-collapsed .sidebar-head { flex-direction: column; justify-content: center; height: auto; padding: .7rem 0; gap: .45rem; }
  html.sidebar-collapsed .sidebar-collapse .icon { transform: rotate(180deg); }
  html.sidebar-collapsed .shop-switch { padding: .6rem .55rem .3rem; }
  html.sidebar-collapsed .shop-switch .dropdown-toggle { justify-content: center; padding: .5rem 0; }
  html.sidebar-collapsed .shop-switch .dropdown-toggle::after { display: none; }
  html.sidebar-collapsed .shop-switch .dropdown-menu { width: 220px; }
  html.sidebar-collapsed .nav-side { padding: .4rem .55rem; }
  html.sidebar-collapsed .nav-side a { justify-content: center; padding: .55rem 0; position: relative; }
  /* Bo'limlar yig'ilgan menyuda hammasi ko'rinadi, sarlavha - ingichka chiziq */
  html.sidebar-collapsed .nav-group-head { display: block; height: 1px; padding: 0; margin: .45rem .3rem; background: var(--as-border); pointer-events: none; }
  html.sidebar-collapsed .nav-group-head > * { display: none !important; }
  html.sidebar-collapsed .nav-group.is-closed .nav-group-items { display: block; }
  /* Ogohlantirish soni ikonka burchagida */
  html.sidebar-collapsed .nav-side a .nav-badge { position: absolute; top: 2px; right: 6px; min-width: 18px; font-size: .65rem; line-height: 1.5; padding: 0 .3rem; }
  html.sidebar-collapsed .sidebar-foot { padding: .6rem .55rem; }
  html.sidebar-collapsed .sidebar-foot a { justify-content: center; }
}

/* ---------- Kassa: skaner va kamera ---------- */

.pos-head { gap: .5rem; }
.pos-head .pos-search { flex: 1; min-width: 0; }
/* Kassa: qidiruv yonidagi kategoriya tanlovi. Tanlangan bo'lsa ajralib turadi */
.pos-category { width: 180px; flex-shrink: 0; }
/* Natijalar ro'yxati qidiruvdan kengroq bo'lishi mumkin (kategoriya tanlovi ustiga chiqadi), lekin ekrandan chiqmaydi */
.pos-head .pos-results { right: auto; width: max(100%, min(480px, calc(100vw - 3rem))); }
.pos-category.is-active { border-color: var(--as-accent); background-color: var(--as-accent-soft); font-weight: 600; }
.pos-results-footer { padding: .45rem .7rem; font-size: .8rem; color: var(--as-muted); border-top: 1px solid var(--as-border); margin-top: .25rem; }
@media (max-width: 575.98px) {
  .pos-head { flex-wrap: wrap; }
  .pos-head .pos-search { flex-basis: 100%; }
  .pos-category { flex: 1; width: auto; }
}
.scan-btn { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.scan-hint {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .45rem 1.25rem; border-bottom: 1px solid var(--as-border); font-size: .8rem; color: var(--as-muted); background: var(--as-bg);
}
/* Skanerlash natijasi: bir necha soniya ko'rinadi */
.scan-toast { font-weight: 600; opacity: 0; transition: opacity .2s; }
.scan-toast.show { opacity: 1; }
.scan-toast.is-ok { color: #15803d; }
.scan-toast.is-error { color: var(--as-danger); }

.scan-reader { width: 100%; min-height: 240px; background: #111827; border-radius: 10px; overflow: hidden; }
.scan-reader video { width: 100% !important; height: auto !important; display: block; }
.scan-status { font-size: .85rem; margin-top: .6rem; color: var(--as-muted); }
.scan-status.is-ok { color: var(--as-text); }
.scan-status.is-error { color: var(--as-danger); }
.scan-log { list-style: none; margin: .5rem 0 0; padding: 0; max-height: 160px; overflow-y: auto; font-size: .88rem; }
.scan-log li { padding: .35rem 0; border-top: 1px solid var(--as-border); }
.scan-log li.is-ok { color: #15803d; }
.scan-log li.is-error { color: var(--as-danger); }
.scan-camera { max-width: 60%; }
@media (max-width: 575.98px) {
  .scan-reader { min-height: 55vh; }
}

/* ---------- Qoldiqni tekshirish (mahsulotlar sahifasi) ---------- */

.stock-result { position: relative; }
.stock-result .stock-close { position: absolute; top: .75rem; right: .75rem; }
.scan-result:empty { display: none; }
.scan-result { margin-top: .75rem; }
.stock-card {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--as-border); background: var(--as-surface);
}
.stock-card.is-ok { border-color: #bbf7d0; background: #f0fdf4; }
.stock-card.is-low { border-color: #fde68a; background: #fffbeb; }
.stock-card.is-out { border-color: #fecaca; background: #fef2f2; }
.stock-card.is-muted { opacity: .8; }
.stock-card .sc-main { flex: 1; }
.stock-card .sc-name { font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.stock-card .sc-meta { font-size: .85rem; color: var(--as-muted); margin-top: .15rem; }
.stock-card .sc-qty { text-align: center; min-width: 96px; padding-right: 1.5rem; }
.stock-card .sc-qty-value { font-size: 2.2rem; font-weight: 700; line-height: 1.1; }
.stock-card.is-ok .sc-qty-value { color: #15803d; }
.stock-card.is-low .sc-qty-value { color: #b45309; }
.stock-card.is-out .sc-qty-value { color: var(--as-danger); }
.stock-card .sc-qty-unit { font-size: .8rem; color: var(--as-muted); }
.scan-result .stock-card .sc-qty { padding-right: 0; }
@media (max-width: 575.98px) {
  .stock-card { flex-direction: column-reverse; align-items: stretch; text-align: left; }
  .stock-card .sc-qty { text-align: left; padding-right: 0; display: flex; align-items: baseline; gap: .5rem; }
}

/* ---------- Mahsulotlar: yorliq uchun belgilash ---------- */

.product-table .select-col { width: 1%; padding-right: 0; }
.selection-bar {
  position: sticky; bottom: 1rem; z-index: 1010; margin: 1rem auto 0; max-width: 560px;
  display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem .6rem 1.1rem;
  background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 12px; box-shadow: 0 8px 30px rgba(17, 24, 39, .15);
}
.selection-bar[hidden] { display: none; }
.selection-bar > span { margin-right: auto; }

/* Zakaz qabuli: to'liq kelmagan mahsulotlar ro'yxati (oynada) */
.missing-list { max-height: 40vh; overflow-y: auto; border: 1px solid var(--as-border); border-radius: 10px; }
.missing-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .75rem; border-top: 1px solid var(--as-border); }
.missing-list li:first-child { border-top: 0; }

/* ---------- Ijarachilar: yil tanlovi va yillik hisobot ---------- */
.year-select { width: auto; min-width: 110px; font-weight: 600; }
.year-totals { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; padding: .75rem 1.25rem 0; font-size: .875rem; }
.year-stats > div { padding: 1rem 1.25rem; border-top: 1px solid var(--as-border); }
@media (min-width: 992px) {
  .year-stats > div + div { border-left: 1px solid var(--as-border); }
}
@media (max-width: 991.98px) {
  .year-stats > div:nth-child(even) { border-left: 1px solid var(--as-border); }
}
.year-table > thead th, .year-table > tbody td, .year-table > tfoot th { padding-left: .3rem; padding-right: .3rem; }
.year-table > thead th:first-child, .year-table > tbody td:first-child, .year-table > tfoot th:first-child { padding-left: 1.25rem; }
.year-table > tfoot th { border-top: 2px solid var(--as-border); font-weight: 600; }
/* Oy katagi: to'langan dollar, rang - holat */
.ym { display: inline-block; min-width: 2.6rem; padding: .15rem .3rem; border-radius: 6px; font-size: .8rem; font-weight: 600; line-height: 1.3; }
.ym-paid { background: #dcfce7; color: #166534; }
.ym-partial { background: #fef3c7; color: #92400e; }
.ym-debt { background: #f3f4f6; color: #4b5563; }
.ym-overdue { background: #fee2e2; color: #b91c1c; }
.ym-none { color: #cbd5e1; font-weight: 400; }
.year-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .75rem 1.25rem; font-size: .8rem; color: var(--as-muted); border-top: 1px solid var(--as-border); }
.year-legend .ym { min-width: 1.4rem; }
/* To'lov qaysi oylarni yopishi: ko'p oy bo'lsa qatorlarga bo'linadi (.tabular nowrap ni bekor qiladi) */
.pay-hint { white-space: normal; }

/* Zakaz formasi: boshqa ochiq zakazdagi takrorlar */
.dup-table { --bs-table-bg: transparent; font-size: .85rem; }
.dup-table > :not(caption) > * > * { padding: .35rem .5rem; border-color: rgba(146, 64, 14, .15); }
.open-badge { font-size: .72rem; padding: .05rem .45rem; margin-left: .15rem; }

/* Parol maydonidagi ko'z tugmasi */
.password-toggle { display: inline-flex; align-items: center; color: var(--as-muted); }
.password-toggle[aria-pressed="true"] { color: var(--as-accent); }

/* Shop sozlamalari: majburiy davomat */
.deadline-input { max-width: 160px; }
.attendance-required .missing-day { font-variant-numeric: tabular-nums; }

/* Oylik: to'lovlar tarixi va xodim statistikasidagi to'lanmagan summa */
.payroll-table tr.payroll-payments > td { background: var(--as-bg); padding-top: .4rem; padding-bottom: .5rem; padding-left: 1.25rem; }
.payroll-payments li + li { margin-top: .3rem; }
.stat.stat-unpaid { border-color: #fecaca; background: #fef2f2; }
.given-table > :not(caption) > * > * { padding-left: .5rem; padding-right: .5rem; }
/* Parolni tiklash: SMS kod maydoni */
.reset-code { font-size: 1.4rem; letter-spacing: .5em; text-align: center; }

/* Xodimlar statistikasi: o'rinlar va ball chizig'i */
.place { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--as-bg); font-weight: 600; font-size: .85rem; font-variant-numeric: tabular-nums; }
.place.place-1 { background: #fef3c7; color: #92400e; }
.place.place-2 { background: #e5e7eb; color: #374151; }
.place.place-3 { background: #fde7d9; color: #9a3412; }
.score { display: flex; align-items: center; gap: .6rem; }
.score-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--as-border); overflow: hidden; min-width: 70px; }
.score-bar > span { display: block; height: 100%; background: var(--as-accent); }
.score-bar.is-green > span { background: #16a34a; }

/* =========================================================
   Statistika: grafiklar (kutubxonasiz, HTML/CSS)
   Bitta qator - urg'u rangi; to'lov usullari - 3 ta toifa rangi;
   soatlar - bitta rangning och->to'q pog'onalari
   ========================================================= */
.viz {
  --viz-1: #2563eb;   /* naqd, asosiy qator */
  --viz-2: #eb6834;   /* karta */
  --viz-3: #1baf7a;   /* o'tkazma */
  --viz-grid: #eef0f3;
  --viz-empty: #f3f4f6;
}
.delta { display: inline-flex; align-items: center; gap: .15rem; font-size: .78rem; font-weight: 600; padding: .05rem .4rem; border-radius: 999px; }
.delta-up { background: #ecfdf3; color: #15803d; }
.delta-down { background: #fef2f2; color: #b91c1c; }
.delta-flat { background: #f3f4f6; color: var(--as-muted); }

/* Vertikal ustunlar: oylar / kunlar */
.vbars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 220px; padding-left: 56px; }
.vbars-grid { position: absolute; inset: 0 0 0 56px; pointer-events: none; }
.vbars-grid > div { position: absolute; left: 0; right: 0; border-top: 1px solid var(--viz-grid); }
.vbars-grid > div > span { position: absolute; right: calc(100% + 8px); top: -.6rem; font-size: .72rem; color: var(--as-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vbar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.vbar > i { display: block; width: 100%; max-width: 44px; min-height: 0; background: var(--viz-1); border-radius: 4px 4px 0 0; }
.vbar:hover > i { filter: brightness(.88); }
.vbar.is-future > i { background: transparent; }
.vbar.is-best > b { position: absolute; bottom: calc(var(--h) + 4px); font-size: .7rem; font-weight: 600; white-space: nowrap; color: var(--as-text); font-variant-numeric: tabular-nums; }
.vbars-labels { display: flex; gap: 2px; padding-left: 56px; margin-top: .4rem; }
.vbars-labels > span { flex: 1; min-width: 0; text-align: center; font-size: .72rem; color: var(--as-muted); white-space: nowrap; overflow: visible; }
.vbars-labels.is-dense > span:nth-child(odd):not(:first-child) { visibility: hidden; }
@media (max-width: 575.98px) {
  .vbars, .vbars-labels { padding-left: 44px; }
  .vbars-grid { left: 44px; }
  .vbars-labels.is-dense > span:not(:nth-child(5n+1)) { visibility: hidden; }
}

/* Gorizontal qatorlar: hafta kunlari, kategoriyalar */
.hbars { display: grid; grid-template-columns: minmax(70px, max-content) 1fr max-content; gap: .55rem .75rem; align-items: center; }
.hbars-label { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.hbars-track { height: 10px; border-radius: 0 4px 4px 0; background: var(--viz-empty); overflow: hidden; }
.hbars-track > i { display: block; height: 100%; background: var(--viz-1); border-radius: 0 4px 4px 0; }
.hbars-value { font-size: .85rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Soatlar issiqlik xaritasi: hafta kuni × soat */
.heat { display: grid; gap: 2px; font-size: .72rem; }
.heat-cell { height: 26px; border-radius: 3px; background: var(--viz-empty); }
.heat-cell[data-l="1"] { background: #cde2fb; }
.heat-cell[data-l="2"] { background: #9ec5f4; }
.heat-cell[data-l="3"] { background: #5598e7; }
.heat-cell[data-l="4"] { background: #2a78d6; }
.heat-cell[data-l="5"] { background: #1c5cab; }
.heat-cell[data-l="6"] { background: #104281; }
.heat-day, .heat-hour { color: var(--as-muted); display: flex; align-items: center; }
.heat-hour { justify-content: center; }
.heat-legend { display: inline-flex; gap: 2px; vertical-align: middle; }
.heat-legend > i { width: 14px; height: 10px; border-radius: 2px; }

/* To'lov usullari: bitta qatorli ulush */
.share-bar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; background: var(--viz-empty); }
.share-bar > i { display: block; height: 100%; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* Grafik ustida maslahat (data-tip) */
.viz-tip { position: fixed; z-index: 1080; pointer-events: none; background: #111827; color: #fff; font-size: .78rem; line-height: 1.35; padding: .4rem .55rem; border-radius: 6px; max-width: 240px; white-space: pre-line; box-shadow: 0 4px 14px rgba(0,0,0,.18); }

/* Sof foyda: nol chizig'idan yuqoriga (foyda) va pastga (zarar) ustunlar */
.nbars { position: relative; display: flex; gap: 2px; height: 220px; padding-left: 56px; }
.nbars-zero { position: absolute; left: 56px; right: 0; border-top: 1px solid #9ca3af; pointer-events: none; }
.nbars-tick { position: absolute; left: 0; width: 48px; text-align: right; font-size: .72rem; color: var(--as-muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nbar { position: relative; flex: 1; cursor: default; }
.nbar > i { position: absolute; left: 0; right: 0; margin: 0 auto; max-width: 44px; background: var(--viz-1); border-radius: 4px 4px 0 0; }
.nbar > i.is-loss { background: var(--viz-2); border-radius: 0 0 4px 4px; }
.nbar:hover > i { filter: brightness(.88); }
.calc-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-variant-numeric: tabular-nums; }
.calc-row + .calc-row { border-top: 1px dashed var(--as-border); }
.calc-row.is-total { border-top: 1px solid var(--as-text) !important; font-weight: 600; }
.calc-sign { display: inline-block; width: 1.1rem; color: var(--as-muted); }

/* Tasdiqlash oynasi (window.avtoConfirm): brauzerning "localhost says" o'rniga */
.confirm-backdrop { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding: 18vh 16px 16px; background: rgba(17, 24, 39, 0); transition: background .15s; }
.confirm-backdrop.is-open { background: rgba(17, 24, 39, .35); }
.confirm-box { width: 100%; max-width: 360px; background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); padding: 1rem 1.1rem .9rem; opacity: 0; transform: translateY(-6px) scale(.98); transition: opacity .15s, transform .15s; }
.confirm-backdrop.is-open .confirm-box { opacity: 1; transform: none; }
.confirm-text { font-size: .95rem; line-height: 1.45; color: var(--as-text); overflow-wrap: anywhere; }
.confirm-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) { .confirm-backdrop, .confirm-box { transition: none; } }

/* Xato sahifasi (Views/Shared/Error.cshtml) */
.error-page { min-height: calc(100vh - 160px); display: flex; align-items: center; justify-content: center; padding: 1rem 0 3rem; }
.error-card { width: 100%; max-width: 480px; text-align: center; background: var(--as-surface); border: 1px solid var(--as-border); border-radius: 16px; padding: 2.25rem 1.75rem 1.75rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.error-code { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem; border-radius: 999px; background: var(--as-accent-soft); color: var(--as-accent); font-size: 1.6rem; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; margin-bottom: 1.1rem; }
.error-code.is-server { background: #fef2f2; color: var(--as-danger); }
.error-title { font-size: 1.35rem; font-weight: 600; margin: 0 0 .5rem; }
.error-message { color: var(--as-muted); margin: 0 auto 1.25rem; max-width: 380px; line-height: 1.5; }
.error-path { margin: -.5rem 0 1.25rem; }
.error-path code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-size: .8rem; color: var(--as-muted); background: var(--as-bg); padding: .15rem .45rem; border-radius: 6px; }
.error-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.error-actions .btn { display: inline-flex; align-items: center; gap: .35rem; }
.error-ref { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--as-border); font-size: .8rem; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; align-items: center; }
.error-ref code { color: var(--as-text); overflow-wrap: anywhere; }
