:root {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --ink: #17202b;
  --muted: #788594;
  --line: #e4e9ef;
  --brand: #d6202a;
  --brand-dark: #ae151e;
  --brand-soft: #fdecec;
  --ink-btn: #212f3d;
  --ink-btn-dark: #14202b;
  --accent: #f0932b;
  --ok: #1f9d55;
  --warn: #e0a800;
  --danger: #d6202a;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 45, .06), 0 1px 3px rgba(20, 30, 45, .05);
  --shadow-md: 0 4px 16px rgba(20, 30, 45, .10);
  --shadow-lg: 0 18px 44px rgba(16, 26, 38, .22);
  --tap: 40px;
  --sidebar: 232px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.55 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overscroll-behavior-y: none;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--danger); margin-top: 8px; min-height: 18px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ic { flex: none; vertical-align: -3px; }

/* ============ Animatsiyalar ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes drawLine { from { stroke-dashoffset: var(--len, 800); } to { stroke-dashoffset: 0; } }
@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes shimmer { 100% { background-position: 200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.view > * { animation: fadeUp .32s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: .04s; }
.view > *:nth-child(3) { animation-delay: .08s; }
.view > *:nth-child(4) { animation-delay: .12s; }

/* ============ Login ============ */
.login-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(circle at 20% 15%, #e8323b, #a01018 45%, #4c0a0e 100%);
}
.login-card {
  background: #fff; padding: 32px 26px; border-radius: 18px; width: 100%; max-width: 370px;
  box-shadow: var(--shadow-lg); text-align: center;
  animation: popIn .45s var(--ease) both;
}
.login-logo {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 8px 22px rgba(214, 32, 42, .3);
}
.login-card h1 { margin: 12px 0 2px; font-size: 22px; }
.login-card p { margin: 0 0 18px; font-size: 13px; }
.login-card input { width: 100%; margin-bottom: 10px; height: var(--tap); }
.parol-qator { position: relative; }
.parol-qator input { padding-right: 46px; }
.parol-qator input::-ms-reveal { display: none; }
.login-card .parol-koz {
  position: absolute; top: 0; right: 0; bottom: 10px; width: 46px; margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 12px; box-shadow: none; color: var(--muted); transform: none;
  -webkit-tap-highlight-color: transparent;
}
.login-card .parol-koz:hover { background: none; box-shadow: none; color: var(--ink); transform: none; }
.login-card .parol-koz:active { background: none; box-shadow: none !important; transform: none; }
.login-card .parol-koz:focus-visible { outline: 2px solid var(--brand); outline-offset: -6px; }
.login-card button[type=submit] {
  width: 100%; height: var(--tap); background: var(--brand); border-color: var(--brand);
  font-weight: 600; letter-spacing: .2px;
}
.login-card button[type=submit]:hover { background: var(--brand-dark); }
.login-lang { margin-top: 14px; }
.login-lang select { width: 100%; }

/* ============ Karkas ============ */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.app-body { display: flex; flex: 1; min-height: 0; }

.topbar {
  background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 9px 16px; display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow-sm);
}
.nav-toggle, .icon-btn {
  background: none; border: none; color: var(--ink); cursor: pointer;
  width: 38px; height: 38px; min-height: 0; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.nav-toggle:hover, .icon-btn:hover { background: #eef1f5; transform: translateY(-1px); }
.nav-toggle:active, .icon-btn:active { transform: scale(.94); }

/* Faqat tepadagi logotip havolasi — .stat.brand kabi boshqa joyga tegmasin */
a.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 2px 8px rgba(214, 32, 42, .25);
  transition: transform .35s var(--ease);
}
a.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.06); }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: .2px; }
.topbar-sep { width: 1px; height: 24px; background: var(--line); margin: 0 2px; }
.topbar h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); flex: 1; min-width: 0; }
#page-actions { flex: none; }
.lang-select { padding: 5px 8px; font-size: 13px; min-height: 34px; }
.who { font-size: 12px; line-height: 1.25; text-align: right; }
.who b { display: block; font-size: 13px; }

.sidebar {
  width: var(--sidebar); flex: none; background: #17222e; color: #ccd6df;
  position: sticky; top: 55px; height: calc(100vh - 55px); overflow: hidden;
  transition: width .26s var(--ease), transform .26s var(--ease);
}
body.nav-collapsed .sidebar { width: 0; }
#nav { height: 100%; overflow-y: auto; padding: 10px 0; -webkit-overflow-scrolling: touch; }
#nav a {
  display: flex; align-items: center; gap: 11px; position: relative;
  padding: 11px 16px; color: #ccd6df; text-decoration: none; font-size: 14px;
  border-left: 3px solid transparent;
  transition: background .18s var(--ease), color .18s var(--ease), padding-left .18s var(--ease);
  animation: slideIn .3s var(--ease) both;
}
#nav a:nth-child(1) { animation-delay: .02s; }
#nav a:nth-child(2) { animation-delay: .05s; }
#nav a:nth-child(3) { animation-delay: .08s; }
#nav a:nth-child(4) { animation-delay: .11s; }
#nav a:nth-child(5) { animation-delay: .14s; }
#nav a:nth-child(6) { animation-delay: .17s; }
#nav a:nth-child(7) { animation-delay: .2s; }
#nav a:nth-child(8) { animation-delay: .23s; }
#nav a:hover { background: #1f2f3d; color: #fff; padding-left: 20px; }
#nav a.active {
  background: linear-gradient(90deg, rgba(214, 32, 42, .95), rgba(214, 32, 42, .72));
  color: #fff; font-weight: 600; border-left-color: #fff;
}
#nav a .ic { opacity: .9; }
#nav .badge {
  margin-left: auto; background: var(--accent); color: #fff;
  border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 600;
}

.nav-overlay { display: none; }
.main { flex: 1; min-width: 0; }
.view { padding: 18px 20px 60px; }

/* ============ Elementlar ============ */
input, select, textarea {
  font: inherit; padding: 8px 11px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink); max-width: 100%;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(214, 32, 42, .14);
}
label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
button {
  font: inherit; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--ink-btn);
  background: var(--ink-btn); color: #fff; cursor: pointer; min-height: 36px;
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
button:hover { background: var(--ink-btn-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
button:active { transform: translateY(0) scale(.97); box-shadow: none; }
button.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
button.ghost:hover { background: #f4f6f9; }
button.brand { background: var(--brand); border-color: var(--brand); }
button.brand:hover { background: var(--brand-dark); }
button.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: var(--brand-soft); }
button.small { padding: 5px 10px; font-size: 12px; min-height: 30px; gap: 5px; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 16px;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 11px; }
.form-grid .full { grid-column: 1 / -1; }

/* 3D ko'rsatkich kartochkalari */
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px; position: relative; overflow: hidden;
  transform-style: preserve-3d; perspective: 700px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  animation: fadeUp .4s var(--ease) both;
}
.stat:hover { transform: translateY(-4px) rotateX(4deg) rotateY(-3deg); box-shadow: var(--shadow-md); }
.stat:after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.stat:hover:after { transform: translateX(120%); }
.stat .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 23px; font-weight: 700; margin-top: 5px; letter-spacing: -.3px; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat.brand { border-left: 3px solid var(--brand); }
.stat.ok { border-left: 3px solid var(--ok); }
.stat.warn { border-left: 3px solid var(--warn); }
.stat.danger { border-left: 3px solid var(--danger); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; position: sticky; top: 0; z-index: 1; }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: #f7fafc; }
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow-sm);
}
.clickable { cursor: pointer; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px;
  font-size: 11px; background: #eef2f5; color: #4a5867; white-space: nowrap; font-weight: 500;
}
.tag.ok { background: #e3f6ea; color: #1a7a43; }
.tag.warn { background: #fdf3d8; color: #8a6400; }
.tag.danger { background: var(--brand-soft); color: #a9161d; }
.tag.brand { background: #eaeef3; color: #2c3a48; }
.tag.gray { background: #edf0f3; color: #5b6875; }

/* ============ Kanban ============ */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 12px; -webkit-overflow-scrolling: touch; }
.kanban .col {
  min-width: 262px; flex: 0 0 262px; background: #eaeef2; border-radius: var(--radius);
  padding: 9px; transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.kanban .col.over { background: #fbe3e4; box-shadow: inset 0 0 0 2px var(--brand); }
.kanban .col h4 {
  margin: 3px 6px 9px; font-size: 12px; text-transform: uppercase;
  color: var(--muted); display: flex; justify-content: space-between; letter-spacing: .4px;
}
.kanban .item {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; margin-bottom: 8px; cursor: grab; font-size: 13px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  animation: fadeUp .3s var(--ease) both;
}
.kanban .item:hover { transform: translateY(-2px) scale(1.01); box-shadow: var(--shadow-md); border-color: #d8dee5; }
.kanban .item.dragging { opacity: .45; transform: rotate(2deg) scale(.98); cursor: grabbing; }
.kanban .item .t { font-weight: 600; }
.kanban .item .s { font-size: 12px; color: var(--muted); }
.kanban .item.due { border-left: 3px solid var(--brand); }

.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters > div { display: flex; flex-direction: column; }

/* ============ Modal ============ */
.modal-back {
  position: fixed; inset: 0; background: rgba(14, 22, 32, .55); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 30px 16px; z-index: 60; overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: fadeUp .18s var(--ease) both;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 780px;
  box-shadow: var(--shadow-lg); animation: popIn .28s var(--ease) both;
}
.modal.wide { max-width: 1020px; }
.modal-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 16px 18px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.x {
  background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer;
  padding: 0 6px; min-height: 0; transition: color .18s var(--ease), transform .18s var(--ease);
}
.x:hover { background: none; color: var(--ink); transform: rotate(90deg); }

#toast-root { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast {
  background: #182833; color: #fff; padding: 11px 15px; border-radius: 10px;
  box-shadow: var(--shadow-lg); font-size: 13px; animation: slideIn .28s var(--ease) both;
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 20px;
  padding: 7px 14px; cursor: pointer; font-size: 13px; min-height: 34px;
  transition: all .18s var(--ease);
}
.chip:hover { background: #f2f5f8; transform: translateY(-1px); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 12px rgba(214, 32, 42, .3); }

.bar { height: 8px; background: #e9edf1; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); transition: width .6s var(--ease); }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 7px 0 7px 15px; border-left: 2px solid var(--line); position: relative; }
.timeline li:before {
  content: ''; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand);
}
.timeline .when { color: var(--muted); font-size: 12px; }

/* ============ Infografika ============ */
.ch-donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ch-donut { flex: none; }
.ch-arc { stroke-dasharray: var(--d); animation: drawLine 1s var(--ease) both; }
.ch-center { font-size: 18px; font-weight: 700; fill: var(--ink); }
.ch-center-sub { font-size: 10px; fill: var(--muted); }
.ch-legend { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ch-leg-row { display: flex; align-items: center; gap: 8px; }
.ch-leg-row i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.ch-bars { display: flex; gap: 10px; align-items: flex-end; height: var(--h); padding-top: 18px; }
.ch-bar { flex: 1; min-width: 22px; display: flex; flex-direction: column; height: 100%; }
.ch-bar-track { flex: 1; display: flex; align-items: flex-end; }
.ch-bar-track > i {
  display: block; width: 100%; border-radius: 6px 6px 0 0;
  transform-origin: bottom; animation: growBar .55s var(--ease) both;
  animation-delay: calc(var(--i) * .04s);
}
.ch-bar-val { font-size: 11px; color: var(--muted); text-align: center; margin-bottom: 4px; }
.ch-bar-lbl { font-size: 11px; color: var(--muted); text-align: center; margin-top: 5px; }

.ch-area { width: 100%; }
.ch-axis { stroke: var(--line); stroke-width: 1; }
.ch-tick { font-size: 10px; fill: var(--muted); }
.ch-line { stroke-dasharray: 2000; animation: drawLine 1.1s var(--ease) both; --len: 2000; }

.ch-funnel { display: flex; flex-direction: column; gap: 9px; }
.ch-fn-row { display: grid; grid-template-columns: 160px 1fr 46px; gap: 10px; align-items: center;
  animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i) * .06s); }
.ch-fn-lbl { font-size: 13px; }
.ch-fn-bar { background: #eef1f4; border-radius: 8px; overflow: hidden; height: 30px; }
.ch-fn-bar > i {
  display: flex; align-items: center; justify-content: flex-end; height: 100%;
  border-radius: 8px; color: #fff; font-size: 12px; font-weight: 600; padding-right: 9px;
  animation: growWidth .7s var(--ease) both;
}
@keyframes growWidth { from { width: 0 !important; } }
.ch-fn-conv { font-size: 12px; color: var(--muted); text-align: right; }

.ch-ring { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.ch-ring-fg { animation: drawLine .9s var(--ease) both; --len: var(--c); }
.ch-spark { display: block; }

.skeleton {
  background: linear-gradient(90deg, #eef1f5 25%, #f7f9fb 50%, #eef1f5 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; height: 14px;
}
.spinner {
  width: 22px; height: 22px; border: 3px solid #e6ebf0; border-top-color: var(--brand);
  border-radius: 50%; animation: spin .8s linear infinite; display: inline-block;
}

/* ============ Planshet ============ */
@media (max-width: 1024px) {
  :root { --sidebar: 200px; }
  .view { padding: 14px 14px 60px; }
  .grid.cols-2 { grid-template-columns: 1fr; }
}

/* ============ Telefon ============ */
@media (max-width: 860px) {
  .topbar { padding: 8px 10px; gap: 7px; }
  .topbar h2, .topbar-sep { display: none; }
  .who { display: none; }
  .brand-name { font-size: 15px; }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 260px; height: 100%;
    transform: translateX(-100%); z-index: 70; box-shadow: 4px 0 30px rgba(0, 0, 0, .3);
    padding-top: 8px;
  }
  body.nav-open .sidebar { transform: translateX(0); width: 260px; }
  .nav-overlay {
    display: block; position: fixed; inset: 0; background: rgba(10, 18, 25, .5);
    opacity: 0; pointer-events: none; transition: opacity .24s var(--ease); z-index: 65;
  }
  body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .view { padding: 12px 11px 70px; }
  .card { padding: 13px; margin-bottom: 12px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filters > div { flex: 1 1 100%; }
  .filters input, .filters select, .filters button { width: 100%; }

  input, select, textarea { font-size: 16px; min-height: var(--tap); }
  button { min-height: var(--tap); }
  button.small { min-height: 32px; }
  .chip { min-height: var(--tap); }

  table { font-size: 12.5px; }
  th, td { padding: 8px; }

  .modal-back { padding: 0; align-items: stretch; }
  .modal, .modal.wide { max-width: 100%; border-radius: 0; min-height: 100%; display: flex; flex-direction: column; }
  .modal-head { position: sticky; top: 0; background: #fff; z-index: 2; }
  .modal-body { flex: 1; padding: 14px; }
  .modal-foot { position: sticky; bottom: 0; background: #fff; }
  .modal-foot button { flex: 1; }

  .kanban .col { min-width: 80vw; flex: 0 0 80vw; }
  .ch-fn-row { grid-template-columns: 110px 1fr 40px; }
  #toast-root { left: 11px; right: 11px; bottom: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ Chop etish ============ */
.print-only { display: none; }
@media print {
  .sidebar, .topbar, #page-actions, .modal-foot, .no-print { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; }
}

/* Ikki holatli almashtirgich: taxta / ro'yxat */
.seg {
  display: inline-flex; border: 1px solid var(--line); border-radius: 9px;
  overflow: hidden; background: #fff; box-shadow: var(--shadow-sm);
}
.seg button {
  border: none; border-radius: 0; background: #fff; color: var(--muted);
  min-height: 36px; padding: 7px 13px; font-size: 13px; box-shadow: none; font-weight: 500;
}
.seg button:hover { background: #f1f4f7; color: var(--ink); transform: none; box-shadow: none; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: #fff; }
.seg button.on:hover { background: var(--brand-dark); }

@media (max-width: 860px) {
  .seg-txt { display: none; }              /* telefonda faqat ikon */
  .seg button { padding: 7px 12px; }

  /* Telefonda tepa panel ikki qatorga bo'linadi: logotip tepada,
     amal tugmalari (Yangi lid, Import, Eksport, Skript) ostidagi qatorda.
     Aks holda tugmalar ekrandan chiqib ketib bosib bo'lmay qoladi. */
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  #page-actions {
    order: 3; flex: 1 1 100%; min-width: 0;
    flex-wrap: wrap; justify-content: flex-start; gap: 6px;
  }
  #page-actions button { padding: 7px 11px; font-size: 13px; }
}

/* Taxta gorizontal surilganda silliq ko'rinsin */
.kanban { scroll-behavior: auto; scrollbar-width: thin; }

/* ======================================================================
   PREMIUM QATLAM — bosqich ranglari, bo'lim sarlavhalari, ko'rsatkichlar
   Rang har bosqichga biriktirilgan: ustunni sarlavhasidan tanib olish oson.
   ====================================================================== */
:root {
  /* Bosqich ranglari — kontrast oq fonda 4.5:1 dan yuqori */
  --st-yangi: #2563eb;
  --st-prioritet: #d6202a;
  --st-boglanmadi: #b45309;
  --st-qayta_aloqa: #7c3aed;
  --st-rasm_kutilmoqda: #0e7490;
  --st-malumot_berildi: #0e7490;
  --st-sifatli: #15803d;
  --st-bajarildi: #166534;
  --st-buyurtma_berdi: #047857;
  --st-eski_mijoz: #0f766e;
  --st-manzil_uzoq: #52627a;
  --st-xodim_raqami: #475569;
  --st-sifatsiz: #be123c;
  --st-notogri_raqam: #9f1239;

  --panel-soft: #f8fafc;
  --shadow-card: 0 1px 2px rgba(20, 30, 45, .05), 0 6px 18px rgba(20, 30, 45, .06);
}

/* ============ Bo'lim sarlavhasi ============ */
/* Har kartaning tepasi ajratilgan: rangli ikon + ingichka chiziq */
.card > h3:first-child {
  margin: -2px -4px 14px; padding: 0 4px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 15px; font-weight: 700; letter-spacing: -.1px;
}
.card > h3:first-child > .ic {
  width: 28px; height: 28px; padding: 6px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand); flex: none;
}
.card { box-shadow: var(--shadow-card); }
.card:hover { box-shadow: 0 2px 4px rgba(20, 30, 45, .06), 0 14px 30px rgba(20, 30, 45, .10); }

/* ============ Ko'rsatkich kartochkalari ============ */
.stat {
  --tone: var(--muted);
  border-left: none; padding: 16px 15px 14px;
  box-shadow: var(--shadow-card);
}
.stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 25%, transparent));
}
.stat.brand { --tone: var(--brand); }
.stat.ok { --tone: var(--ok); }
.stat.warn { --tone: #c98a00; }
.stat.danger { --tone: var(--danger); }
.stat .label { font-size: 12px; font-weight: 600; letter-spacing: .2px; text-transform: uppercase; }
.stat .label .ic { color: var(--tone); }
.stat .value { font-size: 26px; font-variant-numeric: tabular-nums; margin-top: 6px; }
/* 3D burilish o'rniga yumshoq ko'tarilish — ma'lumot o'qishga xalaqit bermaydi */
.stat:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,30,45,.06), 0 16px 32px rgba(20,30,45,.12); }

/* ============ Kanban ustunlari ============ */
.kanban { gap: 14px; padding-top: 4px; }
.kanban .col {
  --st: var(--muted);
  background: #eef1f6; border: 1px solid var(--line);
  padding: 0 9px 10px; overflow: visible;
}
.kanban .col[data-col="yangi"] { --st: var(--st-yangi); }
.kanban .col[data-col="prioritet"] { --st: var(--st-prioritet); }
.kanban .col[data-col="boglanmadi"] { --st: var(--st-boglanmadi); }
.kanban .col[data-col="qayta_aloqa"] { --st: var(--st-qayta_aloqa); }
.kanban .col[data-col="rasm_kutilmoqda"] { --st: var(--st-rasm_kutilmoqda); }
.kanban .col[data-col="malumot_berildi"] { --st: var(--st-malumot_berildi); }
.kanban .col[data-col="sifatli"] { --st: var(--st-sifatli); }
.kanban .col[data-col="bajarildi"] { --st: var(--st-bajarildi); }
.kanban .col[data-col="buyurtma_berdi"] { --st: var(--st-buyurtma_berdi); }
.kanban .col[data-col="eski_mijoz"] { --st: var(--st-eski_mijoz); }
.kanban .col[data-col="eslatildi"] { --st: var(--st-eski_mijoz); }
.kanban .col[data-col="manzil_uzoq"] { --st: var(--st-manzil_uzoq); }
.kanban .col[data-col="xodim_raqami"] { --st: var(--st-xodim_raqami); }
.kanban .col[data-col="sifatsiz"] { --st: var(--st-sifatsiz); }
.kanban .col[data-col="notogri_raqam"] { --st: var(--st-notogri_raqam); }

/* Sarlavha ustun tepasida yopishib turadi — pastga tushganda ham qaysi bosqich ekani ko'rinadi */
.kanban .col h4 {
  position: sticky; top: 0; z-index: 3;
  margin: 0 -9px 10px; padding: 11px 13px 10px;
  background: linear-gradient(180deg, #ffffff 0%, var(--panel-soft) 100%);
  border-top: 3px solid var(--st);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--st); font-size: 12px; font-weight: 700; letter-spacing: .5px;
  align-items: center;
}
.kanban .col h4 > span:last-child {
  background: color-mix(in srgb, var(--st) 13%, #fff);
  color: var(--st); border: 1px solid color-mix(in srgb, var(--st) 22%, #fff);
  padding: 1px 9px; border-radius: 999px; font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.kanban .col.over {
  background: color-mix(in srgb, var(--st) 10%, #fff);
  box-shadow: inset 0 0 0 2px var(--st);
}

/* Kartochka — chap chetida o'z bosqichining rangi */
.kanban .item {
  border-left: 3px solid color-mix(in srgb, var(--st) 40%, #fff);
  border-radius: 11px; padding: 10px 12px;
}
.kanban .item:hover { border-color: color-mix(in srgb, var(--st) 55%, #fff); }
.kanban .item.due { border-left-color: var(--brand); box-shadow: 0 0 0 1px var(--brand-soft), var(--shadow-sm); }
.kanban .item .t { font-size: 13.5px; letter-spacing: -.1px; }
.kanban .item .s { margin-top: 2px; }
.kanban .item .s:first-of-type { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ============ Jadval ============ */
thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--panel-soft); color: var(--muted);
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
  border-bottom: 1px solid var(--line);
}
tbody tr { transition: background .15s var(--ease); }
tbody tr:nth-child(even) { background: #fbfcfe; }
tbody tr.clickable:hover { background: var(--brand-soft); }
td { font-variant-numeric: tabular-nums; }

/* ============ Teglar ============ */
.tag { padding: 3px 10px; font-weight: 600; letter-spacing: .1px; }

/* ============ Yon menyu ============ */
.sidebar a.on { box-shadow: inset 3px 0 0 #fff; }

@media (max-width: 860px) {
  .kanban .col h4 { padding: 10px 12px 9px; }
  .stat .value { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .stat:hover, .kanban .item:hover { transform: none; }
}

/* Chap chiziq tepa chizig'i bilan takrorlanmasin */
.stat.brand, .stat.ok, .stat.warn, .stat.danger { border-left: none; }

/* Bo'sh holat — jadval ham, ustun ham bir xil ko'rinadi */
tbody td[colspan] {
  text-align: center; padding: 28px 12px; color: var(--muted);
  background: repeating-linear-gradient(45deg, #fbfcfe 0 8px, #f7f9fc 8px 16px);
}
.kanban .col > .muted { text-align: center; padding: 18px 8px; font-size: 12px; }

/* ============ Yig'iladigan bo'lim (details/summary) ============ */
/* Sarlavhaga bosilganda ichi ochiladi — karta joyni behuda egallamaydi */
details.card { padding: 0; }
details.card > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; font-size: 15px; font-weight: 700; letter-spacing: -.1px;
  border-radius: var(--radius);
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary:hover { background: var(--brand-soft); }
details.card > summary .ic {
  width: 28px; height: 28px; padding: 6px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand); flex: none;
}
details.card > summary .hint { font-weight: 400; font-size: 12.5px; color: var(--muted); }
details.card > summary::after {
  content: ''; margin-left: auto; width: 7px; height: 7px; margin-right: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s var(--ease);
}
details.card[open] > summary::after { transform: rotate(-135deg); }
details.card[open] > summary {
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}
details.card > .in { padding: 14px 16px 16px; }
details.card > .in > .grid:last-child,
details.card > .in > .card:last-child { margin-bottom: 0; }

/* Kartochka ichidagi kartochka — chegara va soyasiz, faqat ajratuvchi bo'lsin */
.card .flat { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; }
.card .flat:hover { box-shadow: none; }

/* ============ Taxta kartasidagi yorliqlar ============ */
/* Manba va kompaniya bitta qatorga sig'ishi kerak — ustun tor (262px),
   shuning uchun yorliqlar kichikroq va uzuni uch nuqta bilan qisqaradi. */
.kanban .item .tags {
  display: flex; gap: 4px; flex-wrap: nowrap; margin-bottom: 5px; min-width: 0;
}
.kanban .item .tags .tag {
  display: block; min-width: 0; font-size: 10px; padding: 1px 7px; letter-spacing: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============ Har ustun o'z ichida suriladi ============ */
/* Sozlamalardagi «Xodimlar telefon raqami» ro'yxati kabi: kartalar ko'p
   bo'lsa ham sahifa cho'zilmaydi. Sarlavha suriladigan qismdan tashqarida
   turgani uchun bosqich nomi va soni doim ko'rinib turadi. */
.kanban { align-items: flex-start; }
.kanban .col {
  display: flex; flex-direction: column;
  max-height: 62vh; padding-bottom: 0;
}
.kanban .col h4 { position: static; flex: none; }
.kanban .col-body {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 3px 10px; margin: 0 -3px;
}

/* Ro'yxat ko'rinishidagi jadval ham o'z ichida suriladi */
#stage > .table-wrap { max-height: 62vh; overflow: auto; }

@media (max-width: 860px) {
  .kanban .col, #stage > .table-wrap { max-height: 68vh; }
}

/* ============ Mijozlar xaritasi (tumanlar bo'yicha) ============ */
/* Leaflet + OpenStreetMap. Kutubxona o'z serverimizda (public/vendor/leaflet),
   faqat xarita rasmlari tashqaridan keladi. */
.xarita {
  height: 460px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel-soft); z-index: 0;
}
.xarita .leaflet-container { font: inherit; }
/* Doira ustidagi son */
.xr-belgi {
  color: #fff; font-weight: 700; font-size: 12px; text-align: center;
  line-height: 18px; text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.leaflet-tooltip { font-size: 12.5px; border-radius: 8px; }

/* Ulush chizig'i — jadvaldagi kichik ustun */
.ulush { background: var(--panel-soft); border-radius: 999px; height: 8px; overflow: hidden; }
.ulush > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

/* ==================== Chat ==================== */
/* Chat tepasidagi filtr: kompaniya va sana (egasi 2026-11-04) */
.chat-filtr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 12px; }
.chat-filtr [hidden] { display: none; }
.chat-filtr-guruh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chat-filtr-nom { font-size: 12px; font-weight: 700; color: var(--muted); }
.chat-filtr .seg button { min-height: 32px; padding: 5px 12px; white-space: nowrap; }
.chat-oraliq { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.chat-oraliq input { width: auto; min-height: 32px; padding: 4px 8px; }
#chat-soni { margin-left: auto; white-space: nowrap; }
.chat-wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}
.chat-side {
  background: var(--card, #fff);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 160px - var(--filtr-h, 0px));
}
.chat-royxat { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
/* flex: none — suhbat ko'paysa qatorlar siqilmaydi, ro'yxat aylantiriladi */
.chat-item {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.chat-item:hover { background: rgba(0, 0, 0, .04); }
.chat-item.active { background: rgba(47, 111, 235, .1); }
.chat-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-item-top { display: flex; justify-content: space-between; gap: 8px; }
.chat-item-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.chat-item-hisob { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; opacity: .65; }
#chat-hisob { margin-bottom: 8px; }
#chat-hisob[hidden] { display: none; }
#chat-yopilganlar { margin-bottom: 8px; }
#chat-yopilganlar[hidden] { display: none; }
.ig-hisob { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.ig-hisob-matn { flex: 1 1 260px; min-width: 0; }
.ig-hisob-tugma { display: flex; gap: 8px; }
#ig-form input[type=password], #ig-yangi input, #ig-tahrir input { width: 100%; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; }
.chat-avatar-harf {
  display: grid;
  place-items: center;
  background: #e6ebf5;
  color: #44506a;
  font-weight: 600;
}
.chat-oyna { display: flex; flex-direction: column; height: calc(100vh - 160px - var(--filtr-h, 0px)); padding: 0; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.chat-head-actions { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.chat-lenta { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
.chat-msg-in { align-self: flex-start; background: #eef1f6; border-bottom-left-radius: 4px; }
/* Xabarni o'chirish (Korzinaga): pufak yonida, sichqon ustiga kelganda ko'rinadi */
.chat-msg { position: relative; }
.chat-msg .chat-msg-och {
  position: absolute; top: 2px; width: 28px; height: 28px; min-height: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: #8a94a6; opacity: 0; transition: opacity .15s;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.chat-msg-out .chat-msg-och { left: -32px; }
.chat-msg-in .chat-msg-och { right: -32px; }
.chat-msg:hover .chat-msg-och, .chat-msg .chat-msg-och:focus-visible { opacity: 1; }
.chat-msg .chat-msg-och:hover { color: #c92a2a; background: rgba(201, 42, 42, .08); box-shadow: none; }
@media (hover: none) { .chat-msg .chat-msg-och { opacity: .55; } }
.korzina-izoh { margin: 0 0 8px; }
.korzina-royxat { display: flex; flex-direction: column; max-height: 70vh; overflow-y: auto; }
.korzina-qator { padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, .08); display: flex; flex-direction: column; gap: 6px; }
.korzina-qator:last-child { border-bottom: 0; }
.korzina-bosh { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.korzina-xabar { max-width: 100%; width: fit-content; }
.korzina-past { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.korzina-tugmalar { display: flex; gap: 6px; }
.korzina-tugmalar a { text-decoration: none; display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2, #3b4a63); }
.korzina-tugmalar a:hover { background: rgba(0, 0, 0, .05); }
.chat-msg-out .kun { color: inherit; opacity: .9; }
.chat-msg-out { align-self: flex-end; background: #2f6feb; color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-out a { color: #fff; text-decoration: underline; }
.chat-msg-meta { display: block; font-size: 11px; margin-top: 4px; opacity: .75; }
.chat-msg-out .chat-msg-meta { color: #e7eeff; }
.chat-msg .xato { color: #ffd4d4; }
.chat-msg-in .xato { color: #c92a2a; }
.chat-yozish {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, .08);
}
.chat-yozish input, .chat-yozish textarea { flex: 1; }
/* Javob maydoni: Shift+Enter bilan bir necha qator, tugmalar pastki qatorga tekislanadi */
.chat-yozish { align-items: flex-end; }
#chat-matn { resize: none; min-height: 40px; max-height: 150px; line-height: 1.4; overflow-y: auto; }
.chat-msg-matn { white-space: pre-wrap; }
.chat-biriktir { flex: none; min-width: 44px; padding: 0 10px; }
.chat-yozish { position: relative; }
@media (max-width: 640px) {
  .chat-yozish { flex-wrap: wrap; }
  .chat-yozish input, .chat-yozish textarea { flex: 1 1 200px; min-width: 0; }
}
.chat-shablonlar {
  position: absolute; left: 16px; right: 16px; bottom: calc(100% + 6px); z-index: 5;
  max-width: 440px; max-height: 340px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.chat-shablonlar[hidden] { display: none; }
.chat-shablonlar p { margin: 6px; }
.chat-sh { display: flex; gap: 6px; align-items: stretch; }
.chat-sh-yubor { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-start; gap: 10px; text-align: left; min-height: 48px; }
.chat-sh-yubor > svg { flex: none; }
.chat-sh-yubor span { min-width: 0; display: flex; flex-direction: column; }
.chat-sh-yubor small { color: var(--ink-3); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sh-och { flex: none; min-width: 44px; padding: 0 10px; }
.chat-yozuv { display: none; flex: 1; align-items: center; gap: 10px; }
.chat-yozuv #yozuv-vaqt { flex: 1; font-variant-numeric: tabular-nums; font-weight: 800; }
.chat-yozuv #yozuv-tingla { display: none; flex: 1; width: auto; margin: 0; }
.chat-yozuv button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chat-yozish.pauzada .chat-yozuv-nuqta { animation: none; background: var(--ink-3); }
.chat-yozish.tayyor #yozuv-tingla { display: block; }
.chat-yozish.tayyor .chat-yozuv-nuqta, .chat-yozish.tayyor #yozuv-vaqt,
.chat-yozish.tayyor #yozuv-pauza, .chat-yozish.tayyor #yozuv-stop { display: none; }
.chat-msg-meta svg { vertical-align: -2px; }
.chat-oqildi { display: block; margin-top: 2px; font-weight: 800; }
.kamera-oyna { position: relative; display: flex; justify-content: center; background: #000; border-radius: 14px; overflow: hidden; }
.kamera-oyna video { display: block; width: 100%; max-height: 56vh; aspect-ratio: 16 / 9; object-fit: contain; }
.kamera:not([data-holat="tayyor"]) .kamera-oyna video { transform: scaleX(-1); }
.kamera.dumaloq .kamera-oyna video { width: min(56vh, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.kamera-vaqt { display: none; position: absolute; top: 10px; left: 10px; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-variant-numeric: tabular-nums; }
.kamera[data-holat="yozish"] .kamera-vaqt, .kamera[data-holat="pauza"] .kamera-vaqt { display: inline-flex; }
.kamera-vaqt i { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; animation: yozuv-nuqta 1.2s ease-in-out infinite; }
.kamera[data-holat="pauza"] .kamera-vaqt i { animation: none; background: #aaa; }
.kamera-izoh { margin: 10px 0 0; font-size: 13px; }
.chat-msg-kutish { min-width: 220px; }
.chat-kutish-nom { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.chat-msg-kutish .spinner { flex: none; width: 14px; height: 14px; margin: 0; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.chat-kutish-chiziq { height: 4px; margin-top: 8px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .25); }
.chat-kutish-chiziq i { display: block; width: 0; height: 100%; border-radius: 2px; background: #fff; transition: width .2s linear; }
.chat-msg-yetkazish .chat-kutish-chiziq i { animation: chat-yetkazish 1.2s ease-in-out infinite; }
@keyframes chat-yetkazish { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .chat-msg-yetkazish .chat-kutish-chiziq i { animation: none; } }
.chat-oqildi svg + svg { margin-left: -7px; }
.chat-yozuv-nuqta { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; animation: yozuv-nuqta 1.2s ease-in-out infinite; }
@keyframes yozuv-nuqta { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .chat-yozuv-nuqta { animation: none; } }
.chat-yozish.yozilmoqda > :not(.chat-yozuv) { display: none; }
.chat-yozish.yozilmoqda > .chat-yozuv { display: flex; }
.chat-media { display: block; max-width: min(260px, 100%); max-height: 320px; border-radius: 10px; margin-bottom: 4px; }
.chat-komment-yorliq { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; opacity: .75; }
.chat-komment-havola { display: block; font-size: 12px; margin-bottom: 4px; }
.chat-audio { display: block; width: 240px; max-width: 100%; margin-bottom: 4px; }

.chat-orqaga { display: none; }
@media (max-width: 760px) {
  .chat-wrap { grid-template-columns: 1fr; gap: 0; height: var(--chat-h, calc(100dvh - 120px)); }
  .chat-side, .chat-oyna { max-height: none; height: 100%; min-height: 0; }
  .chat-royxat { flex: 1; min-height: 0; }
  .chat-wrap:not(.suhbat-ochiq) .chat-oyna, .chat-wrap.suhbat-ochiq .chat-side { display: none; }
  .chat-lenta { min-height: 0; }
  .chat-orqaga { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; flex: none; }
  /* Telefonda kompaniya va sana alohida qatorda, sig'masa yonga suriladi; suhbat ochilganda yashirinadi */
  .chat-filtr { flex-direction: column; align-items: stretch; gap: 6px; margin-bottom: 8px; }
  .chat-filtr-guruh { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; contain: inline-size; }   /* sahifani kengaytirmasin */
  .chat-filtr-guruh > * { flex: none; }
  .chat-filtr-nom, #chat-soni { display: none; }
  body.suhbatda .chat-filtr { display: none; }
}

/* ============ Lid kartasi (Bitrixdagi ko'rinish) ============ */
.modal.lead-modal { max-width: 1240px; background: var(--bg); }
.lead-modal .modal-head, .lead-modal .modal-foot { background: #fff; border-radius: 14px 14px 0 0; }
.lead-modal .modal-foot { border-radius: 0 0 14px 14px; }

/* Bosqichlar chizig'i — o'q shaklidagi tugmalar */
.lc-stages { display: flex; gap: 3px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; }
.lc-st {
  flex: 1 1 0; min-width: 104px; min-height: 40px; padding: 0 18px 0 22px;
  background: #e2e7ee; color: var(--ink); border: none; border-radius: 0;
  font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
  cursor: pointer; transition: filter .15s var(--ease);
}
.lc-st:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); border-radius: 8px 0 0 8px; padding-left: 14px; }
/* Har bosqich o'z rangida (voronka ustunlaridagi --st-* ranglar):
   oldindagisi och, o'tilgani to'qroq, joriysi to'liq rangda */
.lc-st { background: color-mix(in srgb, var(--c) 10%, #fff); color: color-mix(in srgb, var(--c) 85%, #000); }
.lc-st:hover { background: color-mix(in srgb, var(--c) 20%, #fff); color: color-mix(in srgb, var(--c) 85%, #000); transform: none; box-shadow: none; filter: none; }
.lc-st:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.lc-st.past { background: color-mix(in srgb, var(--c) 28%, #fff); }
.lc-st.past:hover { background: color-mix(in srgb, var(--c) 38%, #fff); }
.lc-st.on, .lc-st.on:hover { background: var(--c); color: #fff; }

.lc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lc-x { cursor: pointer; margin-left: 4px; padding: 0 2px; }

.lc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.lc-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lc-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.lc-h {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); font-size: 13px; text-transform: uppercase; letter-spacing: .3px;
}
.lc-h > b { display: flex; align-items: center; gap: 8px; }
.lc-h > b .ic { color: var(--brand); }
.lc-h .hint { font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.lc-h .lc-link { margin-left: auto; }
.lc-b { padding: 14px 16px 16px; }
.lc-view { cursor: pointer; }
.lc-view:hover { background: var(--panel-soft); border-radius: 0 0 var(--radius) var(--radius); }

.lc-link {
  background: none; border: none; padding: 0; min-height: 0; color: var(--muted);
  font-size: 12.5px; text-transform: none; letter-spacing: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; text-decoration: none;
}
.lc-link:hover { color: var(--brand); }

.lc-f { padding: 6px 0; }
.lc-f + .lc-f { border-top: 1px dashed var(--line); }
.lc-l { font-size: 12px; color: var(--muted); }
.lc-v { font-size: 14px; word-break: break-word; }
.lc-v a { color: var(--ink); font-weight: 600; }
.req { color: var(--brand); }

.lc-call { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.lc-call + .lc-call, #lc-more .lc-call:first-child { margin-top: 8px; }
.lc-call audio { width: 100%; height: 36px; margin-top: 8px; display: block; }
.lc-ovoz { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.lc-ovoz audio { flex: 1; width: auto; min-width: 0; margin-top: 0; }
.lc-tezlik { flex: none; min-width: 54px; padding: 0 8px; font-variant-numeric: tabular-nums; }
/* Jadvaldagi yozuv (Mijozlar, Qo'ng'iroqlar): ixcham, tugma pleyer yonida */
td .lc-ovoz { margin-top: 0; min-width: 230px; max-width: 280px; gap: 6px; }
td .lc-ovoz audio { height: 30px; }
td .lc-tezlik { min-width: 48px; height: 30px; padding: 0 6px; font-size: 12.5px; }
.lc-matn { margin-top: 8px; font-size: 13px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
/* Qo'ng'iroq mazmuni (egasi 2026-11-04): so'zma-so'z matn o'rniga */
.lc-mazmun { margin-top: 8px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.lc-mazmun span { white-space: pre-line; }   /* «Manzil:», «Kelishildi:» alohida qatorda */
.lc-toliq { margin-top: 4px; }
.lc-b > .lc-link[data-more] { margin-top: 10px; }

.lc-map { width: 100%; height: 240px; border: 1px solid var(--line); border-radius: 10px; display: block; }

.lc-tl { max-height: 420px; overflow: auto; }
.lc-tl li.izoh:before { background: var(--accent); }
.lc-tl li.izoh > div:first-child { background: #fff7ec; border-radius: 8px; padding: 6px 10px; display: inline-block; }

@media (max-width: 860px) {
  .lc-grid { grid-template-columns: 1fr; }
  .lc-st { min-width: 92px; font-size: 12px; }
}

/* ============ Lidlar filtri (Bitrix24 dagi kabi) ============ */
.bxf { position: relative; min-width: 0; }
.bxf-bar { display: flex; gap: 8px; }
.bxf-box {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  min-height: var(--tap); padding: 4px 6px 4px 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; cursor: text;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.bxf-box > .ic { color: var(--muted); flex: none; }
.bxf-box:hover { border-color: #c9d2dd; }
.bxf.open .bxf-box, .bxf-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.bxf-chips { display: contents; }
.bxf-box input { flex: 1; min-width: 140px; border: none; outline: none; background: transparent; padding: 4px 2px; box-shadow: none; }
.bxf-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  padding: 3px 4px 3px 10px; border-radius: 7px; font-size: 13px;
  background: #eef1f6; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bxf-chip.on { background: #dbeafe; color: #1e40af; }
.bxf-chip b { cursor: pointer; padding: 0 5px; border-radius: 5px; font-weight: 600; }
.bxf-chip b:hover { background: rgba(0, 0, 0, .08); }
.bxf-x {
  background: none; border: none; min-height: 0; padding: 0 6px; font-size: 18px; line-height: 1;
  color: var(--muted); cursor: pointer;
}
.bxf-x:hover { color: var(--danger); }

.bxf-pop {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(880px, 100%);
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  animation: popIn .18s var(--ease) both;
}
.bxf-side { background: var(--panel-soft); border-right: 1px solid var(--line); border-radius: 12px 0 0 12px; padding: 12px 8px; }
.bxf-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); padding: 0 8px 8px; }
.bxf-preset { display: flex; align-items: center; border-radius: 8px; }
.bxf-preset button {
  flex: 1; text-align: left; background: none; border: none; color: var(--ink);
  padding: 8px; min-height: 0; font-weight: 500; border-radius: 8px; cursor: pointer;
}
.bxf-preset:hover { background: #e8edf3; }
.bxf-preset.on { background: #dbeafe; }
.bxf-preset.on button { color: #1e40af; font-weight: 600; }
.bxf-preset b { padding: 4px 8px; color: var(--muted); cursor: pointer; opacity: 0; }
.bxf-preset:hover b { opacity: 1; }
.bxf-preset b:hover { color: var(--danger); }

.bxf-main { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bxf-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.bxf-field label { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.bxf-field select, .bxf-field input[type=date] { width: 100%; }
.bxf-multi {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: var(--tap);
  padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.bxf-multi select { flex: 1; min-width: 120px; border: none; box-shadow: none; background-color: transparent; min-height: 30px; }
.bxf-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.bxf-foot > select { width: auto; }

@media (max-width: 860px) {
  .bxf-pop { position: fixed; inset: 0; width: auto; border-radius: 0; grid-template-columns: 1fr; overflow-y: auto; }
  .bxf-side { border-right: none; border-bottom: 1px solid var(--line); border-radius: 0; }
  .bxf-fields { grid-template-columns: 1fr; }
}
.bxf-title { display: flex; justify-content: space-between; align-items: center; }
.bxf-close { display: none; }
@media (max-width: 860px) { .bxf-close { display: inline-block; } }
/* Panel lid ustunlari ustida tursin — qator o'z qatlamini ochadi */
.bxf-row { position: relative; z-index: 30; gap: 8px; flex-wrap: nowrap; margin-bottom: 12px; align-items: flex-start; }
.bxf-preset button { justify-content: flex-start; text-align: left; }
.bxf .bxf-multi select { border: none; box-shadow: none; outline: none; padding-left: 6px; }
.bxf .bxf-multi:focus-within { border-color: var(--brand); }
/* Telefonda: panel qator ostida, ekran kengligida, ichida suriladi
   (ota elementdagi animatsiya fixed ni qamab qo'yadi — shuning uchun absolute) */
@media (max-width: 860px) {
  .bxf-pop {
    position: absolute; inset: auto; top: calc(100% + 6px); left: 0;
    width: calc(100vw - 32px); max-height: 78vh; overflow-y: auto;
    border-radius: 12px; grid-template-columns: 1fr;
  }
  .bxf-side { border-radius: 12px 12px 0 0; }
  .bxf-foot { flex-direction: column; align-items: stretch; }
  .bxf-foot .row { justify-content: stretch; }
  .bxf-foot .row button { flex: 1; }
}
.kanban .item .s.owner { color: var(--ink); font-weight: 600; }
/* Bosqich oynasi va buyurtma formasi: maydonlar guruhlangan, kirish maydonlari ustun kengligida */
.stage-fields { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.stage-fields > div > input, .stage-fields > div > select, .stage-fields > div > textarea { width: 100%; }
.stage-group {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px;
}
.stage-group:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.of-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.of-grid .lc-sec .form-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.of-grid .lc-sec .form-grid input, .of-grid .lc-sec .form-grid select, .of-grid .lc-sec .form-grid textarea { width: 100%; }
@media (max-width: 860px) { .of-grid { grid-template-columns: 1fr; } }

/* ============ Hisobotlar → Dashboard: operator × bosqich ============ */
.dash-table th, .dash-table td { white-space: nowrap; }
.dash-table thead th.dash-ish { color: var(--ink); }
.dash-cell { cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 600; transition: filter .15s var(--ease); }
.dash-cell:hover { filter: brightness(.92); outline: 2px solid var(--ink); outline-offset: -2px; }
.dash-table tfoot th { border-top: 2px solid var(--line); font-variant-numeric: tabular-nums; }

/* ============ Buyurtma oynasi (2026-10-05) ============ */
/* Telefon: «+998» o'zgarmas, operator faqat 9 raqam yozadi */
.tel-in { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.tel-in:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tel-in > span { display: flex; align-items: center; padding: 0 8px 0 10px; color: var(--muted); background: var(--panel-soft); border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tel-in > input { flex: 1; min-width: 0; border: none; box-shadow: none; outline: none; font-variant-numeric: tabular-nums; }
.of-hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.of-hint.warn { color: #9a6700; background: #fff8e6; border-radius: 6px; padding: 6px 8px; }
.of-hint.ok { color: var(--ok); }
.of-hint.err { color: var(--danger); background: #fdecec; border-radius: 6px; padding: 6px 8px; }
.of-hint a { color: inherit; text-decoration: underline; }
.of-form .form-grid { gap: 8px 12px; }
.of-form label { margin-bottom: 3px; }

/* Haydovchi slotlari */
.of-slots { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.of-slot-row > b { display: block; font-size: 13px; margin-bottom: 4px; }
.of-slot-days { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.of-slot {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 0; min-height: 0;
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  font-size: 12px; line-height: 1.25; cursor: pointer;
}
.of-slot small { font-size: 11px; color: var(--ok); }
.of-slot:hover { border-color: var(--ok); }
.of-slot.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.of-slot.on small { color: #fff; }
.of-slot.full, .of-slot[disabled] { background: var(--panel-soft); color: var(--muted); cursor: not-allowed; }
.of-slot.full small, .of-slot[disabled] small { color: var(--muted); }

/* Xizmat qatori: nomi, soni, taxminiy m² */
.of-svc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.of-svc .tag { min-width: 150px; }
.of-svc label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 13px; }
.of-svc input { width: 76px; }

/* Lid kartasi: maydonlar zichroq — nomi chapda, qiymati o'ngda (egasi 2026-10-05) */
.lc-b { padding: 10px 14px 12px; }
.lc-view .lc-f { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 4px 0; }
.lc-view .lc-f + .lc-f { border-top: 1px solid #f0f3f6; }
.lc-view .lc-l { font-size: 12.5px; line-height: 1.35; }
.lc-view .lc-v { font-size: 13.5px; line-height: 1.4; }
@media (max-width: 860px) { .lc-view .lc-f { grid-template-columns: 1fr; gap: 0; } }
.of-check { display: inline-flex !important; flex-direction: row; align-items: center; gap: 8px; margin: 6px 0 0 !important; font-weight: 600; color: var(--ink); cursor: pointer; }
.of-check input { width: 18px; height: 18px; margin: 0; flex: none; }
.of-svc .muted { font-size: 12px; }
/* Forma ichidagi «input { width:100% }» qoidalari belgini cho'zib yubormasin */
.of-form .of-check { display: flex !important; width: fit-content; white-space: nowrap; }
.of-form .of-check input[type=checkbox] { width: 18px !important; min-width: 18px; height: 18px; min-height: 0; padding: 0; }

/* Taxta oyna pastigacha (balandlik JS da: taxtaniChoz) — ustunlar to'liq bo'yga cho'ziladi,
   gorizontal aylantirish chizig'i ekran pastida turadi */
.kanban[style*="height"] { align-items: stretch; }
.kanban[style*="height"] .col { max-height: none; }

/* Xodimning ish grafigi (Sozlamalar → Xodimlar → xodim) */
.wc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wc-h { font-size: 11px; color: var(--muted); text-align: center; padding: 2px 0; }
.wc-grid .wc-d {
  position: relative; min-height: 50px; padding: 4px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel, #fff); color: var(--ink); display: flex; flex-direction: column; align-items: flex-start;
  justify-content: space-between; gap: 2px; font-size: 12px; box-shadow: none;
}
.wc-grid .wc-d:hover { background: var(--panel-soft, #f4f6f9); color: var(--ink); transform: none; box-shadow: none; }
.wc-d b { font-size: 13px; }
.wc-d span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wc-grid .wc-d.ish { background: color-mix(in srgb, #15803d 12%, transparent); border-color: color-mix(in srgb, #15803d 35%, transparent); }
.wc-grid .wc-d.dam { background: color-mix(in srgb, #94a3b8 14%, transparent); }
.wc-d.dam span { color: #64748b; }
.wc-d.bugun { outline: 2px solid var(--brand); outline-offset: -2px; }
.wc-d i { position: absolute; top: 3px; right: 6px; color: var(--danger); font-style: normal; font-weight: 800; }
.wc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.wc-dot.ish { background: color-mix(in srgb, #15803d 35%, transparent); }
.work-btn { white-space: nowrap; }
@media (max-width: 860px) { .work-btn .muted { display: none; } }

/* «Tanish mijoz» — avval buyurtma bergan mijozning lidi, qizil bilan ajralib turadi */
.tag.tanish { background: #d6202a; color: #fff; border-color: #d6202a; font-weight: 700; }
.kanban .item:has(.tag.tanish) { box-shadow: inset 3px 0 0 #d6202a, var(--shadow-sm, 0 1px 2px rgba(0,0,0,.08)); }
.kanban .item .tags .tag.tanish { flex: none; max-width: none; overflow: visible; }

/* Qayta murojaat — yopilgan karta yangi murojaat bilan «Yangi» ga qaytgan */
.tag.qayta { background: #7c3aed; color: #fff; border-color: #7c3aed; font-weight: 700; }
.kanban .item .tags .tag.qayta { flex: none; max-width: none; overflow: visible; }

/* ============ Robotlar va triggerlar — Bitrixdagi «Автоматизация продаж» ko'rinishi (robot-map.js) ============ */
.modal.rm-modal { max-width: min(1680px, 96vw); }
.rm-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.rm-scroll { overflow-x: auto; padding-bottom: 6px; }
.rm-grid { display: grid; gap: 8px; min-width: min-content; }
.rm-st {
  background: var(--c); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); font-weight: 600; font-size: 13px; padding: 9px 22px 9px 14px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rm-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-weight: 600; font-size: 15px; }
.rm-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.rm-h .muted { font-weight: 400; font-size: 12px; }
.rm-trig {
  font-size: 12px; padding: 7px 9px; margin-bottom: 6px; border-radius: 8px;
  border: 1px dashed var(--c); color: var(--ink); background: color-mix(in srgb, var(--c) 7%, var(--panel));
}
.rm-col { display: flex; flex-direction: column; gap: 8px; }
.rm-robot {
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--brand));
  border-radius: 8px; padding: 9px 10px 0; font-size: 12.5px; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(20, 30, 45, .05);
}
.rm-robot.off { opacity: .5; border-top-color: var(--line); }
.rm-vaqt { color: var(--brand); font-size: 12px; }
.rm-nom { font-weight: 600; margin-top: 3px; line-height: 1.35; }
.rm-nima { color: var(--muted); margin-top: 4px; line-height: 1.4; }
.rm-ga { align-self: flex-start; margin-top: 6px; padding: 1px 7px; border-radius: 6px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.rm-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 9px -10px 0; padding: 7px 10px;
  border-top: 1px solid var(--line); background: color-mix(in srgb, var(--c, var(--brand)) 5%, var(--panel)); border-radius: 0 0 8px 8px;
  font-size: 11px; color: var(--muted);
}
.rm-edit { color: var(--brand); font-size: 12px; text-decoration: none; }
.rm-edit:hover { text-decoration: underline; }
.rm-umumiy { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.rm-robot { position: relative; }
.rm-robot .rm-del { position: absolute; top: 2px; right: 2px; font-size: 18px; padding: 0 5px; line-height: 1; opacity: .55; }
.rm-robot .rm-del:hover { opacity: 1; color: var(--bad, #d6202a); }
.rm-robot .rm-vaqt { padding-right: 18px; }
.rm-add { width: 100%; min-height: 0; padding: 6px 8px; font-size: 12.5px; border-style: dashed !important; }

/* Lid kartasi: tepada «Bekor qilish» / «Saqlash» (2026-10-09), saqlanmagan o'zgarish — sariq qator */
.lead-modal .modal-head { flex-wrap: wrap; }
.lc-yop { font-size: 26px; line-height: 1; padding: 0 8px 2px 0; }
.lc-yop + h3 { margin-right: auto; }
.lc-actions { display: flex; gap: 8px; align-items: center; }
.lc-actions button { min-height: 36px; }
.lc-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px; background: #fff; color: var(--brand); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.lc-f.changed { background: color-mix(in srgb, #f59e0b 13%, transparent); box-shadow: inset 3px 0 0 #f59e0b; }

/* Sozlamalardagi ichki kartalar (robot, skript) — fon mavzuga bo'ysunadi, tungi rejimda oq qolmaydi */
.card-ichki { background: var(--panel-soft); }
[data-theme=dark] .card-ichki { background: rgba(255, 255, 255, .04); }

/* ---------- Buyurtmalar kalendari (2026-10-19, brend uslubi) ---------- */
.kal-kpi { margin-bottom: 16px; }
.kal-card { padding: 16px; }
.kal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.kal-sarlavha { display: flex; align-items: center; gap: 12px; }
.kal-sarlavha > .em { width: 40px; height: 40px; animation: pop .7s var(--spring) backwards; filter: drop-shadow(0 6px 8px rgba(0,0,0,.14)); }
.kal-oraliq { font-size: 18px; font-weight: 900; letter-spacing: -.01em; }
.kal-limit { font-size: 13px; font-weight: 600; }
.kal-nav { display: flex; gap: 8px; }
.kal-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 12px; }
.kal-legend span { display: inline-flex; align-items: center; gap: 8px; }
.kl { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.kl-bor { background: color-mix(in srgb, var(--ok) 55%, var(--surface)); }
.kl-tola { background: color-mix(in srgb, var(--warn) 65%, var(--surface)); }
.kl-oshdi { background: var(--bad); }
.kl-yoq { border: 2px dashed var(--line-2); }
.kal-holat { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 16px; font-weight: 700; color: var(--ink-2); text-align: center; }
.kal-holat .em { width: 48px; height: 48px; }
.kal-wrap { border-radius: 14px; border: 1px solid var(--line); }

.kal { font-variant-numeric: tabular-nums; border-collapse: separate; border-spacing: 0; }
.kal th, .kal td { padding: 4px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--line); background: var(--surface); }
.kal thead th { background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.kal .kal-h { text-align: left; min-width: 200px; padding: 8px 12px; position: sticky; left: 0; z-index: 3;
  box-shadow: 1px 0 0 var(--line); background: var(--surface); }
.kal thead .kal-h { z-index: 4; background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.kal-hd { display: flex; align-items: center; gap: 12px; }
.kal-hd b { font-weight: 800; }
.kal-hd .muted { font-size: 11px; font-weight: 600; white-space: normal; max-width: 160px; }
.kal-av { flex: none; width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 900;
  color: var(--on-brand); background: linear-gradient(135deg, var(--brand-3), var(--brand-2)); box-shadow: 0 6px 14px -8px var(--brand); }
.kal-av-yoq { background: var(--sunken); box-shadow: none; }
.kal-av .em { width: 22px; height: 22px; }
.kd { min-width: 56px; }
.kc-dam-kun { background: color-mix(in srgb, var(--sunken) 55%, var(--surface)) !important; }
.kal td.kc-bugun, .kal th.kc-bugun { background: color-mix(in srgb, var(--brand) 7%, var(--surface)) !important; }
.kal thead th.kc-bugun { box-shadow: inset 0 -3px 0 var(--brand); }

.kal .kal-btn { position: relative; overflow: hidden; box-sizing: border-box; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0; width: 100%; min-width: 48px; min-height: 48px; margin: 0; padding: 4px; border: 0; border-radius: 12px;
  background: transparent; color: inherit; font: inherit; box-shadow: none; cursor: pointer;
  transition: transform .25s var(--spring), box-shadow .25s var(--ease), background .2s; }
.kal .kal-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kal .kal-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.kal .kal-btn b { font-size: 17px; font-weight: 900; line-height: 1.1; }
.kal .kal-btn small { font-size: 10px; font-weight: 700; color: var(--ink-3); }
.kal .kal-kun span { font-size: 11px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; }
.kal .kal-kun em { font-style: normal; font-size: 9px; font-weight: 900; color: var(--on-brand); background: var(--brand);
  border-radius: 6px; padding: 0 4px; margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }
.kal .kal-kun:hover { background: var(--sunken); box-shadow: none; }
.kb-chiziq { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; border-radius: 3px; background: color-mix(in srgb, currentColor 14%, transparent); }
.kb-chiziq::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 3px; background: currentColor;
  animation: kalOs .7s var(--ease) .2s backwards; }
.kal .kb-bor { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); color: var(--ok); }
.kal .kb-tola { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--warn); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 60%, transparent); }
.kal .kb-oshdi { background: color-mix(in srgb, var(--bad) 16%, var(--surface)); color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad); }
.kal .kb-bor b, .kal .kb-tola b, .kal .kb-oshdi b { color: var(--ink); }
.kal .kb-yoq { background: var(--surface); border: 2px dashed var(--line-2); color: var(--ink); }
.kal .kb-jami { background: var(--brand-soft); color: var(--brand-2); }
.kal .kb-jami b, .kal .kb-jami { font-weight: 900; }
.kc-bosh { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.kc-dam { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--ink-3);
  border-radius: 8px; padding: 4px 8px; background: var(--sunken); }
.kal-sum { min-width: 56px; }
.kal-sum span { font-weight: 900; font-size: 15px; color: var(--ink-2); }
.kal-sum-h { font-size: 11px; text-transform: uppercase; color: var(--ink-3); }
.kal tfoot th, .kal tfoot td { border-top: 2px solid var(--line-2); border-bottom: 0; background: var(--surface-2); }
.kal tfoot .kal-h { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.kal tbody tr { animation: fadeUp .45s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
.kal-qator-yoq th, .kal-qator-yoq td { background: color-mix(in srgb, var(--sunken) 40%, var(--surface)); }
@keyframes kalOs { from { width: 0; } }

/* Kun oynasi — mijoz kartochkalari */
.kal-mod-bosh { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.kal-mod-bosh > .em { width: 40px; height: 40px; animation: pop .6s var(--spring) backwards; }
.kal-mod-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kal-guruh { margin-bottom: 24px; }
.kal-guruh h4 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 16px; font-weight: 900; }
.kk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.kk { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; font-size: 14px;
  transition: transform .3s var(--spring), box-shadow .3s var(--ease), border-color .2s;
  animation: fadeUp .45s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
.kk::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--brand-3), var(--brand-2)); }
.kk:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.kk:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.kk-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kk-num { font-weight: 900; color: var(--ink-3); font-size: 12px; letter-spacing: .03em; margin-right: auto; font-variant-numeric: tabular-nums; }
.kk-ism { font-size: 17px; font-weight: 900; letter-spacing: -.01em; }
.kk-tels { display: flex; flex-wrap: wrap; gap: 8px; }
.kk-tel, .kk-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; text-decoration: none; border-radius: 10px; }
.kk-tel { padding: 4px 8px; background: var(--brand-soft); color: var(--brand-2); font-variant-numeric: tabular-nums; min-height: 32px; }
.kk-link { color: var(--info); font-size: 13px; margin-top: 4px; }
.kk-qator { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); }
.kk-qator > svg { flex: none; margin-top: 2px; color: var(--ink-3); }
.kk-izoh { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.kk-pas { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.kk-pas .muted { margin-right: auto; font-size: 12px; }
.kk-pas b { font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.kal tbody .kal-h, .kal tbody .kal-h * { text-transform: none; letter-spacing: 0; }
.kal tbody .kal-h b { font-size: 14px; color: var(--ink); }
@media (max-width: 640px) {
  .kal-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kal-kpi .stat { padding: 12px; }
  .kal-kpi .stat .value { font-size: 22px; }
  .kal-kpi .stat .label { padding-right: 32px; font-size: 10.5px; }
  .kal-kpi .stat .sub { font-size: 11px; }
  .kal-kpi .stat > .em { width: 28px; height: 28px; right: 8px; top: 8px; }
  .kal-card { padding: 12px; }
  .kal .kal-h { min-width: 150px; }
  .kal-hd .muted { display: none; }
  .kal-nav { width: 100%; } .kal-nav button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .kal tbody tr, .kk, .kb-chiziq::after, .kal-sarlavha > .em, .kal-mod-bosh > .em { animation: none; }
  .kal .kal-btn, .kk { transition: none; }
}

/* ---------- Jiringlash oynasi (2026-10-23) ---------- */
#jr-quti { position: fixed; z-index: 9000; top: calc(72px + env(safe-area-inset-top, 0px)); right: 16px;
  display: flex; flex-direction: column; gap: 12px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.jr { pointer-events: auto; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px;
  padding: 16px; border-radius: 18px; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); font-size: 14px; animation: popIn .45s var(--spring) backwards; }
.jr::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--brand-3), var(--brand-2)); }
.jr.jr-ket { opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
.jr-bosh { display: flex; align-items: center; gap: 12px; }
.jr-em { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); animation: jrPuls 1.2s ease-in-out infinite; }
.jr-em .em { width: 28px; height: 28px; }
@keyframes jrPuls { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 16%, transparent); } }
.jr-tur { flex: 1; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-2); }
.jr-tur small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.jr-yop { min-width: 44px; min-height: 44px; font-size: 22px; }
.jr-ism { font-size: 20px; font-weight: 900; letter-spacing: -.01em; line-height: 1.2; }
.jr-tel { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-2); font-weight: 800; text-decoration: none; font-variant-numeric: tabular-nums; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.jr-qator { display: flex; gap: 8px; align-items: flex-start; }
.jr-qator > svg { flex: none; margin-top: 2px; color: var(--ink-3); }
.jr-matn { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jr-och { margin-top: 4px; width: 100%; min-height: 44px; }
@media (max-width: 640px) { #jr-quti { top: calc(8px + env(safe-area-inset-top, 0px)); right: 8px; width: calc(100vw - 16px); } }
@media (prefers-reduced-motion: reduce) { .jr, .jr-em { animation: none; } .jr.jr-ket { transition: none; } }
/* Mijoz javob kutyapti (egasi 2026-11-03): pastki o'ng burchakda, javob yozilguncha turadi */
/* Qatlam 50: sarlavha (40) va pastki panel (35) ustida, oyna (60), menyu (70) va xabarlar (90) ostida — «Saqlash» ni to'smasin */
#kt-quti { position: fixed; z-index: 50; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
#kt-quti [hidden] { display: none !important; }   /* .jr { display: flex } hidden ni bosib ketmasin */
#kt-quti .jr { gap: 4px; padding: 12px 14px; }
#kt-quti .jr-em { display: none; }
#kt-quti .jr-ism { font-size: 16px; }
#kt-quti .jr-matn { -webkit-line-clamp: 2; font-size: 13px; }
#kt-quti .jr-och { min-height: 36px; margin-top: 2px; }
#kt-quti .jr-yop { min-width: 36px; min-height: 36px; }
.kt-vaqt { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 10px; border-radius: 10px;
  background: var(--brand-soft); font-size: 13px; }
.kt-vaqt [data-qoldi] { font-weight: 900; font-variant-numeric: tabular-nums; }
.jr.kt-kech { border-color: var(--danger); animation: ktYon 1.4s ease-in-out infinite; }
.jr.kt-kech .kt-vaqt { background: var(--danger); color: #fff; }
.jr.kt-lid { animation: ktLid 1.6s ease-in-out infinite; }
@keyframes ktYon { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 45%, transparent), var(--shadow-lg); } }
.kt-yana { pointer-events: auto; align-self: flex-end; min-height: 40px; }
/* Chatdan tushgan lid: faqat ramka emas, butun karta yonib-o'chadi (egasi 2026-11-04) */
@keyframes ktLid { 50% { background: color-mix(in srgb, var(--brand) 24%, var(--surface)); border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 45%, transparent), var(--shadow-lg); } }
/* Taxtada: chatdan tushgan yangi lid yoki javob kutayotgan mijoz kartasi butunlay yonib turadi */
.kanban .item.yonadi { animation: ktKarta 1.6s ease-in-out infinite; }
@keyframes ktKarta { 50% { background: color-mix(in srgb, var(--brand) 24%, var(--surface)); border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 60%, transparent); } }
@media (max-width: 640px) { #kt-quti { right: 8px; width: calc(100vw - 16px); bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) {
  .jr.kt-kech, .jr.kt-lid, .kanban .item.yonadi { animation: none; box-shadow: 0 0 0 3px var(--brand); }
  .jr.kt-lid, .kanban .item.yonadi { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
}

/* ---------- Qo'ng'iroq kartasi (2026-10-31) ---------- */
#qk-tasma { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 48px; margin: 0 0 12px; padding: 8px 14px; border: 0; border-radius: 14px; background: var(--danger, #c62828);
  color: #fff; font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow-lg); }
#qk-tasma > span:nth-of-type(1) { flex: 1; min-width: 0; }
#qk-tasma b { display: block; font-size: 14px; font-weight: 800; }
#qk-tasma small { display: block; font-size: 12px; opacity: .9; }
.qk-tasma-och { flex: none; padding: 4px 10px; border-radius: 10px; background: rgba(255, 255, 255, .22); font-weight: 800; font-size: 13px; }
.qk { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); }
.qk-sarlavha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qk-skript-bosh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qk-skript-bosh b { display: inline-flex; align-items: center; gap: 6px; }
.qk-skript.yopiq .qk-skript-ich { display: none; }
.qk-tablar { display: flex; gap: 4px; margin: 8px 0; overflow-x: auto; padding-bottom: 2px; }
.qk-tablar button { flex: none; }
.faol.ghost, .ghost.faol { background: var(--brand-soft); color: var(--brand-2); border-color: var(--brand); font-weight: 800; }
.qk-matn { max-height: 34vh; overflow-y: auto; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft);
  font-size: 15px; line-height: 1.55; white-space: pre-line; color: var(--ink); }
.qk-tg { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--brand); }
.qk-tg b { display: inline-flex; align-items: center; gap: 6px; }
.qk-tg.hidden { display: none; }
.qk-yakun { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px;
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 22px 22px;
  box-shadow: 0 -6px 18px rgba(14, 22, 32, .12); padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.qk-natijalar { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 100%; }
.qk-natijalar button { min-height: 40px; }
.qk-izoh { flex: 1 1 220px; min-width: 0; min-height: 44px; }
.qk-yop { min-height: 44px; }
.qk-royxat { display: flex; flex-direction: column; gap: 6px; }
.qk-qator { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; text-align: left; }
.qk-qator-ism { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-rasm { display: block; max-width: 220px; max-height: 220px; border-radius: 10px; object-fit: cover; }
@media (max-width: 640px) {
  .qk-yakun { border-radius: 0; }
  .qk-yop { flex: 1 1 100%; }
  .qk-matn { font-size: 14px; max-height: 30vh; }
}

/* ---------- Telefonda sudrash va ilova (2026-10-29) ---------- */
.kanban .item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.drag-soya { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; opacity: .94; margin: 0;
  box-shadow: var(--shadow-lg); border-radius: 12px; will-change: transform; }
.kanban .item.dragging { opacity: .35; }
#install-btn[hidden] { display: none; }
@media (display-mode: standalone) { .topbar { padding-top: max(8px, env(safe-area-inset-top)); } }

/* Telefonda tepa panel ixcham (2026-10-29): varaqlaganda yuqoriga ketadi, amal tugmalari bitta suriluvchi qatorda */
@media (max-width: 640px) {
  .topbar { position: relative; gap: 6px; padding: 8px 10px; }
  .topbar .brand-name { font-size: 16px; }
  #lang { max-width: 72px; padding: 4px 6px; font-size: 13px; min-height: 36px; }
  #page-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-bottom: 2px; margin: 0 -10px; padding-inline: 10px; }
  #page-actions::-webkit-scrollbar { display: none; }
  #page-actions > * { flex: 0 0 auto; }
  /* asosiy amal (Yangi lid / Yangi buyurtma) qator boshida — ekrandan chiqib ketmasin */
  #page-actions #new-lead, #page-actions #new-order { order: -1; }
  .who { display: none; }
  .topbar .brand-name { display: none; }
}

/* Telefonda filtrlar ixcham (2026-10-29): ikki ustun, belgilash katagi oddiy o'lchamda */
@media (max-width: 640px) {
  .filters { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
  .filters > div { min-width: 0; }
  .filters label { font-size: 12px; }
  .filters input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; }
  .filters > div:has(#apply), .filters > div:has(#f-q) { grid-column: 1 / -1; }
}

/* Mijoz rasmlari: izoh bilan tarixda qoladi (2026-10-30) */
.izoh-rasmlar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.izoh-rasmlar:empty { display: none; }
.izoh-rasmlar img { display: block; width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.izoh-rasmlar .tanlangan { position: relative; }
.izoh-rasmlar .tanlangan img { cursor: default; }
.izoh-rasmlar .tanlangan button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; font-size: 14px; line-height: 1; }
#cmt-tanlangan { margin: -4px 0 12px; }
.lc-sec.rasm-ustida { outline: 2px dashed var(--brand); outline-offset: 2px; }
.rasm-katta { display: block; max-width: 100%; max-height: 76vh; margin: 0 auto; border-radius: 10px; }

/* Kanban kartasi: ikonka + qiymat, ustun bo'lib tekis turadi (2026-10-30) */
.kanban .item .s { display: flex; align-items: flex-start; gap: 6px; line-height: 1.35; }
.kanban .item .s > .ic { flex: none; margin-top: 2px; opacity: .75; }
.kanban .item .s.tel { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Lid kartasi: mijozning buyurtmalari alohida bo'limda (2026-10-30) */
.lc-buyurtma { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 40px; margin-bottom: 6px; text-align: left; }
.lc-buyurtma:last-child { margin-bottom: 0; }
.lc-buyurtma .lc-summa { margin-left: auto; font-variant-numeric: tabular-nums; }
.lc-buyurtma .lc-manzil { flex-basis: 100%; display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 13px; font-weight: 500; color: var(--muted); overflow-wrap: anywhere; }
.lc-buyurtma .lc-manzil svg { flex: none; }
.lc-actions button { white-space: nowrap; }
@media (max-width: 640px) { .lc-actions [data-del-lead] span { display: none; } }
.lc-buyurtma.eski { padding: 8px 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: 14px; }
.lc-eski { margin-bottom: 6px; }
.lc-eski:last-child { margin-bottom: 0; }
.lc-eski summary { list-style: none; cursor: pointer; min-height: 44px; margin-bottom: 0; }
.lc-eski summary::-webkit-details-marker { display: none; }
.lc-eski summary:hover { background: var(--panel-soft); }
.lc-eski[open] summary { border-style: solid; border-radius: 12px 12px 0 0; }
.lc-eski-b { padding: 6px 14px 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; }
.lc-karta { color: var(--brand); font-weight: 700; cursor: pointer; }
.lc-olish { display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; font-size: 14px; }

/* Sana yonida necha kun o'tgani (2026-10-31) */
.kun { color: var(--muted); font-size: .92em; white-space: nowrap; }
.kun i { font-style: normal; }
td .kun { display: block; }
td .kun i { display: none; }
.tag .kun { color: inherit; font-size: inherit; }

/* Buyurtma formasi: to'ldirilmagan majburiy maydon (2026-10-31) */
.of-bosh, .of-bosh:focus { outline: 2px solid var(--danger); outline-offset: 1px; border-radius: 8px; }
.tel-in input.of-bosh, .tel-in input.of-bosh:focus { outline: none; }
.tel-in:has(.of-bosh) { outline: 2px solid var(--danger); outline-offset: 1px; border-radius: 10px; }

/* Interaktiv skript: savol ostida javob (egasi 2026-10-31) */
.qk-matn { white-space: normal; }
.qk-matn:has(.qk-w) { max-height: none; overflow: visible; }
.qk-gap { white-space: pre-line; }
.qk-gap:empty { display: none; }
.qk-w { display: block; margin: 6px 0 14px; color: var(--ink); }
.qk-w > b { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.qk-tugmalar { display: flex; flex-wrap: wrap; gap: 6px; }
.qk-v { min-height: 38px; }
button.ghost.qk-v.faol, button.ghost.qk-v.faol:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.qk-i { width: 100%; }

/* Vaziyatli skript: bitta vaziyat, ostida mijoz javobi tugmalari (egasi 2026-11-01) */
.qk-matn.yol { max-height: none; overflow: visible; }
.qk-matn p { margin: 0 0 8px; }
.qk-tanla { display: flex; gap: 6px; margin-bottom: 8px; }
.qk-tanla.hidden, .qk-tanla select.hidden { display: none; }
.qk-tanla select { flex: 1; min-width: 0; }
.qk-tanla button { flex: none; margin-left: auto; }
.qk-bosh { margin-bottom: 8px; }
.qk-bosh small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.qk-bosh b { font-size: 16px; font-weight: 800; }
.qk-yorliq { margin: 10px 0 4px; font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.qk-matn p.qk-ayt { margin-bottom: 6px; padding: 8px 12px; border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0;
  background: var(--surface); font-weight: 600; }
.qk-matn p.qk-man { padding-left: 12px; border-left: 3px solid var(--bad); color: var(--bad); font-size: 13.5px; }
.qk-matn p.qk-esl { color: var(--ink-2); font-size: 13.5px; }
.qk-joy { padding: 0 5px; border-radius: 6px; border: 1px dashed var(--line-2); background: var(--sunken); font-weight: 600; }
.qk-joy.sariq { border-color: var(--s-warn); background: color-mix(in srgb, var(--s-warn) 28%, transparent); }
.qk-otish { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.qk-otish > small { font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.qk-matn button.qk-o { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; margin-bottom: 4px; text-align: left;
  white-space: normal; background: var(--surface); }
.qk-o > span { flex: 1; min-width: 0; }
.qk-o > small { flex: none; max-width: 45%; color: var(--ink-2); text-align: right; }
.qk-o > svg { flex: none; }
.qk-matn button.qk-havola, .qk-matn button.qk-havola:hover { display: inline; padding: 0; border: 0; min-height: 0; background: none;
  color: var(--brand-2); font: inherit; text-decoration: underline; box-shadow: none; }
.qk-jadval { overflow-x: auto; margin-bottom: 8px; }
.qk-jadval table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); }
.qk-jadval th, .qk-jadval td { padding: 6px 8px; border: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.qk-royhat { margin: 0 0 8px; padding-left: 20px; }
.qk-maydonlar { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 12px; margin-top: 8px; }
.qk-maydonlar .qk-w { margin: 0 0 8px; }
.qk-maydonlar div.qk-w { grid-column: 1 / -1; }
.qk-kv .qk-v { min-width: 42px; }

/* Manzil super maydoni: savollar ketma-ket, natija bitta qator (egasi 2026-11-02) */
.lc-view .lc-f.mz-ochiq { display: block; cursor: default; }
.mz-ochiq .lc-l { margin-bottom: 6px; }
.mz { display: flex; flex-direction: column; gap: 10px; }
.mz-q { display: block; }
.mz-q > b { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.mz-q input { width: 100%; }
.mz-q select { width: 100%; }
.mz-ixt { color: var(--muted); font-size: 12px; font-weight: 400; }
/* Uy va xonadon yonma-yon (egasi 2026-11-04: «16/31» ikki katakda) */
.mz-uy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.mz-q input::placeholder { color: var(--muted); font-weight: 400; }
.mz-natija { padding: 8px 10px; border-radius: 10px; background: var(--brand-soft); font-weight: 600; }
.mz-natija:empty { display: none; }
.mz-tugma { display: flex; justify-content: flex-end; gap: 6px; }
.mz-yoq { display: block; color: var(--danger); font-size: 12px; }
/* Ko'cha va mahalla ro'yxati (egasi 2026-11-02) */
.mz-tak { margin-top: 4px; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow-sm); }
.mz-tak > b { display: block; padding: 8px 10px 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
button.ghost.mz-t, button.ghost.mz-t:hover { display: block; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink); font-weight: 600; text-align: left; transform: none; }
button.ghost.mz-t + button.ghost.mz-t { border-top: 1px solid var(--line); }
button.ghost.mz-t:hover, button.ghost.mz-t.faol { background: var(--brand-soft); }
.mz-t small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
/* Olib ketish manzili: avvalgi manzil tavsiyasi, lid manbasi izohi (egasi 2026-11-03) */
.lc-view .lc-f:has(.mz-avval) { display: block; }
.lc-f:has(.mz-avval) .lc-l { margin-bottom: 6px; }
.mz-avval { display: flex; flex-direction: column; gap: 6px; cursor: default; }
.mz-avval-q { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--brand-soft); }
.mz-avval-q > div { flex: 1; min-width: 0; }
.mz-avval-q small { display: block; color: var(--muted); font-size: 12px; }
.mz-avval-q b { font-weight: 600; }
.mz-avval-q button { flex: none; }
.mz-avval > button { align-self: flex-start; }
.lc-izoh { display: block; font-size: 12px; }
/* Xodimlar sahifasi: xodim qatoridagi raqamlar (egasi 2026-11-03) */
.xr-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
button.ghost.xr-chip { min-height: 30px; padding: 3px 8px; font-weight: 600; font-variant-numeric: tabular-nums; gap: 4px; }
.xr-chip .tag { font-size: 10.5px; padding: 1px 6px; }
tr.xr-qator { cursor: pointer; }
tr.xr-qator:hover td { background: var(--panel-soft); }
/* Sozlamalar → Narxlar (egasi 2026-11-03) */
.nx-bolim { margin-top: 18px; }
.nx-sar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nx-bolim-nom { flex: 1; max-width: 460px; font-weight: 800; font-size: 15px; }
.nx-jadval td { padding: 4px 6px; }
.nx-jadval input, .nx-jadval select { width: 100%; min-width: 0; }
.nx-jadval th:nth-child(1) { width: 24%; } .nx-jadval th:nth-child(2) { width: 34%; }
.nx-jadval th:nth-child(3), .nx-jadval th:nth-child(4) { width: 12%; } .nx-jadval th:nth-child(5) { width: 14%; }
.nx-qosh { margin-top: 6px; }
/* Oldin berilgan buyurtma: tarix bo'limidagi forma (egasi 2026-11-03) */
.lc-h [data-oldingi] { margin-left: auto; text-transform: none; letter-spacing: 0; }
.ob-forma { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.ob-forma p { margin: 0; font-size: 12.5px; }
.ob-manzil { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ob-manzil > div { flex: 1 1 100%; }
.lc-eski-b .ob-ochir { margin-top: 8px; }
/* «Rasm kutilmoqda»: mijozga ketadigan SMS ko'rinishi (egasi 2026-11-03) */
.rasm-sms { margin: 12px 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }

/* AI qo'ng'iroqdan to'ldirgan maydonlar (2026-11-04): binafsha — «changed» sariq bilan adashmasin */
.ai-quti { margin: 0 0 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, #7c3aed 30%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, #7c3aed 6%, var(--panel)); }
.ai-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: #6d28d9; }
.ai-h b { color: var(--ink); }
.ai-h .muted { font-size: 12.5px; }
.ai-q { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; margin: 10px 0 12px; }
.ai-q small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.ai-q b { font-weight: 600; overflow-wrap: anywhere; }
.ai-s { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-s > b { margin-right: 4px; }
.ai-belgi { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 5px; font-size: 10.5px; font-weight: 700; line-height: 16px; vertical-align: 1px; color: #6d28d9; background: color-mix(in srgb, #7c3aed 13%, transparent); }
.lc-f.ai:not(.changed) { box-shadow: inset 3px 0 0 color-mix(in srgb, #7c3aed 55%, transparent); }
.ai-tuzat .lc-f.ai:not(.changed) { background: color-mix(in srgb, #7c3aed 10%, transparent); box-shadow: inset 3px 0 0 #7c3aed; }
[data-theme=dark] .ai-h, [data-theme=dark] .ai-belgi { color: #c4b5fd; }
@media (max-width: 560px) { .ai-q { grid-template-columns: 1fr 1fr; } }

/* ===== Videolar ro'yxati (egasi 2026-11-04): mavzular bo'yicha Instagram video havolasi ===== */
.vl-izoh { margin: 0 0 10px; }
#vl-qidir { width: 100%; max-width: 420px; margin-bottom: 10px; }
.vl-mundarija { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.vl-mundarija .chip { text-decoration: none; padding: 5px 11px; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.vl-mundarija .chip .muted { font-weight: 500; margin-left: 2px; }
.vl-mavzu { margin-top: 18px; scroll-margin-top: 70px; }
.vl-mavzu h3 { margin: 0 0 6px; font-size: 16px; }
.vl-mavzu h3 .muted { font-size: 13px; font-weight: 500; }
.vl-q { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface, #fff); }
.vl-q + .vl-q { margin-top: 6px; }
.vl-yashirin { opacity: .55; }
.vl-muqova { flex: none; width: 44px; height: 56px; border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  background: var(--sunken, #eef1f5); color: var(--ink-3, #8a94a0); }
.vl-muqova img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vl-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vl-nom > a { font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-nom > a:hover { text-decoration: underline; }
.vl-nom small { color: var(--ink-3, #6b7785); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 3px; }
.vl-tugma { flex: none; display: flex; gap: 6px; }
.vl-belgilar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
/* Chatdagi «Video havola» (shablonlar oynasida): mavzular ochiladigan ro'yxat */
.chat-vid { display: flex; flex-direction: column; gap: 4px; padding: 2px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.chat-vid-h { display: flex; justify-content: space-between; align-items: baseline; }
.chat-vid-h b { font-size: 12px; color: var(--ink-3, #6b7785); text-transform: uppercase; letter-spacing: .04em; }
.chat-vid-h a { font-size: 12.5px; font-weight: 700; }
.chat-vid-m summary { cursor: pointer; padding: 6px 4px; font-weight: 700; font-size: 13.5px; border-radius: 8px; }
.chat-vid-m summary:hover { background: var(--sunken, #f2f5f8); }
.chat-vid-m summary .muted { font-weight: 500; }
.chat-vid-v { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: flex-start; text-align: left; min-height: 50px; margin: 4px 0 0; }
.chat-vid-v img { width: 34px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; }
.chat-vid-v span { min-width: 0; display: flex; flex-direction: column; }
.chat-vid-v b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-vid-v small { color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 3px; }
@media (max-width: 760px) {
  /* Telefonda mavzular bitta qatorda, yonga suriladi: ro'yxat ekranni egallamasin */
  .vl-mundarija { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: -12px; }
  .vl-mundarija .chip { flex: none; }
  .vl-q { flex-wrap: wrap; }
  .vl-tugma { width: 100%; }
  .vl-tugma [data-nusxa] { flex: 1; }
}
/* Chatda kompaniya logosi va rangi (egasi 2026-11-04) */
.chat-avatar-joy { position: relative; flex: none; display: inline-flex; }
.chat-logo { position: absolute; right: -4px; bottom: -4px; width: 19px; height: 19px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--surface, #fff); background: var(--surface, #fff); }
.chat-logo.chat-logo-ichki { position: static; width: 16px; height: 16px; border-width: 1px; vertical-align: -3px; margin-right: 4px; }
.chat-item[style*="--brend"] { box-shadow: inset 3px 0 0 var(--brend); background: color-mix(in srgb, var(--brend) 6%, transparent); }
.chat-item[style*="--brend"]:hover { background: color-mix(in srgb, var(--brend) 11%, transparent); }
.chat-item[style*="--brend"].active { background: color-mix(in srgb, var(--brend) 16%, transparent); }
.vl-hisob { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.vl-hisob:empty { display: none; }

/* Buyurtma formasi: Manzil maydoni (lid kartasidagidek) va Chegirma (egasi 2026-11-16) */
.of-manzil { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); }
.of-manzil.of-bosh { border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 18%, transparent); }
.of-mz-qator { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.of-mz-qator span { flex: 1 1 200px; }
.of-ch { margin-top: 10px; }
.of-ch [data-ch-och].on { border-color: var(--brand); color: var(--brand); }
.of-ch-box { margin-top: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.of-ch-shart { margin-top: 8px; padding-left: 14px; border-left: 2px solid var(--brand); }
.of-ch .chip:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Narxlatish — joyida yuvish (egasi 2026-11-19) ---------- */
.nx-ogoh { display: flex; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px;
  background: color-mix(in srgb, #f59e0b 14%, transparent); color: var(--ink); font-weight: 600; }
.nx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.nx-bosh { grid-column: 1 / -1; padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.nx-rasm, .nx-rasm.ghost { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 4px; min-height: 0; border-radius: 12px;
  border: 2px solid var(--line); background: none; color: inherit; cursor: pointer; text-align: left; }
.nx-rasm img, .nx-rasm video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; opacity: .55; transition: opacity .15s; }
.nx-rasm small { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-rasm.on, .nx-rasm.ghost.on { border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 8%, transparent); }
.nx-rasm.on img, .nx-rasm.on video { opacity: 1; }
.nx-belgi { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .35); color: #fff; border: 2px solid #fff; }
.nx-rasm.on .nx-belgi { background: var(--brand-2); }
.nx-tur { position: absolute; top: 8px; left: 8px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
#nx-izoh { width: 100%; margin-top: 4px; }
.nx-oldin h4 { margin: 16px 0 8px; }
.nx-sorovlar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nx-sorov { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.nx-sorov-bosh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nx-minilar { display: flex; gap: 6px; align-items: center; }
.nx-minilar:empty { display: none; }
.nx-mini { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; }
.nx-qolda { gap: 6px; flex-wrap: wrap; }
.nx-qolda input { flex: 1; min-width: 120px; }
.kt-narx::before { background: linear-gradient(90deg, #16a34a, #22c55e); }
/* Narxlatish: majburiy mijoz maydonlari (egasi 2026-11-19) */
.nx-mijoz { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.nx-mijoz h4, .nx-rasm-h { margin: 0 0 10px; }
.nx-maydonlar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.nx-m { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 6px; margin: -6px; border-radius: 10px; }
.nx-m > span { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.nx-m .req { color: var(--danger, #d6202a); font-style: normal; }
.nx-m.xato { background: color-mix(in srgb, #d6202a 7%, transparent); box-shadow: inset 0 0 0 1.5px #d6202a; }
.nx-m input:not([type=checkbox]), .nx-m select { width: 100%; }
.nx-keng { grid-column: 1 / -1; }
.nx-tel { padding: 8px 0; font-weight: 700; }
.nx-ikki { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nx-mt-sub:empty { display: none; }
.nx-manzil-q { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 600; }
@media (max-width: 640px) { .nx-maydonlar, .nx-ikki { grid-template-columns: 1fr; } }
