/* Rivoj — shared UI kit */
:root {
  --brand-50: #fffbeb;
  --brand-100: #fef3c7;
  --brand-200: #fde68a;
  --brand-500: #f59e0b;
  --brand-600: #d97706;
  --brand-700: #b45309;
  --brand-800: #92400e;
  --brand-900: #78350f;
  --growth: #fbbf24;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.38);
  --panel: rgba(255, 255, 255, 0.88);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.06);
  --radius: 1.1rem;
  --focus: 0 0 0 3px rgba(217, 119, 6, 0.24);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: "Fraunces", Georgia, serif;
}

.app-bg {
  background-color: #eef2f6;
  background-image:
    radial-gradient(ellipse 900px 480px at 0% -5%, rgba(245, 158, 11, 0.16), transparent 55%),
    radial-gradient(ellipse 700px 420px at 100% 0%, rgba(180, 83, 9, 0.1), transparent 50%),
    radial-gradient(ellipse 600px 400px at 70% 100%, rgba(251, 191, 36, 0.08), transparent 45%),
    linear-gradient(165deg, #fafaf9 0%, #f5f5f4 48%, #faf8f5 100%);
  background-attachment: fixed;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-enter {
  animation: rise-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagger > * {
  animation: rise-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.07s; }
.stagger > *:nth-child(3) { animation-delay: 0.11s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.19s; }
.stagger > *:nth-child(6) { animation-delay: 0.23s; }

/* —— Shell —— */
.sidebar-shell {
  background: linear-gradient(180deg, #1c1917 0%, #292524 42%, #44403c 100%);
  color: #fafaf9;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
/* Desktop: yopilgan holat (Alpine yuklanishidan oldin ham) */
@media (min-width: 768px) {
  html[data-sidebar="collapsed"] .sidebar-shell--desktop {
    width: 0 !important;
    opacity: 0;
    border-color: transparent;
    pointer-events: none;
  }
}
.sidebar-shell .brand-mark,
.sidebar-shell .brand-lockup-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  background: transparent;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar-shell .brand-mark img,
.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* —— Brand lockup —— */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--brand-900);
}
.brand-name-accent {
  color: var(--growth);
}
.brand-tagline {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}
.brand-company {
  margin: 0.15rem 0 0;
  font-size: 0.7rem;
  color: rgba(250, 250, 249, 0.55);
  line-height: 1.2;
}
.brand-lockup--sidebar .brand-name {
  color: #fff;
  font-size: 1.25rem;
}
.brand-lockup--sidebar .brand-name-accent {
  color: #fbbf24;
}
.brand-lockup--sidebar .brand-tagline {
  color: rgba(250, 250, 249, 0.55);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}
.brand-lockup--login {
  flex-direction: column;
  text-align: center;
  gap: 0.65rem;
}
.brand-lockup--login .brand-lockup-mark {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  box-shadow: 0 10px 28px rgba(180, 83, 9, 0.35);
}
.brand-lockup--login .brand-name {
  font-size: 2rem;
}
.brand-lockup--login .brand-tagline {
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.nav-group-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 250, 249, 0.45);
  padding: 1rem 0.75rem 0.35rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  color: rgba(250, 250, 249, 0.78);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.nav-item.is-hot {
  background: rgba(251, 191, 36, 0.18);
  color: #fef3c7;
  font-weight: 650;
}
.nav-item.is-hot:hover,
.nav-item.is-hot.is-active {
  background: rgba(251, 191, 36, 0.28);
  color: #fffbeb;
}
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.45;
  flex-shrink: 0;
}
.nav-item.is-active .nav-dot,
.nav-item.is-hot .nav-dot {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

/* —— Page chrome —— */
.ui-page {
  width: 100%;
  max-width: 72rem;
}
.ui-page-narrow { max-width: 36rem; }
.ui-page-mid { max-width: 48rem; }
.ui-page-wide { max-width: 72rem; }

.ui-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.ui-page-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.7rem, 2.4vw, 2.25rem);
  color: var(--brand-900);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.ui-page-sub {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}
.ui-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.ui-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

/* —— Surfaces —— */
.ui-panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ui-panel-pad { padding: 1.25rem 1.35rem; }
.ui-panel-flush { overflow: hidden; }

.ui-stat {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ui-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.ui-stat::after {
  content: "";
  position: absolute;
  right: -20%;
  top: -40%;
  width: 55%;
  height: 120%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12), transparent 70%);
  pointer-events: none;
}
.ui-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ui-stat-value {
  margin-top: 0.35rem;
  font-size: 1.6rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.ui-stat-meta {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* —— Buttons —— */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.85rem;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ui-btn:active { transform: scale(0.98); }
.ui-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.ui-btn-primary {
  background: linear-gradient(180deg, #b45309, #d97706);
  color: #fff;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.28);
}
.ui-btn-primary:hover {
  background: linear-gradient(180deg, #d97706, #f59e0b);
  color: #fff;
}
.ui-btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--line);
  color: var(--ink);
}
.ui-btn-ghost:hover {
  background: #fff;
  border-color: rgba(217, 119, 6, 0.35);
}
.ui-btn-danger {
  background: #fff;
  border-color: #fecaca;
  color: #b91c1c;
}
.ui-btn-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}
.ui-btn-block { width: 100%; }
.ui-btn-lg { padding: 0.85rem 1.15rem; font-size: 1rem; }
.ui-btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

/* —— Forms —— */
.ui-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.ui-help {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}
.ui-input,
.ui-select,
.ui-textarea {
  width: 100%;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ui-textarea { min-height: 5.5rem; resize: vertical; }
.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
  outline: none;
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: var(--focus);
}
.ui-input-lg {
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
}

/* Django form widgets inside ui-form get nicer defaults */
.ui-form input[type="text"],
.ui-form input[type="number"],
.ui-form input[type="email"],
.ui-form input[type="password"],
.ui-form input[type="date"],
.ui-form input[type="search"],
.ui-form input[type="tel"],
.ui-form input[type="url"],
.ui-form select,
.ui-form textarea {
  width: 100%;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
}
.ui-form input[type="checkbox"],
.ui-form input[type="radio"] {
  width: auto;
  padding: 0;
  border-radius: 0.25rem;
  box-shadow: none;
}
.ui-form input[type="file"] {
  padding: 0.45rem 0.5rem;
  font-size: 0.8rem;
}
.ui-form .field + .field,
.ui-form > div + div {
  margin-top: 0.85rem;
}

/* —— Tables —— */
.ui-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  max-width: 100%;
}
.ui-table {
  width: 100%;
  min-width: 0;
  font-size: 0.875rem;
  border-collapse: collapse;
}
/* Keng jadvallar — faqat kerak bo‘lsa gorizontal scroll */
.ui-table--wide {
  min-width: 36rem;
}
.ui-table thead th {
  text-align: left;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.95);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
}
.ui-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  vertical-align: middle;
}
.ui-table tbody tr {
  transition: background 0.12s ease;
}
.ui-table tbody tr:hover {
  background: rgba(240, 253, 250, 0.7);
}
.ui-table tbody tr:last-child td {
  border-bottom: none;
}
.ui-table .tabular-nums,
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* —— List rows —— */
.ui-list {
  overflow: hidden;
}
.ui-list-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  transition: background 0.12s ease;
}
.ui-list-row:last-child { border-bottom: none; }
.ui-list-row:hover { background: rgba(240, 253, 250, 0.55); }
.ui-list-title {
  font-weight: 600;
  color: var(--ink);
}
.ui-list-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* —— Badges / alerts / empty —— */
.ui-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.ui-badge-ok { background: #ccfbf1; color: #115e59; }
.ui-badge-warn { background: #fef3c7; color: #92400e; }
.ui-badge-danger { background: #fee2e2; color: #991b1b; }
.ui-badge-muted { background: #f1f5f9; color: #475569; }

.ui-alert {
  border-radius: 1rem;
  padding: 0.95rem 1.1rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
  margin-bottom: 1.1rem;
}
.ui-alert-title {
  font-weight: 650;
  margin-bottom: 0.35rem;
}
.ui-alert-warn {
  background: rgba(254, 243, 199, 0.75);
  border-color: #fde68a;
  color: #78350f;
}
.ui-alert-danger {
  background: rgba(254, 226, 226, 0.75);
  border-color: #fecaca;
  color: #7f1d1d;
}
.ui-alert-info {
  background: rgba(224, 242, 254, 0.8);
  border-color: #bae6fd;
  color: #0c4a6e;
}
.ui-alert-ok {
  background: rgba(204, 251, 241, 0.7);
  border-color: #99f6e4;
  color: #115e59;
}

.ui-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.ui-empty-actionable {
  padding: 2.5rem 1.25rem;
}
.ui-empty-text {
  margin: 0 0 1.25rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}
.ui-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.ui-empty-title {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.pos-help-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.75rem;
  color: var(--muted);
}
.pos-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.pos-jump-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(180, 83, 9, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #78350f;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pos-jump-link:hover {
  background: #fff7ed;
  border-color: rgba(180, 83, 9, 0.45);
  color: #9a3412;
}
.pos-help-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.pos-help-item kbd {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #f8fafc;
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: #334155;
}
.pos-help-offline:not(.is-visible) {
  display: none !important;
}
@media (max-width: 640px) {
  .pos-help-mobile {
    width: 100%;
    justify-content: center;
    padding-top: 0.15rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.35);
  }
}

.guide-layout,
.settings-layout {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .guide-layout {
    grid-template-columns: 11rem minmax(0, 1fr);
    align-items: start;
  }
  .settings-layout {
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: start;
  }
  .guide-nav,
  .settings-toc {
    position: sticky;
    top: 4.5rem;
  }
}
.guide-nav-link,
.settings-toc-link {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.guide-nav-link:hover,
.settings-toc-link:hover {
  background: rgba(180, 83, 9, 0.08);
  color: var(--ink);
}
.guide-nav-link.is-active,
.settings-toc-link.is-active {
  background: rgba(180, 83, 9, 0.12);
  color: #92400e;
  font-weight: 600;
}
.prose-guide h2 {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 1.35rem;
  color: #78350f;
  margin: 0 0 0.75rem;
}
.prose-guide p {
  margin: 0 0 0.75rem;
  line-height: 1.55;
  color: #334155;
}
.guide-steps {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
  line-height: 1.55;
  color: #334155;
}
.guide-steps li {
  margin-bottom: 0.5rem;
}
.guide-list {
  margin: 0 0 1rem 1.1rem;
  padding: 0;
  line-height: 1.55;
  color: #334155;
}
.guide-list li {
  margin-bottom: 0.4rem;
}
.guide-tip {
  border-radius: 0.75rem;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(255, 251, 235, 0.8);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #78350f;
  margin-bottom: 0.75rem;
}
.scroll-mt-24 {
  scroll-margin-top: 5.5rem;
}

.ui-toast {
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  animation: rise-in 0.35s ease both;
  border: 1px solid transparent;
}
.ui-toast-ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.ui-toast-err {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.topbar-shell {
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.topbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.topbar-chip:hover {
  background: #fff;
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.login-hero {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(245, 158, 11, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(180, 83, 9, 0.25), transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 90%, rgba(251, 191, 36, 0.15), transparent 50%),
    linear-gradient(160deg, #1c1917 0%, #292524 45%, #44403c 100%);
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 24rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(217, 119, 6, 0.08);
  padding: 2.25rem 2rem 2rem;
  animation: rise-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Link soft */
.ui-link {
  color: var(--brand-700);
  font-weight: 550;
  text-decoration: none;
}
.ui-link:hover { text-decoration: underline; }

/* Safe area / mobile */
@supports (padding: max(0px)) {
  main.page-enter {
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
  .pos-mobile-paybar {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
  .topbar-shell {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

@media (max-width: 640px) {
  .ui-page-header { align-items: stretch; }
  .ui-page-title { font-size: clamp(1.35rem, 7vw, 1.75rem); }
  .ui-page-sub { font-size: 0.8125rem; }
  .ui-panel-pad { padding: 0.9rem 1rem; }
  .ui-stat { padding: 0.9rem 1rem; }
  .ui-actions { width: 100%; }
  .ui-actions .ui-btn {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.8125rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .ui-table thead th,
  .ui-table tbody td {
    padding: 0.55rem 0.5rem;
    font-size: 0.8125rem;
  }
  .ui-table--wide { min-width: 32rem; }
  .ui-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .ui-toolbar .ui-input,
  .ui-toolbar .ui-select,
  .ui-toolbar input[type="date"],
  .ui-toolbar input[type="search"],
  .ui-toolbar input[type="text"],
  .ui-toolbar [class*="min-w-"] {
    min-width: 0 !important;
    width: 100%;
    flex: 1 1 100%;
  }
  .ui-toolbar .ui-btn {
    width: 100%;
    justify-content: center;
  }
  .ui-actions form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
  }
  .ui-actions form .ui-input,
  .ui-actions form .ui-select,
  .ui-actions form input[type="date"],
  .ui-actions form [class*="min-w-"] {
    min-width: 0 !important;
    flex: 1 1 calc(50% - 0.25rem);
  }
  .ui-actions form .ui-btn {
    flex: 1 1 100%;
  }
  /* iOS zoom oldini olish */
  .ui-input,
  .ui-select,
  .ui-textarea,
  .ui-form input[type="text"],
  .ui-form input[type="number"],
  .ui-form input[type="email"],
  .ui-form input[type="password"],
  .ui-form input[type="date"],
  .ui-form input[type="search"],
  .ui-form input[type="tel"],
  .ui-form select,
  .ui-form textarea {
    font-size: 16px;
  }
  .ui-stat-value {
    font-size: clamp(1.25rem, 6vw, 1.75rem);
  }
  .topbar-shell .ui-select {
    max-width: 7.5rem;
    font-size: 0.8125rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  form [class*="min-w-["],
  .ui-toolbar [class*="min-w-["],
  .ui-actions [class*="min-w-["] {
    min-width: 0 !important;
    width: 100%;
  }
  .hide-sm { display: none !important; }
}

/* POS / umumiy modal — Tailwind z-[200] build’da yo‘q, sticky z-10 ustiga chiqmasin */
.rivoj-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
@media (min-width: 640px) {
  .rivoj-modal-overlay {
    align-items: center;
    padding: 1.5rem;
  }
}

/* POS: savat scroll — doim qattiq max-height (kassa pastga ketmasin) */
#pos-cart-panel .pos-cart-lines,
.pos-cart-lines {
  max-height: 240px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 640px) {
  #pos-cart-panel .pos-cart-lines,
  .pos-cart-lines {
    max-height: 280px !important;
  }
}
@media (min-width: 1024px) {
  .pos-cart-anchor {
    position: sticky;
    top: 3.35rem;
    align-self: start;
  }
  #pos-cart-panel .pos-cart-lines,
  .pos-cart-lines {
    max-height: 300px !important;
  }
}

/* POS: mobil sticky to‘lov paneli */
.pos-mobile-paybar {
  display: none;
}
@media (max-width: 1023px) {
  .pos-mobile-paybar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    background: rgba(120, 53, 15, 0.97);
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
    padding: 0.65rem 0.85rem;
  }
  .pos-has-cart {
    padding-bottom: 5.75rem;
  }
  .pos-has-cart.pay-more-pad {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-enter, .stagger > *, .ui-toast, .login-card, .ui-stat {
    animation: none !important;
    transition: none !important;
  }
}

[x-cloak] { display: none !important; }

/* —— Sotuvchi motivatsiyasi —— */
.seller-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.seller-badge--leader {
  background: rgba(251, 191, 36, 0.22);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.seller-badge--hint {
  color: rgba(250, 250, 249, 0.55);
}
.seller-goal-bar {
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.seller-goal-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d97706, #fbbf24);
  transition: width 0.35s ease;
}
.seller-goal-fill.is-done {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}
.seller-goal-card {
  border-radius: 0.85rem;
  border: 1px solid rgba(217, 119, 6, 0.2);
  background: rgba(255, 251, 235, 0.85);
  padding: 0.65rem 0.75rem;
}

/* Katta summalar — o‘qish/yozish */
.js-money,
input.tabular-nums,
.tabular-nums {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
input.js-money {
  font-weight: 600;
}

/* Jonli sahifa yangilanishi */
#page-live.is-live-checking {
  transition: opacity 0.2s ease;
}
#page-live.is-live-updating {
  opacity: 0.94;
}
#page-live.live-flash {
  animation: rivoj-live-flash 0.55s ease;
}
@keyframes rivoj-live-flash {
  0% { box-shadow: inset 0 3px 0 0 transparent; }
  35% { box-shadow: inset 0 3px 0 0 rgba(180, 83, 9, 0.45); }
  100% { box-shadow: inset 0 3px 0 0 transparent; }
}

/* Telegram buyurtma alert */
.shop-order-alert {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.shop-order-alert.hidden {
  display: none !important;
}
.shop-order-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.55);
  backdrop-filter: blur(4px);
}
.shop-order-alert-card {
  position: relative;
  width: min(24rem, 100%);
  border-radius: 1.25rem;
  padding: 1.35rem 1.4rem 1.25rem;
  background: linear-gradient(165deg, #fffbeb 0%, #fef3c7 48%, #fde68a 100%);
  border: 1px solid rgba(180, 83, 9, 0.35);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  animation: shop-order-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.shop-order-alert-pulse {
  position: absolute;
  top: 0.85rem;
  right: 0.95rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #b45309;
  box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.55);
  animation: shop-order-ping 1.4s ease-out infinite;
}
@keyframes shop-order-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes shop-order-ping {
  0% { box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(180, 83, 9, 0); }
  100% { box-shadow: 0 0 0 0 rgba(180, 83, 9, 0); }
}

/* SPA navigatsiya — yuqori progress */
#rivoj-spa-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 100;
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: opacity 0.15s ease;
}
#rivoj-spa-progress.is-active {
  opacity: 1;
  background: linear-gradient(90deg, #b45309, #f59e0b, #b45309);
  background-size: 200% 100%;
  animation: rivoj-spa-load 0.85s ease-in-out infinite, rivoj-spa-grow 0.45s ease-out forwards;
}
#rivoj-spa-progress.is-done {
  animation: none;
  transform: scaleX(1);
  opacity: 0;
  transition: opacity 0.25s ease 0.05s;
}
@keyframes rivoj-spa-grow {
  from { transform: scaleX(0.12); }
  to { transform: scaleX(0.72); }
}
@keyframes rivoj-spa-load {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
#spa-root {
  /* refreshda opacity 0 da qolib ketmasin */
  opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
  #spa-root.is-spa-enter {
    animation: rivoj-spa-in 0.22s ease-out;
  }
}
@keyframes rivoj-spa-in {
  from { opacity: 0.45; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

