:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --primary-soft: #dbeafe;
  --accent: #f59e0b;
  --green: #16a34a; --green-soft: #dcfce7;
  --red: #dc2626; --red-soft: #fee2e2;
  --amber: #b45309; --amber-soft: #fef3c7;
  --violet: #7c3aed; --violet-soft: #ede9fe;
  --blue: #1d4ed8; --blue-soft: #dbeafe;
  --gray-soft: #e5e7eb;
  --side: #0f172a; --side-text: #cbd5e1; --side-active: #1e293b;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 4px 16px rgb(15 23 42 / 4%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #111827; --surface-2: #0f172a; --text: #e5e7eb; --muted: #94a3b8; --line: #1f2937;
    --primary: #3b82f6; --primary-soft: #1e3a8a55;
    --green: #4ade80; --green-soft: #14532d66; --red: #f87171; --red-soft: #7f1d1d66; --amber: #fbbf24; --amber-soft: #78350f66;
    --violet: #a78bfa; --violet-soft: #4c1d9566; --blue: #93c5fd; --blue-soft: #1e3a8a66; --gray-soft: #374151;
    --side: #020617; --side-active: #1e293b;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-tap-highlight-color: transparent; }
body.noscroll { overflow: hidden; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; margin-top: 1em; }
p { margin: .3em 0 .6em; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small, small { font-size: .82rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.nowrap { white-space: nowrap; }
.text-red { color: var(--red); } .text-green { color: var(--green); } .text-amber { color: var(--amber); } .text-blue { color: var(--blue); }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- Каркас ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0; z-index: 40; padding: 14px 10px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; padding: 6px 8px 16px; font-size: .95rem; line-height: 1.2; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #0f172a; display: grid; place-items: center; flex: none; }
.brand-lg { color: var(--text); font-size: 1.15rem; justify-content: center; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-text); font-weight: 500; }
.nav-link:hover { background: var(--side-active); color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; color: var(--side-text); margin-top: 10px; border-top: 1px solid #1e293b; }
.me:hover { background: var(--side-active); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #334155; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-text b { color: #fff; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { color: #94a3b8; }
.content { flex: 1; margin-left: 248px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 1.2rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; }
.menu-btn { display: none; }
.main { padding: 20px 24px 40px; max-width: 1280px; width: 100%; }
.scrim { display: none; }
.bottombar { display: none; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 280px; }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / 45%); z-index: 30; }
  .content { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .main { padding: 14px 16px calc(84px + env(safe-area-inset-bottom)); }
  .bottombar {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bb-link { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; color: var(--muted); font-size: .68rem; font-weight: 600; text-align: center; line-height: 1.1; }
  .bb-link .ico { width: 22px; height: 22px; }
  .bb-link.active { color: var(--primary); }
}

/* ---------- Элементы ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.form, .card.form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.inline-label { gap: 4px; }
.input {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-height: 44px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
textarea.input { resize: vertical; min-height: 64px; }
select.input { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 16px center, right 11px center; background-size: 5px 5px; background-repeat: no-repeat; }
.input-sm { min-height: 38px; padding: 7px 10px; width: auto; font-size: 14px; }
select.input-sm { padding-right: 28px; }
.input-qty { width: 110px; flex: none; text-align: right; }
.input-unit { width: 74px; flex: none; }
.grow { flex: 1; min-width: 140px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: .92rem;
  min-height: 42px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; white-space: nowrap; transition: filter .15s, background .15s; user-select: none;
}
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary.busy::after { border-color: #fff transparent #fff transparent; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger-text { color: var(--red); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.btn-lg { min-height: 50px; font-size: 1rem; }
.btn-xl { min-height: 58px; font-size: 1.05rem; width: 100%; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }

.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-2-1 { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }

.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 500; }
.alert .ico { margin-top: 1px; }
.alert-red { background: var(--red-soft); color: var(--red); }
.alert-blue { background: var(--blue-soft); color: var(--blue); }
.alert-amber { background: var(--amber-soft); color: var(--amber); }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-ico { font-size: 2rem; margin-bottom: 6px; }
.loading { display: grid; place-items: center; min-height: 40vh; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; flex: none; }
.alert .spinner { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Сторож загрузки (js/boot-watch.js): приложение не открылось за 12 с */
.boot-slow { position: fixed; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 1000; display: grid; gap: 8px; padding: 16px; border-radius: 14px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.18); text-align: center; }
.boot-slow p { margin: 0 0 4px; }

/* Списки */
.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.card .list { box-shadow: none; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, .check-item:hover { background: var(--surface-2); }
.li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.issue-people .li-main { overflow-wrap: anywhere; }
.issue-people .list-item > svg { flex-shrink: 0; }
.issue-holding { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; line-height: 1.5; }
.issue-holding-label { display: block; font-weight: 600; margin-bottom: 4px; }
.issue-holding ul { margin: 0; padding-left: 18px; }
.issue-holding li + li { margin-top: 3px; }
.issue-tool-number { color: var(--muted); }
.issue-holding-empty { margin-top: 5px; font-size: 12px; color: var(--muted); }
.tool-issue-bar { position: sticky; top: 64px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.tool-issue-bar > div { min-width: 0; }
.tools-views { display: flex; margin-bottom: 14px; }
.tools-views a { flex: 1; text-align: center; white-space: normal; }
.tool-transfer-list { margin-top: 12px; }
.tool-transfer-list .li-main { overflow-wrap: anywhere; gap: 5px; }
.tool-transfer-destination { font-size: 14px; }
.day-details { overflow-wrap: anywhere; }
.day-details section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.day-details h4 { margin: 0 0 12px; }
.day-points { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.day-point { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.day-detail-photos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.day-photo { padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.day-photo img { display: block; width: 100%; height: 140px; object-fit: cover; }
.day-entry { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 10px 0; }
.day-entry p { margin: 6px 0; }
.day-entry ul { padding-left: 20px; }
.day-close { width: 100%; margin-top: 16px; }
@media(max-width:540px) { .day-points { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 600px) {
  .tools-views { width: 100%; }
  .tools-toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
  .tools-toolbar > * { min-width: 0; margin: 0; }
  .tools-toolbar .tools-status-filter { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; width: 100%; overflow: visible; }
  .tools-status-filter a { text-align: center; white-space: normal; padding: 8px 4px; font-size: 12px; }
  .tools-toolbar #search { grid-column: 1 / -1; width: 100%; }
  .tools-toolbar .btn { white-space: normal; padding: 9px 6px; }
  .tools-toolbar #scanFind, .tools-toolbar #moveTools { grid-column: 1 / -1; }
  .tools-inventory { background: none; border: 0; overflow: visible; border-radius: 0; }
  .tools-inventory .table, .tools-inventory tbody { display: block; width: 100%; }
  .tools-inventory thead { display: none; }
  .tools-inventory tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 10px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .tools-inventory tr[hidden] { display: none; }
  .tools-inventory .table td { display: block; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
  .tools-inventory .tool-inventory-name { grid-column: 1 / -1; grid-row: 1; font-weight: 650; font-size: 16px; line-height: 1.4; }
  .tools-inventory .tool-inventory-number { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 13px; align-self: center; }
  .tools-inventory .tool-inventory-status { grid-column: 2; grid-row: 2; }
  .tools-inventory .tool-inventory-location { grid-column: 1 / -1; font-size: 13px; color: var(--muted); line-height: 1.5; }
  .tools-inventory .tool-inventory-location:empty, .tools-inventory .tool-inventory-days:empty { display: none; }
  .tools-inventory .tool-inventory-days { grid-column: 1 / -1; text-align: left; font-size: 12px; color: var(--muted); }
  .tools-inventory .tool-inventory-days:not(:empty)::before { content: 'Дней на руках: '; }
}
.tool-search-row { flex-wrap: wrap; }
.tool-search-row > .input { min-width: 0; flex: 1 1 200px; }
#tList .li-main { overflow-wrap: anywhere; }
.tool-issue-hint { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.tool-issue-confirm { overflow-wrap: anywhere; }
.tool-issue-recipient { display: flex; flex-direction: column; gap: 4px; }
.tool-confirm-list { padding-left: 26px; margin: 12px 0; max-height: 40vh; overflow-y: auto; }
.tool-confirm-list li { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tool-confirm-list li span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.tool-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 540px) {
  .tool-issue-bar { flex-wrap: wrap; gap: 8px; }
  .tool-issue-bar > .btn { width: 100%; }
  .tool-confirm-actions > .btn { width: 100%; white-space: normal; }
  .tool-confirm-actions > .btn-primary { order: -1; }
}
.li-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.li-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; }
.qty { font-size: 1.1rem; }
.check-item { flex-direction: row; font-weight: 400; color: var(--text); cursor: pointer; }
.check-item input, .check-line input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.check-line { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; color: var(--text); padding: 6px 0; }
.section-title { margin-top: 18px; display: flex; align-items: center; gap: 8px; }
.count { background: var(--gray-soft); color: var(--muted); font-size: .75rem; border-radius: 99px; padding: 1px 8px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 4px; }

/* Таблицы */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.card .table-wrap { border: 0; border-radius: 0; margin: 0 -16px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.row-warn td { background: var(--amber-soft); }
.row-muted td { opacity: .55; }
.table-edit td { padding: 6px; }
.table-edit .input { min-height: 38px; padding: 7px 9px; font-size: 14px; }
.table-edit td small { display: block; margin-top: 2px; }
.table-edit .input-qty { width: 90px; }
.table-edit td.num .input { display: block; margin-left: auto; }
.table-edit .input-vat { width: 104px; padding-right: 26px; }
.lc-tool .check-line { white-space: nowrap; margin: 0; }
.tf-qr svg { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 8px; }
.news-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 820px; }
.news-item { min-width: 0; overflow-wrap: anywhere; }
.news-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 10px; }
.news-head .badge { white-space: normal; }
.news-head h3 { margin: 0; }
.news-item.news-new { border-color: var(--blue); }
.news-body { margin-top: 10px; line-height: 1.6; }
.news-body p { margin: 0 0 10px; }
.news-body ul { margin: 0 0 10px; padding-left: 22px; }
.news-body li { margin: 3px 0; }
.inv-totals { display: grid; gap: 4px; justify-content: end; margin: 10px 4px 12px; font-size: .95rem; }
.inv-totals > div { display: flex; justify-content: space-between; gap: 24px; }
.inv-totals span { color: var(--muted); }
.inv-totals .text-green span, .inv-totals .text-amber span { color: inherit; }
.inv-total-main { font-size: 1.08rem; border-top: 1px solid var(--line); padding-top: 4px; }
.inv-total-main span { color: var(--text); }

/* Сегменты-фильтры */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--gray-soft); border-radius: 10px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; }
.seg a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-wide { display: flex; margin-bottom: 14px; }
.seg-wide a { flex: 1; text-align: center; }

/* Модалки и тосты */
.modal-wrap { position: fixed; inset: 0; background: rgb(15 23 42 / 55%); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; position: relative; box-shadow: 0 20px 60px rgb(0 0 0 / 30%); }
.modal-wide { max-width: 860px; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 26px; color: var(--muted); cursor: pointer; border-radius: 8px; z-index: 1; }
.modal-body h3 { padding-right: 36px; }
.confirm-text { font-size: 1rem; white-space: pre-line; }
@media (max-width: 600px) {
  .modal-wrap { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .modal-body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / 25%); font-weight: 500; transition: opacity .4s, transform .4s; }
.toast-err { background: var(--red); }
.toast.hide { opacity: 0; transform: translateY(10px); }
.photo-full { width: 100%; border-radius: 10px; }
.scanner { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 1; object-fit: cover; }

/* ---------- Вход ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 30% 20%, #1e293b, #0f172a 60%); }
.login-card { width: min(380px, 100%); background: var(--surface); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgb(0 0 0 / 40%); }

/* ---------- Монтажник ---------- */
.greet { margin-bottom: 12px; }
.greet h2 { margin: 0; }
.greet p { margin: 2px 0 0; text-transform: capitalize; }
.shift-card { display: flex; flex-direction: column; gap: 14px; }
.shift-card.is-open { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.shift-head { display: flex; gap: 14px; align-items: center; }
.selfie { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; background: var(--gray-soft); cursor: zoom-in; flex: none; }
.shift-time { font-size: 1.6rem; font-weight: 800; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; color: var(--text); box-shadow: var(--shadow); min-height: 104px; }
.tile .ico { width: 26px; height: 26px; color: var(--primary); margin-bottom: 6px; }
.tile small { color: var(--muted); }
.tile-accent { background: var(--primary); border-color: var(--primary); color: #fff; }
.tile-accent .ico, .tile-accent small { color: #fff; opacity: .95; }
.tile-done .ico { color: var(--green); }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

.report-form { max-width: 760px; }
.work-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.work-row:first-child { padding-top: 0; }
.work-num { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; margin-top: 9px; }
.work-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.work-fields .input-qty { width: 100%; text-align: left; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary); border-radius: 99px; padding: 5px 4px 5px 12px; font-weight: 600; font-size: .88rem; }
.chip button { border: 0; background: transparent; color: inherit; font-size: 18px; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; line-height: 1; }
.mat-list { display: flex; flex-direction: column; margin-bottom: 8px; }
.mat-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mat-row:last-child { border-bottom: 0; }
.mat-row .input-qty { width: 96px; }
.unit { color: var(--muted); font-size: .85rem; min-width: 22px; }
.manual-row, .line { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.input-art { width: 130px; flex: none; }
.badge-edited { font-weight: 700; box-shadow: 0 0 0 1px var(--amber) inset; }
.req-head-side { min-width: 0; } .req-head-side .badge { white-space: normal; }
.req-lines-head { display: flex; gap: 8px; font-size: .75rem; font-weight: 600; color: var(--muted); padding: 0 2px; }
.req-lines-head span:first-child { flex: 1; } .req-lines-head span:nth-child(2) { width: 130px; } .req-lines-head span:nth-child(3) { width: 110px; } .req-lines-head span:nth-child(4) { width: 70px; } .req-lines-head span:last-child { width: 36px; }
@media (max-width: 640px) { .req-lines-head { display: none; } .req-line .grow { flex-basis: 100%; } .req-line .input-art { flex: 1; width: auto; } }
.manual-row .input:first-child { flex: 1; min-width: 160px; }
.lines { display: flex; flex-direction: column; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.thumbs img, .thumb-new img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: var(--gray-soft); }
.thumb-new { position: relative; }
.thumb-new button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer; }
.thumb-add { width: 84px; height: 84px; border-radius: 10px; border: 2px dashed var(--line); background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font: inherit; font-size: .75rem; }
.thumb-add:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Склад ---------- */
.user-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-head h2 { margin: 0; }
.tool-card { display: flex; gap: 16px; align-items: center; }
.qr { width: 110px; height: 110px; background: #fff; border-radius: 8px; padding: 4px; flex: none; }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-item { display: grid; grid-template-columns: 112px 1fr; gap: 10px; font-size: .9rem; }
.tl-item > small { color: var(--muted); }
.inv-layout { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 14px; }
.inv-layout .card { margin-bottom: 14px; }
@media (max-width: 800px) { .inv-layout { grid-template-columns: 1fr; gap: 0; } }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; margin: 0; z-index: 5; }
@media (max-width: 900px) { .sticky-actions { bottom: calc(60px + env(safe-area-inset-bottom)); } }
.rec .line { margin: 0; }

/* ---------- Руководитель ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; color: var(--text); box-shadow: var(--shadow); }
.kpi span { color: var(--muted); font-size: .8rem; font-weight: 600; }
.kpi b { font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi small { color: var(--muted); }
.kpi-accent { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.kpi-warn { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dash-grid .card { margin: 0; }
.dash-grid + .card, .dash-grid + section { margin-top: 14px; }
.span-2 { grid-column: span 2; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-bottom: 10px; }
.face { display: flex; flex-direction: column; gap: 1px; font-size: .85rem; }
.face img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: zoom-in; background: var(--gray-soft); margin-bottom: 4px; border: 3px solid var(--green); }
.face-ended img { border-color: var(--line); filter: grayscale(.4); }
.face b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar { width: 100%; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-col small { color: var(--muted); font-size: .65rem; }
.obj-progress { display: block; color: var(--text); padding: 10px 0; border-bottom: 1px solid var(--line); }
.obj-progress:last-child { border-bottom: 0; }
.progress { height: 8px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--primary), #22c55e); border-radius: 99px; }
.progress-sm { height: 6px; width: 70px; margin: 0; }
.timesheet { font-size: .78rem; }
.timesheet th, .timesheet td { padding: 6px 5px; text-align: center; border-left: 1px solid var(--line); }
.timesheet .sticky-col { position: sticky; left: 0; background: var(--surface); text-align: left; z-index: 1; min-width: 170px; }
.timesheet th.sticky-col { background: var(--surface-2); }
.timesheet .weekend { background: var(--gray-soft); }
.timesheet td.late { background: var(--amber-soft); color: var(--amber); font-weight: 700; }
.timesheet td.open { color: var(--green); font-weight: 800; }
.shift-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.shift-item { display: flex; gap: 12px; margin: 0; }
.shift-photos { display: flex; gap: 6px; flex: none; }
.shift-photos figure { margin: 0; text-align: center; }
.shift-photos img { width: 76px; height: 96px; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: var(--gray-soft); }
.shift-photos figcaption { font-size: .72rem; color: var(--muted); }
.shift-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.shift-info a { display: inline-flex; align-items: center; gap: 3px; }
.shift-info .ico { width: 14px; height: 14px; }
.shift-info .link { text-align: left; margin-top: 4px; }
@media (max-width: 540px) {
  .shift-item { flex-direction: column; }
  .shift-info { overflow-wrap: anywhere; }
  .shift-info [data-shift-details] { margin-top: 8px; width: 100%; }
}

@media print {
  .sidebar, .topbar, .bottombar, .toolbar, .btn { display: none !important; }
  .content { margin: 0; }
}

/* Мобильные поправки */
.seg-wide a { white-space: normal; line-height: 1.2; }
@media (max-width: 600px) {
  .seg-wide a { font-size: .78rem; padding: 7px 6px; }
  .sticky-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .sticky-actions .btn-primary { grid-column: 1 / -1; order: -1; }
  .line .input.grow { min-width: 100%; }
}

/* ---------- Worketra: бренд, подписка, кабинет компании ---------- */
.brand-mark.w { background: none; padding: 0; }
.brand-mark.w img { width: 34px; height: 34px; display: block; }
.brand small { display: block; color: #64748b; font-weight: 600; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.brand-lg small { color: var(--muted); }
.login-foot { text-align: center; color: var(--muted); font-size: .8rem; margin: 4px 0 0; }
.login-card.blocked { text-align: center; }
.login-card.blocked .brand { justify-content: center; }
.sub-banner { display: block; padding: 9px 24px; background: var(--primary); color: #fff; font-weight: 600; font-size: .88rem; text-align: center; }
.sub-banner.warn { background: #b45309; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--gray-soft); border-radius: 99px; transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.mod-toggle { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 400; font-size: .95rem; }
.mod-toggle:last-child { border-bottom: 0; }
.mod-toggle .li-main small { -webkit-line-clamp: 2; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.plan-card { position: relative; flex-direction: column; gap: 2px; padding: 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--text); font-weight: 400; transition: border-color .15s; }
.plan-card input { position: absolute; opacity: 0; }
.plan-card b { font-size: 1.05rem; }
.plan-card .pc-price { font-size: 1.4rem; font-weight: 800; }
.plan-card .pc-price small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.plan-card small { color: var(--muted); }
.plan-card .badge { position: absolute; top: 10px; right: 10px; }
.plan-card.on { border-color: var(--primary); background: var(--primary-soft); }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; margin-bottom: 12px; border-top: 1px dashed var(--line); }
.pay-total b { font-size: 1.5rem; }
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; }
.msg small { display: block; color: var(--muted); margin-bottom: 4px; }
.msg.support { align-self: flex-end; background: var(--primary-soft); border-color: transparent; }

/* Материалы внутри работы в отчёте */
.work-mats { background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.wm-title { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wm-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wm-row .grow { min-width: 160px; }
.wm-row .input-qty { width: 90px; }
@media (max-width: 600px) { .wm-row .grow { min-width: 100%; } }
.work-mat-list { margin: 2px 0 0; padding-left: 16px; color: var(--muted); font-size: .85rem; }

.sub-banner.demo { background: #7c3aed; }
.demo-role { text-align: left; background: var(--surface); font: inherit; }
.demo-role .link { margin-top: 6px; font-weight: 700; }

.pay-methods-app { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.pay-m { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s; }
.pay-m:hover { border-color: var(--primary); }
.pay-m small { color: var(--muted); }
.pay-m.busy { opacity: .6; }

details.history summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.history summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
details.history[open] summary::before { transform: rotate(90deg); }
details.history .hist-body { margin-top: 12px; }
.li-side .btn-sm { margin-top: 4px; }

.pay-m:disabled { opacity: .5; cursor: not-allowed; border-style: dashed; }
.pay-m:disabled:hover { border-color: var(--line); }

.has-err .input { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.field-err { color: var(--red); font-weight: 600; }

.days-pick { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.days-pick label { display: inline-block; cursor: pointer; }
.days-pick input { position: absolute; opacity: 0; pointer-events: none; }
.days-pick span { display: inline-block; min-width: 38px; text-align: center; padding: 7px 6px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; color: var(--muted); font-size: .85rem; }
.days-pick input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.timesheet td.off { background: var(--gray-soft); color: var(--muted); font-weight: 700; }
.timesheet td.off-О { background: var(--blue-soft); color: var(--blue); }
.timesheet td.off-Б { background: var(--amber-soft); color: var(--amber); }

.install-steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.install-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px; border-radius: 12px; background: var(--primary-soft); color: var(--text); font-weight: 600; font-size: .9rem; }
.install-banner span { flex: 1; }

/* Мобильная вёрстка: элементы сетки и поля дат не распирают карточки */
.grid-2 > *, .grid-3 > *, .grid-2-1 > *, .dash-grid > *, .kpis > *, .plan-cards > *, .pay-methods-app > * { min-width: 0; }
input[type="date"].input, input[type="month"].input, input[type="time"].input, input[type="datetime-local"].input { min-width: 0; max-width: 100%; }
@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .row-end { justify-content: stretch; }
  .row-end > .btn, .row-end > a.btn { flex: 1 1 auto; }
  .toolbar > .input-sm, .toolbar > .btn-sm { flex: 1 1 140px; }
  .toolbar > .seg { width: 100%; }
  .topbar-actions .btn-sm { padding: 6px 10px; }
  .row.wrap > .btn, .row.wrap > .btn-sm { flex: 0 1 auto; }
  .user-head .row { width: 100%; }
  .modal-body .row-end > .btn { flex: 1; }
}

.imp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.imp-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.api-doc { margin-top: 12px; }
.api-doc summary { cursor: pointer; padding: 8px 0; }
pre.code { background: #0b1020; color: #e2e8f0; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: .78rem; line-height: 1.5; white-space: pre; }
code.key { display: inline-block; margin-top: 6px; padding: 6px 8px; background: var(--surface); border-radius: 6px; word-break: break-all; user-select: all; }

.outbox-badge { cursor: pointer; background: var(--amber-soft); color: var(--amber); font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }

/* Инструкция */
.help-steps { counter-reset: st; list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.help-steps li { counter-increment: st; display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; }
.help-steps li::before { content: counter(st); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--primary, #2563eb); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.help-steps li span { color: var(--muted, #64748b); font-size: 14px; }
.section-title { margin: 18px 4px 8px; }
.check-list { max-height: 50vh; overflow: auto; }

/* Графики */
.chart svg { width: 100%; height: auto; display: block; }
.chart .ch-grid { stroke: var(--line, #e2e8f0); stroke-width: 1; }
.chart .ch-lab { fill: var(--muted, #64748b); font-size: 11px; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbars { display: grid; gap: 10px; }
.hbar .progress { margin: 4px 0 2px; }
.obj-tabs { margin-bottom: 12px; }
.seg-scroll { overflow-x: auto; max-width: 100%; flex-wrap: nowrap; white-space: nowrap; }
.table-pivot th.num { white-space: normal; min-width: 90px; font-size: 12px; }
.dash-grid > .span-all { grid-column: 1 / -1; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 12px; }
@media (max-width: 760px) { .an-grid { grid-template-columns: 1fr; } }

/* Часовой табель */
.timesheet td.warned { background: #fef9c3; color: #713f12; }
.timesheet td.over { font-weight: 700; color: #1d4ed8; }
.timesheet td.off-Н { background: #fee2e2; color: #b91c1c; font-weight: 700; }
.timesheet td.off-П { background: #ede9fe; color: #6d28d9; }
.timesheet.ts-time td small { font-size: 10px; line-height: 1.1; display: block; }
.lg { padding: 0 6px; border-radius: 4px; }
.lg.late { background: #ffedd5; } .lg.warned { background: #fef9c3; } .lg.over { color: #1d4ed8; font-weight: 700; }
.text-blue { color: #1d4ed8; font-weight: 600; }
.seg-radio { position: relative; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: block; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.seg-radio input:checked + span { background: var(--surface, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }
button.tile { text-align: left; font: inherit; color: inherit; border: none; cursor: pointer; }
[hidden] { display: none !important; }

/* Справочники */
.cat-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cat-list { display: grid; gap: 6px; }
.cat-list textarea { font-size: 13px; }
.cat-group { font-weight: 700; font-size: 16px; }
.cat-items td { vertical-align: top; }
.cat-items .input-sm { min-width: 0; width: 100%; }
.cat-items td:first-child { min-width: 220px; }
.center { text-align: center; }
.btn.pulse { box-shadow: 0 0 0 3px rgba(37, 99, 235, .35); }

/* Документация */
.crumbs { margin: 0 0 10px; font-size: 15px; }
.crumbs a { color: var(--primary, #2563eb); }
.drop-zone { border: 2px dashed transparent; border-radius: 12px; min-height: 120px; transition: .15s; }
.drop-zone.over { border-color: var(--primary, #2563eb); background: rgba(37, 99, 235, .06); }
.file-row .li-main { color: inherit; text-decoration: none; min-width: 0; }
.file-row .li-main b { overflow-wrap: anywhere; }
.toolbar label.btn, .row-end label.btn { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; width: auto; }

/* Чаты */
.nav-link, .bb-link { position: relative; }
.nav-badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.nav-link .nav-badge { margin-left: auto; }
.bb-link .nav-badge { position: absolute; top: 2px; left: 55%; }
.chat-li { align-items: center; }
.chat-ava { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; margin-right: 10px; }
.chat-last { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.chat-mode .main { padding-bottom: 0; max-width: 900px; }
.chat { display: flex; flex-direction: column; height: calc(100dvh - 120px); min-height: 320px; }
.chat-feed { flex: 1; overflow-y: auto; padding: 8px 2px 12px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.chat-older { align-self: center; margin-bottom: 8px; }
.chat-empty { margin: auto; }
.chat-day { text-align: center; margin: 12px 0 6px; }
.chat-day span { background: var(--soft, rgba(127,127,127,.12)); color: var(--muted, #64748b); font-size: 12px; padding: 3px 10px; border-radius: 10px; }
.cmsg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; position: relative; margin-top: 8px; }
.cmsg.grouped { margin-top: 2px; }
.cmsg.mine { align-self: flex-end; align-items: flex-end; }
.msg-author { font-size: 12px; font-weight: 700; margin: 0 0 2px 10px; }
.msg-author small { font-weight: 400; color: var(--muted, #64748b); }
.msg-bubble { white-space: normal; background: var(--surface, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 14px; padding: 7px 10px 18px; position: relative; min-width: 70px; overflow-wrap: anywhere; }
.cmsg.mine .msg-bubble { background: #dbeafe; border-color: #bfdbfe; color: #0f172a; }
.cmsg.deleted .msg-bubble { opacity: .6; }
.msg-time { position: absolute; right: 9px; bottom: 3px; font-size: 10px; color: var(--muted, #64748b); }
.msg-text a { color: #2563eb; text-decoration: underline; }
.msg-quote { border-left: 3px solid #2563eb; padding: 2px 8px; margin-bottom: 5px; font-size: 13px; color: var(--muted, #475569); background: rgba(37,99,235,.06); border-radius: 4px; }
.msg-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 4px; margin-bottom: 4px; max-width: 340px; }
.msg-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.msg-file { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin-bottom: 4px; border-radius: 8px; background: rgba(127,127,127,.1); color: inherit; text-decoration: none; font-size: 14px; }
.msg-file svg { width: 16px; height: 16px; flex: none; }
.msg-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-more { position: absolute; top: 50%; transform: translateY(-50%); right: -26px; border: none; background: none; font-size: 18px; color: var(--muted, #94a3b8); cursor: pointer; opacity: .5; padding: 4px; }
.cmsg.mine .msg-more { right: auto; left: -26px; }
.cmsg:hover .msg-more, .msg-more:focus { opacity: 1; }
.msg-menu { position: fixed; z-index: 1000; background: var(--surface, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); display: grid; min-width: 200px; overflow: hidden; }
.msg-menu button { text-align: left; padding: 11px 14px; border: none; background: none; font: inherit; color: inherit; cursor: pointer; }
.msg-menu button:hover { background: rgba(127,127,127,.1); }
.chat-compose { border-top: 1px solid var(--line, #e2e8f0); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); background: var(--bg, transparent); }
.chat-row { display: flex; gap: 6px; align-items: flex-end; }
.chat-row textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; line-height: 1.35; }
.chat-send { height: 42px; width: 46px; padding: 0; display: grid; place-items: center; }
.chat-clip { height: 42px; width: 42px; display: grid; place-items: center; cursor: pointer; }
.chat-reply, .chat-att { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; font-size: 13px; padding: 4px 4px 8px; }
.chat-reply button, .att-chip button { border: none; background: none; font-size: 18px; cursor: pointer; color: inherit; }
.att-chip { background: rgba(127,127,127,.12); border-radius: 8px; padding: 2px 4px 2px 8px; }
@media (max-width: 760px) {
  .cmsg { max-width: 88%; }
  .msg-more { opacity: .8; }
}

/* Уведомления */
.inbox { display: grid; gap: 10px; }
.inbox-item.unread { border-left: 4px solid #2563eb; }
.inbox-item p { margin: 6px 0; overflow-wrap: anywhere; }
.inbox-item a { color: #2563eb; text-decoration: underline; }
.text-green { color: #16a34a; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-scroll { max-height: 220px; overflow-y: auto; margin-top: 6px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: 5px 10px; border-radius: 16px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.chip-check input:checked + span { background: #2563eb; border-color: #2563eb; color: #fff; }

.timesheet tr.ts-group td { background: var(--surface-2, #f1f5f9); font-weight: 700; text-align: left; padding: 6px 10px; }

body.chat-mode { overflow: hidden; overscroll-behavior: none; }
body.chat-mode .main { padding-bottom: 0 !important; }
.chat-typing { min-height: 18px; font-size: 12px; color: var(--muted); padding: 0 4px; font-style: italic; }
@media (max-width: 900px) {
  body.kb-open .bottombar { display: none !important; }
  body.chat-mode .main { padding-top: 6px; }
  .chat-compose { padding-bottom: 6px; }
  body.kb-open .chat-compose { padding-bottom: 4px; }
}
.cmsg.mine .msg-author { margin: 0 10px 2px 0; }

/* Профессии и права */
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.perm-group { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0; display: grid; gap: 4px; }
.perm-group legend { padding: 0 4px; }
.perm-group .check-line { font-size: 14px; }

/* Телефон: чат закреплён на экране (iPhone: полоска «домой», панели Safari, клавиатура) */
@media (max-width: 900px) {
  body.chat-fixed .chat { position: fixed; left: 0; right: 0; height: auto; min-height: 0; margin: 0; padding: 0 12px; background: var(--bg); z-index: 15; }
  body.chat-fixed.kb-open .chat-compose { padding-bottom: 6px; }
}

/* Обучение */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour.tour-center { background: rgba(2, 6, 23, .55); pointer-events: auto; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(2, 6, 23, .55); outline: 3px solid #3b82f6; transition: all .25s ease; pointer-events: none; }
.tour-card { position: fixed; pointer-events: auto; background: var(--surface, #fff); color: var(--text, #0f172a); border-radius: 14px; padding: 14px 16px 12px; box-shadow: 0 12px 40px rgba(0,0,0,.35); max-width: calc(100vw - 24px); }
.tour.tour-center .tour-card { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 24px)); }
.tour-card h4 { margin: 4px 0 6px; font-size: 17px; }
.tour-card p { margin: 0 0 12px; line-height: 1.45; }
.tour-btns { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-x { position: absolute; top: 6px; right: 8px; border: none; background: none; font-size: 22px; color: var(--muted); cursor: pointer; }
.onb .progress { margin: 8px 0 4px; }
.onb-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.onb-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px; border-radius: 10px; background: var(--surface-2, rgba(127,127,127,.06)); }
.onb-list li.done { opacity: .6; }
.onb-list .grow { flex: 1; min-width: 200px; }
.onb-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; color: #16a34a; flex: none; }
.onb-list li.done .onb-mark { border-color: #16a34a; }
.help h4 { margin: 14px 0 4px; }
.help-more > summary { cursor: pointer; padding: 4px 0; }
.help-more .card { box-shadow: none; border: 0; padding: 8px 0 0; }

/* Чат: компактные пузыри (время в строке), свои — синие, фото в своих пропорциях */
.cmsg { width: fit-content; max-width: 82%; }
.cmsg .msg-bubble { padding: 6px 10px 6px; min-width: 0; border-radius: 16px; }
.cmsg:not(.mine) .msg-bubble { border-top-left-radius: 6px; }
.cmsg.mine .msg-bubble { border-top-right-radius: 6px; background: #2563eb; border-color: #2563eb; color: #fff; }
.cmsg.grouped:not(.mine) .msg-bubble { border-top-left-radius: 16px; }
.cmsg.grouped.mine .msg-bubble { border-top-right-radius: 16px; }
.cmsg .msg-time { position: static; float: right; margin: 7px -2px -3px 10px; font-size: 11px; line-height: 1; white-space: nowrap; color: var(--muted); }
.cmsg.mine .msg-time { color: rgba(255,255,255,.75); }
.cmsg .msg-text { display: block; }
.cmsg.mine .msg-text a { color: #fff; }
.cmsg.mine .msg-quote { background: rgba(255,255,255,.15); color: rgba(255,255,255,.9); border-left-color: #fff; }
.cmsg.mine .msg-file { background: rgba(255,255,255,.15); }
.cmsg.deleted .msg-bubble { background: transparent !important; border: 1px dashed var(--line) !important; color: var(--muted); }
.msg-photos.one { display: block; max-width: none; }
.msg-photos.one img { width: auto; max-width: min(260px, 66vw); max-height: 340px; aspect-ratio: auto; object-fit: cover; display: block; border-radius: 12px; }
.msg-photos.multi { grid-template-columns: repeat(2, minmax(90px, 130px)); max-width: none; }
.cmsg .msg-bubble.media { padding: 3px; position: relative; background: transparent; border-color: transparent; }
.cmsg .msg-bubble.media .msg-photos { margin: 0; }
.cmsg .msg-bubble.media .msg-time { position: absolute; float: none; right: 9px; bottom: 9px; margin: 0; padding: 3px 7px; border-radius: 9px; background: rgba(0,0,0,.5); color: #fff; }
.cmsg .msg-more { right: -30px; }
.cmsg.mine .msg-more { left: -30px; right: auto; }
@media (hover: none) { .cmsg .msg-more { display: none; } }

.qr-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* Бета-функции */
.beta-tag { display: inline-block; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #92400e; background: #fde68a; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.alert .beta-tag { margin: 0 8px 0 0; flex: none; }
.beta-note { align-items: flex-start; }
.nav-link .beta-tag { margin-left: 6px; }

/* Просмотр PDF */
body.pdf-open { overflow: hidden; }
.pdf-view { position: fixed; inset: 0; z-index: 900; background: #1f2937; display: flex; flex-direction: column; }
.pdf-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); background: #111827; color: #fff; }
.pdf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.pdf-btn { width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; display: grid; place-items: center; text-decoration: none; cursor: pointer; flex: none; }
.pdf-pages { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pdf-page { background: #fff; position: relative; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.pdf-page canvas { display: block; }
.pdf-page small { position: absolute; right: 6px; bottom: 4px; font-size: 11px; color: #555; background: rgba(255,255,255,.85); padding: 0 5px; border-radius: 4px; }
.pdf-msg { color: #e5e7eb; text-align: center; margin-top: 40px; }

/* Срочные задачи */
.list-head { font-size: 1rem; margin: 18px 0 8px; display: flex; gap: 6px; align-items: baseline; }
.list-head:first-of-type { margin-top: 4px; }
.task-item.overdue, .task-card.overdue { border-left: 4px solid var(--red); }
.task-item .li-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.task-card h2 { margin: 0; font-size: 1.2rem; }
.task-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.task-acts .btn-xl { flex: 1 1 100%; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.chip-static { padding: 4px 10px; margin: 2px 0; }
.comment-row { display: flex; gap: 8px; margin-top: 14px; }
.comment-row .grow { flex: 1; min-width: 0; }
@media (max-width: 600px) { .tl-item { grid-template-columns: 1fr; gap: 2px; } }

/* Реквизиты: оформление документов и логотип */
.swatches { display: flex; gap: 10px; margin: 4px 0 10px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px var(--border, #ccc); }
.swatch.on { border-color: var(--surface, #fff); box-shadow: 0 0 0 2px var(--primary); }
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.logo-prev { max-height: 56px; max-width: 200px; object-fit: contain; background: #fff; padding: 4px; border-radius: 8px; border: 1px solid var(--border, #ddd); }

/* График компании: ровная сетка вместо переносов */
.sched-days { margin: 4px 0 12px; }
.sched-days .days-pick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 420px; }
.sched-days .days-pick span { display: block; min-width: 0; }
.sched-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr) auto; gap: 10px; align-items: end; margin-bottom: 8px; }
.sched-grid label { min-width: 0; }
.sched-grid .input { width: 100%; }
@media (max-width: 760px) {
  .sched-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sched-grid .sched-tz { grid-column: 1 / -1; }
  .sched-grid .sched-save { grid-column: 1 / -1; }
}

/* iPhone: поля даты и времени не вылезают за край (у Safari своя минимальная ширина) */
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; box-sizing: border-box; }
input.input[type="date"]:not(.input-sm), input.input[type="time"]:not(.input-sm), input.input[type="datetime-local"]:not(.input-sm), input.input[type="month"]:not(.input-sm) { width: 100%; display: block; }
input.input-sm[type="date"], input.input-sm[type="month"] { width: 150px; }
input.input-sm[type="time"] { width: 100px; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value, input[type="datetime-local"]::-webkit-date-and-time-value, input[type="month"]::-webkit-date-and-time-value { text-align: left; }

/* Офлайн */
.offline-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 90; padding: calc(env(safe-area-inset-top) + 6px) 14px 6px; background: #b45309; color: #fff; font-size: .8rem; font-weight: 600; text-align: center; line-height: 1.3; }
.slow-bar { background: #1e40af; font-weight: 500; }
body.is-offline .topbar { margin-top: 28px; }

/* Строки накладной / документа на телефоне — карточками: наименование во всю ширину */
@media (max-width: 700px) {
  .lines-cards thead { display: none; }
  .lines-cards, .lines-cards tbody, .lines-cards tfoot { display: block; width: 100%; }
  .table-wrap:has(.lines-cards), .card .table-wrap:has(.lines-cards) { overflow: visible; margin: 0 0 10px; border: 0; background: none; }
  .lines-cards tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 40px; gap: 10px 10px; position: relative;
    padding: 14px 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, rgba(255,255,255,.02)); }
  .lines-cards tbody td { display: block; padding: 0; border: 0; min-width: 0; }
  .lines-cards td.lc-no { position: absolute; left: 12px; top: 25px; font-weight: 700; color: var(--muted); font-size: .8rem; }
  .lines-cards td.lc-name { grid-column: 1 / -1; padding-left: 20px; }
  .lines-cards td.lc-del { grid-column: 4; grid-row: 2; align-self: end; }
  .lines-cards td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
  .lines-cards td .input, .lines-cards td .input-qty, .lines-cards td .input-unit { width: 100%; }
  .lines-cards td.num { text-align: left; }
  .lines-cards .input-vat { width: 100%; }
  .lines-cards td.lc-tool { grid-column: 1 / -1; }
  .lines-cards td.lc-tool::before { display: none; }
  .inv-totals { justify-content: stretch; }
  .lines-cards td.lc-sum { grid-column: 2 / 5; align-self: end; padding-bottom: 9px; text-align: left; font-weight: 700; }
  .lines-cards td.lc-sum::before { display: inline; margin-right: 6px; }
  .lines-cards tfoot tr { display: flex; justify-content: space-between; gap: 8px; padding: 8px 4px 4px; }
  .lines-cards tfoot td { border: 0; padding: 0; }
  .lines-cards tfoot td:empty, .lines-cards tfoot td.lc-no { display: none; }
}

/* Ровная сетка полей формы: подпись над полем */
.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; margin: 8px 0; }
.fgrid[hidden] { display: none; }
.fgrid > label, .fgrid > .btn { min-width: 0; }
.fgrid .fg-wide { grid-column: 1 / -1; }
@media (min-width: 701px) { .fgrid .btn.fg-wide { grid-column: auto; justify-self: start; } }
#af.fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Чат поддержки под чатами объектов */
.chat-support-list { margin-top: 14px; }
.chat-ava-support { background: linear-gradient(135deg, #0891b2, #4f46e5); color: #fff; }
.chat-ava-support svg { width: 22px; height: 22px; }

/* Дополнительные объекты сотрудника */
.extra-objects { display: grid; gap: 4px; margin: 6px 0 4px; }
.extra-objects .check-item { font-weight: 500; }
.extra-wrap summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .9rem; margin: 2px 0 6px; }

/* Живая камера для селфи смены */
.cam-wrap { position: fixed; inset: 0; z-index: 120; background: #000; display: flex; align-items: center; justify-content: center; }
.cam-box { position: relative; width: 100%; height: 100%; max-width: 560px; display: flex; flex-direction: column; }
.cam-video { flex: 1; width: 100%; min-height: 0; object-fit: cover; transform: scaleX(-1); background: #000; }
.cam-rear .cam-video { transform: none; }
.choose-list { display: grid; gap: 8px; }
.cam-hint { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 3px rgb(0 0 0 / 70%); }
.cam-actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 20px calc(env(safe-area-inset-bottom) + 18px); background: #000; }
.cam-actions .cam-cancel { color: #fff; justify-self: start; }
.cam-shot { width: 72px; height: 72px; border-radius: 50%; border: 5px solid #fff; background: rgb(255 255 255 / 25%); cursor: pointer; }
.cam-shot:active { background: #fff; }

.shift-obj { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.shift-obj svg { width: 18px; height: 18px; color: var(--muted); }

/* Предупреждение о VPN */
.vpn-bar { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 95; display: flex; gap: 10px; align-items: flex-start;
  background: #7c2d12; color: #fff; padding: 12px 14px; border-radius: 14px; box-shadow: 0 10px 30px rgb(0 0 0 / 35%); font-size: .88rem; line-height: 1.35; max-width: 560px; margin: 0 auto; }
.vpn-bar button { border: 0; background: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
@media (min-width: 901px) { .vpn-bar { bottom: 20px; } }

/* Перевод на основной объект: объект — дата — кнопка в одну линию */
.mv-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin: 6px 0; }
.mv-grid > label { min-width: 0; }
@media (max-width: 600px) { .mv-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .mv-grid > label:first-child, .mv-grid .btn { grid-column: 1 / -1; } }
.big-emoji { font-size: 44px; line-height: 1; margin: 6px 0 2px; }

/* Вечерняя сводка руководителю */
.digest-card { margin-bottom: 14px; }
.digest-card .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.digest-text { white-space: pre-line; line-height: 1.55; margin: 8px 0 12px; }
.digest-head { font-weight: 600; margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid var(--violet); background: var(--violet-soft); border-radius: 8px; }
.est-help { margin: 4px 0 10px; } .est-help summary { cursor: pointer; color: var(--accent, #22d3ee); } .est-help ul { margin: 6px 0 0 18px; padding: 0; } .est-help li { margin: 3px 0; }

/* Меню по разделам + вкладки над экраном */
.nav-group { margin-top: 6px; }
.nav-group-h { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; cursor: pointer;
  padding: 8px 12px 4px; font: inherit; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #8b93a7); }
.nav-group-h:hover { color: var(--text, #e5e7eb); }
.nav-group-h .chev { transition: transform .15s; font-size: .8rem; }
.nav-group.closed .chev { transform: rotate(-90deg); }
.nav-group.closed .nav-group-b { display: none; }
.sub-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.sub-tabs a { padding: 8px 12px; white-space: nowrap; color: var(--muted, #8b93a7); text-decoration: none; border-bottom: 2px solid transparent; font-size: .9rem; }
.sub-tabs a.active { color: var(--text, #e5e7eb); border-bottom-color: var(--accent, #22d3ee); font-weight: 600; }
.sub-tabs a:hover { color: var(--text, #e5e7eb); }

.digest-push { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; cursor: pointer; }

.invite-qr { display: flex; justify-content: center; margin: 12px 0; }
.invite-qr img { width: 220px; height: 220px; background: #fff; padding: 10px; border-radius: 12px; }

.chat-ava-lead { background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; display: grid; place-items: center; }
.chat-ava-lead svg { width: 20px; height: 20px; }
.chat-lead-note { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--violet-soft, rgba(139,92,246,.12)); color: var(--violet, #a78bfa); font-size: .85rem; }

.my-ts-head { margin: 0 0 12px; } .my-ts-head h3 { margin: 0; } .my-ts-head .disabled { pointer-events: none; opacity: .35; }
.my-ts-day .li-side { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; align-items: center; }
.my-ts-day.is-bad b { color: var(--red, #f87171); }
