@font-face { font-family: 'Onest'; src: url('/fonts/onest/onest-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'Onest'; src: url('/fonts/onest/onest-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+1E00-1E9F; }
@font-face { font-family: 'Onest'; src: url('/fonts/onest/onest-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; src: url('/fonts/onest/onest-cyrillic-ext-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F; }
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #ecf0f8;
  --surface: #ffffff;
  --soft: #f5f7fc;
  --ink: #151d36;
  --muted: #5c6784;
  --line: #dce2ef;
  --navy: #17213d;
  --brand: #3552d6;
  --brand-soft: #e7ebfd;
  --amber: #ffb224;
  --amber-ink: #8f5600;
  --amber-soft: #fff1d4;
  --red: #d93849;
  --red-soft: #fde8ea;
  --green: #0c8f65;
  --green-soft: #dff5ec;
  --violet: #7345cc;
  --violet-soft: #efe8fc;
  --display: 'Bricolage', 'Onest', system-ui, sans-serif;
  --spring: cubic-bezier(.2, .9, .25, 1.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Onest', system-ui, sans-serif; font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
body.locked { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
h1, h2 { font-family: var(--display); letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 16px; line-height: 1.35; }
h4 { font-size: 14px; margin-bottom: 10px; }
small { font-size: 12.5px; color: var(--muted); }
:focus-visible { outline: 3px solid #8ea2ff; outline-offset: 2px; }
.panel:focus { outline: none; }
.muted { color: var(--muted); }
.link { color: var(--brand); font-weight: 500; }
.link:hover { text-decoration: underline; }
.icon { flex: none; }
.offscreen { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.stack { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* ───── tugma va maydonlar ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 11px; font-weight: 600; font-size: 14px; border: 1px solid var(--line); background: var(--surface); transition: transform .15s var(--spring), background .15s, box-shadow .2s, border-color .15s; }
.btn:hover { border-color: #bcc6df; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px var(--brand); }
.btn-primary:hover { background: #2a44c2; border-color: #2a44c2; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-quiet-danger { color: var(--red); background: transparent; border-color: transparent; }
.btn-quiet-danger:hover { background: var(--red-soft); border-color: var(--red-soft); }
.btn.busy { opacity: .65; pointer-events: none; }
.btn.busy::after { content: ''; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.wide { width: 100%; min-height: 46px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.input { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea.input { resize: vertical; }
.search { width: 280px; max-width: 100%; }
.hint { font-size: 12.5px; color: var(--muted); }
.hint.bad, .form-error { color: var(--red); }
.form-error { font-size: 13.5px; font-weight: 500; }
.label { font-size: 13px; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; transition: all .18s var(--spring); }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions.end { justify-content: flex-end; }
.actions.center { justify-content: center; }

/* ───── avatar va pilik ───── */
.avatar { position: relative; flex: none; display: grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%; overflow: hidden; background: hsl(var(--hue) 55% 88%); color: hsl(var(--hue) 55% 28%); font-weight: 700; font-size: calc(var(--size) * .36); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ring { position: relative; flex: none; display: grid; place-items: center; width: var(--size); height: var(--size); --c: var(--green); }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-track { stroke: var(--line); }
.ring-fill { stroke: var(--c); stroke-linecap: round; transition: stroke-dashoffset .9s ease, stroke .3s; }
.ring[data-urgency="day"] { --c: var(--brand); }
.ring[data-urgency="soon"] { --c: var(--amber); }
.ring[data-urgency="late"] { --c: var(--red); border-radius: 50%; animation: alarm 1.8s ease-out infinite; }
.ring.is-review { --c: var(--violet); }
.ring.is-done { --c: var(--green); }
.ring.is-cancelled { --c: #aab3c9; }
.ring.is-failed { --c: var(--red); }
.countdown { font-weight: 600; font-size: 13.5px; }
.countdown[data-urgency="soon"] { color: var(--amber-ink); }
.countdown[data-urgency="late"] { color: var(--red); }

.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--soft); color: var(--muted); }
.pill-sent { background: var(--amber-soft); color: var(--amber-ink); }
.pill-accepted { background: var(--brand-soft); color: var(--brand); }
.pill-review { background: var(--violet-soft); color: var(--violet); }
.pill-done { background: var(--green-soft); color: var(--green); }
.pill-overdue, .pill-failed { background: var(--red-soft); color: var(--red); }
.priority { font-size: 12px; font-weight: 650; white-space: nowrap; }
.priority::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; background: var(--green); transform: rotate(45deg); }
.priority-high::before { background: #f08a00; }
.priority-urgent { color: var(--red); }
.priority-urgent::before { background: var(--red); }

/* ───── karkas ───── */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 22px 14px; background: var(--navy); color: #fff; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand strong { display: block; font-family: var(--display); font-size: 17px; }
.brand small { color: #9fabd0; overflow-wrap: anywhere; }
.mark { flex: none; width: 38px; height: 38px; background: url('/favicon.svg') center / cover; border-radius: 11px; box-shadow: 0 0 0 1px #ffffff1f; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; color: #bcc6e6; font-weight: 500; transition: background .18s, color .18s; }
.nav a:hover { background: #ffffff0f; color: #fff; }
.nav a[aria-current] { background: #fff; color: var(--navy); font-weight: 650; }
.nav-badge { margin-left: auto; min-width: 21px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; font-weight: 750; text-align: center; animation: pop .4s var(--spring); }
.nav-badge[hidden] { display: none; }
.live::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: var(--amber); }
.live.on::before { background: #34d399; animation: beat 2.4s ease-out infinite; }
.logout { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.content { padding: 28px clamp(16px, 3.2vw, 44px) 70px; width: 100%; max-width: 1560px; margin-inline: auto; }
.page { display: flex; flex-direction: column; gap: 20px; animation: page .35s ease backwards; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.page-head p { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; min-width: 0; }
.card > h2 { margin-bottom: 10px; }
.card.stack > h2 { margin: 0; }
.fab { display: none; }

/* ───── muddat yo'lagi ───── */
.board { background: var(--navy); color: #fff; border-radius: 22px; padding: 20px 22px 14px; overflow: hidden; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.board-head span { font-size: 13px; color: #9fabd0; }
.lane-area { position: relative; }
.lane-scroll { overflow-x: auto; overflow-y: hidden; }
.lane-wrap { position: relative; min-width: 620px; padding-top: 76px; }
.lane { --rows: 1; position: relative; height: calc(var(--rows) * 48px + 12px); border-bottom: 2px solid #ffffff26; background: linear-gradient(90deg, #d938492e 0 12%, #ffb2241f 12% 34%, #3552d62b 34% 60%, transparent 60%); border-radius: 12px 12px 0 0; }
.lane::before { content: ''; position: absolute; top: -8px; bottom: -8px; left: 12%; width: 2px; background: var(--amber); box-shadow: 0 0 14px 2px #ffb22480; }
.lane-empty { position: absolute; inset: 40px 20px auto 14%; color: #9fabd0; font-size: 14px; pointer-events: none; }
.axis { display: grid; grid-template-columns: 12fr 22fr 26fr 22fr 18fr; padding-top: 9px; font-size: 12px; color: #9fabd0; }
.axis span { padding-left: 8px; }
.pin { position: absolute; bottom: calc(var(--row) * 48px + 6px); translate: -50% 0; border-radius: 50%; color: #fff; transition: left .6s var(--spring), bottom .4s; }
.pin .ring { transition: scale .18s var(--spring); }
.pin .ring-track { stroke: #ffffff2e; }
.pin .ring[data-urgency="calm"] { --c: #34d399; }
.pin .ring[data-urgency="day"] { --c: #8ea2ff; }
.pin:hover, .pin:focus-visible { z-index: 3; }
.pin:hover .ring, .pin:focus-visible .ring { scale: 1.18; }
.pin .tip { position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 4px; width: max-content; max-width: 210px; display: flex; flex-direction: column; text-align: left; padding: 8px 11px; border-radius: 10px; background: #fff; color: var(--ink); font-size: 12.5px; opacity: 0; pointer-events: none; transition: .18s; box-shadow: 0 10px 30px #0006; }
.pin .tip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin:hover .tip, .pin:focus-visible .tip { opacity: 1; translate: -50% 0; }
.pin[style*="left: clamp(24px, 4.5%"] .tip { left: 0; translate: 0 0; }
.pin.arrived { animation: drop .6s var(--spring); }

/* ───── ro'yxatlar ───── */
.columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.columns.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.list { display: flex; flex-direction: column; }
.list.card { padding: 8px; }
.row { display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 10px; text-align: left; border-radius: 13px; transition: background .15s, transform .2s var(--spring); }
.row + .row { border-top: 1px solid var(--soft); }
.row:hover { background: var(--soft); transform: translateX(3px); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.row-time { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.row > .pill { min-width: 118px; justify-content: center; }
.arrived { animation: arrive .7s var(--spring), glow 2.2s ease; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 38px 18px; color: var(--muted); grid-column: 1 / -1; }
.empty h3 { color: var(--ink); }
.empty p { max-width: 46ch; }
.empty .btn { margin-top: 8px; }
.invite { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; grid-column: 1 / -1; }
.page > div > .invite { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.page > div:empty { display: none; }
.invite img { border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.invite .stack { flex: 1; min-width: 240px; }
.link-box { padding: 9px 12px; background: var(--soft); border-radius: 10px; font-size: 14px; overflow-wrap: anywhere; user-select: all; }

/* ───── bosh panel ───── */
.home > * { animation: lift .6s var(--spring) backwards; }
.home > :nth-child(4) { animation-delay: .12s; }
.home > :nth-child(5) { animation-delay: .2s; }
.home > :nth-child(6) { animation-delay: .28s; }
.home > :nth-child(7) { animation-delay: .36s; }
.hero { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.hero p { color: var(--muted); }
.hero-side { display: flex; align-items: center; gap: 14px; }
.clock { font-family: var(--display); font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; padding: 5px 15px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 126px; text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { --tone: var(--brand); --wash: var(--brand-soft); position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 2px 12px; padding: 18px 20px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: transform .28s var(--spring), box-shadow .28s, border-color .2s; animation: lift .6s var(--spring) backwards; animation-delay: calc(var(--i) * 80ms); }
.tile::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--tone); transform-origin: left; animation: grow .9s ease backwards; animation-delay: calc(var(--i) * 80ms + .15s); }
.tile::after { content: ''; position: absolute; right: -45px; bottom: -55px; width: 140px; height: 140px; border-radius: 50%; background: var(--wash); opacity: .75; transition: scale .45s var(--spring); }
.tile:hover { transform: translateY(-5px); border-color: var(--tone); box-shadow: 0 20px 34px -24px var(--tone); }
.tile:hover::after { scale: 1.35; }
.tile > * { position: relative; z-index: 1; }
.tile-icon { grid-area: 1 / 2 / span 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--wash); color: var(--tone); transition: rotate .35s var(--spring); }
.tile:hover .tile-icon { rotate: -10deg; }
.tile-label { grid-column: 1; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.tile strong { grid-column: 1; font-family: var(--display); font-size: 42px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile small { grid-column: 1 / -1; }
.tile-review { --tone: var(--violet); --wash: var(--violet-soft); }
.tile-overdue { --tone: var(--red); --wash: var(--red-soft); }
.tile-done { --tone: var(--green); --wash: var(--green-soft); }
.tile.hot strong { color: var(--red); }
.tile.hot .tile-icon { animation: alarm 1.7s ease-out infinite; }

.board { position: relative; }
.board::after { content: ''; position: absolute; top: -40%; left: -30%; width: 30%; height: 180%; rotate: 18deg; background: linear-gradient(90deg, transparent, #ffffff0d, transparent); animation: sweep 7s ease-in-out infinite; pointer-events: none; }
.lane::before { animation: glowline 2.4s ease-in-out infinite; }
.axis b:not(:empty) { display: inline-block; min-width: 19px; margin-left: 7px; padding: 0 5px; border-radius: 99px; background: #ffffff1f; color: #fff; text-align: center; animation: pop .4s var(--spring); }

.widget { display: flex; flex-direction: column; gap: 12px; padding: 20px; transition: box-shadow .3s; }
.widget:hover { box-shadow: 0 18px 36px -30px #17213d99; }
.widget > h2 { margin: 0; }
.widget-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.widget-head .link { font-size: 13px; }

.donut-wrap { flex: 1; display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 190px; height: 190px; flex: none; }
.arc, .arc-track { fill: none; stroke-width: 20; }
.arc-track { stroke: var(--soft); }
.arc { transform: rotate(-90deg); transform-origin: 80px 80px; transition: stroke-dasharray 1.1s cubic-bezier(.3, .8, .25, 1), stroke-dashoffset 1.1s cubic-bezier(.3, .8, .25, 1), opacity .2s, stroke-width .2s; }
.arc:hover { stroke-width: 24; }
.arc.dim { opacity: .25; }
.donut-total { font-family: var(--display); font-size: 34px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.donut-caption { font-size: 12px; fill: var(--muted); text-anchor: middle; }
.legend { list-style: none; flex: 1; min-width: 210px; }
.legend a { display: grid; grid-template-columns: 12px 1fr auto 40px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; transition: background .18s, transform .2s var(--spring); }
.legend a:hover { background: var(--soft); transform: translateX(3px); }
.legend strong { font-variant-numeric: tabular-nums; }
.legend small { text-align: right; }
.legend li.zero { opacity: .55; }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; }
.swatch.given, .col.given { background: #3552d6; }
.swatch.closed, .col.closed { background: #0c8f65; }

.keys { display: flex; gap: 14px; list-style: none; font-size: 12.5px; color: var(--muted); }
.keys li { display: flex; align-items: center; gap: 6px; }
.plot { flex: 1; display: flex; flex-direction: column; min-height: 200px; padding: 10px 0 24px 30px; }
.area { position: relative; flex: 1; min-height: 160px; }
.gridline { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.gridline i { position: absolute; right: calc(100% + 9px); top: -9px; font-style: normal; font-size: 11.5px; color: var(--muted); }
.days { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.day { position: relative; border-radius: 8px 8px 0 0; transition: background .18s; }
.day:hover, .day:focus-visible { background: #3552d60d; }
.pair { height: 100%; display: flex; justify-content: center; align-items: flex-end; gap: 2px; }
.col { width: min(18px, 36%); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: rise-bar .8s var(--spring) backwards; animation-delay: calc(var(--i) * 70ms + .35s); }
.col.none { min-height: 2px; opacity: .3; }
.day-name { position: absolute; top: calc(100% + 6px); left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); }
.day-tip { position: absolute; z-index: 3; bottom: 45%; left: 50%; translate: -50% 6px; display: flex; flex-direction: column; width: max-content; padding: 8px 12px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 12.5px; opacity: 0; pointer-events: none; transition: .18s; }
.day:hover .day-tip, .day:focus-visible .day-tip { opacity: 1; translate: -50% 0; }
.day:first-child .day-tip { left: 0; translate: 0 0; }
.day:last-child .day-tip { left: auto; right: 0; translate: 0 0; }

.next { display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 12px; text-align: left; border: 1px solid var(--line); border-radius: 14px; transition: transform .22s var(--spring), border-color .2s, box-shadow .22s; }
.next + .next { margin-top: 9px; }
.next:hover { transform: translateX(5px); border-color: var(--brand); box-shadow: 0 12px 24px -20px var(--brand); }
.next-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.next-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-time { width: 158px; flex: none; }
.next .bar > span { animation: grow 1s ease backwards .4s; transform-origin: left; }
.next > .pill { min-width: 118px; justify-content: center; }

.timeline { list-style: none; position: relative; }
.timeline li { position: relative; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 25px; top: 46px; bottom: -8px; width: 2px; background: var(--line); }
.moment { display: flex; gap: 13px; align-items: flex-start; width: 100%; text-align: left; padding: 8px; border-radius: 12px; font-size: 13.5px; transition: background .18s; }
.moment:hover { background: var(--soft); }
.moment-face { position: relative; flex: none; }
.moment-icon { position: absolute; right: -4px; bottom: -3px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; border: 2px solid #fff; color: #fff; background: #7c88a8; }
.tone-brand { background: var(--brand); } .tone-green { background: var(--green); } .tone-red { background: var(--red); } .tone-violet { background: var(--violet); } .tone-amber { background: #d98500; }
.moment-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }

.team { display: flex; flex-direction: column; }
.member { display: grid; grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(66px, .5fr)) minmax(140px, 1fr) auto; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 12px; transition: background .18s; }
.member + .member { border-top: 1px solid var(--line); }
.member:hover { background: var(--soft); }
.member-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.member-who > span:last-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.team-num { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.team-num b { font-family: var(--display); font-size: 20px; }
.team-num small { font-size: 11px; }
.team-num.zero b { color: #a2abc4; }
.team-num.bad b { color: var(--red); }
.team-num.good b { color: var(--green); }
.member-progress { display: flex; flex-direction: column; gap: 4px; }
.meter { display: block; height: 8px; border-radius: 9px; background: var(--green-soft); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 9px; background: var(--green); transform-origin: left; animation: grow 1.1s ease backwards .45s; }

/* ───── foydalanuvchilar ───── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 16px; }
.user { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 16px 14px; transition: transform .25s var(--spring), box-shadow .25s, border-color .2s; min-width: 0; }
.user:hover { transform: translateY(-4px); box-shadow: 0 18px 32px -22px #17213d80; }
.user.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.user h3 { font-family: var(--display); font-size: 18px; overflow-wrap: anywhere; }
.select { position: absolute; top: 15px; left: 15px; width: 19px; height: 19px; accent-color: var(--brand); cursor: pointer; }
.refresh { position: absolute; top: 7px; right: 7px; }
.user-photo { position: relative; padding: 4px; border-radius: 50%; background: var(--brand-soft); }
.badge-new { position: absolute; bottom: -3px; left: 50%; translate: -50% 0; padding: 1px 9px; border-radius: 99px; background: var(--amber); color: var(--navy); font-size: 11px; font-weight: 750; }
.id { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 8px; background: var(--soft); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.id:hover { background: var(--brand-soft); color: var(--brand); }
.counts { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; margin: 8px 0; padding: 9px 0; border-block: 1px solid var(--line); }
.counts dd { font-family: var(--display); font-size: 19px; font-weight: 700; }
.counts dt { font-size: 10.5px; color: var(--muted); }
.counts .bad dd, .counts .bad dt { color: var(--red); }
.selection { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100vw - 24px); padding: 12px 18px; border-radius: 16px; background: var(--navy); color: #fff; box-shadow: 0 18px 40px -12px #0008; animation: rise .35s var(--spring); }
.selection .btn-ghost { background: transparent; color: #fff; border-color: #ffffff30; }

/* ───── vazifalar va hisobotlar ───── */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; }
.tab { display: flex; gap: 8px; align-items: center; white-space: nowrap; padding: 8px 14px; border-radius: 11px; font-weight: 550; font-size: 13.5px; color: var(--muted); }
.tab span { font-size: 12px; padding: 0 7px; border-radius: 99px; background: #dbe1f0; color: var(--ink); }
.tab:hover { background: #fff8; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 4px 14px -8px #17213d66; }
.reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 18px; align-items: start; }
.submission { display: flex; flex-direction: column; gap: 13px; }
.submission header { display: flex; align-items: center; gap: 12px; }
.submission header div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.title-link { text-align: left; font-family: var(--display); font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.title-link:hover { color: var(--brand); }
.report { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.report-text { background: var(--soft); border-radius: 4px 16px 16px 16px; padding: 12px 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.report video { width: 100%; max-height: 380px; border-radius: 14px; background: #0d1326; }
.report video.round { width: 240px; height: 240px; object-fit: cover; border-radius: 50%; }
.report audio { width: 100%; }
.photo { display: block; border-radius: 14px; overflow: hidden; cursor: zoom-in; align-self: flex-start; }
.photo img { max-height: 320px; transition: transform .35s; }
.photo:hover img { transform: scale(1.03); }
.file-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.caption { white-space: pre-wrap; overflow-wrap: anywhere; }
.file-status { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border: 1px dashed #bcc6df; border-radius: 14px; color: var(--muted); font-size: 13.5px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.review { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 4px; }

.facts { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 9px 18px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { overflow-wrap: anywhere; }

/* ───── vazifalar jadvali ───── */
.table-card { background: var(--surface); border: 1px solid #cdd5e8; border-radius: 16px; overflow: hidden; box-shadow: 0 14px 30px -26px #17213d80; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th, .table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th:last-child, .table td:last-child { border-right: 0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th { background: #f0f3fa; border-bottom-color: #cdd5e8; white-space: nowrap; }
.table th button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: left; }
.table th button:hover, .table th[aria-sort] button { color: var(--ink); background: #e6ebf7; }
.table th button:focus-visible { outline-offset: -3px; }
.arrow { width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; rotate: 45deg; opacity: 0; transition: rotate .2s, opacity .2s; }
th button:hover .arrow { opacity: .35; }
th[aria-sort] .arrow { opacity: 1; }
th[aria-sort="ascending"] .arrow { rotate: 225deg; translate: 0 2px; }
.table td { padding: 11px 14px; }
.table tbody tr { cursor: pointer; }
.table tbody tr:nth-child(even) td { background: #fafbfe; }
.table tbody tr:hover td { background: var(--brand-soft); }
.table td:first-child { box-shadow: inset 3px 0 0 var(--mark, transparent); }
tr.is-sent { --mark: var(--amber); }
tr.is-accepted { --mark: var(--brand); }
tr.is-review { --mark: var(--violet); }
tr.is-done { --mark: var(--green); }
tr.is-overdue, tr.is-failed { --mark: var(--red); }
.col-id { width: 64px; color: var(--muted); font-variant-numeric: tabular-nums; }
.table td.col-id { text-align: center; }
.col-title { min-width: 220px; max-width: 340px; }
.cell-title { display: block; max-width: 100%; text-align: left; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-title small { display: flex; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap; }
.col-title small .icon { flex: none; }
.col-user { min-width: 190px; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.cell-user strong { font-weight: 600; white-space: nowrap; }
.col-priority { width: 136px; }
.level { display: inline-flex; align-items: center; justify-content: center; min-width: 102px; padding: 4px 10px; border-radius: 7px; border: 1px solid; font-size: 12px; font-weight: 650; }
.level-normal { color: var(--green); background: var(--green-soft); border-color: #b5e3d1; }
.level-high { color: var(--amber-ink); background: var(--amber-soft); border-color: #f6d891; }
.level-urgent { color: var(--red); background: var(--red-soft); border-color: #f5bfc5; }
.col-deadline { width: 140px; white-space: nowrap; }
.col-remaining { width: 200px; }
.col-status { width: 160px; }
.col-status .pill { min-width: 130px; justify-content: center; padding-block: 5px; }
.bar { display: block; height: 5px; margin-top: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 9px; background: var(--green); transition: width .9s ease; }
.bar[data-urgency="day"] > span { background: var(--brand); }
.bar[data-urgency="soon"] > span { background: var(--amber); }
.bar[data-urgency="late"] > span { background: var(--red); }
.result { font-weight: 600; font-size: 13px; }
.result.ok { color: var(--green); }
.result.late { color: var(--red); }
.table-foot { padding: 11px 16px; border-top: 1px solid #cdd5e8; background: #f7f9fd; font-size: 12.5px; color: var(--muted); }
.table tbody tr.empty-row, .table tbody tr.empty-row:hover td { cursor: default; background: var(--surface); }
.table .empty-row td { box-shadow: none; border: 0; }

@media (min-width: 801px) and (max-width: 1450px) {
  .next { gap: 10px; padding: 10px; }
  .next-time { width: 120px; }
  .next > .pill { min-width: 0; padding-inline: 8px; }
}

/* Noutbuk ekranida barcha ustunlar aylantirmasdan sig'adi. */
@media (min-width: 801px) and (max-width: 1450px) {
  .table { min-width: 860px; font-size: 13px; }
  .table td { padding: 10px 9px; }
  .table th button { padding: 11px 9px; gap: 6px; }
  .table .col-id { width: 44px; }
  .table .col-title { min-width: 140px; max-width: 220px; }
  .table .col-user { min-width: 0; }
  .table .col-user .ring { display: none; }
  .table .col-priority, .table .col-deadline, .table .col-status { width: 1%; }
  .table .col-remaining { width: 150px; }
  .level, .col-status .pill { min-width: 0; width: 100%; white-space: nowrap; }
  .table .pick-priority, .table .pick-status { width: 100%; }
}

/* ───── oynalar ───── */
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; background: #0e15296e; backdrop-filter: blur(5px); animation: fade .22s ease both; }
.overlay.leaving { animation: fade .22s ease reverse both; pointer-events: none; }
.panel { background: var(--surface); box-shadow: 0 30px 80px -20px #0e152980; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.overlay-drawer { justify-content: flex-end; }
.panel-drawer { width: min(540px, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain; animation: slide .38s var(--spring) both; }
.panel-drawer .panel-head { position: sticky; top: 0; background: var(--surface); z-index: 2; }
.leaving .panel-drawer { animation: slide .22s ease reverse both; }
.overlay-composer, .overlay-confirm, .overlay-lightbox { align-items: center; justify-content: center; padding: 18px; }
.panel-composer { width: min(940px, 100%); max-height: 100%; display: flex; border-radius: 22px; overflow: hidden; animation: modal .38s var(--spring) both; }
.panel-confirm { width: min(420px, 100%); padding: 22px; border-radius: 18px; display: flex; flex-direction: column; gap: 14px; animation: modal .3s var(--spring) both; }
.panel-lightbox { position: relative; background: transparent; box-shadow: none; animation: modal .3s var(--spring) both; }
.panel-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; }
.panel-lightbox .icon-btn { position: absolute; top: 8px; right: 8px; z-index: 1; background: #fff; }
.composer { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.composer-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); overflow-y: auto; min-height: 0; }
.composer-form { display: flex; flex-direction: column; gap: 17px; padding: 20px 22px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px; max-height: 164px; overflow-y: auto; padding: 3px; }
.person { display: flex; align-items: center; gap: 9px; text-align: left; padding: 8px 9px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; transition: .18s; }
.person-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.person-text strong, .person-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.person-text small { font-size: 11.5px; }
.person .tick { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; scale: 0; transition: scale .25s var(--spring); }
.person[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.person[aria-pressed="true"] .tick { scale: 1; }
.file-drop { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px; border: 1px dashed #b5c0dc; border-radius: 12px; color: var(--muted); cursor: pointer; overflow-wrap: anywhere; }
.file-drop:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.composer-preview { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--soft); border-left: 1px solid var(--line); }
.tg { position: sticky; top: 0; display: flex; flex-direction: column; gap: 5px; padding: 18px 12px; border-radius: 18px; background: linear-gradient(160deg, #b9d3e8, #cfe3d2); font-size: 13.5px; }
.tg-bubble { background: #fff; border-radius: 14px 14px 14px 4px; padding: 11px 13px; overflow-wrap: anywhere; }
.tg-bubble p + p { margin-top: 3px; }
.tg-bubble .tg-title { font-weight: 700; margin-top: 11px; }
.tg-bubble .tg-desc { white-space: pre-wrap; margin-bottom: 9px; }
.tg-button { text-align: center; padding: 9px; border-radius: 10px; background: #ffffffc4; font-weight: 600; color: #24577d; }
.panel-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); }
.panel-foot .form-error { margin-right: auto; }

.drawer-body { display: flex; flex-direction: column; gap: 17px; padding: 20px 22px 40px; }
.drawer-user { display: flex; align-items: center; gap: 13px; }
.drawer-user > div { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.drawer-title { font-family: var(--display); font-size: 23px; overflow-wrap: anywhere; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; }
.attachment { display: flex; gap: 9px; align-items: center; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--brand); font-weight: 550; overflow-wrap: anywhere; }
.deadline-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 16px; border-radius: 14px; background: var(--soft); }
.deadline-card > div { display: flex; flex-direction: column; }
.deadline-card[data-urgency="soon"] { background: var(--amber-soft); }
.deadline-card[data-urgency="late"] { background: var(--red-soft); }
.notice { padding: 11px 14px; border-radius: 11px; background: var(--violet-soft); overflow-wrap: anywhere; }
.notice.bad { background: var(--red-soft); color: var(--red); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; text-align: center; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); }
.steps li strong { font-weight: 550; }
.steps li small { font-size: 11px; }
.steps li + li::before { content: ''; position: absolute; top: 10px; right: calc(50% + 14px); width: calc(100% - 28px); height: 2px; background: var(--line); }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--green); animation: grow .5s ease both; transform-origin: left; }
.steps .dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.steps .done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.drawer-body section { border-top: 1px solid var(--line); padding-top: 15px; display: flex; flex-direction: column; gap: 10px; }
.drawer-body section h4 { margin: 0; }
.drawer-body .empty { padding: 14px; }
.plain { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.reminder { display: flex; gap: 9px; align-items: center; }
.reminder span { flex: 1; }
.history li { display: flex; justify-content: space-between; gap: 12px; }
.history em { font-style: normal; color: var(--muted); overflow-wrap: anywhere; }
.history small { white-space: nowrap; }

/* ───── bildirishnomalar ───── */
#toasts { position: fixed; z-index: 70; bottom: 18px; left: 18px; display: flex; flex-direction: column; gap: 9px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 14px; background: var(--navy); color: #fff; font-size: 13.5px; box-shadow: 0 16px 34px -12px #0008; animation: toast .45s var(--spring) both; overflow-wrap: anywhere; }
.toast.leaving { animation: toast .25s ease reverse both; }
.toast-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #8ea2ff; }
.toast-success .toast-dot { background: #34d399; }
.toast-error .toast-dot { background: #ff6b7a; }
.plane { position: fixed; z-index: 80; color: var(--brand); pointer-events: none; filter: drop-shadow(0 8px 10px #3552d666); animation: fly 1.05s cubic-bezier(.45, -.2, .6, 1) forwards; }
.skeleton { margin: 22px; border-radius: 14px; background: linear-gradient(100deg, var(--soft) 30%, #e7ecf7 50%, var(--soft) 70%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton.tall { height: 320px; }

/* ───── kirish ───── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 15%, #2d3f7c, transparent 50%), var(--navy); }
.login-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 32px 28px; border-radius: 24px; background: var(--surface); animation: modal .55s var(--spring) both; }
.login-card .mark { width: 54px; height: 54px; border-radius: 15px; }
.login-card.shake { animation: shake .4s; }

/* ───── harakat ───── */
@keyframes spin { to { rotate: 360deg; } }
@keyframes lift { from { opacity: 0; transform: translateY(20px); } }
@keyframes rise-bar { from { transform: scaleY(0); } }
@keyframes sweep { 0%, 55% { translate: 0 0; } 100% { translate: 520% 0; } }
@keyframes glowline { 50% { box-shadow: 0 0 24px 6px #ffb22499; } }
@keyframes page { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(100%); } }
@keyframes modal { from { opacity: 0; transform: translateY(24px) scale(.95); } }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
@keyframes toast { from { opacity: 0; transform: translateY(30px) scale(.92); } }
@keyframes pop { from { scale: 0; } }
@keyframes count { from { opacity: 0; transform: translateY(9px); } }
@keyframes arrive { from { opacity: 0; transform: scale(.85) translateY(-14px); } }
@keyframes glow { 0%, 40% { background-color: var(--amber-soft); } }
@keyframes drop { from { opacity: 0; transform: translateY(-60px) scale(1.5); } }
@keyframes alarm { from { box-shadow: 0 0 0 0 #d9384999; } to { box-shadow: 0 0 0 11px #d9384900; } }
@keyframes beat { from { box-shadow: 0 0 0 0 #34d399aa; } 60%, to { box-shadow: 0 0 0 7px #34d39900; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
@keyframes fly { 20% { transform: translate(-26px, 12px) rotate(-12deg) scale(1.15); } to { transform: translate(55vw, -75vh) rotate(8deg) scale(.5); opacity: 0; } }

/* ───── planshet va telefon ───── */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns, .columns.even { grid-template-columns: minmax(0, 1fr); }
  .member { grid-template-columns: repeat(4, 1fr); }
  .member-who, .member-progress { grid-column: span 2; }
  .member .btn { grid-column: span 4; }
}
@media (max-width: 800px) {
  .shell { display: block; }
  .side { position: static; height: auto; flex-direction: row; justify-content: space-between; align-items: center; padding: 12px 16px; }
  .nav { position: fixed; z-index: 20; inset: auto 0 0 0; flex-direction: row; justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--navy); }
  .nav a { position: relative; flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 10.5px; }
  .nav-badge { position: absolute; top: 0; right: 14%; }
  .content { padding: 18px 14px 150px; }
  h1 { font-size: 25px; }
  .page-head .actions .btn-primary, .hero .btn-primary { display: none; }
  .fab { display: grid; place-items: center; position: fixed; z-index: 21; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 18px; background: var(--brand); color: #fff; box-shadow: 0 14px 28px -10px var(--brand); }
  .selection { bottom: 144px; }
  .tiles { gap: 10px; }
  .tile { padding: 14px; }
  .tile strong { font-size: 32px; }
  .tile-icon { width: 36px; height: 36px; border-radius: 11px; }
  .clock { display: none; }
  .next { display: grid; grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
  .next-time { grid-column: 2; width: auto; }
  .next > .pill { grid-column: 2; justify-self: start; }
  .axis span { font-size: 10.5px; padding-left: 4px; white-space: nowrap; }
  .axis b:not(:empty) { margin-left: 3px; min-width: 16px; padding: 0 3px; }
  .member { gap: 10px 6px; }
  .member-who, .member-progress { grid-column: span 4; }
  .search { width: 100%; }
  .page-head .actions { width: 100%; }
  .page-head .actions .search { flex: 1; width: auto; min-width: 0; }
  .row { flex-wrap: wrap; row-gap: 6px; }
  .row-main { flex-basis: 60%; }
  .row > .priority { display: none; }
  .row-time { align-items: flex-start; text-align: left; margin-left: 65px; flex: 1; }
  .row-time small { display: none; }
  .row > .pill { min-width: 0; }
  .overlay-composer { padding: 0; }
  .panel-composer { height: 100%; border-radius: 0; }
  .composer-body { display: block; }
  .composer-preview { border-left: 0; border-top: 1px solid var(--line); }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  /* Telefonda har bir qator alohida kartochka bo'ladi. */
  .table-card { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
  .table, .table tbody { display: block; min-width: 0; }
  .table thead { display: none; }
  .table tbody tr { display: block; margin-bottom: 12px; border: 1px solid #cdd5e8; border-radius: 14px; overflow: hidden; background: var(--surface); }
  .table tbody td { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; align-items: center; width: auto; min-width: 0; max-width: none; padding: 9px 13px; border-right: 0; text-align: left; }
  .table tbody tr td:last-child { border-bottom: 0; }
  .table td::before { content: attr(data-label); font-size: 12px; color: var(--muted); }
  .table td.col-id { text-align: left; }
  .table td.col-title > * { grid-column: 2; }
  .table td.col-title::before { grid-row: 1 / span 2; }
  .table td > .pick { justify-self: start; }
  .table td > .pill { justify-self: start; }
  .cell-title { white-space: normal; overflow-wrap: anywhere; }
  .table .empty-row td { display: block; }
  .table .empty-row td::before { content: none; }
  .table-foot { background: transparent; border: 0; padding: 0 4px; }
  .facts dd { margin-bottom: 9px; }
}

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

/* Til tanlash */
.flag { flex: none; border-radius: 3px; box-shadow: 0 0 0 1px #0e152933; }
.lang-menu { position: relative; }
.lang-trigger { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.lang-trigger:hover, .lang-trigger[aria-expanded="true"] { border-color: var(--brand); }
.chevron { width: 6px; height: 6px; border: solid var(--muted); border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -2px; transition: rotate .2s, translate .2s; }
.lang-trigger[aria-expanded="true"] .chevron { rotate: 225deg; translate: 0 2px; }
.lang-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px; min-width: 178px; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 18px 40px -16px #0e152966; animation: page .18s ease both; }
.lang-list[hidden] { display: none; }
.lang-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 550; text-align: left; cursor: pointer; }
.lang-list button span { flex: 1; }
.lang-list button:hover { background: var(--soft); }
.lang-list button[aria-checked="true"] { background: var(--brand-soft); color: var(--brand); }
.lang-switch { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.lang-switch button { display: flex; align-items: center; gap: 10px; min-width: 156px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; transition: border-color .18s, background .18s; }
.lang-switch button span { flex: 1; text-align: left; }
.lang-switch button:hover { border-color: var(--brand); }
.lang-switch button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.login { position: relative; }
.login-tools { position: absolute; top: 18px; right: 18px; }

/* Yuqori panel: holat, til, chiqish */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: relative; z-index: 10; display: flex; justify-content: flex-end; align-items: center; gap: 12px; width: 100%; max-width: 1560px; margin-inline: auto; padding: 14px clamp(16px, 3.2vw, 44px) 0; font-size: 13px; color: var(--muted); }
.topbar .live { margin-right: auto; }
.topbar .logout { height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); font-weight: 600; }
.topbar .logout:hover { color: var(--red); border-color: var(--red); }
.main .content { padding-top: 16px; }

/* Amal tugmalari: ikkinchi darajali chapda (telefonda tepada), asosiy o'ngda (telefonda eng pastda) */
.decide { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.decide .btn { flex: 1 1 auto; min-width: 150px; justify-content: center; min-height: 44px; white-space: nowrap; }
.review { display: flex; flex-direction: column; gap: 6px; }
.submission { display: flex; flex-direction: column; }
.submission .review { margin-top: auto; }
.user .user-actions { margin-top: auto; }
.panel-drawer { display: flex; flex-direction: column; }
.panel-drawer > * { flex-shrink: 0; }
.panel-drawer .drawer-body { flex-grow: 1; }
.drawer-foot { position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; max-height: 78vh; overflow-y: auto; padding: 12px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -14px 26px -22px #0e1529; }
.drawer-foot > .btn-quiet-danger { align-self: center; }
.drawer-foot .review { border: 0; margin: 0; padding: 0; }
.drawer-foot .review > .btn-quiet-danger { align-self: center; }

@media (max-width: 800px) {
  .side { padding-right: 150px; min-height: 66px; }
  .topbar { position: absolute; top: 0; right: 0; width: auto; height: 66px; padding: 0 14px; gap: 8px; }
  .topbar .live { margin: 0; font-size: 0; }
  .topbar .live::before { margin: 0; }
  .topbar .lang-trigger { border-color: #ffffff26; background: #ffffff14; color: #fff; }
  .topbar .chevron { border-color: #c3cbe6; }
  .topbar .logout { width: 38px; padding: 0; justify-content: center; border-color: #ffffff26; background: #ffffff14; color: #c3cbe6; }
  .topbar .logout span { display: none; }
  .main .content { padding-top: 18px; }
  .panel-foot .btn { flex: 1; justify-content: center; }
  .panel-foot .btn-primary { flex: 2; }
  .panel-foot .form-error { flex-basis: 100%; }
  /* Telefonda bildirishnoma tepada va bittadan: pastdagi tugmalarni yopmaydi. */
  #toasts { top: 10px; bottom: auto; left: 50%; translate: -50% 0; }
  #toasts .toast:not(:last-child) { display: none; }
  .lane-empty { inset: 22px 14px auto 16%; font-size: 13px; }
}

/* Ruscha matn uzunroq: muddat yozuvi bir qatorda tursin. */
.next-time .countdown { white-space: nowrap; font-size: 13px; }
@media (min-width: 801px) and (max-width: 1560px) { .next-time { width: 138px; } }
@media (max-width: 800px) { .next-time { width: auto; } }

/* Adminlar ro'yxati */
.admins { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.admins li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; }
.admins li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.admins small { color: var(--muted); }
.admin-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.admin-form .btn { justify-content: center; }
@media (max-width: 800px) { .admin-form { grid-template-columns: minmax(0, 1fr); } .admins li { flex-wrap: wrap; } }

/* Bildirishnomalar qo'ng'irog'i */
.bell { position: relative; }
.bell-trigger { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .18s, color .18s, background .18s; }
.bell-trigger:hover, .bell-trigger[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
.bell-trigger.has-alerts { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.bell-badge { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid var(--bg); border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; line-height: 16px; text-align: center; }
.bell-badge[hidden], .bell-total[hidden] { display: none; }
.bell-trigger.jingle .icon { animation: jingle .9s ease; transform-origin: 50% 12%; }
.bell-trigger.jingle .bell-badge { animation: pop .5s var(--spring); }
@keyframes jingle { 0%, 100% { rotate: 0deg; } 15% { rotate: 18deg; } 30% { rotate: -15deg; } 45% { rotate: 11deg; } 60% { rotate: -7deg; } 75% { rotate: 3deg; } }
.bell-list { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; display: flex; flex-direction: column; width: 372px; max-height: min(72vh, 580px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 26px 60px -20px #0e152980; color: var(--ink); overflow: hidden; animation: page .18s ease both; }
.bell-list[hidden] { display: none; }
.bell-list > header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bell-list > header strong { font-size: 15px; }
.bell-total { padding: 2px 9px; border-radius: 99px; background: var(--red-soft); color: var(--red); font-size: 12px; font-weight: 750; }
.bell-body { overflow-y: auto; overscroll-behavior: contain; }
.bell-section { padding: 6px 8px 8px; }
.bell-section + .bell-section { border-top: 1px solid var(--line); }
.bell-section h3 { display: flex; justify-content: space-between; align-items: center; padding: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.bell-section h3 b { color: var(--red); }
.bell-section ul { list-style: none; }
.bell-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 8px; border: 0; border-radius: 11px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.bell-item:hover { background: var(--soft); }
.bell-item .avatar { flex: none; }
.bell-text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.35; }
.bell-text strong, .bell-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-text strong { font-size: 14px; }
.bell-text small { font-size: 12.5px; color: var(--muted); }
.bell-text em { font-size: 12.5px; font-style: normal; font-weight: 650; }
.bell-overdue em, .bell-overdue em .countdown { color: var(--red); }
.bell-text em .countdown { font: inherit; }
.bell-review em { color: var(--violet); }
.bell-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.bell-all { display: block; padding: 8px; border-radius: 9px; color: var(--brand); font-size: 13px; font-weight: 650; text-align: center; text-decoration: none; }
.bell-all:hover { background: var(--brand-soft); }
.bell-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 24px; color: var(--muted); font-size: 14px; text-align: center; }
.bell-empty .icon { color: var(--green); }
.bell-hint { display: block; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--amber-soft); color: var(--amber-ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.topbar:has(.bell-list:not([hidden])) { z-index: 45; }

@media (max-width: 800px) {
  .topbar .bell-trigger { border-color: #ffffff26; background: #ffffff14; color: #fff; }
  .topbar .bell-trigger.has-alerts { border-color: var(--red); background: #d9384940; }
  .topbar .bell-badge { border-color: var(--navy); }
  .bell-list { position: fixed; top: 64px; right: 10px; left: 10px; width: auto; max-height: calc(100dvh - 150px); }
  .side { padding-right: 196px; }
}
@media (max-width: 430px) {
  /* Tor ekranda sarlavha bir qatorda qolishi uchun: tilda faqat bayroq, nom sig'masa qisqaradi. */
  .side { padding-right: 168px; }
  .brand > div:last-child { min-width: 0; }
  .brand strong, .brand small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand strong { font-size: 15px; }
  .topbar { gap: 7px; padding: 0 10px; }
  .topbar .live { display: none; }
  .topbar .lang-trigger { gap: 7px; padding: 0 10px; }
  .topbar .lang-trigger > span { display: none; }
}

/* ───── vazifalar filtrlari ───── */
.filter-bar { position: relative; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: -6px; padding: 10px; border: 1px solid #cdd5e8; border-radius: 15px; background: var(--surface); box-shadow: 0 14px 30px -28px #17213d80; }
.filter-bar:has(.facet-popup:not([hidden])) { z-index: 25; }
.filter-search { display: flex; flex: 1 1 280px; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); color: var(--muted); transition: border-color .15s, box-shadow .15s, background .15s; }
.filter-search:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); }
.filter-search .icon { flex: none; }
.filter-search .input { min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.facet { position: relative; }
.facet-trigger { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.facet-trigger:hover, .facet-trigger[aria-expanded="true"] { border-color: var(--brand); color: var(--ink); }
.facet.active .facet-trigger { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.facet-trigger .chevron { margin-left: 2px; }
.facet-trigger[aria-expanded="true"] .chevron { rotate: 225deg; translate: 0 2px; }
.facet-value { max-width: 175px; overflow: hidden; text-overflow: ellipsis; padding: 1px 8px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 12px; }
.facet-value[hidden] { display: none; }
.facet-popup { position: absolute; top: calc(100% + 7px); right: 0; z-index: 30; display: flex; flex-direction: column; gap: 6px; width: 280px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 54px -20px #0e152973; animation: page .18s ease both; }
.facet-popup.from-left { right: auto; left: 0; }
.facet-popup[hidden] { display: none; }
.facet-users .facet-popup { width: 330px; }
.facet-list { display: flex; flex-direction: column; gap: 2px; max-height: 308px; overflow-y: auto; overscroll-behavior: contain; }
.facet-option { display: flex; flex-shrink: 0; align-items: center; gap: 10px; width: 100%; padding: 8px 9px; border-radius: 9px; text-align: left; }
.facet-option:hover, .facet-option:focus-visible { background: var(--soft); }
.facet-option[aria-checked="true"] { background: var(--brand-soft); }
.facet-option .avatar { flex: none; }
.tick { display: grid; flex: none; place-items: center; width: 18px; height: 18px; border: 1.5px solid #b4c0dc; border-radius: 6px; background: var(--surface); color: transparent; }
.facet-option[role="radio"] .tick { border-radius: 50%; }
.facet-option[aria-checked="true"] .tick { border-color: var(--brand); background: var(--brand); color: #fff; }
.facet-text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.facet-text span, .facet-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet-text span { font-size: 13.5px; font-weight: 600; }
.facet-text small { font-size: 12px; color: var(--muted); }
.facet-option b { min-width: 26px; padding: 0 7px; border-radius: 99px; background: #e4e9f6; font-size: 12px; text-align: center; }
.facet-none { padding: 16px 9px; color: var(--muted); font-size: 13.5px; text-align: center; }
.facet-clear { padding: 9px; border-top: 1px solid var(--line); color: var(--brand); font-size: 13px; font-weight: 650; }
.facet-clear[hidden], .facet-range[hidden] { display: none; }
.facet-range { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 4px; }
.facet-range label { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.swatch { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--muted); }
.swatch-sent, .swatch-high { background: var(--amber); }
.swatch-accepted { background: var(--brand); }
.swatch-overdue, .swatch-urgent, .swatch-failed { background: var(--red); }
.swatch-review { background: var(--violet); }
.swatch-done, .swatch-normal { background: var(--green); }
.chips-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -10px; }
.chips-active[hidden] { display: none; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px 6px 12px; border: 1px solid #cbd4f6; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: 13px; animation: pop .25s var(--spring); }
.filter-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-chip:hover { border-color: var(--brand); }
.chips-clear { padding: 6px 10px; border-radius: 99px; color: var(--red); font-size: 13px; font-weight: 650; }
.chips-clear:hover { background: var(--red-soft); }
/* Jadvaldagi bosiladigan kataklar */
.pick { display: inline-flex; max-width: 100%; border-radius: 8px; text-align: left; transition: box-shadow .15s, background .15s; }
.pick:hover, .pick:focus-visible { box-shadow: 0 0 0 2px var(--brand); }
.pick-user { margin: -4px -7px; padding: 4px 7px; border-radius: 11px; }
.pick-user:hover { background: var(--surface); }
.pick-status { border-radius: 99px; }

@media (max-width: 800px) {
  .filter-bar { gap: 8px; }
  .filter-search { flex-basis: 100%; }
  .facet { position: static; flex: 1 1 calc(50% - 4px); min-width: 0; }
  .facet-trigger { width: 100%; padding: 0 11px; }
  .facet-trigger .chevron { margin-left: auto; }
  /* Tanlov bo'lsa, tor tugmada sarlavha o'rniga tanlangan qiymat ko'rinadi. */
  .facet.active .facet-trigger > span:not(.facet-value) { display: none; }
  .facet-value { min-width: 0; max-width: none; }
  .facet-popup, .facet-users .facet-popup { right: 0; left: 0; width: auto; }
  .facet-list { max-height: 42vh; }
}
/* "Foydalanuvchi" kabi uzun sarlavha tor telefonda ham tugmaga sig'sin. */
@media (max-width: 430px) {
  .facet-trigger { gap: 6px; font-size: 13px; }
  .facet-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .facet-trigger .icon, .facet-trigger .chevron { flex: none; }
}

/* To'liq ekran tugmasi */
.screen-toggle { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); transition: border-color .18s, color .18s; }
.screen-toggle:hover, .screen-toggle[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); }
@media (max-width: 800px) {
  .topbar .screen-toggle { border-color: #ffffff26; background: #ffffff14; color: #fff; }
  /* Telefonda bu tugma kerak emas; kompyuterdagi tor oynada (Telegram Desktop) qoladi. */
  .topbar .screen-toggle:not(.in-telegram) { display: none; }
}
@media (max-width: 800px) and (pointer: fine) {
  .topbar .screen-toggle:not(.in-telegram) { display: grid; }
  .side { padding-right: 242px; }
}
@media (max-width: 430px) and (pointer: fine) {
  .side { padding-right: 212px; }
  .brand .mark { display: none; }
}

/* Telegram to'liq ekrani: o'ng yuqori burchakda Telegramning menyu va yopish tugmalari turadi */
@media (min-width: 801px) {
  .tg-fullscreen .topbar { padding-right: 104px; }
  .tg-fullscreen .panel-drawer .panel-head { padding-right: 116px; }
}
.tg-fullscreen .overlay-composer { padding-top: 54px; }

/* Telegram Desktopdagi kichik Mini App oynasi */
@media (max-width: 430px) {
  .drawer-user { flex-wrap: wrap; }
  .drawer-user > div { min-width: 170px; }
}
@media (max-width: 340px) {
  .nav { padding-inline: 2px; }
  .nav a { min-width: 0; padding-inline: 0; font-size: 9.5px; white-space: nowrap; }
}
@media (max-height: 620px) {
  .drawer-foot { gap: 4px; padding-block: 8px calc(8px + env(safe-area-inset-bottom)); }
  .drawer-foot .btn { min-height: 36px; padding-block: 6px; }
  /* Izoh yoki yangi muddat yozilayotganda forma sarlavha ostidagi butun joyni egallaydi */
  .drawer-foot:has(textarea, input) { max-height: calc(100dvh - 70px); }
}
