@font-face { font-family: Vazirmatn; src: url('fonts/Vazirmatn.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --brand: #d71921; --brand-strong: #b3141b; --brand-soft: #fbe9ea;
  --bg: #f3f3f1; --surface: #ffffff; --surface-2: #f8f8f6; --line: #e6e5e1; --line-strong: #d6d5d0;
  --ink: #1d1e20; --ink-2: #4a4c50; --muted: #74767b;
  --series: #2a78d6; --series-soft: #cde2fb;
  --good: #0f7b0f; --good-bg: #e7f5e7; --warn: #8a5a00; --warn-bg: #fff3d6; --serious: #a4471f; --serious-bg: #fde9df; --crit: #b42b2b; --crit-bg: #fbe4e4;
  --info: #1d5fae; --info-bg: #e5effb;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 4px 16px rgb(0 0 0 / .05);
  --radius: 14px; --radius-sm: 9px;
  --nav-w: 216px; --as-w: 420px; --top-h: 60px;
  font-family: Vazirmatn, Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #ef3b42; --brand-strong: #ff5a60; --brand-soft: #3a1c1e;
    --bg: #111213; --surface: #1a1b1d; --surface-2: #202124; --line: #2b2c30; --line-strong: #393a3f;
    --ink: #f0efec; --ink-2: #c6c5c0; --muted: #96979b;
    --series: #3987e5; --series-soft: #1c3557;
    --good: #5fd35f; --good-bg: #16301a; --warn: #fab219; --warn-bg: #3a2e10; --serious: #ec835a; --serious-bg: #3a2318; --crit: #ff7676; --crit-bg: #3b1b1b;
    --info: #8ab8f0; --info-bg: #182a40;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #ef3b42; --brand-strong: #ff5a60; --brand-soft: #3a1c1e;
  --bg: #111213; --surface: #1a1b1d; --surface-2: #202124; --line: #2b2c30; --line-strong: #393a3f;
  --ink: #f0efec; --ink-2: #c6c5c0; --muted: #96979b;
  --series: #3987e5; --series-soft: #1c3557;
  --good: #5fd35f; --good-bg: #16301a; --warn: #fab219; --warn-bg: #3a2e10; --serious: #ec835a; --serious-bg: #3a2318; --crit: #ff7676; --crit-bg: #3b1b1b;
  --info: #8ab8f0; --info-bg: #182a40;
  --shadow: 0 1px 2px rgb(0 0 0 / .3);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { flex: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ———— topbar ———— */
.topbar { height: var(--top-h); display: flex; align-items: center; gap: 16px; padding-inline: 18px; background: var(--surface); border-block-end: 1px solid var(--line); position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 26px; width: auto; display: block; }
.brand-title { font-weight: 700; font-size: 15px; padding-inline-start: 12px; border-inline-start: 1px solid var(--line-strong); color: var(--ink-2); }
.topbar-mid { flex: 1; display: flex; align-items: center; gap: 16px; min-width: 0; }
.today { color: var(--muted); font-size: 13px; white-space: nowrap; }
.webstat { display: flex; gap: 6px; overflow: hidden; }
.site-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; direction: ltr; }
.site-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.site-pill.up .dot { background: #0ca30c; }
.site-pill.down { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 35%, var(--line)); background: var(--crit-bg); }
.site-pill.down .dot { background: #d03b3b; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--ink-2); }
.icon-btn[hidden] { display: none; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn svg { width: 19px; height: 19px; }

/* ———— shell ———— */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--as-w); height: calc(100dvh - var(--top-h)); }
.side { background: var(--surface); border-inline-end: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; position: relative; }
.side a svg { width: 19px; height: 19px; color: var(--muted); }
.side a:hover { background: var(--surface-2); color: var(--ink); }
.side a.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }
.side a.active svg { color: var(--brand); }
.side .badge { margin-inline-start: auto; font-size: 11.5px; min-width: 22px; text-align: center; padding: 0 7px; border-radius: 99px; background: var(--crit-bg); color: var(--crit); font-weight: 700; }
.side .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side .group { font-size: 11.5px; color: var(--muted); padding: 4px 12px; }
.side .wh-link { font-weight: 400; font-size: 13.5px; }
.side .wh-link .code { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); direction: ltr; margin-inline-start: auto; }

.content { overflow-y: auto; padding: 22px 26px 60px; outline: none; container: main / inline-size; }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-block-end: 18px; }
.page-head h1 { font-size: 22px; margin: 0; font-weight: 800; letter-spacing: -.01em; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.page-head .grow { flex: 1; }

/* ———— cards ———— */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; }
.card-h h2 { font-size: 15px; margin: 0; font-weight: 700; }
.card-h .grow { flex: 1; }
.card-h a.more { font-size: 12.5px; color: var(--info); }
.card-b { padding: 12px 18px 16px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.mt { margin-block-start: 16px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@container main (min-width: 860px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: default; }
a.kpi { cursor: pointer; }
a.kpi:hover { border-color: var(--line-strong); }
.kpi .label { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .value { font-size: 24px; font-weight: 800; line-height: 1.3; }
.kpi .value small { font-size: 12.5px; white-space: nowrap; font-weight: 500; color: var(--muted); margin-inline-start: 3px; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi .sub.bad { color: var(--crit); }

/* attention */
.attention { display: flex; gap: 10px; flex-wrap: wrap; margin-block-end: 16px; }
.att { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 10px; font-size: 13.5px; border: 1px solid; cursor: pointer; background: none; }
.att svg { width: 17px; height: 17px; }
.att.crit { background: var(--crit-bg); color: var(--crit); border-color: color-mix(in srgb, var(--crit) 25%, transparent); }
.att.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.att.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.att.ok { background: var(--good-bg); color: var(--good); border-color: transparent; cursor: default; }

/* warehouse cards */
.whs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@container main (min-width: 1240px) { .whs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container main (max-width: 600px) { .whs { grid-template-columns: minmax(0, 1fr); } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.wh { padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s; }
.wh:hover { border-color: var(--line-strong); }
.wh-top { display: flex; align-items: flex-start; gap: 10px; }
.wh-code { font-size: 11px; font-weight: 800; letter-spacing: .06em; direction: ltr; padding: 3px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.wh h3 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.4; }
.wh .role { font-size: 12.5px; color: var(--muted); }
.wh .city { margin-inline-start: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.wh .city svg { width: 14px; height: 14px; }
.fill { display: flex; flex-direction: column; gap: 4px; }
.fill-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--series); }
.bar.hot > i { background: #ec835a; }
.wh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wh-stats div { background: var(--surface-2); border-radius: 9px; padding: 6px 8px; }
.wh-stats b { display: block; font-size: 15px; font-weight: 800; line-height: 1.5; }
.wh-stats span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.wh-foot { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; }

/* building (Tehran floors) */
.building { display: flex; flex-direction: column-reverse; gap: 3px; }
.floor { display: grid; grid-template-columns: 54px 1fr 46px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.floor .bar { height: 12px; border-radius: 4px; }
.floor .bar > i { border-radius: 3px; }
.building.big .floor { grid-template-columns: 250px 1fr 100px; font-size: 13px; color: var(--ink-2); }
.building.big .zn { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.zn b { font-weight: 700; color: var(--ink); }
.zn small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roof { margin-inline: 258px 108px; }
.building.big .floor .bar { height: 22px; border-radius: 6px; }
.building.big .floor .bar > i { border-radius: 5px; }
.roof { height: 6px; margin-inline: 52px 44px; border-radius: 6px 6px 0 0; background: var(--line-strong); }

/* flow */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@container main (max-width: 820px) { .g-3-2, .g-2, .flow { grid-template-columns: minmax(0, 1fr); } }
.lane { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.node { padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.node.src { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.arrow { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.arrow svg { width: 16px; height: 16px; }
.arrow em { font-style: normal; font-size: 11px; color: var(--info); background: var(--info-bg); padding: 0 6px; border-radius: 99px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-block-end: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
.tbl td { padding: 9px 10px; border-block-end: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-block-end: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .r { text-align: end; }
.tbl .sku { direction: ltr; text-align: end; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; font-weight: 600; }
.prod { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.thumb { width: 38px; height: 38px; border-radius: 8px; background: #fff; border: 1px solid var(--line); object-fit: contain; flex: none; display: grid; place-items: center; color: #9a9a9a; }
.thumb svg { width: 18px; height: 18px; }
.prod small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.qty-cell { white-space: nowrap; }
.qty-cell .z { display: block; font-size: 11px; color: var(--muted); }
.qty-0 { color: var(--muted); }

/* pills & status */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 9px; border-radius: 99px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); font-weight: 500; }
.pill svg { width: 13px; height: 13px; }
.pill.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.serious { background: var(--serious-bg); color: var(--serious); border-color: transparent; }
.pill.crit { background: var(--crit-bg); color: var(--crit); border-color: transparent; }
.pill.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.pill.brand { background: var(--brand-soft); color: var(--brand-strong); border-color: transparent; }

/* lists */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-block-end: 1px solid var(--line); }
.li:last-child { border-block-end: 0; }
.li .main { flex: 1; min-width: 0; }
.li .t { font-weight: 600; font-size: 13.5px; line-height: 1.5; }
.li .s { font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); padding: 18px 0; text-align: center; font-size: 13.5px; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-strong); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: none; color: var(--info); }
.btn:disabled { opacity: .55; cursor: default; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-block-end: 14px; }
.input, select.input { height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 12px; min-width: 0; }
.input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--series) 45%, transparent); outline-offset: 1px; }
.search { flex: 1; min-width: 200px; max-width: 360px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 13px; }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; padding-inline: 4px; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }

/* chart */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: Vazirmatn, sans-serif; }
.chart .bar-mark { fill: var(--series); }
.chart .hit:hover + .bar-mark, .chart .bar-mark.hover { fill: color-mix(in srgb, var(--series) 75%, var(--ink)); }
.chart .val-label { fill: var(--ink-2); font-size: 11px; font-weight: 700; font-family: Vazirmatn, sans-serif; }
.tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12.5px; padding: 7px 10px; border-radius: 8px; opacity: 0; transform: translateY(4px); transition: opacity .1s, transform .1s; max-width: 260px; line-height: 1.6; }
.tip.on { opacity: 1; transform: none; }

/* progress */
.prog { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.prog .bar { flex: 1; }
.prog span { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.col h3 { margin: 0 4px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; display: flex; flex-direction: column; gap: 6px; }
.task .t { font-weight: 700; font-size: 13.5px; line-height: 1.55; }
.task .d { font-size: 12.5px; color: var(--ink-2); }
.task .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.task .acts { display: flex; gap: 6px; justify-content: flex-end; }
.task.done .t { text-decoration: line-through; color: var(--muted); }
.by-ai { color: var(--info); }

/* ———— assistant ———— */
.assistant { background: var(--surface); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.as-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-block-end: 1px solid var(--line); }
.as-avatar { width: 36px; height: 36px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.as-title { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.as-title strong { font-size: 14.5px; }
.as-mode { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.as-mode .dot { width: 7px; height: 7px; border-radius: 50%; background: #0ca30c; }
.as-mode.off .dot { background: #fab219; }
.as-close { display: none; }
.as-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 100%; font-size: 14px; line-height: 1.85; }
.msg.user { align-self: flex-start; background: var(--ink); color: var(--surface); padding: 8px 13px; border-radius: 14px 14px 4px 14px; max-width: 88%; white-space: pre-wrap; }
.msg.bot { align-self: stretch; }
.msg.bot > :first-child { margin-top: 0; }
.msg.bot > :last-child { margin-bottom: 0; }
.msg.bot h1, .msg.bot h2, .msg.bot h3 { font-size: 14.5px; margin: 14px 0 4px; font-weight: 800; }
.msg.bot h2 { font-size: 15.5px; }
.msg.bot p { margin: 6px 0; }
.msg.bot ul, .msg.bot ol { margin: 6px 0; padding-inline-start: 20px; }
.msg.bot li { margin: 2px 0; }
.msg.bot code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; font-size: 12.5px; direction: ltr; unicode-bidi: isolate; }
.msg.bot .md-table { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; }
.msg.bot table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.msg.bot th { background: var(--surface-2); text-align: start; font-weight: 700; padding: 5px 8px; white-space: nowrap; }
.msg.bot td { padding: 5px 8px; border-block-start: 1px solid var(--line); }
.msg.notice { align-self: stretch; font-size: 12.5px; color: var(--warn); background: var(--warn-bg); padding: 6px 10px; border-radius: 9px; }
.msg.err { align-self: stretch; font-size: 13px; color: var(--crit); background: var(--crit-bg); padding: 6px 10px; border-radius: 9px; }
.tools { display: flex; flex-direction: column; gap: 4px; margin-block-end: 6px; }
.tool { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.tool svg { width: 14px; height: 14px; }
.tool.done svg { color: var(--good); }
.tool.error { color: var(--crit); }
.spin { width: 13px; height: 13px; border: 2px solid var(--line-strong); border-top-color: var(--series); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.typing { display: inline-flex; gap: 4px; padding: 6px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.welcome { display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); font-size: 13.5px; }
.welcome h3 { margin: 0; font-size: 16px; color: var(--ink); }
.suggest { display: flex; flex-direction: column; gap: 6px; }
.suggest button { text-align: start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.suggest button:hover { border-color: var(--line-strong); background: var(--surface); }
.suggest svg { width: 16px; height: 16px; color: var(--brand); }
.as-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-block-start: 1px solid var(--line); }
.as-form textarea { flex: 1; resize: none; max-height: 160px; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 9px 12px; background: var(--surface-2); line-height: 1.6; }
.send { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.send:disabled { opacity: .5; cursor: default; }
.send svg { width: 19px; height: 19px; transform: scaleX(-1); }
.ask-btn svg { color: var(--brand); }

.fab { display: none; }
.toast { position: fixed; inset-block-end: 22px; inset-inline-start: 50%; transform: translate(50%, 20px); background: var(--ink); color: var(--surface); padding: 9px 16px; border-radius: 10px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: .2s; z-index: 70; }
.toast.on { opacity: 1; transform: translate(50%, 0); }
.toast.bad { background: var(--crit); color: #fff; }

/* ———— responsive ———— */
@media (max-width: 1280px) {
  :root { --nav-w: 64px; --as-w: 380px; }
  .side a span, .side .group, .side .badge, .side .wh-link .code { display: none; }
  .side a { justify-content: center; padding: 10px; }
  .side .badge-dot { position: absolute; inset-block-start: 6px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--crit); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid label:first-child { grid-column: 1 / -1; }
}
@media (min-width: 1281px) { .side .badge-dot { display: none; } }
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--top-h) - 62px); }
  .side { position: fixed; inset-inline: 0; inset-block-end: 0; height: calc(62px + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom); flex-direction: row; justify-content: space-around; border-inline-end: 0; border-block-start: 1px solid var(--line); z-index: 20; overflow: visible; }
  .side .sep, .side .group, .side .wh-link { display: none; }
  .side a { flex-direction: column; gap: 0; padding: 6px 4px; font-size: 10.5px; flex: 1; }
  .side a span { display: block; font-size: 10.5px; white-space: nowrap; }
  .assistant { position: fixed; inset: 0; z-index: 40; transform: translateY(100%); transition: transform .25s ease; border: 0; padding-block-end: env(safe-area-inset-bottom); }
  body.as-open .assistant { transform: none; }
  .as-close { display: inline-grid; }
  .fab { display: inline-flex; position: fixed; inset-inline-start: 16px; inset-block-end: calc(76px + env(safe-area-inset-bottom)); z-index: 30; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 14px; border-radius: 99px; border: 0; background: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 6px 20px rgb(215 25 33 / .35); cursor: pointer; }
  .fab svg { width: 20px; height: 20px; }
  .content { padding: 16px 16px 90px; }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .today { display: none; }
}
@media (max-width: 640px) {
  .brand-title { display: none; }
  .webstat .site-pill:not(.down) { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .building.big .floor { grid-template-columns: 120px 1fr 74px; font-size: 12px; }
  .building.big .roof { margin-inline: 128px 82px; }
  .page-head h1 { font-size: 19px; }
  .search { max-width: none; }
}

/* ———— صفحهٔ ورود (نسخهٔ هاست) ———— */
body.login { display: grid; place-items: center; padding: 16px; overflow: auto; }
.login-card { width: min(380px, 100%); padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.login-card img { height: 30px; width: auto; align-self: flex-start; }
.login-card h1 { margin: 0; font-size: 19px; font-weight: 800; }
.login-card p { margin: -8px 0 0; color: var(--muted); font-size: 13.5px; }
.login-card .input { height: 44px; font-size: 15px; }
.login-card .btn { height: 44px; }
.login-err { color: var(--crit); font-size: 13px; min-height: 20px; margin: -6px 0 0; }
