/* Turava Biznes — panel uslubi. Ranglar FAQAT shu yerdagi tokenlardan. */

/* Tizim panellari (soat, pastki chiziq) uchun joy — BITTA joyda. TURAVA ilovasi ichida (`.ilova`)
   bu joyni ilovaning o'zi qoldiradi: Android WebView tizim joyini baribir xabar qiladi va panel uni
   ikkinchi marta qoldirib, yopishqoq sarlavha ustida bo'shliq ochardi (ostidan matn ko'rinib qolardi). */
:root {
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

:root.ilova {
  --safe-t: 0px;
  --safe-b: 0px;
}

:root {
  --bg: #fafaf8;
  --card: #ffffff;
  --border: #e6e6e6;
  --border-strong: #d4d8d6;
  --soft: #f1f1ef;
  --head: #0e2a2e;
  --text: #3c5a5c;
  --faint: #6f8482;
  --turq: #00b4cc;
  --tink: #0b6470;
  --tint: #e4f5f8;
  --primary: #0b6470;
  --primary-hover: #095560;
  --on-primary: #ffffff;
  --gold: #c79a18;
  --gold-ink: #625100;
  --gold-soft: #fdf8e7;
  --red: #c8323f;
  --red-soft: #fcebed;
  --green: #2e6b48;
  --green-soft: #e2f0e7;
  --navy: #0e2a2e;
  --navy-2: #163a3f;
  --on-dark: #ffffff;
  --on-dark-muted: #9bb8b5;
  --on-dark-accent: #7fdcea;
  --brand: #00a9d6;
  --overlay: rgba(14, 42, 46, 0.45);
  --shadow: 0 1px 2px rgba(14, 42, 46, 0.05), 0 6px 20px rgba(14, 42, 46, 0.06);
  --shadow-pop: 0 12px 40px rgba(14, 42, 46, 0.18);
  --st-new: #00b4cc;
  --st-talk: #6f8482;
  --st-offer: #c79a18;
  --st-agreed: #2e6b48;
  --st-paid: #1f8a5b;
  --st-trip: #0b6470;
  --st-done: #9aa9a7;
  --st-lost: #c8323f;
  --bar-in: #0b6470;
  --bar-out: #c79a18;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --card-line: #ececea;
  --card-shadow: 0 1px 2px rgba(14, 42, 46, 0.04), 0 4px 14px rgba(14, 42, 46, 0.05);
  --side-w: 236px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --card-line: #213a3e;
    --card-shadow: none;
    --bg: #0b1a1c;
    --card: #10252a;
    --border: #213a3e;
    --border-strong: #2d4a4f;
    --soft: #15302f;
    --head: #eaf3f2;
    --text: #b9cccA;
    --faint: #87a3a0;
    --turq: #22c3d9;
    --tink: #7fdcea;
    --tint: #123c42;
    --primary: #0e7c8c;
    --primary-hover: #12909f;
    --on-primary: #ffffff;
    --gold: #e2b83a;
    --gold-ink: #f2d27a;
    --gold-soft: #2c2610;
    --red: #f0707a;
    --red-soft: #3a1a1e;
    --green: #7cc79a;
    --green-soft: #163324;
    --navy: #07171a;
    --navy-2: #12292d;
    --on-dark: #eaf3f2;
    --on-dark-muted: #87a3a0;
    --on-dark-accent: #7fdcea;
    --brand: #22c3d9;
    --overlay: rgba(0, 0, 0, 0.6);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.5);
    --st-new: #22c3d9;
    --st-talk: #87a3a0;
    --st-offer: #e2b83a;
    --st-agreed: #7cc79a;
    --st-paid: #4fbf86;
    --st-trip: #7fdcea;
    --st-done: #5f7775;
    --st-lost: #f0707a;
    --bar-in: #22c3d9;
    --bar-out: #e2b83a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --card-line: #213a3e;
  --card-shadow: none;
  --bg: #0b1a1c;
  --card: #10252a;
  --border: #213a3e;
  --border-strong: #2d4a4f;
  --soft: #15302f;
  --head: #eaf3f2;
  --text: #b9ccca;
  --faint: #87a3a0;
  --turq: #22c3d9;
  --tink: #7fdcea;
  --tint: #123c42;
  --primary: #0e7c8c;
  --primary-hover: #12909f;
  --on-primary: #ffffff;
  --gold: #e2b83a;
  --gold-ink: #f2d27a;
  --gold-soft: #2c2610;
  --red: #f0707a;
  --red-soft: #3a1a1e;
  --green: #7cc79a;
  --green-soft: #163324;
  --navy: #07171a;
  --navy-2: #12292d;
  --on-dark: #eaf3f2;
  --on-dark-muted: #87a3a0;
  --on-dark-accent: #7fdcea;
  --brand: #22c3d9;
  --overlay: rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.5);
  --st-new: #22c3d9;
  --st-talk: #87a3a0;
  --st-offer: #e2b83a;
  --st-agreed: #7cc79a;
  --st-paid: #4fbf86;
  --st-trip: #7fdcea;
  --st-done: #5f7775;
  --st-lost: #f0707a;
  --bar-in: #22c3d9;
  --bar-out: #e2b83a;
  color-scheme: dark;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

h1,
h2,
h3,
h4 {
  color: var(--head);
  margin: 0;
  line-height: 1.25;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 22px;
  font-weight: 700;
}

h2 {
  font-size: 17px;
  font-weight: 650;
}

h3 {
  font-size: 14px;
  font-weight: 650;
}

a {
  color: var(--tink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.num,
.money,
td.r,
.kpi-value {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--faint);
}

.small {
  font-size: 12.5px;
}

.nowrap {
  white-space: nowrap;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--turq);
  outline-offset: 2px;
}

/* ─── yuklanish ─── */
.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.spin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--turq);
  animation: spin 0.8s linear infinite;
}

.spin.sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spin {
    animation-duration: 2.4s;
  }
}

/* ─── logotip ─── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.logo .logo-mark {
  width: 30px;
  height: 30px;
  color: var(--brand);
  flex: none;
}

.logo .logo-word {
  height: 20px;
  width: auto;
}

.logo-sub {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--on-dark-accent);
  margin-top: 2px;
}

/* ─── tugmalar ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--head);
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}

.btn:hover {
  background: var(--soft);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.danger {
  color: var(--red);
  border-color: var(--border-strong);
}

.btn.danger.solid {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
}

.btn.ghost:hover {
  background: var(--soft);
}

.btn.sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.btn.block {
  width: 100%;
}

.btn.icon {
  width: 38px;
  padding: 0;
}

.btn.icon.sm {
  width: 30px;
}

.btn svg,
.ico {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn.sm svg {
  width: 16px;
  height: 16px;
}

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--tink);
  cursor: pointer;
  font-weight: 550;
}

.link:hover {
  text-decoration: underline;
}

.link.muted {
  color: var(--faint);
}

/* ─── maydonlar ─── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span:first-child,
.label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--head);
}

.field .opt {
  font-weight: 400;
  color: var(--faint);
}

.input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--head);
}

.field textarea {
  height: auto;
  min-height: 76px;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.45;
}

.input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--turq);
  box-shadow: 0 0 0 3px var(--tint);
}

.field.bad input,
.field.bad select,
.field.bad textarea {
  border-color: var(--red);
}

.err {
  color: var(--red);
  font-size: 12.5px;
  min-height: 0;
}

.err:empty {
  display: none;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .row2,
  .row3 {
    grid-template-columns: 1fr;
  }
}

.seg {
  display: inline-flex;
  padding: 3px;
  background: var(--soft);
  border-radius: 10px;
  gap: 2px;
  flex-wrap: wrap;
}

.seg button,
.seg label {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 550;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seg button.on,
.seg label.on,
.seg input:checked + span {
  background: var(--card);
  color: var(--head);
  box-shadow: 0 1px 2px rgba(14, 42, 46, 0.12);
}

.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg label {
  position: relative;
  padding: 0;
}

.seg label span {
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ─── kirish ekrani ─── */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.auth-hero {
  background: var(--navy);
  color: var(--on-dark);
  padding: 48px clamp(24px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.auth-hero::after {
  content: '';
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(127, 220, 234, 0.18);
  box-shadow: 0 0 0 60px rgba(127, 220, 234, 0.04), 0 0 0 120px rgba(127, 220, 234, 0.025);
  pointer-events: none;
}

.auth-hero .logo-mark {
  width: 40px;
  height: 40px;
}

.auth-hero .logo-word {
  height: 26px;
}

.auth-hero h1 {
  color: var(--on-dark);
  font-size: clamp(26px, 3.2vw, 38px);
  max-width: 14em;
  margin-top: 8px;
}

.auth-hero ul {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 30em;
}

.auth-hero li {
  display: flex;
  gap: 12px;
  color: var(--on-dark-muted);
  font-size: 15px;
}

.auth-hero li svg {
  color: var(--on-dark-accent);
  margin-top: 2px;
}

.auth-hero .safe {
  color: var(--on-dark-muted);
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-main {
  display: flex;
  flex-direction: column;
  padding: 24px clamp(16px, 4vw, 56px);
}

.auth-top {
  display: flex;
  justify-content: flex-end;
}

.auth-box {
  margin: auto 0;
  width: 100%;
  max-width: 400px;
  align-self: center;
  padding-block: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-box .lead {
  margin: 4px 0 0;
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 12.5px;
}

.or::before,
.or::after {
  content: '';
  height: 1px;
  background: var(--border);
  flex: 1;
}

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--soft);
  font-size: 13px;
}

.note.warn {
  background: var(--gold-soft);
  color: var(--gold-ink);
}

.note.bad {
  background: var(--red-soft);
  color: var(--red);
}

.note.info {
  background: var(--tint);
  color: var(--tink);
}

.note.ok {
  background: var(--green-soft);
  color: var(--green);
}

.note svg {
  margin-top: 1px;
}

.code-input {
  letter-spacing: 0.4em;
  font-size: 20px !important;
  height: 48px !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .auth {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    padding: 28px 16px;
    gap: 20px;
  }

  .auth-hero ul,
  .auth-hero .safe {
    display: none;
  }

  .auth-hero h1 {
    font-size: 24px;
  }
}

/* ─── qobiq ─── */
.shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--card);
  color: var(--head);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  gap: 16px;
  overflow-y: auto;
}

.side .brand {
  padding: 4px 6px;
}

.side .logo-sub {
  color: var(--tink);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.14em;
}

.side .agency {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.side .agency > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.agency-av {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-weight: 750;
  font-size: 14px;
}

.side .agency b {
  color: var(--head);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side .agency span {
  color: var(--faint);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 520;
}

.nav a:hover {
  background: var(--soft);
  color: var(--head);
  text-decoration: none;
}

.nav a.on {
  background: var(--tint);
  color: var(--tink);
  font-weight: 650;
}

.nav .ico.duo {
  width: 20px;
  height: 20px;
}

.nav .badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 4px 0;
  border-top: 1px solid var(--border);
}

.me {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.me div {
  min-width: 0;
}

.me b {
  display: block;
  color: var(--head);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me span {
  color: var(--faint);
  font-size: 12px;
}

/* Til tanlovi + kun/tun tugmasi (menyu pastida — to'q fon; kirish ekranida — och fon) */
.lang-switch {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lang-select {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--head);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Ochilgan ro'yxat: aks holda to'q fondagi och matn oq ro'yxatda ko'rinmay qoladi */
.lang-select option,
.lang-field option {
  background: var(--card);
  color: var(--head);
}

.theme-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--head);
  cursor: pointer;
}

.theme-btn .ico {
  width: 18px;
  height: 18px;
}

.lang-select:focus-visible,
.theme-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.auth-top .lang-switch {
  flex: none;
}

.auth-top .lang-select,
.auth-top .theme-btn {
  border-color: var(--border-strong);
  background: var(--card);
  color: var(--head);
}

.auth-top .lang-select {
  flex: none;
  width: auto;
  max-width: 150px;
}

.auth-top .lang-select:focus-visible,
.auth-top .theme-btn:focus-visible {
  outline-color: var(--turq);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.top {
  position: sticky;
  top: var(--safe-t);
  z-index: 20;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
}

.top h1 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top .grow {
  flex: 1;
}

.top .menu-btn {
  display: none;
}

.demo-bar {
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-size: 13px;
  padding: 8px 28px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.demo-bar > span {
  flex: 1 1 240px;
  min-width: 0;
}

.demo-bar b {
  font-weight: 700;
}

.demo-bar .link {
  color: var(--gold-ink);
  text-decoration: underline;
}

.page {
  padding: 24px 28px 48px;
  width: 100%;
  max-width: 1320px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.scrim {
  display: none;
}

/* ─── pastki menyu (telefon) ─── */
:root {
  --tabbar-h: 58px;
}

.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 0 4px var(--safe-b);
}

.tabbar a,
.tabbar button {
  position: relative;
  min-height: var(--tabbar-h);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tabbar span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabbar svg {
  width: 22px;
  height: 22px;
}

.tabbar .on {
  color: var(--primary);
  font-weight: 600;
}

.tabbar .badge {
  position: absolute;
  top: 5px;
  left: calc(50% + 6px);
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  text-align: center;
}

.tabbar a:focus-visible,
.tabbar button:focus-visible {
  outline: 2px solid var(--turq);
  outline-offset: -4px;
  border-radius: 10px;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 84vw);
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    padding-top: calc(18px + var(--safe-t));
  }

  .shell.nav-open .side {
    transform: none;
    box-shadow: var(--shadow-pop);
  }

  .shell.nav-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 50;
  }

  .top {
    padding: 10px 16px;
  }

  /* menyu endi pastki «Yana» tugmasida — tepada takrorlanmaydi */
  .top .menu-btn {
    display: none;
  }

  /* telefonda ixcham: matn chapda, «chiqish» o'ngda bitta qatorda (3 qavat emas) */
  .demo-bar {
    padding: 8px 12px 8px 16px;
    gap: 10px;
    flex-wrap: nowrap;
    font-size: 12.5px;
    line-height: 1.35;
  }

  .demo-bar > span {
    flex: 1 1 auto;
  }

  .demo-bar .link {
    flex: none;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
  }

  .page {
    padding: 16px 16px calc(40px + var(--tabbar-h) + var(--safe-b));
  }

  .tabbar {
    display: grid;
  }

  #toast {
    bottom: calc(14px + var(--tabbar-h) + var(--safe-b));
  }
}

@media (max-width: 560px) {
  .top .hide-sm,
  .page .hide-sm {
    display: none;
  }
}

/* ─── kartalar ─── */
.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  min-width: 0;
}

.card-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}

.card-h h2,
.card-h h3 {
  flex: 1;
  min-width: 0;
}

.card-b {
  padding: 4px 16px 16px;
}

.card-b.flush {
  padding: 0 0 6px;
}

.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.grid2 > .col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

@media (max-width: 1080px) {
  .grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: inherit;
}

a.kpi:hover {
  text-decoration: none;
  border-color: var(--border-strong);
}

.kpi-label {
  font-size: 12.5px;
  color: var(--faint);
  font-weight: 550;
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--head);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-sub {
  font-size: 12px;
  color: var(--faint);
}

.kpi.warn .kpi-value {
  color: var(--red);
}

.kpi.hero {
  background: var(--navy);
  border-color: var(--navy);
}

.kpi.hero .kpi-label,
.kpi.hero .kpi-sub {
  color: var(--on-dark-muted);
}

.kpi.hero .kpi-value {
  color: var(--on-dark);
}

@media (max-width: 560px) {
  /* telefon: kichik ko'rsatkichlar ikki ustunda, birinchisi (asosiy) to'liq;
     juft o'rindagi oxirgisi yolg'iz qolmasin deb u ham to'liq */
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kpis > :first-child,
  .kpis > :last-child:nth-child(even) {
    grid-column: 1 / -1;
  }

  .kpis .kpi-value {
    font-size: 19px;
    white-space: normal;
  }
}

.meter {
  height: 6px;
  border-radius: 99px;
  background: var(--soft);
  overflow: hidden;
  margin-top: 6px;
}

.kpi.hero .meter {
  background: var(--navy-2);
}

.meter i {
  display: block;
  height: 100%;
  background: var(--turq);
  border-radius: 99px;
}

.meter.done i {
  background: var(--gold);
}

/* ─── ro'yxat qatorlari ─── */
.rows {
  display: flex;
  flex-direction: column;
}

.rowi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: inherit;
  min-width: 0;
}

.rows > .rowi:first-child {
  border-top: 0;
}

a.rowi:hover {
  background: var(--soft);
  text-decoration: none;
}

.rowi .main-t {
  flex: 1;
  min-width: 0;
}

.rowi .t1 {
  color: var(--head);
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rowi .t2 {
  font-size: 12.5px;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rowi .side-v {
  text-align: right;
  flex: none;
  font-size: 13px;
}

/* telefon: o'ng ustunli qatorda matn to'liq qatorni oladi, vaqt/holat
   va tugma ostiga tushadi (aks holda sarlavha «Takli…» bo'lib qolardi) */
@media (max-width: 560px) {
  .rowi:has(> .side-v) {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .rowi:has(> .side-v) > .main-t {
    flex: 1 1 calc(100% - 52px);
  }

  .rowi > .side-v {
    margin-left: 44px;
    flex: 1;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
  }
}

.empty {
  padding: 18px 16px;
  color: var(--faint);
  font-size: 13px;
}

.empty-big {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-big p {
  max-width: 34em;
  margin: 0;
}

/* ─── nishonlar ─── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--soft);
  color: var(--text);
}

.chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot, var(--faint));
}

.chip.plain::before {
  display: none;
}

.chip.s-new { --dot: var(--st-new); }
.chip.s-talk { --dot: var(--st-talk); }
.chip.s-offer { --dot: var(--st-offer); }
.chip.s-agreed { --dot: var(--st-agreed); }
.chip.s-paid { --dot: var(--st-paid); }
.chip.s-trip { --dot: var(--st-trip); }
.chip.s-done { --dot: var(--st-done); }
.chip.s-lost {
  --dot: var(--st-lost);
  background: var(--red-soft);
  color: var(--red);
}

.chip.in {
  background: var(--green-soft);
  color: var(--green);
}

.chip.out {
  background: var(--gold-soft);
  color: var(--gold-ink);
}

.chip.warn {
  background: var(--red-soft);
  color: var(--red);
}

.chip.role-owner {
  background: var(--tint);
  color: var(--tink);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--tint);
  color: var(--tink);
  flex: none;
  letter-spacing: 0.02em;
}

.avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.avatar.lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.side .avatar {
  background: var(--primary);
  color: var(--on-primary);
}

.avatar.none {
  background: var(--soft);
  color: var(--faint);
}

/* ─── asboblar paneli ─── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar .grow {
  flex: 1;
}

/* buyurtma filtrlari: kompyuterda oddiy qatorda (o'rami yo'qdek), telefonda bitta suriladigan qator */
.o-filters {
  display: contents;
}

@media (max-width: 560px) {
  .o-filters {
    display: flex;
    flex: 1 1 100%;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -12px;
    padding: 0 12px 2px;
  }

  .o-filters::-webkit-scrollbar {
    display: none;
  }

  .o-filters > * {
    flex: none;
  }

  .o-tools .search {
    flex: 1 1 0;
  }
}

.search {
  position: relative;
  flex: 1 1 220px;
  max-width: 360px;
  min-width: 0;
}

.search svg {
  position: absolute;
  left: 10px;
  top: 10px;
  color: var(--faint);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 11px 0 34px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--head);
}

.search input:focus {
  outline: none;
  border-color: var(--turq);
  box-shadow: 0 0 0 3px var(--tint);
}

.select {
  height: 38px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--head);
  max-width: 220px;
}

/* ─── doska ─── */
.board-wrap {
  overflow-x: auto;
  margin: 0 -28px;
  padding: 0 28px 8px;
}

@media (max-width: 900px) {
  .board-wrap {
    margin: 0 -16px;
    padding: 0 16px 8px;
  }
}

.board {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 60vh;
}

.col-k {
  flex: 0 0 272px;
  background: var(--soft);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 210px);
  border: 2px solid transparent;
  transition: border-color 0.1s, background 0.1s;
}

.col-k.over {
  border-color: var(--turq);
  background: var(--tint);
}

.col-k.lost {
  background: var(--red-soft);
}

.col-k .col-h {
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.col-k .col-h .t {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: var(--head);
}

.col-k .col-h .t i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot);
  flex: none;
}

.col-k .col-h .t span {
  margin-left: auto;
  color: var(--faint);
  font-weight: 600;
  font-size: 12.5px;
}

.col-k .col-h .sum {
  font-size: 12px;
  color: var(--faint);
}

.col-k .list {
  padding: 4px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 60px;
}

.ocard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: inherit;
  cursor: grab;
  box-shadow: 0 1px 1px rgba(14, 42, 46, 0.04);
}

.ocard:hover {
  border-color: var(--border-strong);
  text-decoration: none;
}

.ocard.dragging {
  opacity: 0.45;
}

.ocard .n {
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 600;
  display: flex;
  gap: 6px;
  align-items: center;
}

.ocard .n .avatar {
  margin-left: auto;
}

.ocard .ttl {
  color: var(--head);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ocard .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--faint);
}

.ocard .meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ocard .meta svg {
  width: 13px;
  height: 13px;
}

.ocard .foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.ocard .foot .money {
  color: var(--head);
  font-weight: 600;
}

.ocard .next {
  font-size: 12px;
  color: var(--text);
  background: var(--soft);
  border-radius: 6px;
  padding: 4px 7px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.ocard .next.late {
  background: var(--red-soft);
  color: var(--red);
}

.ocard .next svg {
  width: 13px;
  height: 13px;
}

.col-more {
  text-align: center;
  font-size: 12.5px;
  padding: 4px 0 2px;
}

/* ─── jadval ─── */
.tbl-wrap {
  overflow-x: auto;
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--faint);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--card);
}

.tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.tbl tr:last-child td {
  border-bottom: 0;
}

.tbl tr.click {
  cursor: pointer;
}

.tbl tr.click:hover td {
  background: var(--soft);
}

.tbl .r {
  text-align: right;
}

.tbl .t1 {
  color: var(--head);
  font-weight: 550;
}

.tbl .t2 {
  color: var(--faint);
  font-size: 12px;
}

.tbl .cell-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.tbl tfoot td {
  font-weight: 650;
  color: var(--head);
  border-top: 1px solid var(--border-strong);
}

/* ─── telefon: jadval qatori → kartochka (2026-11-25) ───
   katak joyi: m-1 asosiy (chapda) · m-r o'ngda · m-3 pastki qatorda · m-x yashirin.
   tr::before — qator uzgich: m-1/m-r yuqorida, qolgani ostida. */
@media (max-width: 560px) {
  .tbl.mc thead {
    display: none;
  }

  .tbl.mc,
  .tbl.mc tbody {
    display: block;
    width: 100%;
  }

  .tbl.mc tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }

  .tbl.mc tr:last-child {
    border-bottom: 0;
  }

  .tbl.mc tr::before {
    content: '';
    order: 2;
    flex-basis: 100%;
    height: 0;
  }

  .tbl.mc td {
    display: block;
    padding: 0;
    border: 0;
    order: 3;
    font-size: 12.5px;
    text-align: left;
  }

  .tbl.mc td.m-1 {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    font-size: 14px;
  }

  .tbl.mc td.m-r {
    order: 1;
    flex: none;
    text-align: right;
    font-size: 14px;
  }

  .tbl.mc td.m-x {
    display: none;
  }

  /* amal tugmasi (o'chirish) — yuqori qatorda, summa yonida: pastda yolg'iz qatorga tushmasin */
  .tbl.mc td.m-act {
    order: 1;
    flex: none;
    margin-right: -8px;
  }

  .tbl.mc td.m-grow {
    flex: 1 1 0;
    width: auto !important;
  }

  .tbl.mc td[data-l]::before {
    content: attr(data-l);
    color: var(--faint);
  }

  .tbl.mc .cell-name {
    min-width: 0 !important;
  }

  .tbl.mc .cell-name > div,
  .tbl.mc .t1 {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .tbl.mc tr.click:hover td {
    background: none;
  }

  .tbl.mc tr.click:active {
    background: var(--soft);
  }

  /* barmoq uchun: kichik tugma va segmentlar ~40px */
  .btn.sm {
    height: 38px;
    padding: 0 12px;
  }

  .btn.icon.sm {
    width: 38px;
  }

  .seg button,
  .seg label span {
    min-height: 40px;
    padding: 9px 14px;
  }

  .tabs button {
    min-height: 40px;
  }

  .lang-select,
  .theme-btn {
    height: 40px;
  }

  .theme-btn {
    width: 40px;
  }

  .demo-bar .link {
    min-height: 36px;
  }

  .tbl.mc td.m-1 a.t1 {
    display: inline-block;
    padding: 4px 0;
  }
}


/* ─── buyurtma sahifasi ─── */
.crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--faint);
  flex-wrap: wrap;
}

.ohead {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ohead .tt {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ohead h1 {
  font-size: 24px;
  overflow-wrap: anywhere;
}

.ohead .sub {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 13px;
}

.ohead .acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stepper {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.step {
  flex: 1 0 auto;
  min-width: 96px;
  border: 0;
  background: var(--soft);
  color: var(--faint);
  padding: 9px 12px;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step::before {
  content: '';
  height: 3px;
  border-radius: 3px;
  background: var(--border-strong);
}

.step.past {
  color: var(--text);
}

.step.past::before {
  background: var(--turq);
}

.step.cur {
  background: var(--tint);
  color: var(--tink);
}

.step.cur::before {
  background: var(--tink);
}

.step:hover {
  color: var(--head);
}

.step:disabled {
  cursor: default;
}

.stepper.lost .step {
  opacity: 0.55;
}

.dl {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  gap: 9px 16px;
  font-size: 13.5px;
  margin: 0;
}

.dl dt {
  color: var(--faint);
}

.dl dd {
  margin: 0;
  color: var(--head);
  min-width: 0;
  overflow-wrap: anywhere;
}

.money-box {
  display: flex;
  flex-direction: column;
}

.mline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px dashed var(--border);
  font-size: 13.5px;
}

.mline:first-child {
  border-top: 0;
}

.mline b {
  color: var(--head);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mline.big b {
  font-size: 17px;
}

.mline.due b {
  color: var(--red);
}

.mline.ok b {
  color: var(--green);
}

.mline.profit {
  border-top: 1px solid var(--border-strong);
  margin-top: 4px;
  padding-top: 10px;
}

.next-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  flex-wrap: wrap;
}

.next-card .nt {
  flex: 1 1 200px;
  min-width: 0;
}

.next-card .nt b {
  display: block;
  color: var(--head);
  font-weight: 600;
}

.next-card.late {
  border-color: var(--red);
  background: var(--red-soft);
}

.next-card .ico-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--tint);
  color: var(--tink);
  display: grid;
  place-items: center;
  flex: none;
}

.next-card.late .ico-box {
  background: var(--card);
  color: var(--red);
}

.timeline {
  display: flex;
  flex-direction: column;
  padding: 0 16px 12px;
}

.tl {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.tl:first-child {
  border-top: 0;
}

.tl .who {
  color: var(--head);
  font-weight: 600;
}

.tl .when {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}

.tl .body {
  flex: 1;
  min-width: 0;
}

.tl .notebox {
  margin-top: 4px;
  background: var(--gold-soft);
  color: var(--head);
  padding: 7px 10px;
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-form {
  display: flex;
  gap: 8px;
  padding: 8px 16px 16px;
  align-items: flex-end;
}

.note-form textarea {
  flex: 1;
  min-height: 42px;
  max-height: 220px;
  field-sizing: content;
  line-height: 1.45;
  resize: vertical;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--head);
}

.note-form textarea:focus {
  outline: none;
  border-color: var(--turq);
  box-shadow: 0 0 0 3px var(--tint);
}

/* ─── hisobot ─── */
.chart {
  width: 100%;
  height: auto;
  display: block;
}

.chart text {
  fill: var(--faint);
  font-size: 11px;
  font-family: inherit;
}

.chart .grid-l {
  stroke: var(--border);
}

.chart .b-in {
  fill: var(--bar-in);
}

.chart .b-out {
  fill: var(--bar-out);
}

.legend {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
  color: var(--faint);
  flex-wrap: wrap;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}

.legend .l-in {
  background: var(--bar-in);
}

.legend .l-out {
  background: var(--bar-out);
}

.hbar {
  height: 6px;
  background: var(--soft);
  border-radius: 99px;
  overflow: hidden;
  min-width: 60px;
}

.hbar i {
  display: block;
  height: 100%;
  background: var(--turq);
  border-radius: 99px;
}

/* ─── oyna ─── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 16px;
  overflow-y: auto;
}

.dialog {
  background: var(--card);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.dialog.sm {
  max-width: 420px;
}

.dialog-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 6px;
}

.dialog-h h2 {
  flex: 1;
}

.dialog-b {
  padding: 12px 20px 8px;
}

.dialog-f {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 18px;
  flex-wrap: wrap;
}

.dialog-f .left {
  margin-right: auto;
}

@media (max-width: 560px) {
  .modal-bg {
    padding: 0;
    align-items: flex-end;
  }

  .dialog {
    border-radius: 16px 16px 0 0;
    max-height: 94vh;
    overflow-y: auto;
  }

  /* uzun formada sarlavha (yopish) tepada, «Saqlash» pastda qotib turadi */
  .dialog-h {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card);
    padding-bottom: 10px;
  }

  .dialog-f {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding-bottom: calc(12px + var(--safe-b));
  }
}

/* ─── xabarcha ─── */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.toast {
  background: var(--navy);
  color: var(--on-dark);
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  font-size: 13.5px;
  display: flex;
  gap: 10px;
  align-items: center;
  animation: up 0.18s ease-out;
}

.toast.bad {
  background: var(--red);
  color: #ffffff;
}

.toast svg {
  color: var(--on-dark-accent);
}

.toast.bad svg {
  color: #ffffff;
}

@keyframes up {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

.loading-line {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--faint);
  padding: 40px 0;
  justify-content: center;
}

.err-page {
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tabs button {
  border: 1px solid var(--border-strong);
  background: var(--card);
  border-radius: 99px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 550;
  color: var(--text);
}

.tabs button.on {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--on-dark);
}

.month-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.month-nav b {
  min-width: 140px;
  text-align: center;
  color: var(--head);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 960px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ─── Excel / CSV dan mijozlar ─── */
.row-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--head);
  text-align: center;
  cursor: pointer;
}

.drop svg {
  width: 26px;
  height: 26px;
  color: var(--tink);
}

.drop .t1 {
  font-weight: 600;
}

.drop:hover {
  border-color: var(--turq);
  background: var(--tint);
}

.drop:focus-within {
  outline: 2px solid var(--turq);
  outline-offset: 2px;
}

.drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop.busy {
  cursor: progress;
  opacity: 0.7;
}

.imp-tips {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.imp-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}

.imp-file svg {
  width: 18px;
  height: 18px;
  color: var(--tink);
  flex: none;
}

.imp-file .t1 {
  font-weight: 600;
  color: var(--head);
  overflow-wrap: anywhere;
  min-width: 0;
}

.imp-file .link {
  margin-left: auto;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--head);
  cursor: pointer;
}

.check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--primary);
}

.imp-h {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--head);
}

.imp-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 12px;
}

.imp-stats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.imp-stats li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
}

.imp-stats svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}

.imp-stats .ok {
  color: var(--green);
  font-weight: 600;
}

.imp-stats .bad {
  color: var(--red);
  font-weight: 600;
}

@media (max-width: 560px) {
  .imp-map {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ═══════════ TURAVA'dagi turlar ═══════════ */
.tr-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.tr-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tr-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tr-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
}

.tr-list svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--green);
}

/* so'rov qatori: matn ko'p qatorli, tugmalar tepada */
.rowi.tr-req {
  align-items: flex-start;
  padding-block: 12px;
}

.tr-req .main-t {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tr-req-h {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tr-req-h .t1 {
  min-width: 0;
}

.tr-req-h .chip {
  flex: none;
}

.tr-who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  min-width: 0;
}

.tr-who b {
  color: var(--head);
  font-weight: 600;
}

.tr-who a {
  overflow-wrap: anywhere;
}

.tr-req .muted.small svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
}

.tr-note {
  margin: 2px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--text);
  font-size: 13px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.tr-acts {
  display: flex;
  gap: 8px;
  flex: none;
}

/* mening sayohatlarim */
.tr-trips {
  display: flex;
  flex-direction: column;
}

.tr-trip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  min-width: 0;
}

.tr-trips > .tr-trip:first-child {
  border-top: 0;
}

.tr-trip-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tr-trip-h b {
  color: var(--head);
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tr-trip-h .chip {
  flex: none;
}

.tr-deps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tr-dep {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-variant-numeric: tabular-nums;
}

.tr-dep svg {
  width: 15px;
  height: 15px;
  color: var(--faint);
  flex: none;
}

.tr-dep b {
  color: var(--head);
  font-weight: 550;
}

.tr-linkrow {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.tr-linkrow .input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
}

.tr-linkrow .btn {
  flex: none;
}

/* yangi sayohat — suratlar */
.tr-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.tr-ph {
  position: relative;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--border);
}

.tr-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tr-ph.add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-style: dashed;
  border-color: var(--border-strong);
  color: var(--faint);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.tr-ph.add:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.tr-ph.add svg {
  width: 18px;
  height: 18px;
}

.tr-cover {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--on-dark);
  font-size: 11px;
  font-weight: 600;
}

.tr-ph-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--overlay);
  color: var(--on-dark);
  cursor: pointer;
}

.tr-ph-x svg {
  width: 14px;
  height: 14px;
}

/* yangi sayohat — sanalar */
.tr-dateadd {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tr-dateadd .input {
  flex: 1 1 160px;
  min-width: 0;
}

.tr-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tr-dates:empty {
  display: none;
}

.tr-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--tink);
  font-size: 13px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.tr-date button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.tr-date button:hover {
  background: var(--card);
}

.tr-date svg {
  width: 13px;
  height: 13px;
}

.tr-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.tr-rules {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--text);
  font-size: 13px;
}

.tr-rules b {
  color: var(--head);
}

.tr-rules ul {
  margin: 6px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 560px) {
  .rowi.tr-req {
    flex-wrap: wrap;
  }

  .tr-req .main-t {
    flex: 1 1 100%;
  }

  .tr-acts {
    flex: 1 1 100%;
  }

  .tr-acts .btn {
    flex: 1;
    justify-content: center;
  }

  .tr-linkrow {
    flex-wrap: wrap;
  }

  .tr-linkrow .input {
    flex: 1 1 100%;
  }
}

.tr-who a svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
}

/* ═══════════ Zayavkalar — Telegram suhbatlari (2026-11-25) ═══════════ */
.ib {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr) 240px;
  gap: 14px;
  flex: 1;
  min-height: 420px;
}

.ib:not(.has-sel) {
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
}

.ib-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ib-seg {
  margin: 12px 12px 8px;
  display: flex;
  flex-wrap: nowrap;
}

.ib-seg button {
  flex: 1 1 auto;
  justify-content: center;
  padding: 6px 8px;
  font-size: 12.5px;
  white-space: nowrap;
}

.ib-seg .badge,
.ib-item-m .badge {
  background: var(--turq);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 0 6px;
  line-height: 17px;
  min-width: 17px;
  text-align: center;
}

.ib-items {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.ib-items .empty {
  padding: 24px 16px;
}

.ib-item {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  align-items: flex-start;
}

.ib-item:hover {
  background: var(--soft);
}

.ib-item.on {
  background: var(--tint);
}

.ib-item .avatar {
  margin-top: 2px;
}

.ib-item-b {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ib-item-t {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.ib-item-t b {
  color: var(--head);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ib-item.unread .ib-item-t b {
  font-weight: 750;
}

.ib-item-s {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ib-item.unread .ib-item-s {
  color: var(--head);
}

.ib-item-m {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  font-size: 11.5px;
  color: var(--faint);
}

.ib-item-m .badge {
  margin-left: auto;
}

.ib-item-m .chip {
  height: 20px;
  font-size: 11px;
  padding: 0 8px;
  margin-left: 4px;
}

.ib-when {
  flex: none;
  font-size: 11.5px;
  color: var(--faint);
}

/* suhbat ekrani oynani to'ldiradi: sahifa emas, ro'yxat va xabarlar o'zi aylanadi */
.shell:has(.ib) .main {
  height: 100dvh;
}

.page:has(> .ib) {
  flex: 1;
  min-height: 0;
  padding: 16px 20px 20px;
  max-width: none;
}

.ico.xs {
  width: 14px;
  height: 14px;
}

.ico.sm {
  width: 16px;
  height: 16px;
}

.chip.ib-wait {
  --dot: var(--gold);
  background: var(--gold-soft);
  color: var(--gold-ink);
}

.chip.ib-late {
  --dot: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

/* suhbat */
.ib-thread {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.ib-th {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.ib-th .grow {
  flex: 1;
}

.ib-th-b {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ib-th-b b,
.ib-th-b .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ib-th-b b {
  color: var(--head);
}

.ib-th .btn {
  flex: none;
}

.ib-back {
  display: none;
}

.ib-msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}

.ib-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(78%, 560px);
  align-self: flex-start;
}

.ib-msg.out {
  align-self: flex-end;
  align-items: flex-end;
}

.ib-bubble {
  padding: 9px 12px;
  border-radius: 14px 14px 14px 4px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--head);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ib-bubble svg {
  vertical-align: -2px;
  margin-right: 5px;
}

.ib-msg.out .ib-bubble {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  border-radius: 14px 14px 4px 14px;
}

.ib-tr {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ib-tr svg {
  color: var(--faint);
  margin-top: 2px;
}

.ib-meta {
  font-size: 11.5px;
  color: var(--faint);
}

.ib-draft {
  align-self: stretch;
  border: 1px dashed var(--gold);
  background: var(--gold-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ib-draft-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--gold-ink);
}

.ib-draft-h .chip {
  background: var(--card);
}

.ib-draft-h .chip::before {
  display: none;
}

.ib-draft-r {
  color: var(--head);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ib-draft .row-btns {
  flex-wrap: wrap;
}

.ib-tools > :last-child {
  margin-left: auto;
}

.ib-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px 0;
  border-top: 1px solid var(--border);
}

.ib-compose {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  align-items: flex-end;
}

.ib-compose textarea {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 200px;
  field-sizing: content;
  line-height: 1.45;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--head);
  font: inherit;
}

.ib-compose textarea:focus {
  outline: none;
  border-color: var(--turq);
  box-shadow: 0 0 0 3px var(--tint);
}

.ib-compose .btn {
  height: 44px;
  flex: none;
}

/* o'ng ustun */
.ib-side {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: start;
  min-width: 0;
}

.lbl-up {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  min-width: 0;
}

.kv span {
  color: var(--faint);
  flex: none;
}

.kv b {
  color: var(--head);
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}

.ib-none {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 32px;
}

.ib-none p {
  margin: 0;
}

/* ulash */
.ib-connect {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ib-connect h2 {
  margin: 0;
  color: var(--head);
  font-size: 22px;
  text-wrap: balance;
}

.ib-connect > p {
  margin: 0;
  line-height: 1.55;
}

.ib-steps {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ib-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.5;
  color: var(--head);
}

.step-n {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.ib-token {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.ib-token input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ib-token .btn {
  align-self: flex-start;
}

.ib-token p {
  margin: 0;
  display: flex;
  gap: 6px;
  align-items: center;
}

@media (max-width: 1180px) {
  .ib,
  .ib.has-sel,
  .ib:not(.has-sel) {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }

  .ib-side {
    display: none;
  }
}

@media (max-width: 900px) {
  .ib,
  .ib.has-sel,
  .ib:not(.has-sel) {
    grid-template-columns: minmax(0, 1fr);
    min-height: 360px;
  }

  .page:has(> .ib) {
    padding: 12px 12px calc(12px + var(--tabbar-h) + var(--safe-b));
  }

  .ib.has-sel .ib-list,
  .ib:not(.has-sel) .ib-none {
    display: none;
  }

  .ib-back {
    display: inline-flex;
  }

  .ib-msg {
    max-width: 88%;
  }

  .ib-connect {
    padding: 24px 18px;
  }
}
