:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e7ed;
  --border-strong: #cdd4de;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eef4ff;
  --primary-100: #dbe7ff;
  --success: #15803d;
  --success-50: #ecfdf3;
  --warning: #b45309;
  --warning-50: #fff8eb;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.2);
  --topbar-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 14px/1.45 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

/* ---------- Topbar ---------- */
header.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
header.topbar .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  margin-right: 18px;
  white-space: nowrap;
}
header.topbar .brand .logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}
header.topbar a {
  color: var(--text-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 9px;
  font-weight: 500;
  white-space: nowrap;
}
header.topbar a:hover { background: var(--surface-2); color: var(--text); }
header.topbar a.active { background: var(--primary-50); color: var(--primary-600); font-weight: 600; }
header.topbar .spacer { flex: 1; }
header.topbar .who { color: var(--muted); font-size: 13px; margin-right: 8px; white-space: nowrap; }

/* ---------- Layout ---------- */
main { padding: 20px 24px; max-width: 1560px; margin: 0 auto; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 16px;
}

.panel > h2 { margin-bottom: 16px; }

/* ---------- Form controls ---------- */
label, .field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

input, select, textarea {
  font: inherit;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  width: 100%;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea { height: auto; padding: 9px 11px; }
input::placeholder { color: #a0abbb; }
input:hover, select:hover { border-color: #b8c1ce; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-100);
}
input.invalid, .field.invalid input {
  border-color: var(--danger);
  background: var(--danger-50);
}

button {
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
button:hover { background: var(--primary-600); }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-100); }
button.secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
button.secondary:hover { background: var(--surface-2); border-color: #b8c1ce; }
button.ghost { background: transparent; color: var(--text-2); }
button.ghost:hover { background: var(--surface-2); }
button.danger { background: var(--danger); }
button.danger:hover { background: #b91c1c; }
button.success { background: var(--success); }
button.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
button .kbd-inline { opacity: 0.75; font-size: 12px; font-weight: 500; }

kbd {
  font: 11px/1 var(--mono);
  padding: 3px 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: var(--text-2);
  white-space: nowrap;
}

/* ---------- Tables (umumiy) ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; }
th {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-2);
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Badges / pills ---------- */
.badge, .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.draft_local { background: #fef3c7; color: #92400e; }
.badge.submitting { background: #dbeafe; color: #1e40af; }
.badge.submitted { background: #d1fae5; color: #065f46; }
.badge.error { background: #fee2e2; color: #991b1b; }
.pill.new { background: var(--primary-50); color: var(--primary-600); }
.pill.exists { background: var(--success-50); color: var(--success); }
.pill.unknown { background: #f1f5f9; color: var(--muted); }
.pill.checking { background: #f1f5f9; color: var(--muted); }
.pill.checking::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  border-top-color: var(--muted);
  animation: spin 0.7s linear infinite;
}

.error-box {
  background: var(--danger-50);
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 11px 14px;
  margin: 10px 0;
  white-space: pre-wrap;
}
.hint { color: var(--muted); font-size: 12px; }
.header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.actions-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }

/* ============================================================
   Xarid kiritish sahifasi
   ============================================================ */
main.entry { padding-bottom: 120px; }

.entry-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.entry-head .title-block { flex: 1; min-width: 220px; }
.entry-head .subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.entry-head .subtitle .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

.header-fields {
  display: grid;
  grid-template-columns: minmax(240px, 2.2fr) minmax(150px, 1.2fr) minmax(120px, 0.9fr) minmax(140px, 1fr) minmax(180px, 1.8fr);
  gap: 14px;
}
.field { min-width: 0; }
.field .req { color: var(--danger); margin-left: 2px; }

/* ---- Grid panel ---- */
.grid-panel { padding: 0; overflow: visible; }
.grid-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 14px;
  flex-wrap: wrap;
}
.grid-toolbar h2 { display: flex; align-items: center; gap: 8px; }
.count-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 999px;
  font-size: 12px;
  padding: 1px 8px;
  font-weight: 600;
}
.kbd-hints {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
}
.kbd-hints span { display: inline-flex; align-items: center; gap: 5px; }

table.grid {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
table.grid thead th {
  position: sticky;
  top: var(--topbar-h);
  z-index: 5;
  padding: 9px 10px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
table.grid th.num { text-align: right; }
table.grid td {
  padding: 0;
  height: 44px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  background: #fff;
}
table.grid td + td { border-left: 1px solid #edf0f4; }
table.grid tbody tr:hover td { background: #fbfcfe; }
table.grid tbody tr:focus-within td { background: #f5f9ff; }
table.grid tbody tr:last-child td { border-bottom: 0; }

table.grid td.col-no {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
table.grid tbody tr:focus-within td.col-no { color: var(--primary-600); font-weight: 700; }

.cell-input {
  display: block;
  width: 100%;
  height: 43px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 10px;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  text-transform: uppercase;
  box-shadow: none;
}
.cell-input:hover { border: 0; }
.cell-input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--primary);
  border-radius: 3px;
  position: relative;
  z-index: 1;
}
.cell-input::placeholder { color: #c3cad5; font-weight: 400; text-transform: none; }
td.num .cell-input { text-align: right; font-variant-numeric: tabular-nums; }

td.invalid .cell-input { box-shadow: inset 0 0 0 2px var(--danger); background: var(--danger-50); color: #991b1b; }
td.missing .cell-input { box-shadow: inset 0 0 0 2px #f59e0b; background: var(--warning-50); }
td.manual .cell-input { color: var(--warning); font-weight: 700; }
td.muted .cell-input:not(:focus) { color: #b3bcc9; font-weight: 400; }
td.from-bito .cell-input { color: var(--success); font-weight: 700; }
/* Firma/brend o'tgan, lekin to'ldirilmagan qator -- yuborilmaydi, xira ko'rinadi */
table.grid tbody tr.skip:not(:focus-within) .cell-input { color: #b3bcc9; font-weight: 400; }
td.suggested .cell-input:not(:focus) { color: var(--muted); font-style: italic; }
.cell-input[readonly] { cursor: default; }
td.pending .cell-input { opacity: 0.45; }
table.grid td.col-karobka { position: relative; }
table.grid td.col-karobka[data-rem]::after {
  content: attr(data-rem);
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--warning);
  pointer-events: none;
}
td.flash .cell-input { animation: flash 1.4s ease-out; }

table.grid td.col-summa {
  text-align: right;
  padding: 0 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.grid td.col-status { text-align: center; padding: 0 4px; }
table.grid td.col-actions { padding: 0 4px; white-space: nowrap; text-align: right; }

.icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 15px;
  font-weight: 500;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.del:hover { background: var(--danger-50); color: var(--danger); }
table.grid tbody tr:not(:hover):not(:focus-within) .icon-btn { opacity: 0.35; }

.add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  border: 0;
  border-top: 1px dashed var(--border-strong);
  border-radius: 0 0 var(--radius) var(--radius);
  background: #fff;
  color: var(--primary-600);
  font-weight: 600;
}
.add-row:hover { background: var(--primary-50); }

/* ---- Excel'dagi kabi to'ldirish tutqichi ---- */
.sel-box, .fill-box, .fill-handle, .fill-tip { position: fixed; display: none; }
.sel-box { z-index: 20; pointer-events: none; border: 2px solid var(--primary); border-radius: 3px; }
.fill-box {
  z-index: 19;
  pointer-events: none;
  border: 2px dashed var(--primary);
  border-radius: 3px;
  background: rgba(37, 99, 235, 0.07);
}
.fill-handle {
  z-index: 21;
  width: 11px;
  height: 11px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--primary);
  cursor: crosshair;
}
.fill-handle:hover { transform: scale(1.25); }
.fill-tip {
  z-index: 22;
  pointer-events: none;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 7px;
  box-shadow: var(--shadow);
}
table.grid td.sel-range, table.grid tbody tr:focus-within td.sel-range { background: #e9f1ff; }
body.filling, body.filling * { cursor: crosshair !important; user-select: none !important; }
body.range-selecting .cell-input { user-select: none; }
@media (max-width: 760px), (pointer: coarse) {
  .sel-box, .fill-box, .fill-handle, .fill-tip { display: none !important; }
}

/* ---- Summary bar ---- */
.summary-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.06);
}
.summary-inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.stat .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.stat .value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .value small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.stat.accent .value { color: var(--primary-600); }
.summary-inner .grow { flex: 1; }

/* ---- Combobox (body'dagi qalqib chiquvchi ro'yxat) ---- */
.cb-pop {
  position: fixed;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 5px;
  max-height: 300px;
  overflow-y: auto;
  min-width: 200px;
}
.cb-pop[hidden] { display: none; }
.cb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}
.cb-item.active { background: var(--primary-50); color: var(--primary-600); }
.cb-item.selected::after { content: "✓"; color: var(--primary-600); font-weight: 700; }
.cb-item mark { background: transparent; color: inherit; font-weight: 800; text-decoration: underline; text-decoration-color: var(--primary-100); text-underline-offset: 3px; }
.cb-item .cb-hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.cb-create {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  color: var(--primary-600);
  font-weight: 600;
  display: block;
}
.cb-create .cb-q { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.cb-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.cb-head {
  padding: 6px 10px 4px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ---- Modal ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  background: rgba(15, 23, 42, 0.5);
  overflow-y: auto;
  animation: fade-in 0.15s ease-out;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(1100px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.18s ease-out;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head .grow { flex: 1; }
.modal-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.modal-body { padding: 20px 24px; }
.modal-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #fff;
  border-radius: 0 0 18px 18px;
}
.modal-foot .grow { flex: 1; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px 20px;
  margin-bottom: 18px;
}
.info-grid .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.info-grid .v { font-weight: 600; margin-top: 2px; }

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.stat-card .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.stat-card .value { font-size: 20px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat-card.blue { background: var(--primary-50); border-color: var(--primary-100); }
.stat-card.blue .value { color: var(--primary-600); }

.review-table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.review-table td { font-size: 13px; }
.review-table tr:last-child td { border-bottom: 0; }
.review-table td.name { font-weight: 600; }
.review-table tr.line-error td { background: var(--danger-50); }
.line-err-msg { color: var(--danger); font-size: 12px; font-weight: 500; margin-top: 2px; }

.progress { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.3s; }
.submit-status { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 500; margin-bottom: 8px; }

.result-box { border-radius: 14px; padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.result-box.ok { background: var(--success-50); border: 1px solid #bbf7d0; }
.result-box.fail { background: var(--danger-50); border: 1px solid #fecaca; }
.result-box .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}
.result-box.ok .icon { background: var(--success); }
.result-box.fail .icon { background: var(--danger); }
.result-box .title { font-weight: 700; font-size: 16px; }
.result-box .desc { color: var(--text-2); margin-top: 3px; white-space: pre-wrap; }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.spinner.dark { border-color: #cbd5e1; border-top-color: var(--primary); }

/* ---- Toasts ---- */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 92px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  animation: toast-in 0.2s ease-out;
}
.toast.success { background: #166534; }
.toast.error { background: #b91c1c; }
.toast .toast-action {
  height: auto;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
}
.toast .toast-action:hover { background: rgba(255, 255, 255, 0.28); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.99); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes flash { 0% { background: #fde68a; } 100% { background: transparent; } }

/* ---------- O'rta ekranlar ---------- */
@media (max-width: 1180px) {
  main { padding: 16px; }
  .header-fields { grid-template-columns: 1fr 1fr 1fr; }
  .header-fields .f-supplier { grid-column: span 2; }
  .kbd-hints { display: none; }
  .cell-input { padding: 0 6px; font-size: 13px; }
  table.grid thead th { padding: 8px 6px; font-size: 10px; }
}

/* ---------- Telefon: har bir qator -- alohida kartochka ---------- */
@media (max-width: 760px) {
  header.topbar { padding: 0 10px; overflow-x: auto; }
  header.topbar .who { display: none; }
  main { padding: 12px; }
  main.entry { padding-bottom: 150px; }
  .panel { padding: 14px; }
  .header-fields { grid-template-columns: 1fr 1fr; }
  .header-fields .f-supplier, .header-fields .f-note { grid-column: 1 / -1; }

  .grid-panel { background: transparent; border: 0; box-shadow: none; }
  .grid-toolbar { padding: 4px 2px 12px; }
  table.grid, table.grid tbody { display: block; }
  table.grid colgroup, table.grid thead { display: none; }
  table.grid tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }
  table.grid tbody tr:focus-within { border-color: var(--primary); }
  table.grid td { display: block; height: auto; border: 0 !important; background: transparent !important; }
  table.grid td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .cell-input { height: 42px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; font-size: 16px; }
  .cell-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); border-radius: 9px; }
  table.grid td.col-no { order: -3; text-align: left; font-size: 13px; font-weight: 700; color: var(--text); align-self: center; }
  table.grid td.col-no::before { content: "Qator "; display: inline; font-size: 13px; text-transform: none; }
  table.grid td.col-actions { order: -2; text-align: right; }
  table.grid td.col-status { order: -1; grid-column: 1 / -1; text-align: left; }
  table.grid td.col-summa { grid-column: 1 / -1; text-align: right; padding: 4px 0 0; font-size: 15px; }
  table.grid td.col-summa::before { display: inline !important; margin-right: 8px; }
  .icon-btn { opacity: 1 !important; }
  .add-row { border: 1px dashed var(--border-strong); border-radius: 12px; }

  .summary-inner { flex-wrap: wrap; gap: 10px 18px; padding: 10px 12px; }
  .summary-inner .grow { display: none; }
  .stat .value { font-size: 15px; }
  .summary-inner button { width: 100%; }
  .toasts { left: 12px; right: 12px; bottom: 150px; align-items: stretch; }
  .modal { padding: 0; }
  .modal-card { border-radius: 0; min-height: 100%; }
}
