/* ==========================================================================
   Fitnes — dizayn tizimi
   ========================================================================== */

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-hover: #f2f4f8;
  --border: #e6e8ef;
  --border-strong: #d5d9e3;
  --text: #0f172a;
  --text-2: #4b5567;
  --muted: #8a93a6;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --primary-text: #4338ca;
  --on-primary: #ffffff;

  --success: #16a34a;
  --success-soft: #e7f8ee;
  --success-text: #15803d;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --danger-text: #b91c1c;
  --warning: #d97706;
  --warning-soft: #fdf3e2;
  --warning-text: #b45309;
  --info: #0284c7;
  --info-soft: #e6f4fb;
  --info-text: #0369a1;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 4px 8px -4px rgba(16, 24, 40, .06);
  --ring: 0 0 0 4px rgba(79, 70, 229, .16);

  --sidebar-w: 264px;
  --topbar-h: 72px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a0c12;
  --surface: #11141c;
  --surface-2: #161a24;
  --surface-hover: #1b2030;
  --border: #222839;
  --border-strong: #2e3549;
  --text: #e8eaf0;
  --text-2: #a3aabb;
  --muted: #6c7489;

  --primary: #6366f1;
  --primary-hover: #7c7ff5;
  --primary-soft: rgba(99, 102, 241, .14);
  --primary-text: #a5a8fb;

  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, .12);
  --success-text: #4ade80;
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, .13);
  --danger-text: #f87171;
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, .13);
  --warning-text: #fbbf24;
  --info: #0ea5e9;
  --info-soft: rgba(14, 165, 233, .13);
  --info-text: #38bdf8;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 3px rgba(0, 0, 0, .35);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, .6);
  --ring: 0 0 0 4px rgba(99, 102, 241, .25);
  color-scheme: dark;
}

/* --- Asos ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.text-success { color: var(--success-text); }
.text-danger { color: var(--danger-text); }
.text-warning { color: var(--warning-text); }
.fw-600 { font-weight: 600; }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* --- Layout ------------------------------------------------------------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 40;
  transition: transform .25s ease;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #7c3aed 100%);
  box-shadow: 0 6px 14px -4px rgba(79, 70, 229, .55);
}
.brand-logo { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--muted); }

.nav { flex: 1; overflow-y: auto; padding: 12px; }
.nav-section {
  margin: 16px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-section:first-child { margin-top: 4px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-hover); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.nav-link.disabled { opacity: .55; cursor: default; }
.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 99px;
  font-size: 11.5px; font-weight: 700;
  background: var(--warning); color: #fff;
}
.nav-link.disabled:hover { background: none; color: var(--text-2); }
.nav-pill {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 4px 4px 0; }
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar-user-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 12px; color: var(--muted); }
.sidebar-backdrop { display: none; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .topbar-menu { display: none; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 1px; }
.breadcrumb a:hover { color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.content { padding: 28px 32px 48px; width: 100%; max-width: 1400px; }

[data-theme="dark"] .theme-icon-light, :root:not([data-theme="dark"]) .theme-icon-dark { display: none; }
.theme-toggle span { display: flex; }

/* --- Grid --------------------------------------------------------------- */

.stack { display: grid; gap: 20px; }
.grid { display: grid; gap: 20px; }
.grid > *, .stack > * { min-width: 0; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.grid-side { grid-template-columns: 340px minmax(0, 1fr); align-items: start; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }

/* --- Card --------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.card-subtitle { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-link { font-size: 13px; font-weight: 600; color: var(--primary-text); display: inline-flex; align-items: center; gap: 2px; }
.card-link:hover { text-decoration: underline; }

/* --- Stat --------------------------------------------------------------- */

.stat { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.stat-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
}
.stat-icon.tone-primary { background: var(--primary-soft); color: var(--primary-text); }
.stat-icon.tone-success { background: var(--success-soft); color: var(--success-text); }
.stat-icon.tone-warning { background: var(--warning-soft); color: var(--warning-text); }
.stat-icon.tone-info { background: var(--info-soft); color: var(--info-text); }
.stat-value { font-size: 26px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.stat-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; padding: 1px 6px; border-radius: 99px; }
.trend-up { color: var(--success-text); background: var(--success-soft); }
.trend-down { color: var(--danger-text); background: var(--danger-soft); }

/* --- Button ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  background: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(79, 70, 229, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--surface-hover); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.06); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); }
.btn-soft-danger { background: var(--danger-soft); color: var(--danger-text); }
.btn-soft-danger:hover { filter: brightness(.97); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }
.btn-block { width: 100%; }

/* --- Form --------------------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--text); }
.req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 10px 14px; resize: vertical; }
.select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.has-error .input, .has-error .select { border-color: var(--danger); }
.has-error .input:focus { box-shadow: 0 0 0 4px var(--danger-soft); }
.field-error { font-size: 12.5px; color: var(--danger-text); font-weight: 500; }
.field-hint { font-size: 12.5px; color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-affix { position: absolute; color: var(--muted); font-size: 13.5px; pointer-events: none; display: flex; }
.input-prefix { left: 14px; }
.input-suffix { right: 14px; }
.has-prefix .input { padding-left: 42px; }
.has-suffix .input { padding-right: 56px; }
input[type="date"].input { padding-right: 10px; }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-section-title { font-size: 13px; font-weight: 650; color: var(--text-2); margin-bottom: 12px; }

/* Rasm yuklash */
.photo-upload { display: flex; align-items: center; gap: 16px; }
.photo-preview {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--muted);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Variant kartalar (radio) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
  height: 100%;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.choice:hover .choice-body { border-color: var(--border-strong); }
.choice input:checked + .choice-body { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--ring); }
.choice input:focus-visible + .choice-body { box-shadow: var(--ring); }
.choice-title { font-weight: 650; }
.choice-price { font-size: 18px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.choice-meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.choice-meta span { display: inline-flex; align-items: center; gap: 4px; }

.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.segmented .choice-body { flex-direction: row; align-items: center; gap: 8px; padding: 10px 16px; font-weight: 600; }

/* --- Table -------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table tbody tr { transition: background .1s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover { background: var(--surface-hover); }
.table .text-right { text-align: right; }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-user-name { font-weight: 600; white-space: nowrap; }
.cell-user-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* --- Badge / avatar ----------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: 99px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-soft); color: var(--success-text); }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.badge-warning { background: var(--warning-soft); color: var(--warning-text); }
.badge-info { background: var(--info-soft); color: var(--info-text); }
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }
.badge-muted { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 19px; }
.avatar-xl { width: 88px; height: 88px; font-size: 30px; }
.avatar-initials { display: inline-grid; place-items: center; font-weight: 700; color: #fff; letter-spacing: .02em; }
.avatar-initials[data-seed="0"] { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.avatar-initials[data-seed="1"] { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.avatar-initials[data-seed="2"] { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.avatar-initials[data-seed="3"] { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.avatar-initials[data-seed="4"] { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.avatar-initials[data-seed="5"] { background: linear-gradient(135deg, #14b8a6, #22c55e); }

/* --- Progress ----------------------------------------------------------- */

.progress { height: 8px; border-radius: 99px; background: var(--surface-hover); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; transition: width .4s ease; }
.progress-primary { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.progress-success { background: var(--success); }
.progress-warning { background: var(--warning); }
.progress-danger { background: var(--danger); }

/* --- Tabs / filtr ------------------------------------------------------- */

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab-count { font-size: 11.5px; padding: 0 6px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-text); }
.search { position: relative; min-width: 260px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 40px; height: 40px; }

/* --- List --------------------------------------------------------------- */

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background .1s; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-hover); }
.list-item-main { flex: 1; min-width: 0; }
.list-item-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; font-weight: 500; text-align: right; }

/* --- Chart -------------------------------------------------------------- */

.chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding-top: 12px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; min-width: 0; }
.chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.chart-bar {
  width: 100%; max-width: 34px; min-height: 4px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #818cf8, #6366f1);
  opacity: .85;
  transition: opacity .15s;
}
.chart-col.is-today .chart-bar { background: linear-gradient(180deg, #a78bfa, #7c3aed); opacity: 1; }
.chart-col.is-empty .chart-bar { background: var(--surface-hover); opacity: 1; }
.chart-col:hover .chart-bar { opacity: 1; }
.chart-label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.chart-col.is-today .chart-label { color: var(--primary-text); font-weight: 700; }
.chart-tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 6px 10px; border-radius: 8px;
  background: var(--text); color: var(--bg);
  font-size: 12px; font-weight: 500; white-space: nowrap;
  pointer-events: none; z-index: 2;
  display: none;
}
.chart-col:hover .chart-tip { display: block; animation: tip-in .12s ease; }
.chart-col:nth-child(-n+3) .chart-tip { left: 0; transform: none; }
.chart-col:nth-last-child(-n+3) .chart-tip { left: auto; right: 0; transform: none; }
@keyframes tip-in { from { opacity: 0; } }

/* --- Empty / alert ------------------------------------------------------ */

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 20px; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); margin-bottom: 4px; }
.empty-title { font-weight: 650; }
.empty-text { color: var(--muted); font-size: 13px; max-width: 360px; margin-bottom: 8px; }

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); font-size: 13.5px; align-items: flex-start; }
.alert .icon { margin-top: 1px; }
.alert-info { background: var(--info-soft); color: var(--info-text); }
.alert-warning { background: var(--warning-soft); color: var(--warning-text); }
.alert-danger { background: var(--danger-soft); color: var(--danger-text); }
.alert-success { background: var(--success-soft); color: var(--success-text); }

/* --- Toast -------------------------------------------------------------- */

.toasts { position: fixed; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: toast-in .3s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.hide { animation: toast-out .2s ease forwards; }
.toast-icon { display: flex; margin-top: 1px; }
.toast-success .toast-icon { color: var(--success); }
.toast-danger .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }
.toast-text { flex: 1; font-weight: 500; }
.toast-close { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; display: flex; border-radius: 6px; }
.toast-close:hover { color: var(--text); background: var(--surface-hover); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

/* --- Pagination --------------------------------------------------------- */

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); }
.pagination-info { font-size: 13px; color: var(--muted); }
.pagination-links { display: flex; gap: 4px; }
.pagination-links .btn { width: 34px; height: 34px; font-size: 13px; }
.pagination-gap { display: grid; place-items: center; width: 24px; color: var(--muted); }

/* --- Dialog ------------------------------------------------------------- */

.dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(10, 12, 20, .5); backdrop-filter: blur(3px); }
.dialog[open] { animation: toast-in .2s ease; }
.dialog-body { padding: 24px; display: grid; gap: 16px; }
.dialog-title { font-size: 17px; font-weight: 700; }
.dialog-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); }

/* --- Sahifaga xos ------------------------------------------------------- */

/* Tashriflar: katta qidiruv */
.checkin-hero {
  padding: 28px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(139, 92, 246, .22), transparent 55%),
    radial-gradient(100% 120% at 0% 100%, rgba(14, 165, 233, .16), transparent 55%),
    var(--surface);
  border: 1px solid var(--border);
}
.checkin-hero h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.checkin-hero p { color: var(--text-2); margin-top: 4px; }
.search-xl { position: relative; margin-top: 18px; }
.search-xl .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-xl .input { height: 56px; padding-left: 52px; font-size: 16px; border-radius: 14px; box-shadow: var(--shadow); }
.search-xl kbd {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font: 600 11px var(--font); color: var(--muted);
  padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2);
}

.result { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.result:last-child { border-bottom: 0; }
.result-main { flex: 1; min-width: 0; }
.result-name { font-weight: 650; font-size: 15px; }
.result-sub { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.result-sub span { display: inline-flex; align-items: center; gap: 4px; }
.result.is-valid { box-shadow: inset 3px 0 0 var(--success); }
.result.is-invalid { box-shadow: inset 3px 0 0 var(--danger); }

/* Mijoz profili */
.profile { text-align: center; padding: 28px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.profile-name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.profile-actions { display: flex; gap: 8px; width: 100%; margin-top: 6px; }
.profile-actions .btn { flex: 1; }

.sub-hero {
  padding: 22px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #a855f7 100%);
  box-shadow: 0 16px 32px -12px rgba(79, 70, 229, .55);
  position: relative;
  overflow: hidden;
}
.sub-hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.sub-hero-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.sub-hero-name { font-size: 20px; font-weight: 750; margin-top: 4px; letter-spacing: -.02em; }
.sub-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; position: relative; z-index: 1; }
.sub-hero-stat-value { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.sub-hero-stat-label { font-size: 12px; opacity: .8; }
.sub-hero .progress { background: rgba(255, 255, 255, .22); margin-top: 18px; }
.sub-hero .progress-bar { background: #fff; }
.sub-hero.is-empty { background: var(--surface-2); color: var(--text); border: 1px dashed var(--border-strong); box-shadow: none; }
.sub-hero.is-empty::after { display: none; }

/* Sotish: xulosa */
.summary { position: sticky; top: calc(var(--topbar-h) + 24px); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13.5px; }
.summary-row span:first-child { color: var(--text-2); }
.summary-row span:last-child { font-weight: 600; text-align: right; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 8px; border-top: 1px dashed var(--border-strong); }
.summary-total-value { font-size: 24px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* Mijoz tanlash (autocomplete) */
.picker { position: relative; }
.picker-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; max-height: 340px; overflow-y: auto;
}
.picker-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.picker-item:hover, .picker-item.active { background: var(--surface-hover); }
.picker-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.picked {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--primary); background: var(--primary-soft);
}

/* Kirish sahifasi */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.auth-art {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(90% 70% at 20% 10%, rgba(167, 139, 250, .55), transparent 60%),
    radial-gradient(80% 60% at 90% 90%, rgba(56, 189, 248, .35), transparent 60%),
    linear-gradient(160deg, #1e1b4b 0%, #312e81 45%, #4c1d95 100%);
}
.auth-art::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent);
}
.auth-art > * { position: relative; }
.auth-art .brand-mark { background: rgba(255, 255, 255, .14); box-shadow: none; backdrop-filter: blur(6px); }
.auth-art h2 { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -.035em; max-width: 480px; }
.auth-art p { margin-top: 16px; font-size: 16px; opacity: .78; max-width: 420px; }
.auth-features { display: grid; gap: 12px; margin-top: 32px; }
.auth-feature { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.auth-feature .icon-box { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .12); }
.auth-form-side { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 380px; display: grid; gap: 24px; }
.auth-card h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.auth-card .lead { color: var(--text-2); margin-top: 6px; }
.auth-theme { position: fixed; top: 16px; right: 16px; }

/* Xato sahifasi */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.error-code { font-size: 88px; font-weight: 800; letter-spacing: -.05em; line-height: 1; background: linear-gradient(135deg, #6366f1, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Sozlamalar navigatsiyasi */
.subnav { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 500; color: var(--text-2); }
.subnav a:hover { background: var(--surface-hover); color: var(--text); }
.subnav a.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }

.plan-card { display: flex; flex-direction: column; }
.plan-card.is-archived { opacity: .6; }
.plan-card .card-body { flex: 1; display: grid; gap: 14px; }
.plan-price { font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.plan-specs { display: flex; gap: 8px; flex-wrap: wrap; }
.spec { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-2); }

.timeline { display: grid; gap: 0; }
.timeline-item { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 24px; bottom: -6px; width: 2px; background: var(--border); }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); flex-shrink: 0; }

/* --- Moslashuvchanlik --------------------------------------------------- */

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(10, 12, 20, .45); }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .topbar .topbar-menu { display: inline-flex; }
  .content { padding: 20px 16px 40px; }
  .grid-3, .grid-side { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}

@media (max-width: 640px) {
  .grid-4, .grid-2, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-value { font-size: 22px; }
  .topbar-title h1 { font-size: 17px; }
  .topbar-actions .btn-label { display: none; }
  .search { min-width: 0; width: 100%; }
  .table th, .table td { padding: 12px 14px; }
  .hide-sm { display: none; }
  .checkin-hero { padding: 20px; }
  .result { flex-wrap: wrap; }
  .result form, .result .result-action { width: 100%; }
  .result form .btn, .result .result-action .btn { width: 100%; }
}

/* --- Kassa / moliya ------------------------------------------------------ */

.cash-hero {
  padding: 24px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 255, 255, .18), transparent 50%),
    linear-gradient(135deg, #059669 0%, #0d9488 55%, #0891b2 100%);
  box-shadow: 0 16px 32px -14px rgba(5, 150, 105, .6);
}
.cash-hero.is-empty { background: var(--surface-2); color: var(--text); border: 1px dashed var(--border-strong); box-shadow: none; }
.cash-hero-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.cash-hero-value { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cash-hero-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; opacity: .9; }
.cash-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.cash-hero .btn-light { background: #fff; color: #047857; }
.cash-hero .btn-light:hover { background: #f0fdf4; }

.money-pos { color: var(--success-text); }
.money-neg { color: var(--danger-text); }

.bar-list { display: grid; gap: 14px; }
.bar-item-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; margin-bottom: 6px; }
.bar-item-head span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.chart-dual .chart-bar-wrap { gap: 3px; }
.chart-dual .chart-bar { max-width: 16px; }
.chart-bar.is-expense { background: linear-gradient(180deg, #fca5a5, #ef4444); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.role-chip { display: inline-flex; align-items: center; gap: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters .select { height: 36px; width: auto; }

.stat-compact .stat-value { font-size: 20px; white-space: nowrap; }

/* --- Davomat jurnali ---------------------------------------------------- */

.att-wrap { overflow: auto; max-height: 620px; }
.att { width: 100%; border-collapse: separate; border-spacing: 0; }
.att th, .att td { border-bottom: 1px solid var(--border); padding: 0; }
.att thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }
.att tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 0; }
.att-name { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 10px 12px 10px 20px !important; min-width: 210px; max-width: 240px; }
.att thead .att-name, .att tfoot .att-name { z-index: 3; background: var(--surface-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.att-ellipsis { overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.att-day { width: 36px; min-width: 36px; padding: 12px 0 !important; text-align: center; line-height: 1.1; }
.att-day-num { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.att-day-mon { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); }
.att-day.is-today .att-day-num { color: var(--primary-text); }
.att-day.is-today .att-day-mon { color: var(--primary-text); font-weight: 700; }
.att-cell { text-align: center; height: 52px; }
.att-cell.is-today { background: color-mix(in srgb, var(--primary-soft) 70%, transparent); }
.att-last { text-align: right; white-space: nowrap; padding: 0 20px 0 12px !important; min-width: 120px; }
.att thead .att-last { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.att tbody tr:hover td { background: var(--surface-hover); }
.att tbody tr:hover .att-cell.is-today { background: var(--primary-soft); }
.att tbody tr.is-absent .att-name { box-shadow: inset 3px 0 0 var(--danger); }

.att-mark {
  display: inline-grid; place-items: center;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong);
  vertical-align: middle;
}
.att-mark.is-on {
  width: 26px; height: 26px; border-radius: 8px;
  color: #fff;
  background: linear-gradient(140deg, #22c55e, #059669);
  box-shadow: 0 3px 8px -3px rgba(5, 150, 105, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .12s;
}
.att tbody tr:hover .att-mark.is-on { transform: scale(1.08); }
.att-total { font-size: 12.5px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.att-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.att-legend .att-mark.is-on { width: 20px; height: 20px; border-radius: 6px; }

.att-mark.is-on .icon { stroke-width: 3; }
.att tfoot td.is-today { background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface-2)); }
.att tfoot .att-cell.is-today .att-total { color: var(--primary-text); }
@media (max-width: 640px) {
  .att-name { min-width: 128px; max-width: 140px; padding-left: 14px !important; }
  .att-name .avatar { display: none; }
  .att-ellipsis { max-width: 112px; }
  .att-last { min-width: 100px; padding-right: 14px !important; }
}

/* Davomat: oy tanlash, yakshanba, kelajak kunlar */
.att-month { display: inline-flex; align-items: center; gap: 4px; }
.att-month form { display: flex; }
.att-month-input { height: 34px; width: 150px; padding: 0 10px; font-weight: 600; }
.att-day.is-sunday .att-day-mon { color: var(--danger-text); }
.att-cell.is-sunday:not(.is-today) { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.att tfoot td.is-sunday:not(.is-today) { background: var(--surface-2); }
.att-day.is-future .att-day-num { color: var(--muted); font-weight: 500; }
.att-mark.is-on { width: 24px; height: 24px; border-radius: 7px; }

/* --- Do'kon -------------------------------------------------------------- */

button.tab { border: 0; background: none; cursor: pointer; }
.shop-tabs { align-self: start; }

.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pos-item {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s, transform .08s;
}
.pos-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.pos-item:active { transform: scale(.98); }
.pos-item.in-cart { border-color: var(--primary); box-shadow: var(--ring); }
.pos-item.is-out { opacity: .5; cursor: not-allowed; }
.pos-item[hidden] { display: none; }
.pos-item-img {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 4 / 3; border-radius: 9px;
  background: var(--surface-2); color: var(--muted); overflow: hidden;
}
.pos-item-img img { width: 100%; height: 100%; object-fit: cover; }
.pos-item-qty {
  position: absolute; top: 6px; right: 6px;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px;
  display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary);
  font-size: 13px; font-weight: 750;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .4);
}
.pos-item-name { font-weight: 650; font-size: 13.5px; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pos-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.pos-item-price { font-weight: 750; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }

.cart { display: grid; gap: 2px; }
.cart:empty { display: none; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.cart-line-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cart-line-total { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 12px; border: 1.5px dashed var(--border); border-radius: var(--radius); color: var(--muted); font-size: 13px; text-align: center; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.qty-btn { width: 30px; height: 30px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 16px; font-weight: 700; color: var(--text-2); }
.qty-btn:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.qty-val { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.product-thumb { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); overflow: hidden; flex-shrink: 0; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-hero { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); overflow: hidden; }
.product-hero img { width: 100%; height: 100%; object-fit: cover; }

/* Karta cheki */
.receipt-drop { display: block; cursor: pointer; }
.receipt-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.receipt-drop-body {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 72px; padding: 12px 16px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text-2); font-size: 13px; text-align: left;
  transition: border-color .15s, background .15s;
}
.receipt-drop:hover .receipt-drop-body { border-color: var(--primary); background: var(--primary-soft); }
.receipt-drop input:focus-visible + .receipt-drop-body { box-shadow: var(--ring); }
.receipt-drop-body img { max-height: 160px; max-width: 100%; border-radius: 8px; object-fit: contain; }
.has-error .receipt-drop-body { border-color: var(--danger); }
.has-file .receipt-drop-body { border-style: solid; border-color: var(--success); background: var(--surface); }
.receipt-thumb { display: inline-block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.receipt-thumb img { display: block; width: 120px; max-height: 180px; object-fit: cover; }
.receipt-link { display: inline-flex; align-items: center; gap: 3px; color: var(--primary-text); font-weight: 600; }

.pos-cartbar { display: none; }
@media (max-width: 960px) {
  .pos-cartbar:not([hidden]) {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40;
    display: flex; align-items: center; gap: 10px;
    height: 54px; padding: 0 18px; border-radius: 14px;
    background: var(--primary); color: var(--on-primary); font-weight: 650;
    box-shadow: 0 10px 30px -8px rgba(79, 70, 229, .6);
  }
  .pos-cartbar-total { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
  [data-pos-form] { padding-bottom: 72px; }
}
@media (max-width: 640px) {
  .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
