/* Jamoa: chap menyu + ish maydoni. Ranglar bitta joyda (tokenlar). */
:root {
  /* Brend "Lojuvard" (2026-11-16): lojuvard = harakat/faol, firuza = muvaffaqiyat, zafaron = bugun/diqqat, anor = xavf. */
  --bg: #f4f6fa; --panel: #ffffff; --panel2: #f8f9fc; --line: #e1e5ee; --text: #151b2c; --muted: #5a6378;
  --side: #141f3a; --side2: #1e2b4d; --side-text: #c9d2e8; --accent: #2846b4; --accent-hover: #20398f; --accent-soft: #e8edfb; --accent-ink: #fff;
  --ok: #159a8c; --ok-ink: #0f7a6f; --ok-bg: #e3f5f2; --sun: #e3a21a; --sun-ink: #8a5a00; --sun-bg: #fdf3dc; --danger: #c2362f; --danger-bg: #fcebea;
  --red: var(--danger); --red-bg: var(--danger-bg); --amber: var(--sun-ink); --amber-bg: var(--sun-bg); --green: var(--ok-ink); --green-bg: var(--ok-bg); --blue: var(--accent); --blue-bg: var(--accent-soft);
  --line-input: #7d879c; --line-hover: #c5ccdb; --focus: #2846b4; --skel: #e6e9f1;
  --font: Onest, system-ui, -apple-system, "Segoe UI", sans-serif; --font-display: Unbounded, Onest, system-ui, sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 18px; --fs-xl: 24px; --fs-2xl: 32px;
  --r: 14px; --shadow: 0 1px 2px rgba(20, 31, 58, .06), 0 4px 16px rgba(20, 31, 58, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 400 var(--fs-md)/1.45 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1 { font: 600 var(--fs-xl)/1.2 var(--font-display); margin: 0; letter-spacing: -.02em; }
b, strong { font-weight: 600; }
h2 { font-size: var(--fs-lg); margin: 0 0 12px; }
h3 { font-size: var(--fs-md); margin: 0 0 10px; color: var(--text); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
/* klaviatura fokusi: hamma joyda bir xil, kontrast >= 3:1 */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.side :focus-visible, .mnav :focus-visible { outline-color: #fff; }
:focus:not(:focus-visible) { outline: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* tugmalar va maydonlar */
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 9px 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--line-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 6px 10px; font-size: var(--fs-sm); border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: var(--fs-sm); }
.chip.on { background: var(--side); border-color: var(--side); color: #fff; }
input, select, textarea { border: 1px solid var(--line-input); background: var(--panel); border-radius: 10px; padding: 9px 11px; width: 100%; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 80px; }
label.f { display: grid; gap: 5px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.form { display: grid; gap: 12px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.grid2 > *, .cols > *, .kpis > * { min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.empty { color: var(--muted); text-align: center; padding: 28px 12px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--sun); color: var(--side); font-size: var(--fs-xs); font-weight: 600; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 600; background: var(--panel2); border: 1px solid var(--line); }
.pill.red { background: var(--red-bg); color: var(--red); border-color: transparent; }
.pill.amber { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.pill.green { background: var(--green-bg); color: var(--green); border-color: transparent; }
.pill.blue { background: var(--blue-bg); color: var(--blue); border-color: transparent; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: var(--fs-sm); color: #fff; flex: none; position: relative; }
.avatar.sm { width: 26px; height: 26px; font-size: var(--fs-xs); }
.avatar .on { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td, table.t tr.click:focus-visible td { background: var(--panel2); }
.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* kirish */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 10% -10%, #dce4fa 0, transparent 60%), var(--bg); }
.auth .box { width: 100%; max-width: 420px; }
.auth .logo { display: flex; align-items: center; gap: 10px; font: 600 var(--fs-xl)/1.2 var(--font-display); letter-spacing: -.02em; margin-bottom: 18px; }
.auth .logo img { width: 40px; height: 40px; }

/* ramka: chap menyu */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 14px 10px; gap: 4px; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 10px; color: #fff; font: 600 var(--fs-lg)/1.2 var(--font-display); letter-spacing: -.01em; padding: 4px 8px 14px; }
.side .brand img { width: 30px; height: 30px; }
.side .co { font-size: var(--fs-xs); color: #9aa8cc; padding: 0 8px 10px; margin-top: -10px; }
/* Kompaniya logotipi oynasi (public/logo.js): brend ostida, kompaniya nomi ustida. */
.side .lg-side { margin: -6px 8px 8px; width: calc(100% - 16px); color: #9aa8cc; }
.side .lg-side.lg-has { width: auto; max-width: calc(100% - 16px); }
.side .lg-side + .co { margin-top: 0; }
.head .lg-home { color: var(--muted); }
.nav { display: flex; align-items: center; gap: 11px; padding: 10px 10px; border-radius: 10px; border: 0; background: transparent; color: var(--side-text); font-weight: 600; text-align: left; width: 100%; }
.nav svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.nav:hover { background: var(--side2); color: #fff; }
.nav.on { background: #fff; color: var(--side); }
.nav .badge { margin-left: auto; }
.side .bottom { margin-top: auto; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.top { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.top .search { max-width: 420px; }
.top .bell { margin-left: auto; }
.top .who { flex: none; }
.top .bell { position: relative; }
.top .bell .badge { position: absolute; top: -6px; right: -6px; }
.view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 20px; }
.view.flush { padding: 0; overflow: hidden; }
.head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

/* bosh sahifa */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); text-align: left; }
.kpi .v { font: 600 var(--fs-xl)/1.25 var(--font-display); font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.kpi .l { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
/* "Bugun" chizig'i: siyoh sirt, 09–19 shkala, tadbirlar va muddatlar zafaron nuqtalar (siyoh ustida kontrast 7.3:1) */
.bugun { background: var(--side); color: #fff; border-radius: var(--r); padding: 14px 18px 12px; margin-bottom: 16px; box-shadow: var(--shadow); }
.bugun-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bugun-h h2 { font: 600 var(--fs-lg)/1.2 var(--font-display); margin: 0; letter-spacing: -.01em; }
.bugun-sum { color: var(--side-text); font-size: var(--fs-sm); }
.bugun-add { margin-left: auto; background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.bugun-add:hover { border-color: #fff; }
.bugun :focus-visible { outline-color: #fff; }
.tl-scroll { overflow-x: auto; overflow-y: hidden; margin: 6px -6px 0; padding: 0 6px; scrollbar-width: thin; }
.tl { --lanes: 1; position: relative; min-width: 640px; height: calc(56px + var(--lanes) * 40px); margin: 0 14px 0 6px; }
.tl-tk { position: absolute; top: 4px; transform: translateX(-50%); font-size: var(--fs-xs); color: #9aa8cc; font-variant-numeric: tabular-nums; }
.tl-tk::after { content: ''; position: absolute; left: 50%; top: 22px; width: 1px; height: 6px; background: rgba(255, 255, 255, .3); }
.tl-tk:first-of-type { transform: none; }
.tl-tk:first-of-type::after { left: 0; }
.tl-tk:nth-of-type(11) { transform: translateX(-100%); }
.tl-tk:nth-of-type(11)::after { left: auto; right: 0; }
.tl-line { position: absolute; left: 0; right: 0; top: 30px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.tl-bar { position: absolute; top: 29px; height: 4px; min-width: 4px; border-radius: 4px; background: var(--sun); opacity: .55; }
.tl-pin { position: absolute; top: 25px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px var(--side); }
.tl-ev { --lane: 0; position: absolute; top: calc(48px + var(--lane) * 40px); max-width: 190px; display: flex; gap: 6px; align-items: baseline; margin-left: -6px; padding: 5px 9px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; background: var(--side2); color: #fff; font-size: var(--fs-sm); text-align: left; }
.tl-ev::before { content: ''; position: absolute; left: 5px; bottom: 100%; width: 1px; height: calc(15px + var(--lane) * 40px); background: rgba(227, 162, 26, .55); }
.tl-ev.end { transform: translateX(calc(-100% + 12px)); }
.tl-ev.end::before { left: auto; right: 5px; }
.tl-ev b { color: var(--sun); font-variant-numeric: tabular-nums; }
.tl-ev:hover { border-color: var(--sun); }
.tl-ev.past, .tl-pin.past, .tl-bar.past { opacity: .5; }
.tl-now { position: absolute; top: 20px; bottom: 0; width: 2px; margin-left: -1px; background: #fff; border-radius: 2px; pointer-events: none; }
.tl-now i { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font: 600 var(--fs-xs)/1 var(--font); font-style: normal; background: #fff; color: var(--side); border-radius: 99px; padding: 3px 6px; white-space: nowrap; }
.tl-empty { position: absolute; left: 0; top: 46px; color: var(--side-text); font-size: var(--fs-sm); }
.tl-tasks { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: var(--fs-sm); }
.tl-k { color: var(--side-text); }
.tl-none { color: #9aa8cc; }
.tl-task { display: inline-flex; align-items: center; gap: 7px; max-width: 260px; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: #fff; border-radius: 99px; padding: 4px 11px 4px 9px; }
.tl-task i { width: 9px; height: 9px; flex: none; background: var(--sun); transform: rotate(45deg); border-radius: 2px; }
.tl-task:hover { border-color: var(--sun); }
.tl-task.done { color: var(--side-text); text-decoration: line-through; }
.tl-task.done svg { color: #5fd3c4; flex: none; }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.li { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li.small { flex-wrap: wrap; row-gap: 2px; }
.li.small .grow { flex-basis: 120px; }
.li.click { cursor: pointer; border-radius: 8px; }
.li.click:hover { background: var(--panel2); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* messenjer */
.chat { display: grid; grid-template-columns: 320px 1fr; height: 100%; }
.chat-list { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.chat-list .tools { padding: 12px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.chat-list .items { overflow-y: auto; flex: 1; }
.citem { display: flex; gap: 10px; padding: 11px 12px; cursor: pointer; border-bottom: 1px solid var(--panel2); align-items: center; }
.citem:hover { background: var(--panel2); }
.citem.on { background: var(--accent-soft); }
.citem .t { font-weight: 600; }
.citem .s { font-size: var(--fs-sm); color: var(--muted); }
.conv { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #eef1f7; }
.conv .ch { padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: min(640px, 80%); background: var(--panel); border-radius: 14px; padding: 8px 12px; box-shadow: 0 1px 1px rgba(0,0,0,.04); align-self: flex-start; word-wrap: break-word; }
.msg .body { white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: #e3e9fa; }
.msg.sys { align-self: center; background: transparent; box-shadow: none; color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.msg .who { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.msg .meta { font-size: var(--fs-xs); color: var(--muted); text-align: right; margin-top: 2px; }
.msg .file { display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.04); border-radius: 10px; padding: 8px 10px; margin-top: 4px; text-decoration: none; color: inherit; }
.msg img.prev { max-width: 280px; max-height: 240px; border-radius: 10px; display: block; margin-top: 4px; }
.msg .tools { display: none; }
.msg.me:hover .tools { display: inline; }
.day-sep { align-self: center; font-size: var(--fs-xs); color: var(--muted); background: rgba(255,255,255,.7); border-radius: 99px; padding: 3px 10px; margin: 8px 0; }
.composer { display: flex; gap: 8px; padding: 12px; background: var(--panel); border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 160px; resize: none; }

/* vazifalar: kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: #ebeef5; border-radius: var(--r); padding: 10px; min-height: 120px; }
.col.drop { outline: 2px dashed var(--accent); }
.col .ct { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 2px 4px 10px; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow); }
.tcard:hover { border-color: var(--line-hover); }
.tcard .tt { font-weight: 600; margin-bottom: 6px; }
.tcard .tm { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: var(--fs-xs); color: var(--muted); }
.tcard.dragging { opacity: .5; }
.check { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.check input { width: auto; }
.comment { background: var(--panel2); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; white-space: pre-wrap; }

/* kalendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line); gap: 1px; }
.cal .dh { background: var(--panel2); padding: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-align: center; }
.cal .day { background: var(--panel); min-height: 110px; padding: 6px; cursor: pointer; min-width: 0; }
.cal .day:hover { background: #f9fafd; }
.cal .day.out { background: var(--panel2); color: #646d82; }
.cal .day.today .dn { background: var(--sun); color: var(--side); }
.cal .dn { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 600; font-size: var(--fs-sm); }
.cal .ev { font-size: var(--fs-xs); border-radius: 6px; padding: 2px 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--accent-soft); color: #1e3a9e; font-weight: 600; }
.cal .ev.task { background: var(--amber-bg); color: var(--amber); }

/* hujjatlar */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.folder { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.folder:hover { border-color: var(--line-hover); }
.drop-zone.over { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: var(--r); }

/* oyna va xabar */
.modal-bg { position: fixed; inset: 0; background: rgba(14, 20, 40, .5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal-box { background: var(--panel); border-radius: 18px; width: 100%; max-width: 520px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box.wide { max-width: 860px; }
.foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--side); color: #fff; padding: 10px 16px; border-radius: 12px; opacity: 0; transition: .2s; pointer-events: none; z-index: 60; max-width: 90vw; }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--red); }
.notif { position: absolute; right: 0; top: 44px; width: 360px; max-height: 70vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 40px rgba(0,0,0,.15); z-index: 40; }
.notif .ni { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif .ni.new { background: var(--accent-soft); }
.pick { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--panel2); cursor: pointer; }
.pick input { width: auto; }

/* filtr qatori: hamma boshqaruv bir xil 36 px balandlikda */
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters > .chip, .filters > .btn, .filters > select, .filters > input, .filters .seg .chip, .filters > .right > .chip, .filters > label { height: 36px; }
.filters > .chip, .filters > .btn, .filters .chip { display: inline-flex; align-items: center; padding-top: 0; padding-bottom: 0; }
.filters > select, .filters > input { padding-top: 0; padding-bottom: 0; }
.filters > label { display: inline-flex; align-items: center; }
.ico { display: inline-flex; align-items: center; gap: 3px; }
.ico svg { flex: none; }

/* yuklanish skeleti, xato va bo'sh holatlar */
.skel { background: var(--skel); border-radius: 8px; animation: skel 1.2s ease-in-out infinite; }
.skel.h1 { height: 28px; width: 220px; margin-bottom: 18px; }
.skel.line { height: 14px; margin: 10px 0; }
.skel.block { height: 92px; border-radius: var(--r); }
.skel.tall { height: 260px; border-radius: var(--r); }
.skel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
@keyframes skel { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.state { max-width: 460px; margin: 8vh auto; text-align: center; padding: 28px 20px; }
.state svg { color: var(--muted); margin-bottom: 8px; }
.state h2 { margin-bottom: 6px; }
.state p { color: var(--muted); margin: 0 0 16px; }
.drop-empty { border: 2px dashed var(--line-input); border-radius: 16px; padding: 36px 16px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.drop-empty > svg { color: var(--muted); }
.col-empty { color: var(--muted); font-size: var(--fs-sm); text-align: center; padding: 22px 8px; border: 1px dashed var(--line-hover); border-radius: 10px; }
.tcard:focus-visible, .li.click:focus-visible, .folder:focus-visible, .citem:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* "Yana" varag'i (telefon) */
.sheet-bg { align-items: flex-end; padding: 0; }
.sheet { background: var(--panel); width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
.sheet .grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-hover); margin: 2px auto 10px; }
.sheet .nav { color: var(--text); padding: 13px 12px; min-height: 48px; }
.sheet .nav:hover { background: var(--panel2); color: var(--text); }
.sheet .nav.on { background: var(--accent-soft); color: var(--accent); }
.sheet .nav svg { color: var(--accent); }

/* telefonga moslar: kalendar kun ro'yxati, jamoa kartochkalari (kompyuterda yashirin) */
.cal-m, .team-cards { display: none; }
.team-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-bottom: 1px solid var(--line); }
.team-card:last-child { border-bottom: 0; }
.team-card .avatar { width: 40px; height: 40px; }
.team-card .nm { font-size: var(--fs-md); font-weight: 600; }
.team-card .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* telefon: menyu pastda, chatda ro'yxat yoki suhbat */
.mnav { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .side { display: none; }
  .mnav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--side); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); flex: none; }
  .mnav .nav { flex-direction: column; gap: 3px; font-size: var(--fs-xs); padding: 7px 2px 6px; min-height: 52px; align-items: center; justify-content: center; position: relative; border-radius: 0; white-space: nowrap; }
  .mnav .nav span:not(.badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .mnav .nav.on { background: transparent; color: #fff; }
  .mnav .nav.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: #fff; }
  .mnav .nav .badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; margin: 0; }
  .top { padding: 10px 12px; }
  h1 { font-size: var(--fs-lg); }
  .top .who { display: none; }
  .view { padding: 14px 12px; }
  .cols, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi .v { font-size: var(--fs-md); white-space: normal; overflow-wrap: anywhere; }
  .bugun { padding: 12px 12px 10px; }
  .bugun-sum { order: 3; flex-basis: 100%; margin-top: -8px; }
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat.open .chat-list { display: none; }
  .chat:not(.open) .conv { display: none; }
  .cal { display: none; }
  .cal-m { display: block; }
  .team-table { display: none; }
  .team-cards { display: block; }
  .filters > input[type=search] { flex: 1 1 140px; width: auto !important; }
  .notif { position: fixed; left: 8px; right: 8px; top: 56px; width: auto; }
  .msg { max-width: 88%; }
}
.conv .ch [data-a="back"] { display: none; }
@media (max-width: 860px) { .conv .ch [data-a="back"] { display: inline-flex; } }

/* telefon kalendari: ixcham oy to'ri (nuqtalar) + tanlangan kun ro'yxati */
.cal-m .mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 6px; }
.cal-m .mh { text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); padding: 2px 0 6px; }
.cal-m .md { border: 0; background: transparent; border-radius: 10px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 600; font-size: var(--fs-sm); padding: 0; }
.cal-m .md.out { color: #646d82; font-weight: 500; }
.cal-m .md.today { color: var(--sun-ink); box-shadow: inset 0 0 0 2px var(--sun); }
.cal-m .md.sel { background: var(--accent); color: #fff; }
.cal-m .md .dots { display: flex; gap: 2px; height: 5px; }
.cal-m .md .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal-m .md .dots i.t { background: var(--sun); }
.cal-m .md.sel .dots i { background: #fff; }
.cal-m .agenda { margin-top: 12px; }
.cal-m .ag { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cal-m .ag:last-child { border-bottom: 0; }
.cal-m .ag .tm { width: 48px; flex: none; font-weight: 600; font-size: var(--fs-sm); }
.cal .ev.ico { display: flex; gap: 3px; }

/* ---------- egasi bo'limlari: Marketing, Moliya, HR, Bugalteriya, Yurist (2026-11-16) ---------- */
.nav-sec { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9aa8cc; padding: 14px 10px 4px; }
.pos { color: var(--ok-ink); }
.neg { color: var(--danger); }
.kpi .v.pos { color: var(--ok-ink); } .kpi .v.neg { color: var(--danger); }
.today-ink { color: var(--sun-ink); font-weight: 600; }
.owner-panel { margin-bottom: 4px; }
.owner-panel h3 { font-size: var(--fs-sm); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
table.t tr.void td { color: var(--muted); }
table.t tr.void td b { text-decoration: line-through; color: var(--muted); }
table.t tr.sum td { font-weight: 600; background: var(--panel2); }
.li.void { color: var(--muted); text-decoration: line-through; }
/* 6 oylik ustunli grafik (kutubxonasiz) */
.bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; }
.bcol { display: grid; gap: 4px; justify-items: center; min-width: 0; }
.bpair { height: 160px; width: 100%; display: flex; gap: 4px; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); }
.bpair i { display: block; width: min(22px, 40%); min-height: 2px; border-radius: 5px 5px 0 0; }
.bpair i.kirim, .lg.kirim, .hbar .track i.kirim { background: var(--ok); }
.bpair i.chiqim, .lg.chiqim, .hbar .track i.chiqim { background: var(--danger); }
.bcol.on .bl { color: var(--accent); font-weight: 600; }
.bl { font-size: var(--fs-xs); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv { font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.hbar { padding: 6px 0; }
.hbar .track { height: 6px; border-radius: 6px; background: var(--panel2); margin-top: 5px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 6px; }
/* hisoblar kartochkalari */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.acc { text-align: left; cursor: pointer; }
.acc .nm { font-weight: 600; margin: 2px 0 6px; }
.acc .v { font: 600 var(--fs-xl)/1.2 var(--font-display); font-variant-numeric: tabular-nums; margin-bottom: 4px; overflow-wrap: anywhere; }
.acc.archived { opacity: .6; }
.acc.add { display: grid; place-items: center; min-height: 120px; border-style: dashed; color: var(--accent); font-weight: 600; background: transparent; box-shadow: none; }
.acc:hover { border-color: var(--line-hover); }
/* faktura qatorlari */
.iline { display: grid; grid-template-columns: minmax(0, 1fr) 64px 120px 110px 36px; gap: 6px; align-items: center; margin-bottom: 6px; }
.iline.ih { margin-bottom: 4px; }
.iline .ls { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.pay-total { display: flex; justify-content: space-between; align-items: center; box-shadow: none; background: var(--panel2); padding: 12px 14px; }
.pay-total b { font: 600 var(--fs-lg)/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
/* ogohlantirish va shablonlar */
.warnbox { display: flex; gap: 12px; align-items: flex-start; border-color: var(--sun); background: var(--sun-bg); margin-bottom: 14px; box-shadow: none; }
.warnbox > svg { color: var(--sun-ink); flex: none; margin-top: 2px; }
.disclaimer { display: flex; gap: 8px; align-items: center; color: var(--sun-ink); background: var(--sun-bg); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; font-weight: 600; }
.disclaimer svg { flex: none; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tpl .vars { display: flex; flex-wrap: wrap; gap: 4px; }
.bday { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; box-shadow: none; }
@media (max-width: 860px) {
  .bars { gap: 4px; }
  .bpair { height: 120px; }
  .iline { grid-template-columns: minmax(0, 1fr) 52px 92px 32px; }
  .iline .ls, .iline.ih span:nth-child(4) { display: none; }
  .head .right.row { width: 100%; margin-left: 0; }
  .head .right.row .btn { flex: 1 1 auto; justify-content: center; }
  .modal-box .foot { flex-wrap: wrap; }
}
/* chop etish: faqat #print (faktura yoki hujjat) chiqadi */
#print { display: none; }
.pdoc { font: 400 12pt/1.5 var(--font); color: #000; }
.pdoc .prow { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.pdoc .pco { font-size: 16pt; font-weight: 600; }
.pdoc .ptitle { font-size: 14pt; font-weight: 600; }
.pdoc table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.pdoc th, .pdoc td { border: 1px solid #999; padding: 6px 8px; text-align: left; }
.pdoc .n { text-align: right; }
.pdoc .ptot td { font-weight: 600; }
.pdoc .psign { display: flex; justify-content: space-between; margin-top: 40px; }
.pdoc .ptext { white-space: pre-wrap; font: inherit; margin: 0; }
@media print {
  body.printing > *:not(#print) { display: none !important; }
  body.printing #print { display: block; }
  html, body { background: #fff; height: auto; }
}
table.t th.n { text-align: right; }
/* egasi bo'limlaridagi pul KPI lari: uzun summa kesilmaydi */
.kpis.mny .kpi .v { font-size: var(--fs-lg); white-space: normal; overflow-wrap: anywhere; }
.btn.ghost.sm[data-a="voidT"] { color: var(--muted); }
.btn.ghost.sm[data-a="voidT"]:hover { color: var(--danger); border-color: var(--line); }

/* RTL mexanizmi (2026-11-16): dir="rtl" tilida interfeys o'ngdan chapga. Hozircha tayyor RTL til yo'q,
   lekin egasi RTL til qo'shsa (masalan arabcha) maket to'g'ri ishlaydi. */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .shell { grid-template-columns: minmax(0, 1fr) 232px; }
[dir="rtl"] .side { order: 2; }
[dir="rtl"] .main { order: 1; }
[dir="rtl"] .nav { text-align: right; }
[dir="rtl"] .nav .badge, [dir="rtl"] .right, [dir="rtl"] .bugun-add, [dir="rtl"] .top .bell { margin-left: 0; margin-right: auto; }
[dir="rtl"] .chat-list { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .notif { right: auto; left: 0; }

/* ---------- Dashbord (2026-11-17, Shuxrat namunasi): siyoh fonli 3 qavat, grafiklar SVG ---------- */
/* Siyoh fonda AA: oq matn, --db-muted 8.6:1, och firuza/anor/lojuvard >= 4.5:1 (#1e2b4d kartochkada). */
:root { --db-bg: #141f3a; --db-card: #1e2b4d; --db-line: rgba(255,255,255,.09); --db-muted: #c9d2e8; --db-up: #4fd1c0; --db-down: #ff8f86; }
.db .head { flex-wrap: wrap; gap: 8px 14px; }
.db-cmp { order: 3; flex-basis: 100%; margin-top: -4px; }
.db-seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.db-seg button { border: 0; background: transparent; border-radius: 9px; padding: 7px 14px; font-weight: 600; font-size: var(--fs-sm); color: var(--muted); }
.db-seg button.on { background: var(--side); color: #fff; }
.db-seg button:hover:not(.on) { color: var(--text); background: var(--panel2); }
.db-sec { background: linear-gradient(180deg, #17244a 0%, var(--db-bg) 100%); color: #fff; border-radius: 20px; padding: 18px 18px 20px; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(20,31,58,.18); }
.db-h { display: flex; align-items: center; gap: 14px; font: 600 var(--fs-lg)/1.2 var(--font-display); margin: 0 0 14px; letter-spacing: -.01em; }
.db-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(123,150,245,.6), rgba(123,150,245,0)); }
.db-card { background: var(--db-card); border: 1px solid var(--db-line); border-radius: 14px; padding: 14px; min-width: 0; position: relative; overflow: hidden; }
.db-card > b { font-size: var(--fs-md); }
.db-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.db-kpi { padding-bottom: 46px; }
.db-kl { color: var(--db-muted); font-size: var(--fs-sm); font-weight: 500; }
.db-kv { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font: 600 var(--fs-xl)/1.15 var(--font-display); margin-top: 6px; }
.db-ks { color: var(--db-muted); font-size: var(--fs-xs); margin-top: 4px; }
.db-d { font: 600 var(--fs-sm)/1 var(--font); white-space: nowrap; }
.db-d.up, .db-up, .db-big.up { color: var(--db-up); }
.db-d.down, .db-big.down, .db-bad { color: var(--db-down); }
.db-d.na { color: var(--db-muted); }
.db-spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 40px; }
.db-trend { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
.db-ct { margin-bottom: 6px; }
.db-leg { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--db-muted); }
.db-leg i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.db-leg i.dash { height: 0; border-top: 2px dashed; background: none; }
.db-line { width: 100%; height: auto; display: block; }
.db-grid { stroke: rgba(255,255,255,.09); stroke-width: 1; }
.db-ax { fill: var(--db-muted); font: 500 11px var(--font); }
.db-grow { display: flex; flex-direction: column; }
.db-big { font: 600 var(--fs-2xl)/1.1 var(--font-display); margin-top: 8px; }
.db-bars { flex: 1; min-height: 110px; display: flex; align-items: flex-end; gap: 3px; margin-top: 12px; }
.db-bars span { flex: 1; min-width: 2px; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #8fa6ff, #2846b4); }
.db-donut { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 8px; }
.db-donut svg { width: 120px; height: 120px; }
.db-dn { fill: #fff; font: 600 18px var(--font-display); }
.db-ds { fill: var(--db-muted); font: 500 8px var(--font); }
.db-donut ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.db-donut li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.db-donut li i { width: 10px; height: 10px; border-radius: 3px; }
.db-empty { color: var(--db-muted); font-size: var(--fs-sm); padding: 18px 0; text-align: center; }
.db-detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.db-side { display: grid; gap: 12px; align-content: start; }
.db-tbl table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: var(--fs-sm); table-layout: fixed; }
.db-tbl th { text-align: left; color: var(--db-muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--db-line); }
.db-tbl td { padding: 10px 6px; border-bottom: 1px solid var(--db-line); }
.db-tbl tr:last-child td { border-bottom: 0; }
.db-tbl th:first-child { width: 40%; }
.db-tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-cmp-n { display: none; }
.db-hbars { display: grid; gap: 9px; margin-top: 12px; }
.db-hb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.db-hbt { height: 8px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.db-hbt i { display: block; height: 100%; border-radius: 99px; }
.db-prog .db-pct { font: 600 var(--fs-xl)/1 var(--font-display); }
.db-track { height: 8px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.db-track span { display: block; height: 100%; border-radius: 99px; }
.db-rank { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.db-rank li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); padding: 6px 0; border-bottom: 1px solid var(--db-line); }
.db-rank li:last-child { border-bottom: 0; }
.db-rn { width: 18px; color: var(--db-muted); font-weight: 600; text-align: right; }
.db-ri { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--db-bg); flex: none; }
.db :focus-visible { outline-color: var(--focus); }
.db-sec :focus-visible { outline-color: #fff; }
@media (max-width: 1100px) { .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .db-trend { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .db-trend > .db-card:first-child { grid-column: 1 / -1; } }
@media (max-width: 860px) {
  .db-sec { padding: 14px 12px 14px; border-radius: 16px; }
  .db-kpis, .db-trend, .db-detail { grid-template-columns: minmax(0, 1fr); }
  .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .db-kpi { padding: 12px 12px 40px; }
  .db-kv { font-size: var(--fs-lg); }
  .db-seg button { padding: 6px 10px; }
  .db-full { display: none; } .db-cmp-n { display: inline; }
  .db-tbl th:first-child { width: 44%; }
  .db .head .right { margin-left: 0; }
}
@media print { .db-seg { display: none; } }

/* ---------- AI agentlar (2026-11-17): har bo'limda AI xodim ---------- */
.ai-ava { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--accent) 0%, var(--side) 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.ai-ava.big { width: 44px; height: 44px; }
.ai-ava i { position: absolute; right: -4px; bottom: -3px; font: 700 9px/1 var(--font); font-style: normal; letter-spacing: .02em; color: #fff; background: var(--ok-ink);
  border: 2px solid var(--panel); border-radius: 999px; padding: 2px 4px; }
.ai-fab { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px;
  border: 1px solid var(--side2); background: var(--side); color: #fff; box-shadow: 0 8px 24px rgba(20,31,58,.28); }
.ai-fab:hover { background: var(--side2); }
.ai-fab .ai-ava { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.ai-fab .ai-ava i { border-color: var(--side); }
.ai-fab-t { display: grid; text-align: left; line-height: 1.15; }
.ai-fab-t b { font-size: var(--fs-sm); }
.ai-fab-t span { font-size: var(--fs-xs); color: var(--side-text); }
.ai-fab:focus-visible { outline-color: var(--focus); outline-offset: 3px; }
.ai-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(20,31,58,.28); }
.ai-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(440px, 100vw); background: var(--bg); display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(20,31,58,.22); animation: aiIn .18s ease-out; }
@keyframes aiIn { from { transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) { .ai-drawer { animation: none; } .ai-msg.typing span { animation: none !important; } }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; background: var(--side); color: #fff; }
.ai-head .muted { color: var(--side-text); }
.ai-head .btn.ghost { color: #fff; }
.ai-head .btn.ghost:hover { background: var(--side2); }
.ai-head :focus-visible { outline-color: #fff; }
.ai-title { font: 600 var(--fs-lg)/1.2 var(--font-display); letter-spacing: -.01em; }
.ai-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: grid; align-content: start; gap: 12px; }
.ai-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ai-fact { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.ai-fact span { font-size: var(--fs-xs); color: var(--muted); }
.ai-fact b { font-size: var(--fs-md); overflow-wrap: anywhere; }
.ai-fact.danger b { color: var(--danger); }
.ai-fact.ok b { color: var(--ok-ink); }
.ai-fact.sun { background: var(--sun-bg); border-color: #f1dca7; }
.ai-fact.sun b { color: var(--sun-ink); }
.ai-warn { display: flex; gap: 8px; align-items: flex-start; background: var(--sun-bg); color: var(--sun-ink); border: 1px solid #f1dca7; border-radius: 12px; padding: 10px 12px; font-size: var(--fs-sm); margin: 0; }
.ai-warn svg { flex: none; margin-top: 1px; }
.ai-disc { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.ai-disc svg { flex: none; }
.ai-sub { margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: var(--fs-xs); }
.ai-prop { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--sun); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; margin-bottom: 8px; }
.ai-pp { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; font-size: var(--fs-sm); }
.ai-pp span:last-child { white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-msgs { display: grid; gap: 10px; }
.ai-msg { max-width: 92%; padding: 10px 12px; border-radius: 14px; font-size: var(--fs-md); overflow-wrap: anywhere; position: relative; }
.ai-msg.me { justify-self: end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-msg.bot { justify-self: start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; padding-right: 34px; }
.ai-p { display: block; }
.ai-gap { display: block; height: 6px; }
.ai-li { display: block; padding-left: 14px; position: relative; }
.ai-li::before { content: ''; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.ai-copy { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; color: var(--muted); padding: 4px; border-radius: 6px; }
.ai-copy:hover { background: var(--panel2); color: var(--text); }
.ai-msg.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.ai-msg.typing span:not(.sr) { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: aiDot 1s infinite ease-in-out; }
.ai-msg.typing span:nth-child(2) { animation-delay: .15s; } .ai-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ai-hello { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; font-size: var(--fs-sm); }
.ai-foot { border-top: 1px solid var(--line); background: var(--panel); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.ai-quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.ai-quick .chip { white-space: nowrap; flex: none; }
.ai-quick .chip:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.ai-quick .chip:disabled { opacity: .55; cursor: not-allowed; }
.ai-form { display: flex; gap: 8px; align-items: flex-end; }
.ai-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; border: 1px solid var(--line-input); border-radius: 12px; padding: 10px 12px; background: var(--panel); }
.ai-form .btn { height: 42px; }
.ai-usage { text-align: right; }
/* bosh sahifa: AI jamoangiz */
.ai-team { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 16px; }
.ai-team-h { margin-bottom: 10px; }
.ai-team-h h3 { margin: 0; font-size: var(--fs-sm); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ai-team-note { display: flex; gap: 8px; align-items: flex-start; background: var(--accent-soft); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; }
.ai-team-note svg { flex: none; color: var(--accent); }
.ai-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ai-agent { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--panel2); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.ai-agent:hover { border-color: var(--accent); background: var(--accent-soft); }
.ai-agent .grow { display: grid; min-width: 0; }
.ai-agent.off { opacity: .6; }
.ai-team-props { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.ai-team-props .ai-ava { width: 26px; height: 26px; }
.ai-team-props .ai-ava svg { width: 14px; height: 14px; }
.ai-users .li, .ai-agents-set .li { gap: 10px; }
.ai-ulim { display: inline-flex; align-items: center; gap: 6px; }
.ai-ulim input { width: 110px; padding: 5px 8px; }
.ai-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .ai-fab { right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); padding: 6px 12px 6px 6px; }
  .ai-drawer { width: 100vw; }
  .ai-title { font-size: var(--fs-md); }
  .hide-sm { display: none; }
  .ai-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-agent b.ellipsis { white-space: normal; line-height: 1.2; font-size: var(--fs-sm); }
  .ai-agent { padding: 8px; gap: 8px; }
}
@media print { .ai-fab, .ai-drawer, .ai-scrim, .ai-team { display: none !important; } }

/* Tashqi savdo (2026-11-17): yuk kartochkalari, hujjatlar progressi, qonunlar chizig'i; Sozlamalar → Davlat va qonunlar; AI web tekshiruv */
.ts-law { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; box-shadow: none; border-color: var(--accent-soft); background: var(--accent-soft); }
.ts-law > svg { color: var(--accent-ink); flex: none; margin-top: 2px; }
.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ts-ship { display: grid; gap: 10px; align-content: start; }
.ts-ship h3 { margin: 0 0 2px; font-size: var(--fs-md); }
.ts-ship h3.click { cursor: pointer; }
.ts-ship h3.click:hover { color: var(--accent); }
.ts-prog { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ts-prog i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.ts-docs { display: grid; gap: 2px; }
.ts-docs .check { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.ts-docs .check input { width: auto; }
.ts-ai { justify-self: start; display: inline-flex; gap: 6px; align-items: center; }
.small.ok { color: var(--ok-ink); }
.dv-partners { border: 0; padding: 0; margin: 0; }
.dv-partners legend { padding: 0; margin-bottom: 6px; }
.dv-partners .pick { max-height: 200px; }
.ai-web { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 600px) { .ts-grid { grid-template-columns: 1fr; } }
.ts-head { gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.ts-head .grow { min-width: 180px; }
.dv-partners { min-width: 0; min-inline-size: 0; }
/* Sozlamalar ustunlari ichidagi grid kartalarni ekrandan chiqarmasin (telefonda o'ng tomoni kesilardi, 2026-11-17) */
.cols > * { grid-template-columns: minmax(0, 1fr); }

/* Bitim hujjatlari (2026-11-18): bo'limlar, to'lov ko'rsatkichi, yuklash maydoni, fayllar ro'yxati, rasmni katta ko'rish. */
.tcard .clip { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-weight: 600; }
.ddocs h3 { display: flex; align-items: center; gap: 6px; }
.dcats { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 8px; scrollbar-width: thin; }
.dcats .chip { white-space: nowrap; flex: none; }
.dcats .chip .n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 99px; background: var(--panel2); color: var(--muted); font-size: var(--fs-xs); text-align: center; }
.dcats .chip.on .n { background: rgba(255,255,255,.18); color: #fff; }
.dpay { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.dpay .due { color: var(--sun-ink); }
.dpay .okp { color: var(--ok-ink); font-weight: 600; }
.dpay .bar { height: 6px; border-radius: 99px; background: var(--line); margin-top: 8px; overflow: hidden; }
.dpay .bar i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.dpayin { margin-bottom: 8px; }
.dzone { border: 1.5px dashed var(--line-hover); border-radius: 12px; padding: 14px; text-align: center; display: grid; gap: 8px; justify-items: center; color: var(--muted); background: var(--panel); }
.dzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dzone .dcam { display: none; }
@media (pointer: coarse) { .dzone .dcam { display: inline-flex; } }
.dlist { margin-top: 6px; }
.dfile { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.dthumb { flex: none; width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); display: grid; place-items: center; overflow: hidden; padding: 0; color: var(--accent); cursor: pointer; }
.dthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dname { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text); text-align: left; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.dname:hover { color: var(--accent); text-decoration: underline; }
.dsum { margin-top: 3px; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(12, 18, 36, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 16px 16px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; border-radius: 8px; background: #fff; }
.lb-top .btn { color: var(--text); }
.lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 10px 16px; color: #fff; font-weight: 600; }
@media (max-width: 860px) { .dfile { gap: 8px; } .dthumb { width: 44px; height: 44px; } }
