/* Ажлын төв — цэвэр, ойлгомжтой загвар. Системийн фонт (Ө Ү ₮ бүгд бий). */
:root {
  --bg: #f4f6fb; --surface: #ffffff; --surface2: #f8fafd; --line: #e3e8f0; --line2: #edf1f7;
  --text: #1b2333; --muted: #667089; --faint: #98a1b5;
  --primary: #3b6ef5; --primary-soft: #eaf0ff; --primary-ink: #2350c9;
  --todo: #64748b; --doing: #3b6ef5; --review: #e8890c; --done: #12a072; --danger: #e03131; --danger-soft: #fdecec;
  --warn-soft: #fff4e2; --ok-soft: #e6f7f0;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 4px 16px rgba(20, 30, 60, .05);
  --shadow-lg: 0 12px 40px rgba(20, 30, 60, .18);
  --side: 264px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- товч, талбар ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface2); border-color: #d3dae6; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-ink); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: #f5c2c2; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line2); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.icon { width: 36px; padding: 0; }
.btn:disabled { opacity: .55; cursor: default; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--line2); color: var(--muted); white-space: nowrap; }
.chip.blue { background: var(--primary-soft); color: var(--primary-ink); }
.chip.green { background: var(--ok-soft); color: #0b7a56; }
.chip.amber { background: var(--warn-soft); color: #a25e00; }
.chip.red { background: var(--danger-soft); color: #c01f1f; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700;
  flex: none; border: 2px solid #fff; }
.avatar.lg { width: 38px; height: 38px; font-size: 14px; }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -8px; }
.seg { display: inline-flex; background: var(--line2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- нэвтрэх ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 10% -10%, #dfe8ff 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #d9f3ea 0%, transparent 55%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 32px 28px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #3b6ef5, #12a072); display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 800; }
.brand b { font-size: 19px; letter-spacing: -.2px; }
.brand small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.auth h1 { font-size: 22px; margin: 26px 0 4px; }
.auth p.lead { color: var(--muted); margin: 0 0 22px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn { width: 100%; height: 42px; }
.google-btn svg { width: 18px; height: 18px; }
.auth .err { background: var(--danger-soft); color: #b42318; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px; }
.linkbtn { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- бүтэц ---------- */
.app { display: flex; min-height: 100%; }
.side { width: var(--side); flex: none; background: #fff; border-right: 1px solid var(--line); height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; }
.side-top { padding: 18px 16px 10px; }
.side .search { margin-top: 16px; position: relative; }
.side .search input { padding-left: 34px; height: 38px; background: var(--surface2); }
.side .search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--faint); }
.side nav { padding: 4px 10px; overflow-y: auto; flex: 1; }
.nav-h { font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); padding: 16px 10px 6px; display: flex; align-items: center; justify-content: space-between; }
.nav-h button { border: 0; background: none; color: var(--primary); font-weight: 700; font-size: 18px; line-height: 1; padding: 0 4px; }
.nav-a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; color: var(--text); font-weight: 500; text-decoration: none !important; }
.nav-a:hover { background: var(--surface2); }
.nav-a.on { background: var(--primary-soft); color: var(--primary-ink); font-weight: 650; }
.nav-a .ico { width: 22px; text-align: center; font-size: 16px; }
.nav-a .cnt { margin-left: auto; font-size: 12px; color: var(--faint); font-weight: 600; }
.nav-a.on .cnt { color: var(--primary-ink); }
.nav-a .pdot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.nav-a.paused { opacity: .6; }
.side-bottom { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.side-bottom .who { min-width: 0; flex: 1; }
.side-bottom .who b { display: block; font-size: 13.5px; }
.side-bottom .who span { font-size: 12px; color: var(--muted); }
.main { flex: 1; min-width: 0; }
.topbar { display: none; }
.page { max-width: 1280px; margin: 0 auto; padding: 26px 28px 60px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.section-h { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.section-h h2 { font-size: 17px; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* ---------- нүүр ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 28px; font-weight: 750; letter-spacing: -.5px; margin-top: 4px; }
.stat.red .v { color: var(--danger); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.list-item { display: flex; align-items: center; gap: 11px; padding: 11px 16px; border-top: 1px solid var(--line2); cursor: pointer; }
.list-item:first-child { border-top: 0; }
.list-item:hover { background: var(--surface2); }
.list-item .t { font-weight: 600; }
.feed-item { display: flex; gap: 11px; padding: 10px 16px; border-top: 1px solid var(--line2); font-size: 13.5px; }
.feed-item:first-child { border-top: 0; }
.feed-item .when { color: var(--faint); font-size: 12px; white-space: nowrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fchip { height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; color: var(--muted); }
.fchip.on { background: var(--text); border-color: var(--text); color: #fff; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.pcard { position: relative; padding: 18px 18px 16px; cursor: pointer; transition: transform .12s, box-shadow .12s; overflow: hidden; display: flex; flex-direction: column; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20, 30, 60, .1); }
.pcard::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--pc); }
.pcard .pe { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--pc) 14%, #fff); flex: none; }
.pcard h3 { font-size: 16.5px; }
.pcard .cat { font-size: 12px; color: var(--muted); }
.pcard p.desc { color: var(--muted); font-size: 13.5px; margin: 12px 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.progress { height: 7px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--done); }
.pmeta { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.pmeta .sep { flex: 1; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- төсөл ---------- */
.phero { padding: 20px 22px; margin-bottom: 18px; position: relative; overflow: hidden; }
.phero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--pc); }
.phero .pe { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 28px; background: color-mix(in srgb, var(--pc) 14%, #fff); flex: none; }
.phero h1 { font-size: 23px; letter-spacing: -.3px; }
.phero-side { text-align: right; min-width: 140px; }
.phero .desc { color: var(--muted); margin: 10px 0 0; max-width: 820px; }
.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.links a { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 11px 14px; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--primary-ink); border-bottom-color: var(--primary); }
.tabs a .cnt { font-size: 12px; background: var(--line2); color: var(--muted); border-radius: 99px; padding: 1px 8px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

/* kanban */
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: #eef1f7; border-radius: var(--radius); padding: 10px; min-height: 120px; }
.col.over { outline: 2px dashed var(--primary); outline-offset: -2px; background: var(--primary-soft); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-size: 13.5px; }
.col-h .n { margin-left: auto; font-size: 12px; color: var(--muted); background: #fff; border-radius: 99px; padding: 1px 9px; }
.tcard { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: 0 1px 2px rgba(20, 30, 60, .04);
  transition: box-shadow .12s, transform .12s; }
.tcard:hover { box-shadow: 0 6px 18px rgba(20, 30, 60, .1); }
.tcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.tcard .tt { font-weight: 600; font-size: 14px; line-height: 1.4; word-break: break-word; }
.tcard .tm { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tcard .tm .sp { flex: 1; }
.tcard.done .tt { color: var(--muted); text-decoration: line-through; text-decoration-color: #c3cad8; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 11.5px; }
.prio.high { color: var(--danger); }
.prio.med { color: #b7791f; }
.prio.low { color: var(--faint); }
.due { display: inline-flex; align-items: center; gap: 4px; }
.due.late { color: var(--danger); font-weight: 700; }
.due.soon { color: #b7791f; font-weight: 700; }
.quick-add { width: 100%; border: 1px dashed #c9d1e0; background: transparent; border-radius: 10px; height: 36px; color: var(--muted); font-weight: 600; font-size: 13px; }
.quick-add:hover { background: #fff; color: var(--primary); border-color: var(--primary); }
.quick-form input { margin-bottom: 6px; }
/* жагсаалт */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface2); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface2); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; }

/* төлөвлөгөө */
.plan-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ms { display: flex; align-items: flex-start; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line2); }
.ms:first-child { border-top: 0; }
.ms input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--done); flex: none; }
.ms.done .mt { color: var(--muted); text-decoration: line-through; }
.ms .x { margin-left: auto; opacity: 0; }
.ms:hover .x { opacity: 1; }
.md { line-height: 1.7; word-break: break-word; }
.md h1 { font-size: 21px; margin: 18px 0 8px; }
.md h2 { font-size: 17.5px; margin: 20px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line2); }
.md h3 { font-size: 15.5px; margin: 16px 0 6px; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md li.task { list-style: none; margin-left: -20px; }
.md code { background: var(--line2); padding: 1px 6px; border-radius: 5px; font-size: 13px; font-family: Consolas, "SF Mono", monospace; }
.md blockquote { margin: 0 0 10px; padding: 6px 14px; border-left: 3px solid var(--primary); background: var(--surface2); border-radius: 0 8px 8px 0; color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.plan-edit textarea { min-height: 420px; font-family: Consolas, "SF Mono", monospace; font-size: 13.5px; }

/* файл */
.drop { border: 2px dashed #c9d1e0; border-radius: var(--radius); padding: 26px 16px; text-align: center; background: #fff; transition: border-color .12s, background .12s; }
.drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop .big { font-size: 30px; }
.drop b { display: block; margin: 4px 0 2px; font-size: 15px; }
.uploads { margin-top: 12px; display: grid; gap: 8px; }
.up { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.up .bar { height: 6px; background: var(--line2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.up .bar i { display: block; height: 100%; background: var(--primary); transition: width .2s; }
.up.ok .bar i { background: var(--done); }
.up.err .bar i { background: var(--danger); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.fcard { overflow: hidden; cursor: pointer; transition: box-shadow .12s, transform .12s; display: flex; flex-direction: column; }
.fcard:hover { box-shadow: 0 10px 26px rgba(20, 30, 60, .12); transform: translateY(-2px); }
.fthumb { height: 128px; background: var(--surface2); display: grid; place-items: center; position: relative; overflow: hidden; border-bottom: 1px solid var(--line2); }
.fthumb img, .fthumb video { width: 100%; height: 100%; object-fit: cover; }
.fthumb .fi { font-size: 40px; }
.fthumb .badge { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 800; letter-spacing: .4px; color: #fff; padding: 2px 7px; border-radius: 6px; background: rgba(15, 20, 35, .72); }
.fthumb .play { position: absolute; width: 42px; height: 42px; border-radius: 50%; background: rgba(15, 20, 35, .62); color: #fff; display: grid; place-items: center; font-size: 16px; }
.fbody { padding: 10px 12px 12px; }
.fbody .fn { font-weight: 600; font-size: 13.5px; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fbody .fm { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- цонх ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 22, 40, .45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .16s; }
.modal.wide { max-width: 980px; }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px 12px; }
.modal-h h2 { font-size: 18px; flex: 1; min-width: 0; }
.modal-b { padding: 6px 22px 18px; overflow-y: auto; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line2); }
.drawer-wrap { justify-content: flex-end; padding: 0; }
.drawer { background: #fff; width: 100%; max-width: 620px; height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .18s; }
.drawer .modal-b { flex: 1; }
.title-input { width: 100%; border: 0; font-size: 20px; font-weight: 700; padding: 4px 0; outline: none; border-radius: 6px; }
.title-input:focus { background: var(--surface2); }
.props { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; align-items: center; margin: 12px 0 18px; }
.props > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.status-seg button.on[data-s=todo] { color: var(--todo); }
.status-seg button.on[data-s=doing] { color: var(--doing); }
.status-seg button.on[data-s=review] { color: var(--review); }
.status-seg button.on[data-s=done] { color: var(--done); }
.comment { display: flex; gap: 10px; margin-bottom: 12px; }
.comment .cb { background: var(--surface2); border: 1px solid var(--line2); border-radius: 12px; padding: 8px 12px; flex: 1; min-width: 0; }
.comment .cb .cm { font-size: 12px; color: var(--muted); }
.comment .cb .ct { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.viewer-body { background: #11151f; border-radius: 12px; overflow: hidden; display: grid; place-items: center; min-height: 300px; }
.viewer-body iframe { width: 100%; height: 72vh; border: 0; background: #fff; }
.viewer-body video { width: 100%; max-height: 72vh; background: #000; }
.viewer-body img { max-width: 100%; max-height: 72vh; display: block; }
.viewer-body audio { width: calc(100% - 40px); margin: 40px 20px; }
.viewer-body pre { margin: 0; width: 100%; max-height: 72vh; overflow: auto; background: #fff; padding: 16px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.viewer-body .nopreview { color: #c9d1e0; text-align: center; padding: 40px 20px; }
.cred { background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-family: Consolas, "SF Mono", monospace; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.check-list { border: 1px solid var(--line); border-radius: 12px; max-height: 260px; overflow-y: auto; }
.check-list label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line2); }
.check-list label:first-child { border-top: 0; }
.check-list select { width: auto; height: 30px; font-size: 12.5px; padding: 0 6px; }
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; }
.toast { background: #1b2333; color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; animation: pop .16s; }
.toast.err { background: #b42318; }
.storage-bar { height: 12px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.storage-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3b6ef5, #12a072); }
.search-res .list-item .k { font-size: 11.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

/* ---------- утас ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-grid, .plan-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .app.menu .side { transform: none; }
  .app.menu::after { content: ""; position: fixed; inset: 0; background: rgba(15, 22, 40, .4); z-index: 55; }
  .topbar { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .topbar .t { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page { padding: 16px 16px 60px; }
  .page-head { flex-wrap: wrap; }
  .page-head h1 { font-size: 21px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .v { font-size: 24px; }
  .board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .props { grid-template-columns: 1fr; gap: 6px; }
  .props > span { margin-top: 6px; }
  .drawer { max-width: none; }
  .modal-h, .modal-b, .modal-f { padding-left: 16px; padding-right: 16px; }
  .phero { padding: 16px; }
  .phero h1 { font-size: 20px; }
  .phero-row { flex-wrap: wrap; }
  .phero .desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
  .phero .desc.open { display: block; }
  .hide-m { display: none !important; }
  .phero-main { flex-basis: calc(100% - 70px); }
  .phero-side { width: 100%; min-width: 0; text-align: left; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line2); padding-top: 12px; }
  .phero-side > div:first-child { font-size: 20px !important; }
  .phero-side .avatars { margin-top: 0 !important; }
  .phero-side .btn { margin-top: 0 !important; margin-left: auto; }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fthumb { height: 104px; }
  .tbl .hide-m { display: none; }
  .viewer-body iframe { height: 64vh; }
}
