/* Manrope (SIL OFL 1.1) — o'zimizda saqlanadi, Google Fonts'ga bog'liq emas */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-cyrillic-wght-normal.e58febde317b.woff2") format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.6d36d5bdedfa.woff2") format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.938c6e8019b6.woff2") format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* nonbook — ranglar. Barcha ranglar shu yerda: yorug' va qorong'i mavzu.
   Matn va fon juftliklari WCAG AA (kamida 4.5:1) talabiga mos tekshirilgan. */
:root {
  color-scheme: light;
  --bg: #F8F4EC;
  --bg-desk: #EDE6DA;
  --card: #FFFDF9;
  --hover: #FBF7F0;
  --seg: #EDE5D8;
  --seg-on: #FFFFFF;
  --line: #D8D0C3;
  --line-soft: #F0E9DE;
  --line-strong: #CFC6B9;
  --ink: #1A1815;
  --muted: #5F584F;
  --faint: #71695F;
  --accent: #A84F04;
  --accent-dark: #8C4000;
  --accent-soft: #F5E7D6;
  --accent-line: #E8CFB1;
  --on-accent: #FFFFFF;
  --ring: var(--ring);
  --green: #0E7A45;
  --green-soft: #E1F1E7;
  /* "Issiq tandir": asosiy tugmalar va kartadagi gradientlar (oq yozuv bilan kontrast >= 4.5:1) */
  --accent-grad: linear-gradient(180deg, #BA5C08 0%, #A84F04 100%);
  --accent-edge: #7A3A02;
  --accent-glow: rgba(168, 79, 4, 0.26);
  --green-grad: linear-gradient(180deg, #0F8048 0%, #0B6A3B 100%);
  --green-edge: #08532E;
  --green-glow: rgba(14, 122, 69, 0.24);
  --hero-grad: radial-gradient(120% 90% at 100% 0%, rgba(238, 154, 69, 0.20) 0%, rgba(238, 154, 69, 0) 55%), linear-gradient(150deg, #2F251D 0%, #1C1714 100%);
  --hero-line: rgba(238, 154, 69, 0.30);
  --hero-shadow: 0 10px 28px rgba(60, 35, 10, 0.20);
  --on-green: #FFFFFF;
  --red: #B42318;
  --red-soft: #FCEBE9;
  --red-line: #F2C7C2;
  --on-red: #FFFFFF;
  --warn: #5C4300;
  --warn-soft: #FFEDB0;
  --warn-line: #F0D67A;
  --info: #2B4E8C;
  --info-soft: #E8EEF9;
  --dark: #26221D;
  --dark-2: #37312A;
  --dark-line: #4A4239;
  --dark-muted: #D8CEC1;
  --on-dark: #FFFFFF;
  --dark-green: #8FD9A9;
  --dark-red: #FF94A8;
  --dark-amber: #F2C48D;
  --toast: #1A1815;
  --on-toast: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.14);
  --overlay: rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --nav-h: 68px;
}
/* Qorong'i mavzu: telefon sozlamasi bo'yicha (agar foydalanuvchi o'zi "Yorug'" ni tanlamagan bo'lsa) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #121110;
  --bg-desk: #0C0B0A;
  --card: #1C1A17;
  --hover: #24211D;
  --seg: #26231F;
  --seg-on: #3A352F;
  --line: #3A352F;
  --line-soft: #282521;
  --line-strong: #4A443D;
  --ink: #F3EFE9;
  --muted: #B5ACA0;
  --faint: #9A9085;
  --accent: #E59A4E;
  --accent-dark: #F2B27A;
  --accent-soft: #3A2A1A;
  --accent-line: #5A3F22;
  --on-accent: #1A1006;
  --ring: rgba(229, 154, 78, 0.3);
  --green: #5CCB8F;
  --green-soft: #17301F;
  --accent-grad: linear-gradient(180deg, #F2A552 0%, #E5913E 100%);
  --accent-edge: #9A5A1C;
  --accent-glow: rgba(229, 154, 78, 0.28);
  --green-grad: linear-gradient(180deg, #6AD49B 0%, #52C083 100%);
  --green-edge: #2E7A52;
  --green-glow: rgba(92, 203, 143, 0.22);
  --hero-grad: radial-gradient(120% 90% at 100% 0%, rgba(238, 154, 69, 0.18) 0%, rgba(238, 154, 69, 0) 55%), linear-gradient(150deg, #2A221B 0%, #1A1613 100%);
  --hero-line: rgba(238, 154, 69, 0.28);
  --hero-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  --on-green: #07150D;
  --red: #FF7A93;
  --red-soft: #3A1A24;
  --red-line: #5E2A3A;
  --on-red: #1A0605;
  --warn: #F7D560;
  --warn-soft: #33290A;
  --warn-line: #5A4A14;
  --info: #9FBAF2;
  --info-soft: #1C2740;
  --dark: #24211D;
  --dark-2: #302B26;
  --dark-line: #3E3832;
  --dark-muted: #C9BFB2;
  --on-dark: #F3EFE9;
  --dark-green: #8FD9A9;
  --dark-red: #FF94A8;
  --dark-amber: #F2C48D;
  --toast: #F3EFE9;
  --on-toast: #1A1815;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.6);
  --overlay: rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121110;
  --bg-desk: #0C0B0A;
  --card: #1C1A17;
  --hover: #24211D;
  --seg: #26231F;
  --seg-on: #3A352F;
  --line: #3A352F;
  --line-soft: #282521;
  --line-strong: #4A443D;
  --ink: #F3EFE9;
  --muted: #B5ACA0;
  --faint: #9A9085;
  --accent: #E59A4E;
  --accent-dark: #F2B27A;
  --accent-soft: #3A2A1A;
  --accent-line: #5A3F22;
  --on-accent: #1A1006;
  --ring: rgba(229, 154, 78, 0.3);
  --green: #5CCB8F;
  --green-soft: #17301F;
  --accent-grad: linear-gradient(180deg, #F2A552 0%, #E5913E 100%);
  --accent-edge: #9A5A1C;
  --accent-glow: rgba(229, 154, 78, 0.28);
  --green-grad: linear-gradient(180deg, #6AD49B 0%, #52C083 100%);
  --green-edge: #2E7A52;
  --green-glow: rgba(92, 203, 143, 0.22);
  --hero-grad: radial-gradient(120% 90% at 100% 0%, rgba(238, 154, 69, 0.18) 0%, rgba(238, 154, 69, 0) 55%), linear-gradient(150deg, #2A221B 0%, #1A1613 100%);
  --hero-line: rgba(238, 154, 69, 0.28);
  --hero-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  --on-green: #07150D;
  --red: #FF7A93;
  --red-soft: #3A1A24;
  --red-line: #5E2A3A;
  --on-red: #1A0605;
  --warn: #F7D560;
  --warn-soft: #33290A;
  --warn-line: #5A4A14;
  --info: #9FBAF2;
  --info-soft: #1C2740;
  --dark: #24211D;
  --dark-2: #302B26;
  --dark-line: #3E3832;
  --dark-muted: #C9BFB2;
  --on-dark: #F3EFE9;
  --dark-green: #8FD9A9;
  --dark-red: #FF94A8;
  --dark-amber: #F2C48D;
  --toast: #F3EFE9;
  --on-toast: #1A1815;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.6);
  --overlay: rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.app.with-nav { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.app.with-action { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- yuqori qism ---------- */
.topbar { padding: 20px 20px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar .sub { font-size: 14px; color: var(--muted); font-weight: 600; }
.topbar h1 { font-size: 22px; font-weight: 800; }
.subbar { padding: 10px 8px 6px; display: flex; align-items: center; gap: 4px; }
.subbar h1 { font-size: 19px; font-weight: 800; flex: 1; min-width: 0; }
.subbar .sub { font-size: 13px; color: var(--muted); }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 22px; color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.icon-btn.outlined { border: 1px solid var(--line); background: var(--card); }
.avatar {
  width: 44px; height: 44px; border-radius: 22px; flex: none; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
}
.avatar.green { background: var(--green-soft); color: var(--green); }
.avatar.square { border-radius: 12px; }

.page { flex: 1; padding: 0 16px 20px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- kartalar ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card.pad { padding: 14px 16px; }
.hero { background: var(--hero-grad), var(--dark); color: var(--on-dark); border: 1px solid var(--hero-line); box-shadow: var(--hero-shadow); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.hero .label { font-size: 14px; color: var(--dark-muted); font-weight: 600; }
.hero .big { font-size: clamp(26px, 9vw, 34px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; white-space: nowrap; }
.hero .big small { font-size: 15px; font-weight: 600; color: var(--dark-muted); opacity: 0.85; letter-spacing: 0; }
.hero .tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.hero .tile { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero .tile span:first-child { font-size: 12px; color: var(--dark-muted); font-weight: 600; }
.hero .tile b { font-size: clamp(11px, 3.6vw, 14px); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero .foot { border-top: 1px solid var(--dark-line); padding-top: 12px; display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.t-green { color: var(--dark-green); }
.t-red { color: var(--dark-red); }
.t-amber { color: var(--dark-amber); }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat-grid > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.stat .s { font-size: 13px; color: var(--muted); }

/* ---------- ro'yxatlar ---------- */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; }
.row {
  padding: 12px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-soft);
  color: var(--ink); text-decoration: none; min-height: 56px;
}
.row:last-child { border-bottom: 0; }
a.row:hover, a.row:active { background: var(--hover); color: var(--ink); }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .title { font-size: 16px; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.row .meta { font-size: 13px; color: var(--muted); }
.row .end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; }
.row .amount { font-size: 16px; font-weight: 800; white-space: nowrap; }
.amount, .big, .stat .v, .kv b, .sub-amount, .money-box input, .qty { font-variant-numeric: tabular-nums lining-nums; }
.row.cancelled .title, .row.cancelled .amount { text-decoration: line-through; color: var(--faint); }
.ev-icon { width: 36px; height: 36px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; }
.ev-icon.pay { background: var(--green-soft); color: var(--green); }
.ev-icon.give { background: var(--accent-soft); color: var(--accent); }
.ev-icon.ret { background: var(--bg); color: var(--muted); }
.check { width: 24px; height: 24px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; }
.check.on { background: var(--green); color: var(--on-green); }
.check.off { border: 2px solid var(--faint); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.section-head h2 { font-size: 16px; font-weight: 800; }
.section-head .side { font-size: 14px; color: var(--muted); font-weight: 600; }
.day-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.badge.ok { color: var(--green); background: var(--green-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-line); }
.badge.bad { color: var(--red); background: var(--red-soft); }
.badge.gray { color: var(--muted); background: var(--bg); }
.debt { color: var(--red); }
.good { color: var(--green); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); padding: 0 4px; margin: 0; }

/* ---------- tugmalar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { color: var(--ink); filter: brightness(0.98); }
.btn.primary, .action.primary { background: var(--accent-grad); border-color: transparent; color: var(--on-accent);
  box-shadow: 0 2px 0 var(--accent-edge), 0 6px 14px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.btn.success, .action.success { background: var(--green-grad); border-color: transparent; color: var(--on-green);
  box-shadow: 0 2px 0 var(--green-edge), 0 6px 14px var(--green-glow), inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.btn.primary, .btn.success { min-height: 52px; }
.btn.sm.primary, .btn.sm.success { min-height: 36px; box-shadow: 0 1px 0 var(--accent-edge); }
.btn.primary:hover, .action.primary:hover { color: var(--on-accent); filter: brightness(1.05); }
.btn.success:hover, .action.success:hover { color: var(--on-green); filter: brightness(1.05); }
.btn.primary:active, .action.primary:active { transform: translateY(2px); box-shadow: 0 0 0 var(--accent-edge), 0 2px 6px var(--accent-glow); }
.btn.success:active, .action.success:active { transform: translateY(2px); box-shadow: 0 0 0 var(--green-edge), 0 2px 6px var(--green-glow); }
@media (prefers-reduced-motion: no-preference) { .btn, .action { transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease; } }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.t-success { color: var(--green); }
.btn.t-danger { color: var(--red); }
.btn.block { width: 100%; }
.btn.lg { min-height: 54px; font-size: 16px; font-weight: 800; border-radius: 16px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 800; font-size: 14px; min-height: 44px; padding: 0 4px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.link-btn.danger { color: var(--red); }

.actions-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.actions-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.actions-row:has(> :nth-child(3)) .action { font-size: 13px; padding: 12px 4px; }
.actions-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.actions-1 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.actions-1 .action { flex-direction: row; justify-content: center; min-height: 56px; gap: 10px; }
.action {
  text-decoration: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; font-weight: 700;
}
.action:hover { color: var(--ink); }
.action.row-style { flex-direction: row; justify-content: center; min-height: 56px; padding: 0 8px; font-size: 16px; font-weight: 800; }

.sticky-action {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.sticky-action > * { max-width: 488px; margin: 0 auto; }

/* ---------- formalar ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-size: 14px; color: var(--muted); font-weight: 700; }
.input, select.input {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: 16px; background: var(--card); color: var(--ink); outline: none;
}
textarea.input { min-height: 72px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.input-lg { font-size: 20px; font-weight: 700; min-height: 56px; }
.money-box {
  display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--accent);
  border-radius: 14px; padding: 0 14px; min-height: 58px;
}
.money-box input { border: 0; outline: none; background: transparent; font-size: 24px; font-weight: 800; flex: 1; min-width: 0; width: 100%; }
.money-box .unit { font-size: 15px; color: var(--muted); font-weight: 700; }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--red); font-size: 14px; font-weight: 600; }
.alert { border-radius: 12px; padding: 10px 14px; font-size: 15px; font-weight: 600; }
.alert.error { background: var(--red-soft); color: var(--red); }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.checkbox-row input { width: 22px; height: 22px; accent-color: var(--green); }

/* segment (radio guruh) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; background: var(--seg); border-radius: 14px; padding: 4px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px; font-size: 14px;
  font-weight: 700; text-align: center; padding: 0 4px; line-height: 1.15;
}
.seg span.two { flex-direction: column; gap: 2px; min-height: 52px; }
.seg span.two small { font-size: 13px; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--seg-on); color: var(--accent); font-weight: 800; box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.seg a { display: flex; align-items: center; justify-content: center; min-height: 36px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; }
.seg a.on { background: var(--seg-on); color: var(--accent); font-weight: 800; box-shadow: var(--shadow-sm); }
.seg button { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 6px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--seg-on); color: var(--accent); font-weight: 800; box-shadow: var(--shadow-sm); }
.seg.seg-2 { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* chiplar (xarajat turi, filtr) */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip-grid label { position: relative; }
.chip-grid input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-grid span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); font-size: 15px; font-weight: 700; padding: 4px; line-height: 1.15;
}
.chip-grid input:checked + span { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.chip-grid input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* non soni */
.bread-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.bread-row:last-child { border-bottom: 0; }
.bread-row .name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bread-row .name b { font-size: 16px; }
.bread-row .name small { font-size: 13px; color: var(--muted); }
.bread-row .name small.custom { color: var(--accent); font-weight: 600; }
.step { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 24px; font-weight: 700; cursor: pointer; flex: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.step.plus { border: 0; background: var(--accent); color: var(--on-accent); }
/* Son maydoni — qo'lda yozish mumkinligi ko'rinib tursin (ramka, raqam klaviaturasi) */
.qty { width: 72px; height: 48px; border: 1.5px solid var(--line); text-align: center; font-size: 20px; font-weight: 800; background: var(--card); outline: none; border-radius: 12px; color: var(--ink); }
.qty:focus { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.qty.zero { color: var(--faint); }
.ret-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ret-cell { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--bg); border-radius: 10px; padding: 0 4px 0 12px; min-height: 44px; font-size: 15px; font-weight: 700; }
.ret-cell input { width: 46px; height: 40px; border: 0; background: transparent; text-align: right; font-size: 17px; font-weight: 800; outline: none; }
.sum-lines { display: flex; flex-direction: column; gap: 4px; padding: 2px 4px; font-size: 15px; }
.sum-lines div { display: flex; justify-content: space-between; gap: 8px; }
.sum-lines span { color: var(--muted); font-weight: 600; }
.sum-lines b { font-weight: 700; white-space: nowrap; }
.sum-lines .total { border-top: 1px dashed var(--line-strong); padding-top: 6px; margin-top: 2px; }
.sum-lines [hidden] + .total { border-top: 0; padding-top: 0; margin-top: 0; }
.sum-lines .total span { color: var(--ink); font-weight: 800; }
.sum-lines .total b { font-weight: 800; font-size: 17px; }

.partner-pick {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px 14px; min-height: 58px;
}
.partner-pick select { border: 0; background: transparent; font-size: 16px; font-weight: 800; flex: 1; min-width: 0; outline: none; padding: 8px 0; }

.price-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.price-tag { font-size: 13px; font-weight: 700; background: var(--bg); border-radius: 8px; padding: 5px 9px; }
.price-tag.custom { background: var(--accent-soft); color: var(--accent); }

/* ---------- pastki menyu ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav .inner { max-width: 520px; margin: 0 auto; display: flex; height: var(--nav-h); padding: 4px 8px 8px; }
.bottom-nav a {
  flex: 1; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.bottom-nav a.on { color: var(--accent); font-weight: 800; }

/* ---------- xabarlar ---------- */
.toasts { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  max-width: 496px; width: 100%; background: var(--toast); color: var(--on-toast); border-radius: 12px; padding: 12px 16px; font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-md); animation: toast-in 0.2s ease-out; pointer-events: auto;
}
.toast.error { background: var(--red); }
.toast.hide { opacity: 0; transition: opacity 0.4s; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

.empty { text-align: center; padding: 28px 16px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty b { color: var(--ink); font-size: 16px; }

/* ---------- kirish ---------- */
.auth { max-width: 420px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 48px 24px 32px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.brand .mark { width: 64px; height: 64px; border-radius: 20px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.brand h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.3px; }
.brand p { margin: 0; font-size: 15px; color: var(--muted); }
.pin-input {
  width: 100%; min-height: 64px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: center;
  font-size: 32px; font-weight: 800; letter-spacing: 18px; padding-left: 18px; outline: none;
}
.pin-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.phone-card { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* hisobot satrlari */
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; padding: 4px 0; }
.kv span { font-weight: 600; }
.kv > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.kv b { font-weight: 700; text-align: right; }
.bar { height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; margin-top: 2px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

details.more summary { cursor: pointer; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }

@media (min-width: 560px) {
  body { background: var(--bg-desk); }
  .app { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
}


/* ---------- qo'shimchalar (audit) ---------- */
.money-box:focus-within, .partner-pick:focus-within { box-shadow: 0 0 0 3px var(--ring); border-color: var(--accent); }
.ret-cell:focus-within { box-shadow: 0 0 0 2px var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input:focus-visible, .qty:focus-visible { outline: none; }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 8px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.tag.edited { background: var(--info-soft); color: var(--info); }
.tag.cancel { background: var(--red-soft); color: var(--red); }
.row .chev { color: var(--faint); flex: none; }
.row .sub-amount { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.btn.outline-danger { color: var(--red); border-color: var(--red-line); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > * { flex: 1 1 140px; }
.detail { display: flex; flex-direction: column; }
.detail .kv { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.detail .kv:last-child { border-bottom: 0; }
.detail .kv span { color: var(--muted); }
.code-box { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; background: var(--dark); color: var(--on-dark); border-radius: 18px; padding: 18px; }
.code-box .code { font-size: 38px; font-weight: 800; letter-spacing: 8px; padding-left: 8px; font-variant-numeric: tabular-nums; }
.code-box small { color: var(--dark-muted); font-size: 14px; }
.log-item { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; }
.log-item:last-child { border-bottom: 0; }
.log-item .head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.log-item .body { font-size: 14px; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 48px; }
.search-box input { border: 0; outline: none; flex: 1; font-size: 16px; background: transparent; min-height: 46px; min-width: 0; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.picked { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 14px; min-height: 60px; }
.picked .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.picked .main b { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.picked .main small { font-size: 14px; font-weight: 700; }
.icon-btn.sm-tap { width: 44px; height: 44px; }
.saving { position: relative; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-top-color: transparent; opacity: .8; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mode-hint { font-size: 13px; color: var(--muted); padding: 0 4px; }
.error-page { text-align: center; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.error-page h1 { font-size: 22px; }
.error-page p { margin: 0; color: var(--muted); }
.amount.nowrap, .nowrap { white-space: nowrap; }
@media (max-width: 359px) {
  .actions-3 .action { font-size: 13px; padding: 12px 4px; }
  .seg span { font-size: 13px; }
  .bread-row .name b { font-size: 15px; }
  .step { width: 44px; height: 44px; }
  .qty { width: 54px; }
}

/* ---------- PWA: internet holati, o'rnatish, oflayn navbat ---------- */
.status-stack { position: sticky; top: 0; z-index: 60; }
.net-bar {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top));
  background: var(--dark); color: var(--on-dark); font-size: 14px; line-height: 1.3;
}
.net-bar[hidden] { display: none !important; }
.net-bar .net-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.net-bar .net-text b { font-weight: 800; }
.net-bar .net-text small { font-size: 13px; color: var(--dark-muted); font-weight: 600; }
.net-bar .net-text small:empty { display: none; }
.net-bar .btn { min-height: 36px; flex-shrink: 0; }
.net-dot { width: 10px; height: 10px; border-radius: 50%; background: #F59E0B; flex-shrink: 0; }
.net-bar.checking .net-dot { animation: net-pulse 1s ease-in-out infinite; }
.net-bar.back { background: var(--green); color: var(--on-green); }
.net-bar.back .net-dot { background: #fff; }
.net-bar.back .net-text small { color: rgba(255, 255, 255, .85); }
@keyframes net-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .net-bar.checking .net-dot { animation: none; } }
.queue-bar {
  position: relative; z-index: 40; display: flex; align-items: center; gap: 8px;
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn-line); padding: 8px 16px; font-size: 14px; font-weight: 700;
}
.queue-bar span { flex: 1 1 auto; min-width: 0; }
.queue-bar .btn { min-height: 36px; }
dialog.sheet {
  border: 0; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); width: 100%; max-width: 520px;
  margin: auto auto 0; background: var(--bg); color: var(--ink); display: none; flex-direction: column; gap: 12px; max-height: 80vh; overflow: auto;
}
dialog.sheet[open] { display: flex; }
dialog.sheet::backdrop { background: var(--overlay); }
dialog.sheet h2 { font-size: 18px; }
.install-banner { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 6px 10px 12px; }
.install-banner .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.install-banner[hidden], .install-card[hidden], .queue-bar[hidden] { display: none !important; }
.ios-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
@media (display-mode: standalone) {
  .topbar { padding-top: calc(20px + env(safe-area-inset-top)); }
  .subbar { padding-top: calc(10px + env(safe-area-inset-top)); }
}
/* 6 xonali PIN: maslahat matni oddiy harf oralig'ida */
.pin-input { letter-spacing: 14px; padding-left: 14px; }
.pin-input::placeholder { letter-spacing: normal; font-size: 18px; font-weight: 600; color: var(--faint); }

/* Kunlik: kun almashtirgich */
.day-nav { display: flex; align-items: center; gap: 8px; }
.day-nav-label {
  position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 52px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; text-align: center;
}
.day-nav-label b { font-size: 16px; font-weight: 800; }
.day-nav-label small { font-size: 13px; color: var(--muted); font-weight: 600; }
.day-nav-label input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; }
.day-nav-label:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.ev-icon.debt { color: var(--red); background: var(--red-soft); }

/* ---------- Davr filtri (butun loyihada bir xil) ---------- */
.period { display: flex; gap: 8px; align-items: stretch; }
.period-menu { position: relative; flex: none; }
.period-btn {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); font-size: 15px; font-weight: 800; cursor: pointer; white-space: nowrap; user-select: none;
}
.period-btn::-webkit-details-marker { display: none; }
.period-btn .caret { display: inline-flex; color: var(--muted); margin-left: -2px; transition: transform .15s; }
.period-menu[open] > .period-btn { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.period-menu[open] > .period-btn .caret { transform: rotate(180deg); color: var(--green); }
.period-list {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 6px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 2px;
}
.period-list a, .period-custom > summary {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--ink); text-decoration: none;
  font-size: 16px; font-weight: 700; cursor: pointer; list-style: none;
}
.period-custom > summary::-webkit-details-marker { display: none; }
.period-list a:hover, .period-custom > summary:hover { background: var(--bg); color: var(--ink); }
.period-list a.on, .period-custom > summary.on { background: var(--green-soft); color: var(--green); }
.period-custom-form { display: flex; flex-direction: column; gap: 8px; padding: 6px 8px 8px; }
.period-custom-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.period-custom-form .input { min-height: 42px; font-size: 16px; }
.period-nav { flex: 1; min-width: 0; display: flex; align-items: stretch; height: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.period-arrow {
  flex: none; width: 44px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
  color: var(--ink); text-decoration: none; line-height: 1;
}
.period-arrow:hover { background: var(--bg); color: var(--ink); }
.period-arrow:first-child { border-right: 1px solid var(--line); }
.period-arrow:last-child { border-left: 1px solid var(--line); }
.period-arrow.off { color: var(--line); }
.period-label { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 0 6px; cursor: pointer; }
.period-label b { font-size: 15px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.period-label input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; }
.period-label:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.period-label b.long { white-space: normal; text-align: center; line-height: 1.15; font-size: 12.5px; overflow: visible; }
@media (min-width: 560px) { .period-label b.long { white-space: nowrap; font-size: 15px; } }
.period-today { align-self: center; }
@media (max-width: 380px) {
  .period-btn { padding: 0 10px; gap: 6px; font-size: 14px; }
  .period-label b { font-size: 14px; letter-spacing: 0; }
  .period-arrow { width: 38px; }
}

/* ---------- Ochiladigan menyu (davr filtri bilan bir xil ko'rinish) ---------- */
.period-list.right { left: auto; right: 0; }
.dd .dd-title { font-size: 14px; font-weight: 600; color: var(--muted); }
.dd.changed > .period-btn { border-color: var(--ink); }
.dd .period-btn .chip-n, .period-list .chip-n { margin-left: 0; }
.period-list a { gap: 10px; }
.period-list a.danger, .period-list button.danger { color: var(--red); }
.period-list form { margin: 0; }
.period-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px;
  background: none; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left;
}
.period-list button:hover { background: var(--bg); }
.period-list hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 6px; }
.dd-row { display: flex; gap: 8px; flex-wrap: wrap; }
/* Xarajatlar: turlar bo'yicha ulush va taqqoslash jadvallari */
.xs-table.xb-table { min-width: 0; }
.xb-cell { display: flex; align-items: center; gap: 10px; }
.xb-cell b { min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.xb-bar { display: block; flex: 1; min-width: 70px; height: 10px; border-radius: 5px; background: var(--line-soft); overflow: hidden; }
.xb-bar i { display: block; height: 100%; border-radius: 5px; background: var(--accent-grad); }
.xb-up { color: var(--red); font-weight: 700; }
.xb-down { color: var(--green); font-weight: 700; }
.xs-table tr.is-picked td { background: var(--accent-soft); }
/* Hamkorlar: bitta tanlov va jami qarz bir qatorda */
.pl-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-bar > .dd { flex: 0 1 auto; min-width: 0; }
.dd-stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.dd-stack small { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dd-stack b { font-size: 15px; font-weight: 800; }
.pl-archive { align-self: center; color: var(--muted); }
.pl-debt { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; white-space: nowrap; }
.pl-debt small { font-size: 12px; font-weight: 600; color: var(--muted); }
.pl-debt b { font-size: 16px; font-weight: 800; color: var(--red); }
.dd-row > .dd { flex: 1 1 auto; }
.dd-row > .dd > .period-btn { width: 100%; justify-content: space-between; }
.dd-row > .dd > .period-btn > span:first-of-type { flex: 1; text-align: left; }
.more-menu > .period-btn { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 22px; }
.more-menu > .period-btn::after { content: "⋯"; font-size: 22px; line-height: 1; font-weight: 800; }

/* Mavzu tugmasi: hozirgi mavzuga qarab oy yoki quyosh ko'rinadi */
.theme-toggle .theme-moon { display: flex; }
.theme-toggle .theme-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-sun { display: flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .theme-moon { display: none; }
  :root:not([data-theme]) .theme-toggle .theme-sun { display: flex; }
}

/* ---------- Qo'ng'iroqcha va xabarlar ---------- */
.bell { position: relative; }
.bell-n {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: var(--on-red); font-size: 11px; font-weight: 800; display: flex; align-items: center;
  justify-content: center; border: 2px solid var(--bg);
}
.top-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.note { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.note:last-child { border-bottom: 0; }
a.note:hover { background: var(--hover); color: var(--ink); }
.note.unread { background: var(--hover); }
.note-icon { width: 36px; height: 36px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--muted); }
.note.lv-warn .note-icon { background: var(--warn-soft); color: var(--warn); }
.note.lv-important .note-icon { background: var(--red-soft); color: var(--red); }
.note.lv-payment .note-icon { background: var(--warn-soft); color: var(--warn); }
.note.lv-info .note-icon { background: var(--info-soft); color: var(--info); }
.note-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.note-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.note-head b { font-size: 16px; overflow-wrap: anywhere; }
.note-body { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.note-meta { font-size: 13px; color: var(--muted); }
.note-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--red); flex: none; margin-top: 6px; }
.sub-bar { position: sticky; top: 0; z-index: 40; display: flex; gap: 8px; align-items: center; justify-content: center;
  padding: 9px 16px; background: var(--red); color: var(--on-red); font-size: 14px; font-weight: 600; text-decoration: none; text-align: center; }
.sub-bar:hover { color: var(--on-red); }
.sub-bar b { white-space: nowrap; }
.alert-banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red-line); }
.alert-banner.lv-payment { background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-line); }
.alert-banner:hover { color: var(--ink); }
.alert-banner b { display: block; font-size: 16px; }
.alert-banner span { font-size: 14px; }

.radio-list { display: flex; flex-direction: column; gap: 6px; }
.radio-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; font-weight: 700; cursor: pointer; }
.radio-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.radio-row:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Til tanlash ---------- */
.auth-top { display: flex; justify-content: flex-end; gap: 8px; margin: -24px -8px 0; }
.lang-menu .period-btn { height: 44px; padding: 0 12px; font-size: 14px; }
.period-list.up { top: auto; bottom: calc(100% + 6px); }
.lang-menu.on-dark .period-btn { background: var(--dark-2); border-color: var(--dark-line); color: var(--on-dark); }
.lang-menu.on-dark { width: 100%; }
.lang-menu.on-dark .period-btn { width: 100%; justify-content: flex-start; }
.lang-menu.on-dark .period-btn span { flex: 1; }

/* tahrirlanadigan qatorlar: qalam belgisi ko'rinib tursin */
.row .row-edit { flex: none; display: inline-flex; color: var(--faint); margin-left: 4px; }
a.row:hover .row-edit { color: var(--accent); }
.chip.chip-edit { display: inline-flex; align-items: center; gap: 6px; }
.chip.chip-edit svg { color: var(--faint); }
.section-head .btn.sm { gap: 6px; }

/* do'kon joyi va "Yo'lga chiqish" */
.place-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.place-text { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; min-width: 0; }
.place-text svg { color: var(--accent); flex: none; }
.route-menu > summary { list-style: none; }
.route-menu > summary::-webkit-details-marker { display: none; }
.route-menu > summary.btn { min-height: 42px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); gap: 8px; }
.route-menu[open] > summary.btn { background: var(--accent-dark); border-color: var(--accent-dark); }
.place-row form { margin: 0; }

/* ---------- maosh va davomat ---------- */
.att-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.att-card .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.s-ico-sm { width: 40px; height: 40px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.att-row { flex-wrap: wrap; row-gap: 8px; }
.att-row .main { min-width: 140px; }
.att-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--seg); border-radius: 12px; padding: 3px; margin: 0; flex: 1 1 210px; max-width: 280px; }
.att-seg button { border: 0; background: none; min-height: 38px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; }
.att-seg button.on { background: var(--green); color: var(--on-green); }
.att-seg button.on.half { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.att-seg button.on.off { background: var(--seg-on); color: var(--ink); box-shadow: var(--shadow-sm); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.cal-h { font-size: 12px; font-weight: 700; color: var(--faint); padding-bottom: 2px; }
.cal-d { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--ink); background: var(--bg); text-decoration: none; }
.cal-d.full { background: var(--green); color: var(--on-green); }
.cal-d.half { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.cal-d.future { color: var(--line-strong); background: none; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.cal-legend i.full { background: var(--green); box-shadow: none; }
.cal-legend i.half { background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-line); }

/* Telegram: do'kon cheki tasdig'i */
a.tg-row { text-decoration: none; padding-top: 10px; border-top: 1px solid var(--line-soft); }
a.tg-row .place-text svg { color: var(--info); }

/* Obuna tariflari */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm);
  padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan.best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.plan .badge { position: absolute; top: -10px; right: 10px; }
.plan .k { font-size: 14px; font-weight: 700; color: var(--muted); }
.plan .v { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan .s { font-size: 13px; color: var(--muted); }

/* Yuklab olish (PDF / Excel) */
.export-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.export-row > span { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-weight: 600; }
.export-row .btn { min-width: 76px; }

/* Do'kon egasi: barcha novvoyxonalar (Telegram «Hisobim») */
.back-link { text-decoration: none; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: var(--accent); margin: 0 0 6px -4px; padding: 4px 4px; min-height: 32px; }
.hub-row .meta b { color: var(--ink); font-weight: 700; }
.hub-row .rate { font-weight: 700; }
.hub-row .rate.high { color: var(--warn); }
.hub-inactive .title { color: var(--muted); }

/* Novvoyxona almashtirgich (tepada) */
.bk-switch { position: relative; min-width: 0; }
.bk-switch > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; max-width: 100%; border-radius: 10px; }
.bk-switch > summary::-webkit-details-marker { display: none; }
.bk-switch > summary h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bk-switch .caret { display: inline-flex; color: var(--muted); flex: none; transition: transform .15s; }
.bk-switch[open] .caret { transform: rotate(180deg); color: var(--accent); }
.bk-list {
  position: absolute; z-index: 45; top: calc(100% + 8px); left: 0; min-width: 260px; max-width: calc(100vw - 32px);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 2px;
}
.bk-list form { margin: 0; }
.bk-list button, .bk-list a {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer; text-decoration: none;
}
.bk-list button:hover, .bk-list a:hover { background: var(--bg); }
.bk-list button.on { background: var(--accent-soft, var(--bg)); color: var(--accent); }
.bk-list .bk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-list .bk-check { display: inline-flex; flex: none; }
.bk-list a { color: var(--muted); font-size: 15px; }
.bk-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.bk-row { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.hub-export { display: flex; flex-direction: column; gap: 8px; }
.hub-pick { display: flex; flex-direction: column; gap: 4px; }
.hub-pick .input { min-height: 44px; font-size: 16px; font-weight: 700; }

/* Novvoyxonaning o'zida sotish */
.sale-bar { position: sticky; bottom: calc(var(--nav-h, 64px) + 8px); z-index: 5; display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px 10px 10px 16px; box-shadow: var(--shadow-lg); }
.sale-total { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.sale-total small { color: var(--muted); font-weight: 700; font-size: 13px; }
.sale-total b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.sale-bar .btn { flex: none; }
.action.sale { background: var(--card); border-color: var(--line); }
.sale-cta { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 18px; border-radius: 18px; text-decoration: none;
  background: var(--accent-grad); color: var(--on-accent); font-size: 18px; font-weight: 800; box-shadow: 0 4px 0 var(--accent-edge), 0 8px 18px var(--accent-glow); }
.sale-cta small { margin-left: auto; font-size: 14px; font-weight: 700; opacity: .9; }
.toggle-row { display: flex; align-items: center; gap: 12px; margin: 0; }
.toggle-row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.switch { flex: none; width: 52px; height: 32px; border-radius: 16px; border: 0; background: var(--line); position: relative; cursor: pointer; padding: 0; transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on { background: var(--green); }
.switch.on i { transform: translateX(20px); }
.perm-list { display: flex; flex-direction: column; gap: 6px; }
.perm-group { display: flex; flex-direction: column; gap: 6px; }
.perm-group-title { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.preset-row .chip { cursor: pointer; font: inherit; font-size: 13px; }
.preset-row .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (min-width: 700px) { .perm-group .perm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.perm-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.perm-row input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--green); }
.perm-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perm-row small { color: var(--muted); font-size: 13px; }
.perm-row:has(input:checked) { border-color: var(--green); background: var(--green-soft); }

/* ---------- Davomat: selfi bilan smena (xodim) ---------- */
.shift-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.shift-card .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shift-card .main .small { color: var(--muted); }
.shift-card > .btn { flex-basis: 100%; }
.shift-ico { width: 44px; height: 44px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.shift-card.on { border-color: var(--green); background: var(--green-soft); }
.shift-card.on .shift-ico { background: var(--green); color: var(--on-green); }
.shift-warn { flex-basis: 100%; margin: 0; font-size: 13px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 8px 10px; }

.shift-modal {
  border: 0; padding: 0; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: 20px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden;
}
.shift-modal::backdrop { background: var(--overlay); }
.shift-modal.full { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; background: #000; }
.shift-x { position: absolute; top: calc(8px + env(safe-area-inset-top)); right: 8px; z-index: 3; }
.shift-modal.full .shift-x { color: #fff; }
.shift-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 20px 20px; }
.shift-step[hidden] { display: none !important; }
.shift-step h2 { font-size: 19px; }
.shift-step p { margin: 0; color: var(--muted); font-size: 15px; }
.shift-big { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.shift-big.bad { background: var(--red-soft); color: var(--red); }
.shift-btns { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.shift-btns .btn { flex: 1; }
.shift-spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .9s linear infinite; margin: 8px 0; }
.shift-map { width: 100%; height: 220px; border-radius: 14px; overflow: hidden; background: var(--seg); }
.shift-step.full { position: relative; padding: 0; height: 100dvh; justify-content: center; background: #000; }
.shift-step.full video, .shift-step.full img { width: 100%; height: 100%; object-fit: cover; }
.shift-step.full video { transform: scaleX(-1); }      /* old kamera — oynadagidek */
.shift-top, .shift-bottom { position: absolute; left: 0; right: 0; padding: 16px; color: #fff; display: flex; flex-direction: column; gap: 8px; }
.shift-top { top: 0; padding-top: calc(16px + env(safe-area-inset-top)); background: linear-gradient(rgba(0,0,0,.6), transparent); }
.shift-top p { color: rgba(255,255,255,.85); }
.shift-bottom { bottom: 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.65)); }

/* ---------- Davomat: egasi sahifasi ---------- */
.att-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.att-sum .badge { font-size: 13px; padding: 4px 10px; }
.att-full { flex-direction: column; align-items: stretch; }
.att-head { display: flex; align-items: center; gap: 12px; }
.att-head .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-head .title { color: var(--ink); font-weight: 800; text-decoration: none; }
.att-head .meta { font-size: 13px; color: var(--muted); }
.att-times { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; background: var(--hover); border-radius: 12px; padding: 8px 10px; }
.att-t { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.att-t small { flex-basis: 100%; font-size: 12px; color: var(--muted); font-weight: 600; }
.att-t b { font-size: 16px; }
.att-h { justify-content: flex-end; text-align: right; }
.att-m { font-size: 12px; color: var(--faint); }
.att-ph { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--seg); flex: none; }
.att-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.att-actions form { margin: 0; }
.att-pop summary { list-style: none; cursor: pointer; }
.att-pop summary::-webkit-details-marker { display: none; }
.att-pop-body { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.att-cal summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.att-cal summary::-webkit-details-marker { display: none; }
.att-cal summary .muted { flex: 1; }
.att-cal[open] summary { display: none; }
.att-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.att-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.att-cal-grid .wd { font-size: 12px; color: var(--muted); font-weight: 700; padding: 2px 0; }
.att-cal-grid .d { min-height: 42px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; background: var(--hover); }
.att-cal-grid .d b { font-size: 11px; line-height: 1; color: var(--green); }
.att-cal-grid .d.has { background: var(--green-soft); }
.att-cal-grid .d.future { color: var(--faint); background: none; }
.att-cal-grid .d.today { box-shadow: inset 0 0 0 2px var(--accent-line); }
.att-cal-grid .d.sel { background: var(--accent); color: var(--on-accent); }
.att-cal-grid .d.sel b { color: var(--on-accent); }

.photo-dialog { border: 0; border-radius: 18px; padding: 12px; width: min(420px, calc(100vw - 24px)); background: var(--card); color: var(--ink); }
.photo-dialog::backdrop { background: rgba(0,0,0,.75); }
.photo-dialog img { width: 100%; border-radius: 12px; display: block; background: var(--seg); }
.photo-dialog p { margin: 8px 2px; color: var(--muted); }
.switch-input { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch-input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch-input:checked { background: var(--green); }
.switch-input:checked::after { transform: translateX(20px); }
.switch-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.offshift-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn-line); font-size: 13px; font-weight: 600; text-decoration: none; }
.offshift-bar span:not(.offshift-dot) { flex: 1; min-width: 0; }
.offshift-bar b { white-space: nowrap; text-decoration: underline; }
.offshift-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #F59E0B; color: #fff; font-weight: 900; animation: net-pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .offshift-dot { animation: none; } }
.offshift-gate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 12px 8px 4px; }
.offshift-gate h2 { font-size: 20px; }
.offshift-gate p { margin: 0; color: var(--muted); }

/* ==========================================================================
   Ilova qolipi — Zebest'dagi panel bilan bir xil tuzilma (static/css/panel.css):
     < 1024px  — tepada ixcham qator (.wtop), pastda bo'limlar paneli (.snav, faqat .is-bottom — ko'pi bilan 4 ta);
     >= 1024px — chap sidebar (brend, foydalanuvchi menyusi, barcha bo'limlar), yig'ilsa — faqat belgilar.
   Bo'limlar ro'yxati — hisob/templatetags/app_nav.py. Rang — nonbook brendi (--accent).
   ========================================================================== */
.snav { display: none; }
.snav-ic { position: relative; display: grid; place-items: center; }

/* ---- tepa qator ---- */
.wtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; position: sticky; top: 0; z-index: 30; background: var(--bg); }
.wtop-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-grad); color: var(--on-accent); font-weight: 800; font-size: 18px; }
.wtop-back { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.wtop-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.wtop-text h1 { font-size: 19px; font-weight: 800; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtop-role { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtop-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.wtop-right .icon-btn { width: 40px; height: 40px; }
.wtop-shift { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; text-decoration: none; background: var(--green-soft); color: var(--green); }
.wtop-shift i, .um-shift i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.wtop-menu { position: relative; }
.wtop-menu summary { list-style: none; cursor: pointer; }
.wtop-menu summary::-webkit-details-marker { display: none; }
.wtop-avatar { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 15px; text-transform: uppercase; box-shadow: 0 0 0 3px var(--bg); }
.wtop-avatar.active, .wtop-menu[open] .wtop-avatar { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 5px var(--accent); }
.wtop-on, .snav-on { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--bg); }
.wtop-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: var(--on-red); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.wtop-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 270px; padding: 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
@media (max-width: 400px) { .wtop-shift { display: none; } }

/* ---- bo'lim tablari ---- */
.wtabs { display: flex; gap: 6px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; position: sticky; top: 64px; z-index: 29; background: var(--bg); }
.wtabs::-webkit-scrollbar { display: none; }
.wtabs a { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.wtabs a.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---- avatar menyusi (telefonda tepada, kompyuterda sidebarda) ---- */
.um { display: flex; flex-direction: column; gap: 2px; }
.um-who { display: flex; flex-direction: column; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.um-who strong { font-size: 15px; overflow-wrap: anywhere; }
.um-who span { font-size: 12px; color: var(--muted); }
.um-shift { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 800; text-decoration: none; }
.um-group { display: flex; flex-direction: column; gap: 2px; padding: 2px 0; border-bottom: 1px solid var(--line-soft); }
.um-group form { margin: 0; }
.um-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.um-item > span:not(.um-badge):not(.um-check) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-item svg { color: var(--muted); flex: none; }
.um-item:hover { background: var(--hover); }
.um-item.is-active { background: var(--accent-soft); color: var(--accent); }
.um-item.is-active svg { color: currentColor; }
.um-item.is-danger, .um-item.is-danger svg { color: var(--red); }
.um-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: var(--on-red); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.um-check { color: var(--green); display: inline-flex; }
.um form[data-logout] { margin: 0; }

/* ---- Zebest «rp» kartalari (Hisobotim, Profil) ---- */
.page.narrow { width: 100%; }
.rp-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; }
.rp-stats { display: flex; justify-content: space-around; text-align: center; padding: 18px 8px; }
.rp-stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-stats b { font-size: 28px; font-weight: 800; line-height: 1.1; }
.rp-stats span { font-size: 12px; color: var(--muted); }
.rp-title { font-size: 15px; font-weight: 800; margin: 0 0 4px; }
.rp-section { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 2px -4px; }
.rp-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.rp-row:first-child, .rp-title + .rp-row { border-top: 0; }
.rp-row > span { display: flex; flex-direction: column; min-width: 0; }
.rp-row small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rp-row b { white-space: nowrap; }
.rp-row .is-minus { color: var(--red); }
.rp-row .is-plus { color: var(--green); }
.rp-total { font-weight: 800; }
.rp-total b { font-size: 18px; }
.rp-empty { color: var(--muted); font-size: 14px; margin: 6px 0; }
/* Sozlamalar markazi: qatorlar ro'yxati */
.st-list { padding: 0 16px; }
.st-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; margin: 0; border-top: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.st-row:first-child { border-top: 0; }
.st-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.st-ico.tg { background: rgba(34, 158, 217, .14); color: #229ED9; }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-main b { font-size: 15px; }
.st-main small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.st-chev { flex: none; color: var(--faint); display: inline-flex; }
.pf-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 22px; }
.pf-avatar { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); color: var(--on-accent); font-size: 30px; font-weight: 800; text-transform: uppercase; margin-bottom: 10px; }
.pf-head > strong { font-size: 19px; }
.pf-role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pf-rows { width: 100%; margin-top: 14px; text-align: left; }
.pf-rows .rp-row:first-child { border-top: 1px solid var(--line-soft); }
.pf-pin summary, .pf-link { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.pf-pin summary::-webkit-details-marker { display: none; }
.pf-pin summary > span:nth-child(2), .pf-link > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pf-pin summary small, .pf-link small { font-size: 12px; color: var(--muted); }
.pf-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); flex-shrink: 0; }
.pf-ico.tg { background: var(--info-soft); color: var(--info); }
.pf-chev { color: var(--faint); display: inline-flex; transition: transform .15s; }
.pf-pin[open] .pf-chev { transform: rotate(180deg); }
.pf-form { margin-top: 14px; }
.pf-logout { margin: 0; }

/* ---- telefon / planshet: pastki panel ---- */
@media (max-width: 1023.98px) {
  body.pn.has-snav:has([data-bottom-nav]) .snav {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(16, 24, 40, .06);
  }
  .snav-brand, .snav-user, .snav-toggle { display: none; }
  .snav-list { display: flex; max-width: 560px; margin: 0 auto; }
  .snav-link { display: none; }
  .snav-link.is-bottom {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 62px; padding: 6px 2px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.2;
    text-decoration: none; -webkit-tap-highlight-color: transparent;
  }
  .snav-link.is-bottom .snav-ic { width: 56px; height: 30px; border-radius: 15px; transition: background .15s; }
  .snav-link.is-bottom .snav-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .snav-link.is-bottom.is-active { color: var(--accent); font-weight: 800; }
  .snav-link.is-bottom.is-active .snav-ic { background: var(--accent-soft); }
  .wtop-pop.um { position: fixed; top: calc(62px + env(safe-area-inset-top)); right: 10px; left: auto; max-height: calc(100dvh - 140px); overflow-y: auto; }
}

/* ---- kompyuter: chap sidebar ---- */
@media (min-width: 1024px) {
  body.pn.has-snav { --snav-w: 248px; }
  .pn-app { display: flex; min-height: 100vh; align-items: stretch; }
  .pn-main { flex: 1; min-width: 0; }
  body.pn .app { max-width: 1040px; }
  body.pn .page.narrow { max-width: 760px; }
  body.pn .sticky-action { left: var(--snav-w); }
  .snav {
    position: sticky; top: 0; z-index: 35; width: var(--snav-w); height: 100vh; flex: none;
    display: flex; flex-direction: column; gap: 8px; padding: 0 12px 14px;
    background: var(--card); border-right: 1px solid var(--line); overflow-x: hidden; overflow-y: auto; transition: width .15s;
  }
  .snav-brand { display: flex; align-items: center; gap: 12px; flex: none; height: 72px; margin: 0 -12px 6px; padding: 0 16px; border-bottom: 1px solid var(--line); min-width: 0; }
  .snav-mark { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-grad); color: var(--on-accent); font-size: 20px; font-weight: 800; }
  .snav-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
  .snav-brand-text strong { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .snav-brand-text span { font-size: 13px; color: var(--muted); white-space: nowrap; }
  .snav-user { position: relative; margin: 2px 0 6px; }
  .snav-user > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; list-style: none; }
  .snav-user > summary::-webkit-details-marker { display: none; }
  .snav-user > summary:hover, .snav-user[open] > summary { background: var(--hover); }
  .snav-avatar { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; }
  .snav-user-text { display: grid; min-width: 0; line-height: 1.25; }
  .snav-user-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .snav-user-text small { color: var(--muted); font-size: 12px; }
  .snav-user-chev { margin-left: auto; color: var(--muted); display: inline-flex; }
  .snav-user-pop { margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-lg); }
  .snav-list { display: flex; flex-direction: column; gap: 2px; }
  .snav-link, .snav-toggle {
    display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 10px;
    background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: left; text-decoration: none;
    white-space: nowrap; cursor: pointer;
  }
  .snav-link svg, .snav-toggle svg { color: var(--muted); }
  .snav-link:hover, .snav-toggle:hover { background: var(--hover); }
  .snav-link.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 800; }
  .snav-link.is-active svg { color: currentColor; }
  .snav-label { overflow: hidden; text-overflow: ellipsis; }
  .snav-toggle { margin-top: auto; color: var(--muted); font-size: 14px; }
  .snav-toggle svg { transition: transform .15s; }
  /* sidebar bor — tepa qatordagi belgi va avatar menyusi takrorlanmaydi */
  body.pn.has-snav .wtop .brand-mark, body.pn.has-snav .wtop-menu, .um-dup { display: none !important; }
  body.pn.has-snav .wtop { padding: 0 24px; min-height: 72px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
  body.pn.has-snav .wtop-text h1 { font-size: 22px; }
  body.pn.has-snav .wtabs { top: 72px; padding: 0 24px 12px; }
  body.pn.has-snav .page { padding-left: 24px; padding-right: 24px; }
  body.pn.has-snav .app.with-nav { padding-bottom: 32px; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) { body.pn.has-snav { --snav-w: 76px; } }
@media (min-width: 1280px) { html.snav-mini body.pn.has-snav { --snav-w: 76px; } }
@media (min-width: 1024px) and (max-width: 1279.98px), (min-width: 1280px) {
  html.snav-mini body.pn.has-snav .snav-link, html.snav-mini body.pn.has-snav .snav-toggle { justify-content: center; padding: 0; }
  html.snav-mini body.pn.has-snav .snav-label, html.snav-mini body.pn.has-snav .snav-brand-text { display: none; }
  html.snav-mini body.pn.has-snav .snav-brand { justify-content: center; padding: 0; }
  html.snav-mini body.pn.has-snav .snav-user > summary { justify-content: center; padding: 6px 0; }
  html.snav-mini body.pn.has-snav .snav-user-pop { position: fixed; left: 84px; top: 76px; width: 260px; z-index: 60; }
  html.snav-mini .snav-toggle svg { transform: rotate(180deg); }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  body.pn.has-snav .snav-link, body.pn.has-snav .snav-toggle { justify-content: center; padding: 0; }
  body.pn.has-snav .snav-label, body.pn.has-snav .snav-brand-text, body.pn.has-snav .snav-toggle { display: none; }
  body.pn.has-snav .snav-brand { justify-content: center; padding: 0; }
  body.pn.has-snav .snav-user > summary { justify-content: center; padding: 6px 0; }
  body.pn.has-snav .snav-user-pop { position: fixed; left: 84px; top: 76px; width: 260px; z-index: 60; }
}
.page-tools { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.att-full { flex-wrap: nowrap; gap: 10px; }


/* ==========================================================================
   Xodimlar ro'yxati va davomat — Zebest (manage.css .xs-*) bilan bir xil: kartochka + jadval, telefonda jadval
   yonga suriladi, ism ustuni joyida qoladi; davomatda oy kalendari.
   ========================================================================== */
.xs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.xs-layout > .xs-side { position: sticky; top: 16px; }
@media (max-width: 1439px) {
    .xs-layout { grid-template-columns: minmax(0, 1fr); }
    .xs-layout > .xs-side { position: static; order: -1; }
}
.xs-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 16px; }
.xs-card > .xs-scroll:last-child { border-radius: 0 0 15px 15px; }
.xs-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.xs-card-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.xs-card-head .xs-sub { color: var(--muted); font-weight: 500; }
.xs-card-body { padding: 16px 20px; }
.xs-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.xs-head-actions form { display: contents; }
.xs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.xs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--hover); color: var(--muted); border: 1px solid var(--line); }
.xs-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.xs-chip.is-plain::before { display: none; }
.xs-chip.is-ok { background: var(--green-soft); color: var(--green); border-color: transparent; }
.xs-chip.is-bad { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.xs-chip.is-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.xs-chip.is-brand { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

.xs-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.xs-tools .period-bar { margin: 0; }
.xs-search { position: relative; flex: 1 1 220px; max-width: 320px; }
.xs-search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.xs-search input { width: 100%; height: 40px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
.xs-select { width: auto; height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; max-width: 100%; }
.xs-search input:focus, .xs-select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; border-color: var(--accent); }

.xs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.xs-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.xs-table th { position: sticky; top: 0; padding: 11px 16px; background: var(--hover); color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.xs-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.xs-table tr:last-child td { border-bottom: 0; }
.xs-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, var(--card)); }
.xs-table .xs-num { text-align: right; font-variant-numeric: tabular-nums; }
.xs-table .xs-end { text-align: right; }
.xs-table .xs-muted { color: var(--muted); }
/* Birinchi ustun (xodim) suriganda joyida qoladi */
.xs-table th:first-child, .xs-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }
.xs-table th:first-child { z-index: 2; background: var(--hover); }
.xs-table td:first-child { min-width: 200px; }
.xs-table tbody tr:hover td:first-child { background: color-mix(in srgb, var(--accent) 4%, var(--card)); }
.xs-scroll.is-scrolled .xs-table td:first-child, .xs-scroll.is-scrolled .xs-table th:first-child { box-shadow: 6px 0 8px -6px rgba(0, 0, 0, .18); }
.xs-table tr[hidden] { display: none; }
.xs-empty-row td { text-align: center; color: var(--muted); padding: 28px 16px; white-space: normal; }

.xs-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.xs-person .avatar { flex: none; width: 34px; height: 34px; font-size: 14px; }
.xs-person-text { display: grid; gap: 1px; }
/* 2026-10-22 (Shohzod: "ism to'liq ko'rinmay qolmoqda"): uzun ism kesilmaydi — ikki qatorga o'tadi. */
.xs-name { display: block; font-weight: 600; color: var(--accent); text-decoration: none; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; max-width: 220px; }
a.xs-name:hover { text-decoration: underline; }
.xs-role { color: var(--muted); font-size: 12.5px; }
.xs-person.is-off .xs-name { color: var(--muted); }

.xs-time { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.xs-time small { color: var(--muted); font-weight: 500; }
.xs-photo { width: 30px; height: 30px; padding: 0; flex: none; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--hover); cursor: zoom-in; }
.xs-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xs-hand { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--hover); border-radius: 6px; padding: 2px 6px; }
.xs-more { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); font-weight: 500; }
.xs-table a.xs-muted { text-decoration: none; }

.xs-act { display: inline-flex; align-items: center; gap: 6px; }
.xs-act form { margin: 0; }
.xs-link-btn { border: 0; background: none; padding: 4px 2px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--accent); cursor: pointer; white-space: nowrap; }
.xs-link-btn:hover { text-decoration: underline; }
.xs-link-btn.is-danger { color: var(--red); }
.xs-pop { position: relative; }
.xs-pop > summary { list-style: none; }
.xs-pop > summary::-webkit-details-marker { display: none; }
.xs-pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; gap: 8px; width: 220px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px rgba(0, 0, 0, .14); white-space: normal; text-align: left; }
.xs-table .xs-pop-body { position: static; width: 200px; margin-top: 8px; margin-left: auto; box-shadow: none; }
.xs-pop-body label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.xs-pop-body input { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; }

/* Oy kalendari */
.xs-cal { padding: 16px 18px 18px; }
.xs-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.xs-cal-head strong { font-size: 16px; text-transform: capitalize; }
.xs-cal-nav { display: flex; gap: 4px; }
.xs-cal-nav a, .xs-cal-nav span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 18px; line-height: 1; }
.xs-cal-nav a:hover { background: var(--hover); }
.xs-cal-nav span { color: var(--faint); }
.xs-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px 4px; text-align: center; }
.xs-cal-wd { font-size: 11.5px; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.xs-cal-day { position: relative; justify-self: center; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
a.xs-cal-day:hover { background: var(--hover); }
.xs-cal-day.is-out, .xs-cal-day.is-future { color: var(--faint); font-weight: 500; }
.xs-cal-day.has-data { background: var(--green-soft); color: var(--green); }
.xs-cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--muted); }
.xs-cal-day.is-selected { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.xs-cal-day b { position: absolute; top: -5px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; background: var(--green); color: var(--card); font-size: 10.5px; font-weight: 700; border: 2px solid var(--card); }
.xs-cal-day.is-selected b { background: var(--accent); }
@media (max-width: 1439px) { .xs-cal-grid { max-width: 420px; margin: 0 auto; } }
@media (min-width: 900px) and (max-width: 1439px) {
    .xs-cal { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
    .xs-cal-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .xs-cal-grid { margin: 0; width: 420px; }
    .xs-cal-legend { display: block !important; }
}
.xs-cal-legend { display: none; margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; max-width: 220px; }

.xs-btn-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.xs-btn-row form { display: contents; }
.xs-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.xs-btn:hover { border-color: var(--line-strong); background: var(--hover); }
.xs-btn svg { width: 16px; height: 16px; flex: none; }
.xs-btn.is-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.xs-btn.is-primary:hover { background: var(--accent-dark); }
.xs-btn.is-danger { color: var(--red); }
.xs-btn.is-ok { color: var(--green); }
@media (max-width: 640px) {
    .xs-card { border-radius: 14px; }
    .xs-card-head, .xs-tools, .xs-card-body, .xs-btn-row { padding-left: 14px; padding-right: 14px; }
    .xs-search { max-width: none; flex-basis: 100%; }
    .xs-tools .xs-select { flex: 1 1 140px; min-width: 0; }
    .xs-tools .xs-chips { flex-basis: 100%; }
    .xs-table { font-size: 13.5px; }
    .xs-table th, .xs-table td { padding-left: 12px; padding-right: 12px; }
    .xs-name { max-width: 150px; }
    .xs-table td:first-child { min-width: 170px; }
}
/* nonbook qo'shimchalari: jadval yakuni (jami), davr tanlagich asboblar qatorida, kartochka chetlari */
.xs-card { overflow: visible; box-shadow: var(--shadow-sm); }
.xs-table tfoot td { padding: 12px 16px; background: var(--hover); border-top: 1px solid var(--line); font-weight: 800; white-space: nowrap; }
.xs-table tfoot td:first-child { background: var(--hover); }
.xs-table tbody tr:last-child td { border-bottom: 0; }
.xs-tools .period { flex: 1 1 300px; max-width: 460px; }
.xs-person .avatar { width: 34px; height: 34px; font-size: 14px; }
.page.wide { width: 100%; }
@media (max-width: 640px) {
  .xs-tools .period { max-width: none; flex-basis: 100%; }
  .xs-table tfoot td { padding-left: 12px; padding-right: 12px; }
}
.xs-table .att-seg { min-width: 200px; max-width: 240px; }
.xs-table .att-seg button { min-height: 34px; font-size: 13px; }
.xs-table:not(:has(th:nth-child(3))) { min-width: 0; }
.xs-role { white-space: normal; line-height: 1.3; }
.xs-person-text { max-width: 240px; }
@media (max-width: 640px) { .xs-person-text { max-width: 150px; } }
.avatar { overflow: hidden; }
.avatar .av-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Xodim sahifasi (Zebest manage.css «Profil») */
.xs-kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14.5px; }
.xs-kv dt { color: var(--muted); }
.xs-kv dd { margin: 0; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.xs-kv dd a { display: inline; padding: 0; min-height: 0; color: var(--ink); font-weight: 600; text-decoration: none; }
.xs-hero { display: flex; align-items: center; gap: 14px; }
.xs-hero .avatar { width: 52px; height: 52px; font-size: 20px; flex: none; }
.xs-hero h2 { margin: 0; font-size: 20px; }
.xs-hero p { margin: 2px 0 0; color: var(--muted); }
.xs-money { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 20px; }
.xs-money strong { font-size: 15px; }
.xs-money .xs-money-val { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.xs-money a { font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.xs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.xs-stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.xs-stat span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.xs-stat strong { display: block; margin-top: 8px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.xs-stat.is-warn strong { color: var(--warn); }
.xs-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.xs-note { margin: 0; padding: 12px 20px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); }
.xs-shift-note { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--green); }
.xs-shift-note.is-warn { color: var(--warn); }
@media (max-width: 640px) {
  .xs-money { padding-left: 14px; padding-right: 14px; }
  .xs-kv { grid-template-columns: 130px minmax(0, 1fr); font-size: 14px; }
  .xs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 14px; padding-right: 14px; }
  .xs-stat strong { font-size: 22px; }
  .xs-btn-row .xs-btn { flex: 1 1 auto; justify-content: center; }
}
.avatar.lg { width: 64px; height: 64px; font-size: 24px; flex: none; }
.photo-field { display: flex; align-items: center; gap: 14px; }
.photo-field-main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.photo-field input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.avatar.lg, .xs-hero .avatar, .xs-person .avatar { border-radius: 50%; }

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

/* ==========================================================================
   Ixcham tugma va formalar (ilova paneli ichida):
   * Tugma matniga qarab ixcham, o'ngga yopishgan. Telefonda faqat formaning asosiy (katta, .lg) tugmasi
     to'liq kenglikda qoladi — bosh barmoq bilan bosish oson.
   * Kompyuterda formalar 640px dan kengaymaydi; asosiy tugma ham ixcham va o'ngda.
   ========================================================================== */
body.pn .page .btn.block:not(.lg) { width: fit-content; max-width: 100%; margin-left: auto; padding: 0 20px; }
body.pn .page .card.empty .btn, body.pn .page .card.empty .btn.block { margin: 0 auto; }
body.pn .period-list .btn.block, body.pn .wtop-pop .btn.block, body.pn dialog .btn.block { width: 100%; margin: 0; }
body.pn .page .btn-row { justify-content: flex-end; }
@media (min-width: 700px) {
  body.pn .page form.form-stack:not(.inline-form), body.pn .page > .form-stack > form.form-stack { max-width: 640px; }
  body.pn .page .btn.block { width: fit-content; min-width: 180px; max-width: 100%; margin-left: auto; padding: 0 24px; }
  body.pn .page .card.empty .btn.block { margin: 0 auto; }
  body.pn .sticky-action > * { max-width: 640px; }
  body.pn .sticky-action .btn.block { width: fit-content; min-width: 200px; margin-left: auto; padding: 0 28px; }
  /* Xarajat formasi keng kartochkada — maydonlar bir qatorda */
  .exp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 14px; align-items: start; }
  .exp-grid > .field { margin: 0; }
  form.exp-form { max-width: none !important; }
}
.xs-table td.log-cell { white-space: pre-line; min-width: 260px; max-width: 480px; font-size: 13.5px; }
.xs-table tr.is-cancelled td { color: var(--faint); }
.xs-table tr.is-cancelled td b, .xs-table tr.is-cancelled td .t-green { text-decoration: line-through; color: var(--faint); }
.xs-card-head .export, .xs-card-head .dd-row { margin: 0; }
.xs-card-head .export-row { margin: 0; }
.xs-search.inline-form { margin: 0; }
.xs-tools > .dd { flex: none; }
.avatar.square { border-radius: 12px; }
.xs-person .avatar.square { border-radius: 10px; font-size: 12px; }
@media (max-width: 640px) { .xs-table .hide-sm { display: none; } }
@media (min-width: 700px) { body.pn .page > .actions-row:has(> .btn) { width: min(100%, 560px); margin-left: auto; } }
