:root {
  --bg: #050505; --panel: rgba(9, 9, 9, 0.78); --panel-solid: #090909; --panel2: #101010; --border: #2c2c2c; --border-hi: #4a4a4a;
  --text: #ffffff; --text2: #f0f0f0; --muted: #a4a4a4; --muted2: #8e8e8e; --faint: #656565;
  --inv-bg: #ffffff; --inv-text: #090909; --hover: rgba(255, 255, 255, 0.05); --hover2: rgba(255, 255, 255, 0.09);
  --green: #00ff80; --red: #ff5050; --amber: #ffc44d; --switch-on: #44cc66; --switch-off: #3a3a3a;
  --radius: 6px; --radius-sm: 4px; --shadow: 0 0 22px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --dur: 0.18s;
  --side: 248px; --gap: 12px; --pad: 14px; --row: 40px;
}
:root[data-theme="light"] {
  --bg: #ececec; --panel: rgba(255, 255, 255, 0.88); --panel-solid: #ffffff; --panel2: #f4f4f4; --border: #d6d6d6; --border-hi: #a9a9a9;
  --text: #090909; --text2: #111111; --muted: #5b5b5b; --muted2: #6d6d6d; --faint: #9a9a9a;
  --inv-bg: #090909; --inv-text: #ffffff; --hover: rgba(0, 0, 0, 0.04); --hover2: rgba(0, 0, 0, 0.07);
  --green: #00a854; --red: #e0303a; --amber: #b67b00; --switch-off: #c9c9c9; --shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
:root[data-theme="contrast"] {
  --bg: #000; --panel: #000; --panel-solid: #000; --panel2: #0a0a0a; --border: #8a8a8a; --border-hi: #fff; --muted: #d8d8d8; --muted2: #cfcfcf; --faint: #a8a8a8;
}
:root[data-compact="1"] { --gap: 8px; --pad: 10px; --row: 34px; }
:root[data-motion="0"] *, :root[data-motion="0"] *::before, :root[data-motion="0"] *::after { animation: none !important; transition: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font: 600 14px/1.45 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text2); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
body::before { content: ''; position: fixed; inset: 0; background: url('back.svg') center / cover no-repeat; opacity: 1; pointer-events: none; z-index: 0; transition: opacity .4s; }
:root[data-bg="0"] body::before, :root[data-theme="light"] body::before { opacity: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--inv-bg); color: var(--inv-text); }
* { scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

@keyframes uiOpen { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes uiClose { to { opacity: 0; transform: scale(0.97); } }
@keyframes uiRow { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes uiPop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes uiFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes uiSlide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: 200px 0; } }
.uiRow { animation: uiRow .22s var(--ease) backwards; }
.uiPop { animation: uiPop .16s ease-out; }
.uiOpen { animation: uiOpen var(--dur) var(--ease); }

.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; height: 100dvh; }
.side { display: flex; flex-direction: column; gap: 10px; padding: 14px 10px 14px 14px; min-height: 0; animation: uiSlide .3s var(--ease); }
.brand { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.brand img { width: 36px; height: 36px; border-radius: 6px; display: block; }
.brand-title { color: var(--text); font-size: 15px; font-weight: 700; }
.brand-sub { color: var(--muted); font-size: 11px; font-weight: 500; }
.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; }
.nav-group { color: var(--muted); font-size: 11px; font-weight: 700; padding: 12px 6px 4px; display: flex; justify-content: space-between; align-items: center; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 12px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer;
  text-align: left; transition: background .2s linear, color .2s linear, border-color .2s linear, transform .2s var(--ease);
}
.nav-item:hover { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }
.nav-item.active { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }
.nav-item:active { transform: scale(0.98); }
.nav-item .ico { width: 16px; height: 16px; flex: none; opacity: .9; }
.nav-item .cnt { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--hover2); }
.nav-item.active .cnt, .nav-item:hover .cnt { background: rgba(0, 0, 0, 0.12); }
.nav-item.soon { opacity: .55; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: .2s linear; }
.me:hover { border-color: var(--border-hi); }
.me img, .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel2); object-fit: cover; flex: none; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.me-name { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-sub { font-size: 11px; color: var(--muted); font-weight: 500; }

.main { min-width: 0; display: flex; flex-direction: column; padding: 14px 14px 14px 4px; gap: var(--gap); min-height: 0; }
.header { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.header .title { color: var(--text); font-size: 16px; font-weight: 700; }
.header .crumb { color: var(--muted); font-size: 12px; font-weight: 500; }
.header .grow { flex: 1; }
.burger { display: none; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; cursor: pointer; place-items: center; }
.key { display: inline-flex; align-items: center; justify-content: center; background: var(--inv-bg); color: var(--inv-text); border-radius: 3px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.view { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: var(--gap); padding-right: 4px; padding-bottom: 30px; min-height: 0; }
.view.enter { animation: uiFade .2s ease-out; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { flex: 1; min-width: 110px; text-align: center; padding: 10px 12px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); color: var(--muted); font-size: 13px; cursor: pointer; transition: .2s linear; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--pad); }
.panel-title { color: var(--text); font-size: 14px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.panel-sub { color: var(--muted); font-size: 12px; font-weight: 500; margin-top: -6px; margin-bottom: 10px; }
.grid { display: grid; gap: var(--gap); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; transition: border-color .2s linear, transform .2s var(--ease); }
.tile:hover { border-color: var(--border-hi); transform: translateY(-1px); }
.tile .num { color: var(--text); font-size: 26px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.15; }
.tile .lbl { color: var(--muted); font-size: 12px; font-weight: 500; }
.tile .hint { color: var(--faint); font-size: 11px; font-weight: 500; margin-top: 2px; }

.muted { color: var(--muted); font-weight: 500; font-size: 12px; }
.faint { color: var(--faint); font-weight: 500; font-size: 12px; }
.green { color: var(--green); } .red { color: var(--red); } .amber { color: var(--amber); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.sep { height: 1px; background: var(--border); margin: 10px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--inv-bg); color: var(--inv-text); border: 1px solid var(--inv-bg); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: .2s linear; white-space: nowrap; text-decoration: none;
}
.btn:hover { filter: brightness(0.88); }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: var(--panel); color: var(--muted); border-color: var(--border); }
.btn.ghost:hover { color: var(--text); border-color: var(--border-hi); filter: none; }
.btn.green { background: transparent; color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.btn.green:hover { background: var(--green); color: #050505; filter: none; }
.btn.red { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.btn.red:hover { background: var(--red); color: #fff; filter: none; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn[disabled], .btn.busy { opacity: .45; pointer-events: none; }
.btn.busy::after { content: ''; width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.field-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 36px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--panel-solid); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-weight: 600; outline: none; transition: border-color .15s linear, box-shadow .15s linear;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--border-hi); box-shadow: 0 0 0 3px var(--hover2); }
.textarea { min-height: 110px; resize: vertical; font-weight: 500; line-height: 1.5; }
.select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.search { position: relative; flex: 1; min-width: 180px; }
.search .input { padding-left: 32px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--border); color: var(--muted); font-size: 12px; cursor: pointer; transition: .2s linear; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.green { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.tag.red { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.tag.amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.role { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); white-space: nowrap; }
.role i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }

.switch { position: relative; width: 40px; height: 20px; flex: none; cursor: pointer; }
.switch input { display: none; }
.switch span { position: absolute; inset: 3px 0; border-radius: 99px; background: var(--switch-off); transition: all .3s ease; }
.switch span::after { content: ''; position: absolute; top: -3px; left: -1px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); transition: all .3s ease; }
.switch input:checked + span { background: var(--switch-on); }
.switch input:checked + span::after { left: calc(100% - 19px); }
.setting { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: var(--row); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.setting .grow { flex: 1; min-width: 0; }
.setting .s-title { color: var(--text); font-size: 13px; }
.setting .s-sub { color: var(--muted); font-size: 12px; font-weight: 500; }

.table { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.thead, .trow { display: grid; gap: 10px; align-items: center; padding: 9px 14px; }
.thead { color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--border); }
.trow { border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); transition: background .15s linear; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--hover); }
.trow.click { cursor: pointer; }
.trow .details { color: var(--muted2); font-size: 12px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cell-sub { color: var(--muted); font-size: 11px; font-weight: 500; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--pad); transition: border-color .2s linear; }
.card:hover { border-color: var(--border-hi); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-title { color: var(--text); font-size: 14px; font-weight: 700; }
.qa { display: grid; gap: 8px; margin-top: 10px; }
.q { color: var(--muted); font-size: 12px; }
.a { color: var(--text); font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs img { width: 120px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: zoom-in; transition: transform .2s var(--ease); }
.thumbs img:hover { transform: scale(1.04); }
.empty { text-align: center; color: var(--faint); padding: 36px 10px; font-weight: 500; }
.empty b { display: block; color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.skeleton { height: 54px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(90deg, var(--panel) 0, var(--panel2) 50%, var(--panel) 100%) 0 0 / 400px 100%; animation: shimmer 1.1s linear infinite; }

.chat { display: flex; flex-direction: column; gap: 10px; max-height: 58vh; overflow-y: auto; padding: 4px; }
.msg { display: flex; gap: 10px; animation: uiRow .2s var(--ease) backwards; }
.msg .bubble { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; }
.msg.bot .bubble { border-style: dashed; }
.msg .who { color: var(--text); font-size: 12px; font-weight: 700; display: flex; gap: 8px; align-items: baseline; }
.msg .who span { color: var(--faint); font-weight: 500; font-size: 11px; }
.msg .txt { color: var(--text2); font-weight: 500; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.msg img.att { max-width: 240px; max-height: 180px; border-radius: var(--radius-sm); margin-top: 6px; display: block; border: 1px solid var(--border); }

.matrix { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); max-height: 70vh; }
.matrix table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 12px; }
.matrix th, .matrix td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.matrix th { position: sticky; top: 0; background: var(--panel-solid); color: var(--muted); z-index: 2; font-weight: 600; }
.matrix th.grp { top: 0; color: var(--text); }
.matrix td:first-child, .matrix th:first-child { position: sticky; left: 0; background: var(--panel-solid); text-align: left; z-index: 1; color: var(--text); }
.matrix th:first-child { z-index: 3; }
.matrix tr:hover td { background: var(--hover); }
.cbx { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--border-hi); display: inline-grid; place-items: center; cursor: pointer; transition: .15s linear; background: transparent; }
.cbx.on { background: var(--inv-bg); border-color: var(--inv-bg); }
.cbx.on::after { content: ''; width: 8px; height: 4px; border-left: 2px solid var(--inv-text); border-bottom: 2px solid var(--inv-text); transform: rotate(-45deg) translate(1px, -1px); }

.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; padding: 16px; animation: uiFade .15s ease-out; }
.modal-back.closing { animation: uiFade .14s ease-in reverse forwards; }
.modal { width: min(560px, 100%); max-height: 88vh; overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); animation: uiOpen var(--dur) var(--ease); }
.modal.wide { width: min(860px, 100%); }
.modal-back.closing .modal { animation: uiClose .14s ease-in forwards; }
.modal-title { color: var(--text); font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; justify-content: space-between; gap: 10px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.picker-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; margin-top: 8px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; transition: .12s linear; color: var(--muted); }
.pick:hover { background: var(--hover); color: var(--text); }
.pick.on { color: var(--text); background: var(--hover2); border-color: var(--border-hi); }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .88); display: grid; place-items: center; animation: uiFade .15s; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: var(--radius); animation: uiOpen .2s var(--ease); }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--panel-solid); border: 1px solid var(--border); border-left: 3px solid var(--green); color: var(--text); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow); animation: uiPop .18s ease-out; max-width: 360px; }
.toast.err { border-left-color: var(--red); }
.toast.out { animation: uiFade .2s reverse forwards; }

.chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 10px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.chart .bar i { width: 100%; max-width: 26px; border-radius: 3px 3px 0 0; background: var(--inv-bg); opacity: .85; transform-origin: bottom; animation: grow .5s var(--ease) backwards; min-height: 2px; }
.chart .bar i.b { background: var(--muted); opacity: .5; }
.chart .bar span { color: var(--faint); font-size: 10px; font-weight: 500; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; font-weight: 500; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--inv-bg); margin-right: 6px; vertical-align: -1px; }
.legend i.b { background: var(--muted); opacity: .5; }

.soon { display: grid; place-items: center; text-align: center; padding: 60px 20px; gap: 10px; }
.soon h2 { margin: 0; color: var(--text); font-size: 28px; letter-spacing: -0.5px; }
.soon .list { display: grid; gap: 6px; margin-top: 10px; text-align: left; }
.soon .list div { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: var(--muted); font-weight: 500; }

.login-wrap { position: fixed; inset: 0; z-index: 2; display: grid; place-items: center; padding: 16px; }
.login { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; text-align: center; display: grid; gap: 14px; justify-items: center; animation: uiOpen .3s var(--ease); }
.login-logo { width: 88px; height: 88px; border-radius: 12px; }
.login h1 { margin: 0; color: var(--text); font-size: 20px; }
.login .btn { width: 100%; padding: 12px; font-size: 14px; }
.login .btn.tg { background: #2aabee; border-color: #2aabee; color: #fff; }
.login .btn.ds { background: #5865f2; border-color: #5865f2; color: #fff; }
.login-code { color: var(--text); font-size: 34px; font-weight: 800; letter-spacing: 10px; padding: 8px 18px 8px 28px; border-radius: var(--radius); background: var(--panel-solid); border: 1px solid var(--border); }
.login-ok { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--green); color: var(--green); font-size: 30px; animation: uiOpen .3s var(--ease); }
.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.overlay { display: none; }

@media (max-width: 1100px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  body { overflow: auto; }
  .app { grid-template-columns: 1fr; height: auto; min-height: 100dvh; }
  .side { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: 280px; background: var(--panel-solid); border-right: 1px solid var(--border); transform: translateX(-102%); transition: transform .28s var(--ease); animation: none; }
  .side.open { transform: none; }
  .overlay.show { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .55); animation: uiFade .2s; }
  .main { padding: 10px; }
  .burger { display: grid; }
  .view { overflow: visible; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr 1fr; }
  .thead { display: none; }
  .trow { grid-template-columns: 1fr !important; gap: 4px; }
  .tab { min-width: 90px; padding: 9px 8px; }
}
@media (max-width: 480px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } .header .crumb { display: none; } }
svg { width: 16px; height: 16px; flex: none; }
svg.ico { vertical-align: -3px; }
.btn svg { width: 14px; height: 14px; }
.btn.sm svg { width: 13px; height: 13px; }
.burger svg { width: 18px; height: 18px; color: var(--text); }
.panel-title svg { width: 16px; height: 16px; color: var(--muted); }
.icon-btn { width: 34px; height: 34px; padding: 0; }
.view > *, .stack > *, .main > * { flex-shrink: 0; }
html, body, .view, .nav, .chat, .matrix, .picker-list, .modal, .tabs, .table { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
.reloading { opacity: .55; pointer-events: none; transition: opacity .15s linear; }
.uiRow { animation-duration: .16s; }
.view.enter { animation: none; }
.table { overflow-x: auto; }
.trow > *, .thead > * { min-width: 0; }
.trow .role, .trow .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.card-head > div:first-child { min-width: 0; }
.card-title, .s-title { overflow-wrap: anywhere; }
.setting { flex-wrap: wrap; }
.setting .chips { flex-wrap: wrap; }
.header .hide-sm { display: inline; }
.matrix table { width: max-content; }
@media (max-width: 860px) { .header .hide-sm { display: none; } .setting > .select, .setting > .input { max-width: 100% !important; flex: 1 1 100%; } }
@media (min-width: 1600px) { .view { max-width: 1400px; width: 100%; } }
