/* G-Agronom — dizayn "Maysa" (A varianti, Shuxrat tanlovi 2026-11-17; maket: dizayn/maket-a.html).
   MAVZUNI ALMASHTIRISH: faqat shu fayl boshidagi tokenlar (:root — yorug', [data-theme="dark"] — to'q) va @font-face. Qolgan qoidalar faqat var(--…) ishlatadi. */
@font-face { font-family: 'Unbounded'; src: url(fonts/Unbounded.woff) format('woff'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Onest'; src: url(fonts/Onest.woff) format('woff'); font-weight: 400 700; font-display: swap; }

:root {
  --fd: 'Unbounded', 'Onest', system-ui, sans-serif; --fb: 'Onest', system-ui, sans-serif;
  --bg: #F4F6F1; --surface: #FFFFFF; --surface2: #EAF0E6; --ink: #0F2A1E; --muted: #4A5D52; --line: #D5DED2;
  --primary: #1C6B3A; --onprimary: #FFFFFF; --accent: #A6E05A; --onaccent: #0F2A1E;
  --danger: #B3261E; --warn: #F2B33D; --onwarn: #0F2A1E; --warntext: #8A5300; --water: #1D5FA6; --ok: #1C6B3A;
  --maphalo: #FFFFFF; --m1: #2E8B4F; --m2: #7FC65A; --m3: #B9DF7A; --m4: #E3C35A; --mapink: #0F2A1E;
  --sidebg: #0F2A1E; --sideink: #E8F2EA; --sideon: #1C6B3A; --sideonink: #FFFFFF;
  --r: 14px; --rl: 22px; --bw: 1px; --shadow: 0 10px 30px -18px rgba(0, 0, 0, .35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0A1712; --surface: #11241B; --surface2: #173025; --ink: #E8F2EA; --muted: #A3B8AA; --line: #264034;
  --primary: #7FD36B; --onprimary: #0A1712; --accent: #A6E05A; --onaccent: #0A1712; --danger: #FF8A80; --warn: #F2B33D; --onwarn: #0A1712; --warntext: #F2B33D;
  --water: #86BAF2; --ok: #7FD36B; --maphalo: #0A0A0A; --m1: #2E7D47; --m2: #5BAA45; --m3: #8CC25B; --m4: #C7A443; --mapink: #E8F2EA;
  --sidebg: #07110C; --sideink: #E8F2EA; --sideon: #7FD36B; --sideonink: #0A1712; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0A1712; --surface: #11241B; --surface2: #173025; --ink: #E8F2EA; --muted: #A3B8AA; --line: #264034;
  --primary: #7FD36B; --onprimary: #0A1712; --accent: #A6E05A; --onaccent: #0A1712; --danger: #FF8A80; --warn: #F2B33D; --onwarn: #0A1712; --warntext: #F2B33D;
  --water: #86BAF2; --ok: #7FD36B; --maphalo: #0A0A0A; --m1: #2E7D47; --m2: #5BAA45; --m3: #8CC25B; --m4: #C7A443; --mapink: #E8F2EA;
  --sidebg: #07110C; --sideink: #E8F2EA; --sideon: #7FD36B; --sideonink: #0A1712; color-scheme: dark;
}
/* Unbounded'da qozoq harflari yo'q: kk tilida sarlavhalar Onest Bold. */
html[lang="kk"] { --fd: 'Onest', system-ui, sans-serif; }
html[lang="kk"] h1, html[lang="kk"] h2, html[lang="kk"] h3, html[lang="kk"] .big { font-weight: 700; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--fb); }
h1, h2, h3 { font-family: var(--fd); font-weight: 500; margin: 0; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .tiny { font-size: 12px; }
.grow { flex: 1; min-width: 0; } .right { margin-left: auto; } .hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.danger-t { color: var(--danger); } .warn-t { color: var(--warntext); } .water-t { color: var(--water); } .ok-t { color: var(--ok); }

/* ---------- maket ---------- */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--sidebg); color: var(--sideink); padding: 20px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; margin: 0 6px 20px; text-decoration: none; color: inherit; }
.brand img { width: 36px; height: 36px; } .wm { font: 500 19px var(--fd); letter-spacing: -.01em; }
/* Kompaniya logotipi oynasi (public/logo.js): menyuda brend ostida, Bosh sahifada sarlavha yonida. */
.side .lg-side { margin: -8px 6px 16px; width: calc(100% - 12px); }
.side .lg-side.lg-has { width: auto; max-width: calc(100% - 12px); }
.top .lg-home { color: var(--muted); }
.sn { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r); font-size: 15px; color: inherit; text-decoration: none; opacity: .88; min-height: 44px; }
.sn:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.sn.on { background: var(--sideon); color: var(--sideonink); opacity: 1; font-weight: 700; }
.side-f { margin-top: auto; padding: 12px 4px 0; display: flex; flex-direction: column; gap: 8px; }
.side .net { color: var(--sideink); background: transparent; border: 1px solid currentColor; }
.side .who { display: flex; gap: 10px; align-items: center; background: none; border: 0; color: inherit; padding: 6px; border-radius: var(--r); cursor: pointer; text-align: left; }
.ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); color: var(--ink); font-weight: 700; font-size: 14px; flex: none; border: 0; cursor: pointer; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; gap: 12px; align-items: center; padding: 18px 28px 6px; flex-wrap: wrap; }
.top .tlogo { display: none; width: 34px; height: 34px; }
.top-t h1 { font-size: 30px; } .top-s { color: var(--muted); font-size: 14px; }
.top-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.content { padding: 12px 28px 48px; }
.net { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: var(--surface2); color: var(--ok); white-space: nowrap; }
.net.off { color: var(--warntext); }
.bn { display: none; }

/* ---------- bloklar ---------- */
.card { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--rl); padding: 16px; }
.card + .card { margin-top: 12px; }
.lbl { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.h { font: 500 15px var(--fd); margin: 20px 0 10px; display: flex; gap: 8px; align-items: center; }
.cnt { font: 600 13px var(--fb); background: var(--ink); color: var(--bg); border-radius: 999px; padding: 1px 9px; }
.sample { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1.5px dashed var(--muted); border-radius: 6px; padding: 2px 8px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi b { display: block; font: 500 30px var(--fd); margin: 4px 0 2px; } .kpi em { font-style: normal; font-size: 14px; color: var(--muted); }
.dgrid { display: grid; grid-template-columns: 1fr 340px; gap: 14px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wx { background: linear-gradient(160deg, var(--surface) 0%, var(--surface2) 100%); }
.wx-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wx-t { font: 500 44px/1.05 var(--fd); } .wx-d { color: var(--muted); font-size: 15px; }
.wx-row { display: flex; gap: 14px; margin: 10px 0; font-size: 15px; font-weight: 600; flex-wrap: wrap; } .wx-row span { display: inline-flex; gap: 5px; align-items: center; }
.spray { display: flex; gap: 8px; align-items: center; font-size: 15px; padding: 10px 12px; border-radius: var(--r); background: var(--accent); color: var(--onaccent); }
.spray.bad { background: var(--danger); color: #fff; }
.sig { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 8px; border-radius: var(--r); background: var(--surface); border: var(--bw) solid var(--line); border-left: 6px solid var(--c, var(--line)); min-height: 60px; color: inherit; text-decoration: none; width: 100%; text-align: left; cursor: pointer; }
.sig > div { flex: 1; min-width: 0; } .sig b { display: block; font-size: 16px; } .sig span { font-size: 14px; color: var(--muted); }
.sig > .ico:first-child { color: var(--c); }
.sig.danger { --c: var(--danger); } .sig.warn { --c: var(--warntext); } .sig.water { --c: var(--water); } .sig.ok { --c: var(--ok); }
.task { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); min-height: 60px; }
.task:last-child { border-bottom: 0; }
.task b { display: block; font-size: 16px; } .task span.s { font-size: 14px; color: var(--muted); }
.cb { width: 32px; height: 32px; flex: none; border: 2.5px solid var(--ink); border-radius: 8px; display: grid; place-items: center; background: none; cursor: pointer; padding: 0; }
.task.done .cb { background: var(--ok); border-color: var(--ok); color: var(--surface); } .task.done b { text-decoration: line-through; color: var(--muted); }
.task.late .cb { border-color: var(--danger); }
.ai-hint { display: flex; gap: 12px; margin-top: 16px; padding: 14px; border-radius: var(--r); background: var(--surface2); border: 1.5px dashed var(--muted); align-items: flex-start; }
.ai-hint b { display: block; font-size: 15px; } .ai-hint span { font-size: 14px; color: var(--muted); }
.pill { display: inline-flex; gap: 6px; align-items: center; background: var(--surface2); color: var(--ink); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.acc { background: var(--accent); color: var(--onaccent); } .pill.danger { background: var(--danger); color: #fff; } .pill.warn { background: var(--warn); color: var(--onwarn); }
.pill.water { background: var(--water); color: var(--surface); } .pill.ok { background: var(--ok); color: var(--surface); }
.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; } .st::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.st.danger { --c: var(--danger); } .st.water { --c: var(--water); } .st.ok { --c: var(--ok); } .st.warn { --c: var(--warntext); } .st.muted { --c: var(--muted); }
.bar { height: 10px; border-radius: 99px; background: var(--surface2); overflow: hidden; } .bar span { display: block; height: 100%; background: var(--water); }
.bar.over span { background: var(--danger); }
.barl { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 4px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; } .kv span { display: block; font-size: 13px; color: var(--muted); } .kv b { font-size: 16px; }
.fc-t { font: 500 30px var(--fd); }
.log { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.log b { display: block; font-size: 15px; } .log span { font-size: 13px; color: var(--muted); }
.d { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--muted); }
.d.water { background: var(--water); } .d.danger { background: var(--danger); } .d.ok { background: var(--ok); } .d.warn { background: var(--warn); }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); flex: none; }
audio { width: 100%; max-width: 320px; height: 40px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.note { background: var(--surface2); border-radius: var(--r); padding: 10px 12px; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.note.warn { background: color-mix(in srgb, var(--warn) 25%, var(--surface)); }
.note.danger { background: color-mix(in srgb, var(--danger) 18%, var(--surface)); }

/* ---------- tugmalar va formalar ---------- */
.btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--primary); color: var(--onprimary); border-color: var(--primary); }
.btn.big { width: 100%; min-height: 60px; font-size: 17px; font-weight: 700; }
.btn.danger { color: var(--danger); } .btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.form { display: flex; flex-direction: column; gap: 12px; }
.f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.f input, .f select, .f textarea, input.inp, select.inp { min-height: 52px; padding: 0 14px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 17px; font-weight: 400; width: 100%; }
.f textarea { padding: 12px 14px; min-height: 90px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--ink); outline: none; }
.cbx { display: flex; gap: 10px; align-items: center; font-size: 15px; min-height: 44px; cursor: pointer; } .cbx input { width: 22px; height: 22px; accent-color: var(--primary); }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.seg button { min-height: 52px; display: flex; gap: 6px; align-items: center; justify-content: center; border: var(--bw) solid var(--line); border-radius: var(--r); font-weight: 600; background: var(--surface); cursor: pointer; padding: 0 8px; }
.seg button.on { background: var(--primary); color: var(--onprimary); border-color: var(--primary); }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.lvl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lvl button { height: 56px; display: grid; place-items: center; font: 600 17px var(--fd); border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.lvl button.on { background: var(--warn); color: var(--onwarn); border-color: var(--ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-width: 48px; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: var(--bw) solid var(--line); border-radius: var(--r); font-weight: 700; font-size: 15px; background: var(--surface); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.tabs a { padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); border: var(--bw) solid var(--line); font-weight: 600; font-size: 14px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.tabs a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gps { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.photo { position: relative; border-radius: var(--rl); overflow: hidden; border: var(--bw) solid var(--line); background: var(--surface2); min-height: 150px; display: grid; place-items: center; }
.photo img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.photo .ph-add { position: absolute; right: 10px; bottom: 10px; }
.rec { color: var(--danger); font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: var(--bw) solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface2); }
.tw { overflow-x: auto; }

/* ---------- xarita (SVG) ---------- */
.mapwrap { position: relative; border-radius: var(--r); overflow: hidden; border: var(--bw) solid var(--line); background: var(--surface2); }
.map { display: block; width: 100%; height: 340px; touch-action: manipulation; }
.map.tall { height: 420px; }
.mapbg { fill: var(--surface2); }
.fld { stroke: var(--surface); stroke-width: 2.5; cursor: pointer; vector-effect: non-scaling-stroke; }
.fld.z1 { fill: var(--m1); } .fld.z2 { fill: var(--m2); } .fld.z3 { fill: var(--m3); } .fld.z4 { fill: var(--m4); } .fld.z0 { fill: var(--line); }
.fld.sel { stroke: var(--ink); stroke-width: 4; }
.flbl { font: 600 18px var(--fd); fill: var(--mapink); paint-order: stroke; stroke: var(--maphalo); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.scout { fill: var(--danger); stroke: var(--surface); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.draw-l { fill: color-mix(in srgb, var(--accent) 40%, transparent); stroke: var(--primary); stroke-width: 3; vector-effect: non-scaling-stroke; }
.draw-p { fill: var(--primary); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.me-p { fill: var(--water); stroke: var(--surface); stroke-width: 3; vector-effect: non-scaling-stroke; }
.maptag { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 700; background: var(--surface); color: var(--ink); padding: 4px 9px; border-radius: 999px; }
.attr { position: absolute; right: 6px; bottom: 4px; font-size: 11px; background: var(--surface); padding: 1px 6px; border-radius: 6px; }

/* ---------- modal, toast, menyu ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 15, 10, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--bg); border-radius: var(--rl); padding: 20px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--shadow); }
.modal-box.wide { max-width: 860px; }
.modal-box h2 { margin-bottom: 14px; }
.foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--r); opacity: 0; pointer-events: none; transition: .2s; z-index: 70; max-width: calc(100vw - 32px); font-weight: 600; }
#toast.on { opacity: 1; transform: translateX(-50%); } #toast.err { background: var(--danger); color: #fff; }
.pop { position: fixed; z-index: 60; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r); padding: 8px; box-shadow: var(--shadow); min-width: 230px; display: flex; flex-direction: column; }
.pop a, .pop button.it { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left; min-height: 44px; }
.pop a:hover, .pop button.it:hover { background: var(--surface2); }
.pop .who-b { padding: 8px 10px; display: flex; flex-direction: column; }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; }
.themes button { min-height: 44px; border: var(--bw) solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; }
.themes button.on { background: var(--ink); color: var(--bg); }

/* ---------- kirish ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top { display: flex; align-items: center; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.auth-top img { width: 44px; height: 44px; } .auth-top b { font: 500 20px var(--fd); }
.auth-mid { flex: 1; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 460px; padding: 24px; }
.auth h1 { margin-bottom: 6px; } .lead { color: var(--muted); margin: 0 0 16px; }

/* ---------- AI panel ---------- */
.ai-top { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 4px 12px 4px 6px; border-radius: 999px; border: 1.5px dashed var(--muted); background: var(--surface2); cursor: pointer; }
.ai-top-t { display: flex; flex-direction: column; text-align: left; line-height: 1.1; } .ai-top-t b { font-size: 14px; } .ai-top-t span { font-size: 12px; color: var(--muted); }
.ai-ava { position: relative; flex: none; width: 34px; height: 34px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--primary); color: var(--onprimary); }
.ai-ava .ico { width: 18px; height: 18px; } .ai-ava.big { width: 44px; height: 44px; border-radius: 14px; }
.ai-ava i { position: absolute; right: -5px; bottom: -4px; font: 700 9px/1 var(--fb); font-style: normal; color: var(--onaccent); background: var(--accent); border-radius: 6px; padding: 2px 4px; }
.ai-scrim { position: fixed; inset: 0; background: rgba(5, 15, 10, .35); z-index: 40; }
.ai-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--bg); z-index: 45; display: flex; flex-direction: column; box-shadow: var(--shadow); border-left: var(--bw) solid var(--line); }
.ai-head { display: flex; gap: 10px; align-items: center; padding: 14px; border-bottom: var(--bw) solid var(--line); }
.ai-title { font: 500 17px var(--fd); }
.ai-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.ai-fact { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r); padding: 10px; } .ai-fact span { display: block; font-size: 12px; color: var(--muted); } .ai-fact b { font: 500 18px var(--fd); }
.ai-fact.danger b { color: var(--danger); } .ai-fact.sun b { color: var(--warntext); } .ai-fact.ok b { color: var(--ok); }
.ai-warn, .ai-disc { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; background: var(--surface2); border-radius: var(--r); padding: 10px 12px; margin: 0; }
.ai-msgs { display: flex; flex-direction: column; gap: 8px; }
.ai-msg { max-width: 92%; padding: 10px 12px; border-radius: 16px; font-size: 15px; position: relative; overflow-wrap: anywhere; }
.ai-msg.me { align-self: flex-end; background: var(--primary); color: var(--onprimary); border-bottom-right-radius: 4px; }
.ai-msg.bot { align-self: flex-start; background: var(--surface); border: var(--bw) solid var(--line); border-bottom-left-radius: 4px; padding-right: 36px; }
.ai-msg .ai-p, .ai-msg .ai-li { display: block; } .ai-msg .ai-li::before { content: '• '; } .ai-gap { display: block; height: 6px; }
.ai-copy { position: absolute; right: 6px; top: 6px; background: none; border: 0; cursor: pointer; color: var(--muted); }
.ai-msg.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 4px; animation: aiDot 1s infinite; }
@keyframes aiDot { 50% { opacity: .2; } }
.ai-prop { background: var(--surface); border: 1.5px dashed var(--muted); border-radius: var(--r); padding: 10px 12px; }
.ai-pp { display: flex; gap: 8px; justify-content: space-between; font-size: 13px; margin-top: 4px; }
.ai-foot { border-top: var(--bw) solid var(--line); padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-quick { display: flex; gap: 6px; overflow-x: auto; } .ai-quick .chip { font-size: 13px; min-height: 38px; white-space: nowrap; }
.ai-form { display: flex; gap: 8px; } .ai-form textarea { flex: 1; min-height: 48px; border: 2px solid var(--line); border-radius: var(--r); padding: 12px; resize: none; background: var(--surface); }
.ai-attach { display: flex; gap: 8px; align-items: center; font-size: 13px; } .ai-attach select { min-height: 40px; border-radius: 10px; border: var(--bw) solid var(--line); background: var(--surface); flex: 1; min-width: 0; }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ai-agent { display: flex; gap: 10px; align-items: center; text-align: left; cursor: pointer; width: 100%; }

/* ---------- telefon ---------- */
@media (max-width: 860px) {
  .top .lg-home { height: 34px; min-width: 34px; width: 34px; border-radius: 9px; } .top .lg-home.lg-has { width: auto; max-width: 96px; padding: 2px 5px; } .top .lg-home.lg-empty .lg-t { display: none; }
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 12px 16px 4px; } .top .tlogo { display: block; } .top-t h1 { font-size: 19px; } .top .ava { margin-left: 0; }
  .top-acts { width: 100%; margin-left: 0; } .top-acts:empty { display: none; }
  .content { padding: 8px 16px 110px; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpi b { font-size: 24px; }
  .dgrid, .grid2, .grid3 { grid-template-columns: 1fr; }
  .bn { display: flex; justify-content: space-around; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-top: var(--bw) solid var(--line); background: var(--surface); padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); }
  .bn a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 56px; min-height: 48px; justify-content: center; text-decoration: none; }
  .bn a.on { color: var(--ink); }
  .bn a.main { width: 60px; height: 60px; border-radius: 20px; background: var(--primary); color: var(--onprimary); margin-top: -26px; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); }
  .bn a.main span { display: none; }
  .map { height: 260px; } .map.tall { height: 340px; }
  .wx-t { font-size: 40px; } .fc-t { font-size: 26px; }
  .modal-bg { place-items: end center; padding: 0; } .modal-box { border-radius: var(--rl) var(--rl) 0 0; max-height: 92vh; }
  .hide-m { display: none !important; }
  #toast { bottom: 100px; }
  table.resp thead { display: none; } table.resp tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; } table.resp td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 2px; }
  table.resp td::before { content: attr(data-l); color: var(--muted); font-size: 13px; }
}
@media (min-width: 861px) { .hide-d { display: none !important; } }

/* ---------- chop etish (PDF brauzer orqali): oq qog'oz, qora matn ---------- */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .side, .bn, .top-acts, .btn, .ai-top, .ai-drawer, .ai-scrim, #toast, .tabs { display: none !important; }
  .layout { display: block; } .content { padding: 0; } .card { border-color: #999; break-inside: avoid; }
  * { color: #000 !important; background: transparent !important; }
}
