:root {
  --text: #f1f3ff;
  --muted: rgba(226, 231, 255, .64);
  --glass: rgba(20, 25, 78, .55);
  --glass-strong: rgba(15, 19, 62, .94);
  --surface: rgba(255, 255, 255, .055);
  --surface-hover: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .12);
  --green: #9dcf00;
  --green-hover: #b1e300;
  --blue: #2fc6f6;
  --amber: #ffb547;
  --red: #ff5d5d;
  --violet: #9b7bff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(4, 6, 30, .35);
  --side-w: 165px;  /* меню на 30% уже прежних 236 px (ТЗ Крафта 27.10.2026) */
  font-family: "Segoe UI", "Open Sans", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: #161a5c; color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }

#bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 38% 45% at 82% 72%, rgba(64, 224, 255, .38), transparent 70%),
    radial-gradient(ellipse 30% 30% at 95% 30%, rgba(120, 190, 255, .22), transparent 70%),
    radial-gradient(ellipse 50% 60% at 55% 95%, rgba(90, 80, 255, .38), transparent 75%),
    radial-gradient(ellipse 60% 70% at 5% 10%, rgba(110, 60, 200, .45), transparent 70%),
    linear-gradient(135deg, #23237e 0%, #1a2590 45%, #111a6a 100%);
  background-size: cover; background-position: center;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; color: var(--muted); }
.err { color: #ffb4b1; min-height: 20px; margin: 6px 0; }
.warn { color: #ffd27a; }

.glass {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}

/* ---------------------------------------------------------------- иконки (SVG из app.js) */
.ico { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; }
.ico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- кнопки и поля */
button { font: inherit; color: inherit; cursor: pointer; }
.btn-green {
  background: var(--green); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 700;
  letter-spacing: .2px; box-shadow: 0 6px 16px rgba(157, 207, 0, .25); transition: background .15s, transform .05s;
}
.btn-green:hover { background: var(--green-hover); }
.btn-green:active { transform: translateY(1px); }
.btn-green:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn-ghost {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px;
  transition: background .15s;
}
.btn-ghost:hover { background: var(--surface-hover); }
.btn-small {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 12px;
  white-space: nowrap; transition: background .15s;
}
.btn-small:hover { background: var(--surface-hover); }
.btn-small:disabled { opacity: .45; cursor: default; }
.wide { width: 100%; margin-top: 10px; }
.link { background: none; border: 0; color: var(--blue); padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); transition: background .15s;
}
.icon-btn:hover { background: var(--surface-hover); }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 4px 11px; font-size: 12px; }
.chip-btn:hover { background: var(--surface-hover); }
.quick-due { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.lbl { display: block; color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
.lbl .inp { margin-top: 4px; }
.inp {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .07);
  color: var(--text); font: inherit; font-size: 14px; transition: border-color .15s, background .15s;
}
.inp:focus { outline: none; border-color: var(--blue); background: rgba(255, 255, 255, .11); box-shadow: 0 0 0 3px rgba(47, 198, 246, .18); }
.inp::placeholder { color: rgba(255, 255, 255, .42); }
select.inp option, .mode option { color: #111; }
textarea.inp { resize: vertical; }
kbd { font: 11px/1 inherit; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }

/* ---------------------------------------------------------------- вход */
.screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 420px; padding: 28px 26px; box-shadow: var(--shadow); }
.login-card h1 { margin: 10px 0 2px; font-size: 26px; font-weight: 650; }
.login-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 1px; color: var(--muted); }
.login-clock { color: var(--muted); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--green), #4fc500); color: #0c2400; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 16px rgba(157, 207, 0, .3);
}
.user-list { max-height: 46vh; overflow-y: auto; margin-top: 8px; border-radius: 10px; border: 1px solid var(--line); }
.user-item {
  display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; padding: 11px 12px;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
}
.user-item:last-child { border-bottom: 0; }
.user-item:hover, .user-item:focus { background: var(--surface-hover); outline: none; }
.user-item small { color: var(--muted); white-space: nowrap; }
.picked { font-size: 16px; font-weight: 600; margin: 4px 0 6px; }
.hint { color: var(--muted); margin: 6px 0; }

/* ---------------------------------------------------------------- каркас: меню слева, шапка, страница */
#app { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--side-w); flex: 0 0 var(--side-w); display: flex; flex-direction: column;
  background: rgba(10, 13, 48, .62); border-right: 1px solid var(--line); backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px); z-index: 12;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; cursor: pointer; }
.side-title { font-weight: 700; font-size: 16px; line-height: 1.2; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 10px; display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0;
  background: transparent; text-align: left; color: rgba(241, 243, 255, .86); font-weight: 600; transition: background .15s;
}
.nav-item:hover { background: var(--surface-hover); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(157, 207, 0, .28), rgba(157, 207, 0, .08)); color: #fff; box-shadow: inset 3px 0 0 var(--green); }
.nav-item .lab { flex: 1; }
.nav-badge { min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.nav-badge.soft { background: rgba(255, 255, 255, .16); }
.side-foot { padding: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.side-user:hover { background: var(--surface-hover); }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-text b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text small { color: var(--muted); font-size: 11px; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background: linear-gradient(135deg, #2fc6f6, #6b5bff); color: #fff; font-weight: 700; font-size: 13px;
}
.side-link { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.side-link:hover { background: var(--surface-hover); color: #fff; }
.side-overlay { position: fixed; inset: 0; background: rgba(4, 6, 30, .55); z-index: 11; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 9; display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  background: rgba(12, 15, 55, .55); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.menu-btn { display: none; }
.qsearch {
  position: relative; flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06);
}
.qsearch:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 198, 246, .18); }
.qsearch .ico { color: var(--muted); }
.qsearch input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; padding: 9px 0; outline: none; }
.qsearch input::placeholder { color: rgba(255, 255, 255, .42); }
.qs-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: 60vh; overflow-y: auto; border-radius: 12px;
  background: var(--glass-strong); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 20;
}
.qs-item { display: block; width: 100%; text-align: left; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.qs-item:hover, .qs-item.sel { background: var(--surface-hover); }
.qs-item b { font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.mode select {
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font: inherit; max-width: 220px;
}
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface); font-size: 12px; white-space: nowrap; cursor: default;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(157, 207, 0, .2); }
.data-age.warn-age .dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 181, 71, .2); }
.data-age.stale { border-color: rgba(255, 93, 93, .55); color: #ffc9c9; }
.data-age.stale .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 93, 93, .25); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-variant-numeric: tabular-nums; }
.clock b { font-size: 16px; font-weight: 650; letter-spacing: .3px; }
.clock small { font-size: 11px; color: var(--muted); }
.clock small::first-letter { text-transform: uppercase; }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
  box-shadow: 0 0 0 2px #1a1f66;
}
.bell.ring .ico { animation: ring .9s ease; transform-origin: 50% 0; }
@keyframes ring { 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }

main { padding: 18px 22px 60px; max-width: 1480px; width: 100%; }
.page-title { font-size: 24px; font-weight: 650; margin: 4px 0 14px; }
.page-sub { color: var(--muted); margin: -8px 0 16px; }

/* ---------------------------------------------------------------- оповещения */
.np {
  position: fixed; top: 60px; right: 16px; width: 400px; max-width: calc(100vw - 24px); max-height: calc(100vh - 80px);
  display: flex; flex-direction: column; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--line);
  box-shadow: var(--shadow); z-index: 25;
}
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 6px; }
.np-head b { font-size: 15px; }
.np-opts { display: flex; gap: 14px; padding: 0 14px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.np-opts label { display: flex; gap: 5px; align-items: center; cursor: pointer; }
.np-list { overflow-y: auto; padding: 6px; }
.np-item {
  display: flex; gap: 10px; width: 100%; text-align: left; padding: 10px; border: 0; border-radius: 10px; background: transparent;
  position: relative;
}
.np-item:hover { background: var(--surface-hover); }
.np-item.unread { background: rgba(47, 198, 246, .08); }
.np-item.unread::after { content: ""; position: absolute; right: 10px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.np-item .t { font-weight: 600; font-size: 13px; padding-right: 14px; }
.np-item .x2 { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.np-item .when { font-size: 11px; color: var(--muted); margin-top: 3px; }
.np-empty { padding: 26px 12px; text-align: center; color: var(--muted); }
.lvl { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; }
.lvl .ico { width: 17px; height: 17px; flex-basis: 17px; }
.lvl-info { background: rgba(47, 198, 246, .18); color: #7fdcff; }
.lvl-success { background: rgba(157, 207, 0, .2); color: #c4f05a; }
.lvl-warning { background: rgba(255, 181, 71, .2); color: #ffcd7f; }
.lvl-danger { background: rgba(255, 93, 93, .2); color: #ff9c9c; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; flex-direction: column-reverse; gap: 10px; width: 380px; max-width: calc(100vw - 24px); pointer-events: none; }
.toast-card {
  pointer-events: auto; position: relative; overflow: hidden; display: flex; gap: 11px; padding: 12px 34px 14px 12px;
  border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: toast-in .28s cubic-bezier(.2, .9, .3, 1.2); cursor: pointer;
}
.toast-card.out { animation: toast-out .25s ease forwards; }
.toast-card .t { font-weight: 650; font-size: 13px; }
.toast-card .x2 { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.toast-card .tx { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; }
.toast-card .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--blue); animation: bar linear forwards; }
.toast-card.success .bar { background: var(--green); }
.toast-card.warning .bar { background: var(--amber); }
.toast-card.danger { border-color: rgba(255, 93, 93, .5); }
.toast-card.danger .bar { background: var(--red); }
.toast-card:hover .bar { animation-play-state: paused; }
@keyframes toast-in { from { transform: translateX(110%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateX(110%); opacity: 0; } }
@keyframes bar { from { width: 100%; } to { width: 0; } }

/* ---------------------------------------------------------------- титульная */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 16px; }
.hello h1 { margin: 0; font-size: 26px; font-weight: 650; }
.hello .sub { color: var(--muted); margin-top: 2px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-align: left; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform .15s, border-color .15s, background .15s;
}
button.kpi:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .28); background: rgba(34, 40, 120, .62); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi-val { font-size: 28px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.kpi-val small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.kpi-sub .bad { color: #ff9c9c; font-weight: 700; }
.kpi .lvl { width: 34px; height: 34px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.card { padding: 16px 18px; border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.task-row {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 10px; border-radius: 10px;
  border: 0; background: transparent; border-bottom: 1px solid var(--line);
}
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: var(--surface-hover); }
.task-row .tt { font-weight: 600; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-row .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.due-tag { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 9px; background: rgba(157, 207, 0, .25); }
.due-tag.over { background: rgba(255, 93, 93, .35); }
.empty { padding: 22px 10px; text-align: center; color: var(--muted); }
.stats { padding: 16px 18px; margin-bottom: 14px; }
.stats h3 { margin: 0 0 10px; font-size: 16px; font-weight: 650; }
.stat-line { font-size: 15px; margin: 6px 0; }
.stat-line b { font-size: 19px; }

/* ---------------------------------------------------------------- карточка клиента */
.cc-top { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 18px; margin-bottom: 14px; }
.cc-grid .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.cc-grid .v { margin-top: 2px; }
.cc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.cc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cc-cols h3 { font-size: 14px; margin: 6px 0 6px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

/* ---------------------------------------------------------------- таблицы */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; text-transform: uppercase; letter-spacing: .3px; }
.tbl tr:hover td { background: rgba(255, 255, 255, .035); }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr.off td { opacity: .5; }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 9px; background: rgba(255, 255, 255, .14); }
.tag.green { background: rgba(157, 207, 0, .32); }
.tag.red { background: rgba(255, 93, 93, .38); }
.tag.blue { background: rgba(47, 198, 246, .3); }
.placeholder { padding: 40px 20px; text-align: center; }
.placeholder .big { font-size: 20px; margin-bottom: 8px; }
.skel { height: 14px; border-radius: 7px; margin: 10px 0; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06)); background-size: 200% 100%; animation: skel 1.2s infinite; }
@keyframes skel { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- модальные окна */
.modal {
  position: fixed; inset: 0; background: rgba(5, 6, 30, .6); z-index: 30; display: flex; align-items: flex-start;
  justify-content: center; padding: 40px 16px; overflow-y: auto; animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal-body { width: 100%; max-width: 560px; padding: 20px 22px; background: var(--glass-strong); box-shadow: var(--shadow); }
.wide-modal { max-width: 1000px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 650; }
.x { background: none; border: 0; font-size: 28px; line-height: 1; padding: 0 4px; color: var(--muted); }
.x:hover { color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.reg-list { max-height: 220px; overflow-y: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 0; }
.reg-list label { display: flex; gap: 8px; align-items: center; padding: 5px 10px; cursor: pointer; }
.reg-list label:hover { background: var(--surface-hover); }
.row-end { display: flex; justify-content: flex-end; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.row-end.left { justify-content: flex-start; }
.pwd-box { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 6px; }
.pwd-shown { margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: rgba(157, 207, 0, .18); border: 1px solid rgba(157, 207, 0, .5); }
.pwd-shown code { font-size: 18px; font-weight: 700; user-select: all; }

/* ---------------------------------------------------------------- клиенты */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .inp { width: auto; flex: 1 1 220px; }
.toolbar select.inp { flex: 0 1 240px; }
.clients-wrap { padding: 4px 6px; }
.clients td { font-size: 13px; }
.clients td.name { min-width: 200px; font-weight: 600; }
.clients tr.member td.name { padding-left: 34px; font-weight: 400; }
.clients tr.label td.name { color: var(--muted); font-style: italic; }
.toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 6px;
  border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; padding: 0;
}
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.ci-list { margin: 6px 0 12px; padding: 0; list-style: none; }
.ci-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.ci-list .k { color: var(--muted); font-size: 12px; display: block; }
.person { margin-top: 10px; }
.person b { font-size: 15px; }
.name-link { background: none; border: 0; padding: 0; color: #fff; font-weight: 600; text-align: left; }
.name-link:hover { color: var(--blue); text-decoration: underline; }

/* ---------------------------------------------------------------- задачи: канбан как в Б24 */
/* колонки вписаны в ширину страницы без горизонтальной прокрутки (ТЗ Крафта 27.10.2026); узкий экран - прокрутка */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kcol { flex: 1 1 0; min-width: 150px; background: rgba(255, 255, 255, .03); border-radius: 12px; padding: 0 0 6px; }
.khead {
  padding: 8px 12px; font-weight: 700; font-size: 13px; color: #fff; border-radius: 10px 10px 4px 4px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
}
.khead .n { font-weight: 400; opacity: .85; margin-left: 4px; }
.kcol[data-col="overdue"] .khead { background: #ff5d5d; }
.kcol[data-col="today"] .khead { background: #7bd500; color: #102000; }
.kcol[data-col="week"] .khead { background: #2fc6f6; color: #04243a; }
.kcol[data-col="next_week"] .khead { background: #55d0e0; color: #04303a; }
.kcol[data-col="no_date"] .khead { background: #a8adb4; color: #1d2026; }
.kcol[data-col="later"] .khead { background: #3a7bd5; }
.kcol[data-col="done"] .khead { background: #6b6f7a; }
.kadd { width: calc(100% - 12px); margin: 8px 6px; padding: 6px; border-radius: 8px; border: 1px dashed var(--line); background: transparent; font-size: 18px; }
.kadd:hover { background: var(--surface-hover); }
.kcard {
  display: block; width: calc(100% - 12px); margin: 0 6px 8px; text-align: left; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .95); color: #1d2026; border: 0; box-shadow: 0 3px 10px rgba(0, 0, 0, .22); transition: transform .12s;
}
.kcard:hover { background: #fff; transform: translateY(-1px); }
.kcard .tt { font-weight: 600; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.kcard .meta { font-size: 11px; color: #5d6370; margin-top: 4px; }
.kcard .meta b { color: #1d2026; font-weight: 600; }
.kcard.ai { border-left: 4px solid var(--violet); }
.kcard.done .tt { text-decoration: line-through; color: #6b6f7a; }
.picker { position: relative; }
.picker-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 3; max-height: 240px; overflow-y: auto;
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 10px;
}
.picker-list button { display: block; width: 100%; text-align: left; padding: 8px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); }
.picker-list button:hover { background: var(--surface-hover); }

/* ---------------------------------------------------------------- календарь месяца */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head .month { font-size: 18px; font-weight: 650; min-width: 170px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; }
.cal .dow { background: rgba(10, 12, 50, .7); padding: 7px; font-size: 12px; color: var(--muted); text-align: center; text-transform: uppercase; }
.cal .day { background: rgba(18, 22, 70, .6); min-height: 108px; padding: 5px; cursor: pointer; transition: background .12s; }
.cal .day:hover { background: rgba(30, 36, 110, .75); }
.cal .day.other { opacity: .45; }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--green); }
.cal .num { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.cal .day.today .num { color: var(--green); font-weight: 700; }
.cal .chip {
  display: block; width: 100%; text-align: left; font-size: 11px; padding: 2px 6px; margin-top: 2px; border-radius: 5px; border: 0;
  background: #2fc6f6; color: #04243a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal .chip.overdue { background: #ff5d5d; color: #fff; }
.cal .chip.done { background: #6b6f7a; color: #e6e8ec; text-decoration: line-through; }
.cal .more { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------------- аналитика */
.seg { display: inline-flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.seg button { border: 0; padding: 9px 14px; background: var(--surface); font-weight: 600; }
.seg button.on { background: var(--green); }
.an th.sort { cursor: pointer; user-select: none; }
.an th.sort:hover { color: #fff; }
/* аналитика: шапка "Период" над тремя колонками, подписи периода переносятся */
.tbl.an th, .tbl.an th.num { white-space: normal; vertical-align: bottom; }
.tbl.an th.num { min-width: 110px; max-width: 150px; text-align: right; }
.an th .small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.an th.an-period { text-align: center; border-bottom: 1px solid var(--line); color: #fff; }
.an tr.an-total td { font-weight: 700; color: #fff; }
.up { color: #b8f56a; font-weight: 600; }
.down { color: #ff9c9c; font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; color: #fff; font-weight: 600; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; }
.link-btn:hover { color: var(--blue); }
.brand-row td { background: rgba(255, 255, 255, .06); font-weight: 600; }
.dropped-tag { display: inline-block; font-size: 10px; padding: 0 7px; border-radius: 8px; background: rgba(255, 93, 93, .42); margin-left: 6px; }
.star-row td { opacity: .7; }

/* ---------------------------------------------------------------- задачи программисту */
.pboard { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.pcol { background: rgba(255, 255, 255, .035); border-radius: 14px; padding: 8px; min-height: 120px; }
.pcol-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; font-weight: 700; font-size: 13px; }
.pcol-head .n { color: var(--muted); font-weight: 600; }
.pcol-head .st { display: inline-flex; align-items: center; gap: 7px; }
.pcol-head .st i, .pt-statuses button i { width: 9px; height: 9px; border-radius: 50%; }
.st-new { background: var(--blue); }
.st-work { background: var(--amber); }
.st-review { background: var(--violet); }
.st-done { background: var(--green); }
.st-hold { background: #a8adb4; }
.pcard {
  display: block; width: 100%; text-align: left; margin-bottom: 9px; padding: 0; border-radius: 12px; overflow: hidden; position: relative;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .07); transition: transform .12s, border-color .12s, background .12s;
}
.pcard:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); }
.pcard .cover { height: 112px; background: #0d1146 center / cover no-repeat; }
.pcard .pc-in { padding: 10px 11px; }
.pcard .tt { font-weight: 650; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; font-size: 11px; color: var(--muted); }
.pcard .cnt { display: inline-flex; align-items: center; gap: 3px; }
.pcard .cnt .ico { width: 13px; height: 13px; flex-basis: 13px; }
.pcard .who { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.pcard .who .avatar { width: 22px; height: 22px; flex-basis: 22px; font-size: 10px; }
.pcard.unseen::after { content: ""; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(47, 198, 246, .25); }
.prio { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 8px; text-transform: uppercase; letter-spacing: .3px; }
.prio-urgent { background: rgba(255, 93, 93, .45); }
.prio-high { background: rgba(255, 181, 71, .4); }
.prio-normal { background: rgba(255, 255, 255, .12); }
.prio-low { background: rgba(255, 255, 255, .06); color: var(--muted); }
.ptabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ptabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 5px 12px; font-size: 12px; font-weight: 600; }
.ptabs button.on { background: var(--green); border-color: var(--green); color: #fff; }
.ptask-body { position: relative; max-width: 1080px; }
.pt-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: 8px; }
.pt-statuses { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.pt-statuses button { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 5px 12px; font-size: 12px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.pt-statuses button.on { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .5); }
.pt-statuses button:disabled { cursor: default; opacity: .5; }
.pt-statuses button.on:disabled { opacity: 1; }
.pt-desc { white-space: pre-wrap; word-break: break-word; line-height: 1.55; background: rgba(255, 255, 255, .04); border-radius: 10px; padding: 12px; min-height: 40px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 10px; }
.gallery .gi { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: #0d1146 center / cover no-repeat; }
.gallery .gi:hover { border-color: var(--blue); }
.media-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.media-list video { width: 100%; max-height: 380px; border-radius: 10px; background: #000; }
.media-list audio { width: 100%; }
.fitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); text-decoration: none; color: inherit; }
.fitem:hover { background: rgba(255, 255, 255, .1); }
.fitem .small { margin-left: auto; }
.dropzone { margin-top: 12px; padding: 16px; border: 2px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; width: 100%; background: transparent; }
.dropzone:hover { border-color: var(--blue); background: rgba(47, 198, 246, .06); color: #fff; }
.drop-hint { position: absolute; inset: 0; border-radius: var(--radius); background: rgba(47, 198, 246, .18); border: 3px dashed var(--blue); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; z-index: 5; pointer-events: none; }
.upl { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.upl-row { font-size: 12px; color: var(--muted); }
.upl-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: 3px; }
.upl-bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .15s; }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.msg { display: flex; gap: 9px; }
.msg .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; }
.msg .bubble { background: rgba(255, 255, 255, .07); border-radius: 4px 12px 12px 12px; padding: 8px 11px; min-width: 0; flex: 1; }
.msg.mine .bubble { background: rgba(47, 198, 246, .14); }
.msg .bubble .h { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.msg .bubble .h b { color: #fff; }
.msg .bubble .tx { white-space: pre-wrap; word-break: break-word; }
.msg.event { justify-content: center; font-size: 11px; color: var(--muted); }
.reply { margin-top: 10px; display: flex; gap: 8px; align-items: flex-end; }
.reply textarea { flex: 1; min-height: 42px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(3, 4, 20, .92); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lb-x { position: absolute; top: 14px; right: 20px; border: 0; background: none; font-size: 38px; color: #fff; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255, 255, 255, .1); color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 34px; line-height: 1; }
.lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- администрирование: модули */
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix th { white-space: normal; min-width: 92px; vertical-align: bottom; }
.matrix input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; }
.matrix tr.saving td { opacity: .6; }
.matrix .colall { display: block; margin: 4px auto 0; font-size: 10px; text-transform: none; }

/* ---------------------------------------------------------------- телефон и узкий экран */
@media (max-width: 1100px) {
  .clock small { display: none; }
  .dash-grid, .cc-cols, .pt-grid { grid-template-columns: 1fr; }
  .pboard { grid-template-columns: repeat(5, 240px); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .qsearch { order: 5; flex-basis: 100%; max-width: none; }
  .qsearch kbd { display: none; }
  .pill .lab-long { display: none; }
  main { padding: 14px 12px 60px; }
}
@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .page-title, .hello h1 { font-size: 21px; }
  .modal { padding: 12px 8px; }
  .mode select { max-width: 140px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; }
  .kpi-val { font-size: 21px; }
  .cal .day { min-height: 64px; }
  .cal .chip { font-size: 10px; padding: 1px 3px; }
  .kcol { flex-basis: 240px; min-width: 240px; }
  .toasts { right: 12px; left: 12px; width: auto; bottom: 12px; }
}

/* ---------------------------------------------------------------- логистика */
.xwide-modal { max-width: 1320px; }
#lreestr, #lreis { z-index: 29; }
.top-modal { z-index: 31; }
.lg-per { display: inline-flex; align-items: center; gap: 6px; }
.lg-per .inp { width: auto; padding: 7px 9px; }
.lg-tbl td.name, .lg-rows td.name { min-width: 170px; }
.lg-rows td { font-size: 13px; }
.lg-act { white-space: nowrap; text-align: right; }
.lg-act .btn-small { padding: 4px 6px; margin-left: 4px; }
.lg-act .ico svg { width: 15px; height: 15px; }
.lg-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.lg-stats b { color: var(--text, #fff); font-size: 15px; }
.lg-comment { margin: 4px 0 10px; padding: 8px 12px; border-left: 3px solid var(--blue); background: rgba(255, 255, 255, .05); border-radius: 6px; white-space: pre-wrap; }
.lg-note { white-space: pre-wrap; }
.lg-h { font-size: 14px; margin: 18px 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.lg-trips { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.lg-trip { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.lg-trip:hover { background: var(--surface-hover); }
.lg-trip .tt { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.lg-trip.off { opacity: .5; }
.lg-selbar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px;
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.lg-selbar .inp { width: auto; flex: 1 1 260px; }
.lg-jobs { display: flex; flex-direction: column; gap: 6px; }
.lg-job { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.lg-job > .small:last-child { flex-basis: 100%; }
.st-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: rgba(255, 255, 255, .14); }
.st-pill.green { background: rgba(157, 207, 0, .35); }
.st-pill.red { background: rgba(255, 93, 93, .42); }
.st-pill.blue { background: rgba(47, 198, 246, .32); }
.st-pill.amber { background: rgba(255, 184, 0, .38); }
.lg-chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.lg-free { max-height: 55vh; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.lg-fo { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.lg-fo:hover { background: rgba(255, 255, 255, .06); }
.lg-fo input { margin-top: 3px; }
.lg-ship { padding: 9px 0; border-bottom: 1px solid var(--line); }
.lg-ship .ico svg { width: 15px; height: 15px; vertical-align: -2px; }
@media (max-width: 700px) {
  .lg-per .inp { padding: 6px; }
}

/* ---------------------------------------------------------------- реализации */
.rz-hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.rz-hint b { color: var(--text); }
.rz-hint .ico svg { width: 18px; height: 18px; }
.tbl tr.rz-soft td { opacity: .62; }
.btn-make { padding: 6px 11px; font-size: 12px; white-space: nowrap; }
.btn-make .ico svg { width: 14px; height: 14px; }
td .btn-make { margin-top: 6px; }

/* ---------------------------------------------------------------- заказы клиентов */
.od-row { cursor: pointer; }
.od-row:hover td { background: rgba(255, 255, 255, .07); }
.on-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(47, 198, 246, .22); border-color: rgba(47, 198, 246, .5); }
.x-mini { border: 0; background: transparent; color: inherit; font-size: 15px; line-height: 1; padding: 0 2px; cursor: pointer; }
.od-lines td { font-size: 13px; }
.od-tbl td:nth-child(4) { min-width: 170px; }
.od-tbl td:nth-child(6) { min-width: 170px; }
.od-tbl .st-pill { white-space: normal; line-height: 1.35; }
a.side-link { text-decoration: none; font-size: 14px; }

/* окно заказа как форма 1С */
.of-actions { margin-left: auto; display: inline-flex; gap: 8px; flex-wrap: wrap; }
.of-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 16px; margin: 10px 0 6px; font-size: 13px; }
.of-f { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.of-f.wide { grid-column: span 2; }
.of-k { color: var(--muted); white-space: nowrap; }
.of-k::after { content: ":"; }
.of-v { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-debt { justify-content: flex-end; font-size: 13px; }
.of-tabs { margin: 12px 0 4px; }
.of-wrap { max-height: 58vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.of-tbl { border-collapse: collapse; font-size: 12px; min-width: 1500px; width: 100%; }
.of-tbl th { position: sticky; top: 0; z-index: 1; background: #20245a; color: var(--muted); font-weight: 600; text-align: left; padding: 6px 7px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.of-tbl td { padding: 4px 7px; border-bottom: 1px solid rgba(255, 255, 255, .07); white-space: nowrap; }
.of-tbl td.of-name { white-space: normal; min-width: 260px; }
.of-tbl th.num, .of-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.of-tbl tbody tr:hover td { background: rgba(255, 255, 255, .05); }
.of-tbl td.of-short { background: rgba(233, 150, 122, .45); }
.of-tbl td.of-over { background: rgba(255, 215, 0, .35); }
.of-icon { width: 22px; }
.of-foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4px 18px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.of-foot b { color: var(--text); }
.of-comment { margin-top: 8px; font-size: 13px; }
@media (max-width: 900px) { .of-head { grid-template-columns: 1fr 1fr; } .of-foot { grid-template-columns: 1fr; } }

/* справочник клиентов деревом */
.ct-seg button { padding: 7px 12px; font-size: 13px; }
.ct-tbl tr.ct-folder td { background: rgba(255, 255, 255, .035); }
.ct-tog { border: 0; background: transparent; color: var(--muted); width: 20px; padding: 0; font-size: 13px; cursor: pointer; }
.ct-ico .ico svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; color: #f6c35b; }
.ct-n { display: inline-block; font-size: 11px; color: var(--muted); background: rgba(255, 255, 255, .1); border-radius: 8px; padding: 0 7px; margin-left: 4px; }
.ct-sp { display: inline-block; width: 20px; }

/* дебиторка по менеджерам */
.db-tree tr.db-mgr td { background: rgba(255, 255, 255, .045); }
.db-tree tr.db-doc td { font-size: 12.5px; background: rgba(0, 0, 0, .12); }

/* шапка окна заказа */
.oh-hero { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 16px 18px; margin: 6px 0 14px;
  border-radius: 14px; background: linear-gradient(120deg, rgba(47, 198, 246, .16), rgba(140, 196, 0, .12)); border: 1px solid var(--line); }
.oh-num { font-size: 26px; font-weight: 750; letter-spacing: .3px; }
.oh-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.oh-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.oh-sum { text-align: right; }
.oh-sum-v { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; }
.oh-sum-v span { font-size: 15px; color: var(--muted); font-weight: 600; }
.oh-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.oh-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 6px; }
.oh-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: rgba(255, 255, 255, .035); }
.oh-h { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 8px; }
.oh-h .ico svg { width: 16px; height: 16px; }
.oh-row { display: flex; gap: 10px; padding: 3px 0; font-size: 13px; }
.oh-k { color: var(--muted); min-width: 108px; }
.oh-v { flex: 1; min-width: 0; word-break: break-word; }
@media (max-width: 1000px) { .oh-cards { grid-template-columns: 1fr; } .oh-sum { text-align: left; } .oh-btns { justify-content: flex-start; } }
.ct-tbl td.name, .db-tree td.name { min-width: 340px; }
.ct-tbl td.name { min-width: 260px; }
.ct-tbl th { white-space: normal; vertical-align: bottom; }
.ct-tbl td.ct-wide { min-width: 160px; max-width: 240px; word-break: break-word; }
.ct-ci { text-align: left; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.db-tree th.db-span { text-align: center; }
.tbl.db-tree th, .tbl.db-tree th.num { white-space: normal; vertical-align: bottom; font-size: 11px; line-height: 1.25; max-width: 104px; padding: 7px 8px; }
.db-tree td { padding: 7px 8px; }
.db-tree td.name { min-width: 300px; }
.db-tree tr.db-doc td.name { white-space: nowrap; }
.db-tree tr.db-real td { background: rgba(0, 0, 0, .18); padding: 6px 10px 10px 30px; }
.db-real-box { position: sticky; left: 30px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(255, 255, 255, .03); box-sizing: border-box; }
.db-real-head { font-size: 13px; margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.db-real-tbl { min-width: 0; margin-top: 6px; }
/* дебиторка на всю видимую область: страница без ограничения ширины, таблица по высоте окна со своей прокруткой,
   шапка и колонка менеджер/клиент/документ закреплены (у закрепленных ячеек непрозрачный фон) */
main.wide { max-width: none; padding-bottom: 12px; }
.db-scroll { max-height: calc(100vh - 92px); overflow: auto; }
.tbl.db-tree thead th { position: sticky; top: 0; z-index: 2; background: #1b1f5e; box-shadow: inset 0 -1px 0 var(--line); }
.tbl.db-tree thead th.db-corner { left: 0; z-index: 3; }
.tbl.db-tree td.name { position: sticky; left: 0; z-index: 1; background: #161a55; box-shadow: inset -1px 0 0 var(--line); }
.tbl.db-tree tr.db-mgr td.name { background: #1f235b; }
.tbl.db-tree tr.brand-row td.name { background: #23275e; }
.tbl.db-tree tr.db-doc td.name { background: #12164a; }
.tbl.db-tree tr:hover td.name { background: #262a66; }
/* карточка клиента: задолженность как в отчете 1С, контакты с записью в 1С */
.oi-ptype { display: inline-block; width: auto; max-width: 340px; padding: 3px 8px; font-size: 12px; height: auto; }
/* 10.11.2026: шаблоны новой задачи */
.t-tpl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.t-tpl:empty { display: none; }
.t-tpl .chip-btn.on { background: var(--green); border-color: var(--green); color: #0c2400; }
/* 10.11.2026: лента по клиенту в карточке */
.feed-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.feed-filter .chip { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 4px 11px; font-size: 12px; color: inherit; }
.feed-filter .chip b { opacity: .7; font-weight: 600; margin-left: 2px; }
.feed-filter .chip.on { background: var(--green); border-color: var(--green); color: #0c2400; }
.feed-list { position: relative; max-height: 460px; overflow: auto; padding-right: 4px; }
.feed-day { position: sticky; top: 0; z-index: 2; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 0 4px 40px; background: var(--glass-strong); }
.feed-item { position: relative; display: flex; gap: 12px; padding: 4px 0 10px; }
.feed-item::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: -4px; width: 2px; background: var(--line); }
.feed-item:last-child::before { display: none; }
.feed-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: var(--muted); }
.feed-dot svg { width: 15px; height: 15px; }
.tone-ok .feed-dot { background: rgba(123, 213, 0, .22); color: #c9ff8a; }
.tone-info .feed-dot { background: rgba(47, 198, 246, .2); color: #9fe6ff; }
.tone-warn .feed-dot { background: rgba(255, 209, 102, .2); color: #ffd166; }
.tone-bad .feed-dot { background: rgba(255, 93, 93, .2); color: #ff9a9a; }
.feed-main { min-width: 0; flex: 1; padding-top: 4px; }
.feed-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.feed-head .link-btn, .feed-head b { font-weight: 600; text-align: left; }
.feed-sum { white-space: nowrap; font-weight: 700; }
.tone-bad .feed-sum { color: #ff9a9a; }
.feed-text { overflow-wrap: anywhere; }
.feed-meta { opacity: .7; }
.cc-h { font-size: 14px; margin: 18px 0 6px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.tbl.db-client td.name { min-width: 240px; background: #10144a; }
.tbl.db-client tr.brand-row td.name { background: #1c2058; }
.tbl.db-client thead th { background: #161a52; }
.ci-bar { margin: 2px 0 6px; }
.ci-job { font-size: 12px; padding: 6px 10px; margin: 4px 0; border-radius: 8px; background: rgba(47, 198, 246, .12); }
.ci-job.err { background: rgba(255, 93, 93, .14); color: #ffb3b3; }
.ci-item { position: relative; padding-right: 34px !important; }
.ci-edit { position: absolute; right: 2px; top: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 28px; height: 26px; color: var(--muted); }
.ci-edit:hover { background: var(--surface-hover); color: #fff; }
.cf-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; background: rgba(255, 255, 255, .03); }
.cf-title { font-weight: 650; margin-bottom: 2px; }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 10px; }
.cf-phone { grid-template-columns: 90px 100px 1fr 70px; }
.cf-preview { margin: 10px 0 4px; }
.cf-btns { display: flex; gap: 8px; margin-top: 10px; }
/* контактные лица в карточке клиента */
.ci-persons-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 2px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.ci-sub { list-style: none; margin: 4px 0 2px 10px; padding: 0 0 0 10px; border-left: 2px solid var(--line); }
.ci-sub li { padding: 4px 34px 4px 0 !important; border-bottom: 0 !important; }
.ci-padd { font-size: 12px; margin-top: 4px; font-weight: 500; }
/* отчеты 1С */
.rp-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.rp-list { padding: 8px; max-height: calc(100vh - 150px); overflow: auto; }
.rp-group { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; margin: 10px 6px 4px; }
.rp-item, .rp-hist { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 7px 9px; border-radius: 9px; font-size: 13px; }
.rp-item:hover, .rp-hist:hover { background: var(--surface-hover); }
.rp-item.on, .rp-hist.on { background: rgba(157, 207, 0, .16); }
.rp-hist span { display: block; }
.rp-main { min-width: 0; }
.rp-form { padding: 12px 14px; margin-bottom: 12px; }
.rp-title { font-weight: 650; font-size: 16px; }
.rp-row { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.rp-row .lbl { min-width: 160px; }
.rp-quick { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 4px; }
.rp-client { position: relative; min-width: 320px !important; }
.rp-sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 10px; max-height: 260px; overflow: auto; }
.rp-sugg button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 7px 10px; }
.rp-sugg button:hover { background: var(--surface-hover); }
.rp-res { padding: 10px 14px; margin-bottom: 10px; }
.rp-res-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rp-res-title { font-weight: 650; margin-right: auto; }
.rp-frame { width: 100%; height: calc(100vh - 150px); border: 1px solid var(--line); border-radius: 10px; background: #fff; }
@media (max-width: 900px) { .rp-wrap { grid-template-columns: 1fr; } .rp-list { max-height: none; } }
/* прайс-лист с настройками: карточки отбора, кнопки-переключатели, строка итога */
.pf-head { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.pf-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.pf-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; background: rgba(255, 255, 255, .03); min-width: 0; }
.pf-card.pf-wide2 { grid-column: 1 / -1; }
.pf-card-t { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 650; margin-bottom: 8px; }
.pf-card .lbl { display: block; width: 100%; }
.pf-card .inp { width: 100%; box-sizing: border-box; }
.pf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.pf-sub { font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.pf-note { margin-top: 6px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chips.pf-col { flex-direction: column; align-items: stretch; }
.pf-chip { border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); border-radius: 999px; padding: 5px 12px;
  font-size: 12.5px; cursor: pointer; text-align: left; transition: background .12s, border-color .12s; }
.pf-chip:hover { background: var(--surface-hover); }
.pf-chip.on { background: rgba(157, 207, 0, .18); border-color: rgba(157, 207, 0, .75); font-weight: 600; }
.pf-chip.on::before { content: "\2713\00a0"; color: var(--green); }
.pf-chip[disabled] { opacity: .75; cursor: default; }
.pf-chips.pf-col .pf-chip { border-radius: 10px; }
.pf-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--glass-strong, rgba(20, 24, 60, .92)); z-index: 3; }
.pf-sum { margin-right: auto; flex: 1 1 260px; }
@media (max-width: 600px) { .pf-two { grid-template-columns: 1fr; } .pf-bar .btn-green { width: 100%; } }
/* закупки: планирование заказа поставщику */
.pu-supinfo { padding-bottom: 12px; }
.pk-list { max-height: 60vh; overflow: auto; margin-top: 10px; }
.pk-fold, .pk-item { display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit;
  padding: 6px 10px; cursor: pointer; }
.pk-fold { font-weight: 600; }
.pk-item.on { color: #9be22d; }
.pk-fold:hover, .pk-item:hover { background: rgba(255, 255, 255, 0.06); }
.pu-inc { padding-bottom: 6px; margin-right: 4px; }
.pu-tools { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 8px 0 6px; }
.pu-tools .small { display: inline-flex; align-items: center; gap: 6px; }
.pu-small { width: 84px; padding: 5px 8px; }
.pu-op { width: auto; padding: 5px 8px; }
.pu-orow { margin-top: 6px; gap: 0 12px; }
.pu-comment { flex: 1; min-width: 260px !important; }
.pu-orow .small { padding-bottom: 10px; }
.pu-box { padding: 0; overflow: hidden; }
.pu-tbl td { padding: 5px 7px; }
.pu-tbl td.pu-chk, .pu-tbl th.pu-chk { left: 0; width: 30px; min-width: 30px; max-width: 30px; text-align: center; }
.tbl.pu-tbl td.pu-name, .tbl.pu-tbl th.pu-name { left: 30px; min-width: 280px; max-width: 340px; }
.tbl.pu-tbl thead th.pu-name { position: sticky; left: 30px; z-index: 3; }
.tbl.pu-tbl td.pu-name { position: sticky; z-index: 1; }
.pu-tbl tr.pu-out td { background: rgba(47, 198, 246, .16); }
.tbl.pu-tbl tr.pu-out td.name { background: #1c3f6e; }
.pu-in { width: 82px; padding: 3px 6px; text-align: right; font-variant-numeric: tabular-nums; }
.pu-tbl tfoot td { position: sticky; bottom: 0; background: #1b1f5e; font-weight: 650; box-shadow: inset 0 1px 0 var(--line); }
.tbl.pu-tbl tfoot td.name { z-index: 2; background: #1b1f5e; }

/* потенциальные клиенты (аналитика) */
.pt-okved { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 8px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.tbl th.center { text-align: center; }
.section-title { font-weight: 600; margin: 14px 0 6px; }
.pt-res { max-height: 60vh; overflow: auto; }
/* закрепленная шапка таблицы (аналитика, клиенты): таблица по высоте окна со своей прокруткой, шапка видна всегда */
.sticky-wrap { max-height: calc(100vh - 92px); overflow: auto; }
.sticky-wrap thead { position: sticky; top: 0; z-index: 2; }
.sticky-wrap thead th { background: #1b1f5e; box-shadow: inset 0 -1px 0 var(--line); }
.an-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ct-acts { white-space: nowrap; }
.ct-acts .btn-small + .btn-small { margin-left: 4px; }
/* узкое меню (165 px): плотнее пункты, длинные слова ("задолженность") помещаются без горизонтальной прокрутки */
.side-nav { padding: 6px 6px; overflow-x: hidden; }
.nav-item, .side-link { gap: 8px; padding: 8px 8px; font-size: 13px; }
.nav-item .lab { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.side-brand { padding: 14px 10px 12px; }
.side-foot { padding: 8px 6px; }

/* ТЗ 29.10.2026 (вкладки "Заказы клиентов", "ДЗ", "Аналитика") */
/* окно заказа: шапка компактно сверху (около 20% высоты), таблица товаров на остальную высоту со своей прокруткой */
#lorder { padding: 12px 16px; }
.order-modal { max-width: none; width: calc(100vw - 32px); height: calc(100vh - 24px); display: flex; flex-direction: column; padding: 12px 16px; }
.order-modal #lo-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.order-modal { position: relative; }
.order-modal .modal-head { position: absolute; top: 14px; right: 14px; z-index: 2; }
.order-modal .modal-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.order-modal .oh-hero { margin-right: 44px; }
.order-modal .oh-hero { padding: 8px 14px; margin: 4px 0 8px; gap: 10px; align-items: center; }
.order-modal .oh-num { font-size: 19px; }
.order-modal .oh-sum-v { font-size: 20px; }
.order-modal .oh-sub { font-size: 12px; }
.order-modal .oh-tags { margin-top: 4px; }
.order-modal .oh-btns { margin-top: 4px; }
.order-modal .oh-btns button { padding: 5px 12px; }
.order-modal .oh-cards { gap: 8px; margin-bottom: 0; }
.order-modal .oh-card { padding: 6px 10px; border-radius: 10px; }
.order-modal .oh-h { margin-bottom: 2px; font-size: 11px; }
.order-modal .oh-row { padding: 0; font-size: 12px; gap: 8px; line-height: 1.35; }
.order-modal .oh-k { min-width: 92px; }
.order-modal .oh-v { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.of-tabrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.of-tabrow #lo-q, .of-tabrow #rc-q { max-width: 360px; margin: 0; }
.order-modal #lo-q, .order-modal #rc-q { padding: 6px 10px; }
.order-modal .of-tabrow { margin: 6px 0 4px; }
.order-modal .of-tabs { margin: 0; }
.order-modal .oh-hero { flex-wrap: nowrap; }
.order-modal .oh-main { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.order-modal .oh-sum { display: flex; align-items: center; gap: 14px; }
.order-modal .oh-sum .oh-sub { margin: 0; }
.order-modal .oh-btns { flex-wrap: nowrap; }
.order-modal .of-wrap { flex: 1 1 auto; min-height: 160px; max-height: none; }
.order-modal .of-foot { margin-top: 6px; font-size: 12px; }
.order-modal .of-comment { margin-top: 4px; font-size: 12px; }
/* дебиторка по ширине окна без прокрутки вправо: колонки уже, наименование переносится */
.tbl.db-tree { font-size: 12.5px; }
.tbl.db-tree th, .tbl.db-tree th.num { max-width: 84px; padding: 6px 5px; font-size: 10.5px; letter-spacing: 0; }
.tbl.an.db-tree th.num { min-width: 0; }
.tbl.clients.db-tree td { font-size: 12.5px; }
.db-tree td { padding: 6px 5px; }
.db-tree td.name { min-width: 200px; max-width: 280px; white-space: normal; }
.db-tree tr.db-doc td.name { white-space: normal; }
.db-orgs { gap: 12px; flex-wrap: wrap; margin: -4px 0 8px; }
/* аналитика: стрелки сортировки у колонок периода; номер счета КП в строке бренда; окно КП */
.sort-arr { border: 0; background: transparent; color: var(--muted); padding: 0 3px; font-size: 11px; cursor: pointer; line-height: 1; }
.sort-arr:hover { color: var(--text); }
.sort-arr.on { color: var(--green); }
.kp-last { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.kp-last b { color: var(--text); font-weight: 600; }
.kp-scroll { max-height: 52vh; overflow: auto; }
.kp-scroll th { position: sticky; top: 0; z-index: 1; background: #1b1f5e; }
.kp-sel { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
tr.kp-rest td { opacity: .78; }
.tag.stock { background: rgba(157, 207, 0, .22); }

/* ---------------------------------------------------------------- оформление (theme.js) */
#bg { transition: filter .2s; }
.th-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 12px; }
.th-card { display: flex; align-items: center; gap: 6px; padding: 14px 8px; border: 2px solid transparent; border-radius: 10px; font-weight: 600; font-size: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.th-card.on { border-color: #fff; }
.th-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; }
.th-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 6px 0 12px; }
.th-colors label, .th-sliders label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.th-colors input[type=color] { width: 48px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.th-wall { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; }
.th-sliders { display: grid; gap: 8px; margin-bottom: 10px; }
.th-sliders input[type=range] { width: 55%; }
@media (max-width: 560px) { .th-presets { grid-template-columns: repeat(2, 1fr); } .th-colors { grid-template-columns: 1fr; } }

/* ТЗ 09.11.2026, ДЗ: таблица по ширине окна без прокрутки вправо - фиксированная раскладка, первая колонка ~18%,
   суммы делят остальное, шрифт сжимается на узком экране */
.db-scroll { overflow-x: hidden; }
.tbl.db-tree.an { table-layout: fixed; width: 100%; }
.tbl.db-tree.an th:first-child { width: 18%; }
.tbl.db-tree.an td, .tbl.db-tree.an th { font-size: clamp(10px, 0.68vw, 13px); padding: 6px 4px; overflow-wrap: anywhere; }
.tbl.db-tree.an td.num { white-space: nowrap; overflow: hidden; text-overflow: clip; }
.tbl.db-tree.an td.name { min-width: 0; white-space: normal; }
.tbl.db-tree.an tr.db-doc td.name { white-space: normal; }
.tbl.db-tree.an th { max-width: none; }
.db-tree .soon { color: #ffd166; }
.tbl.db-tree.an th { overflow-wrap: normal; word-break: normal; hyphens: auto; -webkit-hyphens: auto; }
/* ТЗ 09.11.2026: таблица пользователей на главной */
.st-tbl th[data-sfsort] { cursor: pointer; }
.st-tbl td { white-space: nowrap; }
.tbl.st-tbl th { min-width: 0; padding: 6px 5px; white-space: normal; letter-spacing: 0; }
.st-tbl td { padding: 6px 5px; }
.st-tbl td:first-child { white-space: normal; min-width: 170px; }
.st-tbl tr.st-total td { font-weight: 700; border-top: 2px solid var(--line); }
.st-tbl .st-gap { border-left: 1px solid var(--line); }
.team-tbl th, .team-tbl td { padding: 6px 8px; }
.team-tbl th.db-span { text-align: center; border-bottom: 1px solid var(--line); }
.team-tbl td .small { opacity: .75; }
.team-tbl .up { color: #9be22d; }

/* ТЗ 09.11.2026, задачи: группы постановщиков в колонке, зеленый шрифт задач ИИ (как "На сегодня"), счетчики */
.kgroup { margin: 6px 8px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.kgroup.kg-shef { color: #ffd166; }
.kgroup.kg-user { color: #9fd3ff; }
.kgroup.kg-ai { color: #7bd500; }
.kcard.ai { border-left: 4px solid #7bd500; }
.kcard.ai .tt { color: #4f9a00; }
.btn-ghost.on { background: rgba(123, 213, 0, .22); border-color: #7bd500; color: #fff; }
.tk-self { margin-left: auto; font-size: 13px; opacity: .9; }
.tk-sum { margin-bottom: 10px; padding: 8px 14px; }
.tk-sum summary { cursor: pointer; font-weight: 600; }
.tk-sum table { margin-top: 8px; max-width: 560px; }
.cal .chip.ai:not(.overdue):not(.done) { color: #0d2a00; background: #7bd500; }
/* окно задач дня */
#task.modal { z-index: 40; }
.day-list { max-height: 60vh; overflow-y: auto; }
.day-row { display: grid; grid-template-columns: 26px 1fr; align-items: start; gap: 6px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.day-row .day-done { margin-top: 6px; width: 16px; height: 16px; }
.day-open { text-align: left; background: none; border: 0; padding: 2px 4px; border-radius: 8px; width: 100%; }
.day-open:hover { background: var(--surface-hover); }
.day-open .tt { font-weight: 600; white-space: pre-wrap; }
.day-open .meta { font-size: 12px; opacity: .75; }
.day-row.ai .tt { color: #7bd500; }
.day-row.done .tt { text-decoration: line-through; opacity: .7; }

/* ТЗ 09.11.2026: загрузка заказа клиента */
.oi-modal { max-width: 1200px; }
/* 10.11.2026: выбор контрагента в окне загрузки заказа */
.oi-client-row { display: flex; gap: 8px; align-items: flex-start; }
.oi-client-row .picker { flex: 1; }
.picker-list .oi-more { color: var(--green); font-weight: 600; }
.oicl-modal { max-width: 900px; }
.oicl-wrap { max-height: min(60vh, 560px); overflow: auto; }
.oicl-tbl tbody tr { cursor: pointer; }
.oicl-tbl tbody tr:hover td, .oicl-tbl tbody tr.cur td { background: var(--surface-hover); }
.oicl-tbl tbody tr.cur td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.oicl-tbl mark { background: rgba(157, 207, 0, .35); color: inherit; border-radius: 3px; padding: 0 1px; }
/* 10.11.2026: миниатюры файла и линия чтения во время распознавания */
.oi-thumbs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 8px 0 4px; }
.oi-thumbs:empty { display: none; }
/* несколько файлов заказа: порядок распознавания (10.11.2026) */
.oi-paste-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 2px; }
.oi-flist { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.oi-flist:empty { display: none; }
.oi-frow { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; }
.oi-frow > b { min-width: 18px; text-align: right; color: var(--muted); }
.oi-fext { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.oi-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oi-frow .btn-small { padding: 2px 8px; }
.oi-fstep { text-align: center; font-weight: 650; margin-bottom: 6px; }
.oi-prow { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.oi-prow > b { color: var(--muted); min-width: 16px; text-align: right; }
.oi-prow .oi-pst { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.oi-prow .oi-scan-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--blue); }
.oi-prow.run .oi-scan-dot { animation: pulse 1.2s infinite; }
.oi-prow.ok .oi-scan-dot { background: var(--green); }
.oi-prow.bad .oi-scan-dot { background: var(--red); }
.oi-prow.bad .oi-pst { color: #ff9a9a; }
.oi-prow:not(.run):not(.ok):not(.bad) .oi-scan-dot { opacity: .35; }
.oi-file-row td { background: rgba(255, 255, 255, .06); font-weight: 650; font-size: 12px; }
.oi-addbtn { cursor: pointer; display: inline-flex; align-items: center; }
.oi-sheet { position: relative; overflow: hidden; background: #fff; }
.oi-sheet img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.oi-thumb { width: 54px; height: 76px; flex: none; border-radius: 5px; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
.oi-thumb b { position: absolute; right: 3px; bottom: 3px; z-index: 2; font-size: 10px; padding: 0 4px; border-radius: 4px; background: rgba(13, 17, 70, .75); color: #fff; }
.oi-fake { position: absolute; inset: 0; background-color: #fff; }
.oi-fake.txt { background-image: repeating-linear-gradient(to bottom, transparent 0 9px, #dfe3ef 9px 11px); background-size: 76% 100%; background-position: 50% 14%; background-repeat: no-repeat; }
.oi-fake.tbl { background-image: linear-gradient(#e8ecf5 1px, transparent 1px), linear-gradient(90deg, #e8ecf5 1px, transparent 1px); background-size: 22% 9%; background-position: 4% 4%; }
.oi-fake span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 800; font-size: 12px; color: #6a7397; background: #fff; padding: 1px 4px; border-radius: 4px; }
.oi-scan-wrap { display: flex; justify-content: center; align-items: flex-start; gap: 18px; padding: 10px 0 4px; }
.oi-scan-page { --p: 0; width: min(380px, 72vw); aspect-ratio: 1 / 1.414; border-radius: 8px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); animation: oiPageIn .45s cubic-bezier(.2, .8, .2, 1); }
.oi-scan-page .oi-fake span { font-size: 22px; padding: 4px 10px; }
.oi-scan-dim { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--p) * 100%); background: rgba(12, 16, 66, .30); }
.oi-scan-read { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--p) * 100%); background: linear-gradient(to bottom, rgba(157, 207, 0, .04), rgba(157, 207, 0, .14)); }
.oi-scan-line { position: absolute; left: -2%; right: -2%; top: calc(var(--p) * 100%); height: 3px; margin-top: -2px; z-index: 3;
  background: linear-gradient(90deg, transparent, #c6ff3d 12%, #fff 50%, #c6ff3d 88%, transparent);
  box-shadow: 0 0 10px 3px rgba(157, 207, 0, .8), 0 0 36px 10px rgba(157, 207, 0, .28); }
.oi-scan-line::before { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 54px; background: linear-gradient(to top, rgba(176, 240, 20, .30), transparent); }
.oi-glint { position: absolute; height: 2px; z-index: 2; border-radius: 2px; background: #8fc400; opacity: 0; }
.oi-glint.on { animation: oiGlint 1.6s ease-out forwards; }
.oi-scan-page.done::after { content: "✓"; position: absolute; right: 12px; top: 12px; z-index: 4; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #0c2400; background: var(--green); box-shadow: 0 0 18px rgba(157, 207, 0, .8); animation: oiPageIn .3s ease; }
.oi-scan-pages { display: flex; flex-direction: column; gap: 8px; max-height: min(540px, 60vh); overflow: auto; padding: 4px; }
.oi-scan-pages .oi-thumb { opacity: .55; transition: opacity .3s, box-shadow .3s; }
.oi-scan-pages .oi-thumb.cur { opacity: 1; box-shadow: 0 0 0 2px var(--green), 0 0 16px rgba(157, 207, 0, .6); }
.oi-scan-pages .oi-thumb.done { opacity: .9; }
.oi-scan-pages .oi-thumb.done::after { content: "✓"; position: absolute; left: 3px; top: 3px; z-index: 2; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #0c2400; background: var(--green); }
.oi-scan-status { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; font-weight: 600; }
.oi-scan-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: oiPulse 1.2s ease-in-out infinite; }
.oi-scan-dot.ok { animation: none; box-shadow: 0 0 10px var(--green); }
.oi-scan-bar { height: 4px; max-width: 420px; margin: 10px auto 6px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .12); }
.oi-scan-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6fb000, var(--green), #d6ff6a); transition: width .3s; }
@keyframes oiPageIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes oiGlint { 0% { opacity: 0; } 15% { opacity: .95; box-shadow: 0 0 8px rgba(157, 207, 0, .9); } 100% { opacity: .35; box-shadow: none; } }
@keyframes oiPulse { 50% { opacity: .35; transform: scale(.75); } }
@media (max-width: 600px) { .oi-scan-wrap { flex-direction: column; align-items: center; } .oi-scan-pages { flex-direction: row; max-height: none; max-width: 100%; } }
/* линия чтения - медленный индикатор хода, она остается и при "уменьшить анимацию" (так часто на офисных ПК и в RDP) */
@media (prefers-reduced-motion: reduce) { .oi-glint { display: none; } .oi-scan-page, .oi-scan-dot { animation: none; } }
.oi-list { margin-bottom: 14px; }
.oi-row { cursor: pointer; }
.oi-row:hover td { background: var(--surface-hover); }
.oi-list-head { flex-wrap: wrap; gap: 8px; }
.oi-list-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.oi-list-collapsed .card-head { margin-bottom: 0; }
.oi-row-hidden td { opacity: .55; }
.warn-text { color: #ffd166; }
/* новый заказ и окно номенклатуры (10.11.2026) */
.oi-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.oi-cat { width: min(1200px, 96vw); }
.oi-cat-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.oi-cat-bar .inp { flex: 1 1 280px; }
.oi-cat-path { margin: 4px 0; }
.oi-cat-crumb { background: none; border: 0; color: var(--accent, #4cc9f0); cursor: pointer; padding: 2px 4px; font: inherit; }
.oi-cat-wrap { max-height: 60vh; overflow: auto; }
.oi-cat-tbl td, .oi-cat-tbl th { white-space: nowrap; }
.oi-cat-tbl td:nth-child(3) { white-space: normal; min-width: 260px; }
.oi-cat-group { cursor: pointer; }
.oi-cat-group:hover td, .oi-cat-item:hover td { background: var(--surface-hover); }
.oi-cat-folder { display: inline-block; width: 14px; height: 10px; margin-right: 8px; border-radius: 2px; background: #ffd166; vertical-align: middle; }
.oi-cat-old td { opacity: .7; }
.oi-cat-tbl .oi-qty { width: 80px; }
.oi-badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; margin-top: 3px; background: rgba(255, 255, 255, .12); }
.oi-badge.ok { background: rgba(123, 213, 0, .25); color: #c9ff8a; }
.oi-badge.warn { background: rgba(255, 209, 102, .22); color: #ffd166; }
.oi-badge.bad { background: rgba(255, 93, 93, .22); color: #ff9a9a; }
.oi-badge.info { background: rgba(47, 198, 246, .22); color: #9fe6ff; }
.oi-wrap { max-height: 58vh; overflow: auto; margin: 8px 0; }
.oi-tbl td { vertical-align: top; }
.oi-tbl tr.off td { opacity: .5; }
.oi-tbl .oi-qty { width: 80px; text-align: right; padding: 5px 8px; }
.oi-acts { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.oi-acts .oi-cand { max-width: 320px; padding: 4px 8px; font-size: 12px; }
.oi-search { position: relative; margin-top: 6px; }
.oi-search .picker-list { position: static; max-height: 220px; }
.bad-txt { color: #ff9a9a; }
/* окно "Обучение подбора" (11.11.2026) */
.oilm-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.oilm-filter #oilm-q { flex: 1 1 260px; }
.oilm-filter #oilm-kind { flex: 0 1 220px; }
.oilm-kpi { margin: 6px 0 10px; }
#oilm .modal-body { width: min(1200px, calc(100vw - 16px)); max-width: calc(100vw - 16px); min-width: 0; box-sizing: border-box; }
#oilm .oilm-kpi { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
#oilm .table-wrap { overflow-x: auto; max-width: 100%; }
#oilm .oilm-filter > * { min-width: 0; }

/* ТЗ 11.11.2026 п.17: "ВСЕ ЗАДАЧИ" холдинга - окно на половину экрана справа с месячным календарем */
.an-alltasks { font-size: 11px; font-weight: 700; letter-spacing: .03em; margin-top: 2px; }
.modal.side { justify-content: flex-end; padding: 0; }
.modal.side .side-body { max-width: none; width: 50vw; min-width: 340px; min-height: 100vh; border-radius: 0; overflow-y: auto; }
@media (max-width: 760px) { .modal.side .side-body { width: 100vw; min-width: 0; } }
.cal.mini .day { min-height: 74px; cursor: default; }
.cal.mini .chip { font-size: 10px; }
.at-legend { margin: 4px 0 8px; display: flex; gap: 6px; align-items: center; }
.at-legend .chip { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 5px; background: #2fc6f6; color: #04243a; }
.at-legend .chip.overdue { background: #ff5d5d; color: #fff; }
.at-legend .chip.done { background: #6b6f7a; color: #e6e8ec; }
#task, #tday { z-index: 40; }
#oilm .modal-body { width: min(1200px, calc(100vw - 16px)); max-width: calc(100vw - 16px); min-width: 0; box-sizing: border-box; }
#oilm .oilm-kpi { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
#oilm .table-wrap { overflow-x: auto; max-width: 100%; }
#oilm .oilm-filter > * { min-width: 0; }

/* ТЗ 11.11.2026: клиент первой строкой карточки задачи (п.12), сводная карточка просроченных по клиенту (п.11),
   полный список позиций автозадачи в окне (п.6) */
.kcard .kclient { font-weight: 700; font-size: 13px; color: #1d2026; margin-bottom: 3px; word-break: break-word; }
.kgroupcard { border-left: 4px solid #ff5d5d; }
.kgroupcard .small { color: #5d6370; margin-bottom: 4px; }
.kgroupcard .krow {
  display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid #e3e5ea; background: transparent;
  padding: 6px 2px; color: #1d2026; cursor: pointer;
}
.kgroupcard .krow:hover { background: #f1f3f7; }
.kgroupcard .krow.ai { border-left: 3px solid var(--violet); padding-left: 6px; }
.kgroupcard .krow .tt { display: block; font-weight: 600; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.kgroupcard .krow .meta { display: block; font-size: 11px; color: #5d6370; }
.t-items { margin: 4px 0 8px; font-size: 13px; }
.t-items summary { cursor: pointer; color: var(--accent, #2fc6f6); }
.t-items ol { max-height: 220px; overflow-y: auto; margin: 6px 0 0; padding-left: 22px; }
.db-due { font: inherit; font-size: 12px; padding: 1px 3px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: inherit; width: 8.2em; }
.db-due:hover, .db-due:focus { border-color: var(--line); background: var(--surface); }
.db-due.crm { background: rgba(255, 196, 0, .25); border-color: rgba(255, 196, 0, .6); }

/* Номенклатура (11.11.2026): дерево групп, товары, окно товара с данными сайтов поставщиков */
.nk-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.nk-bar #nk-q { flex: 1 1 320px; }
.nk-only { width: auto; }
.nk-status { padding: 10px 14px; margin: 10px 0; }
.nk-st-row { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.nk-st-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.nk-run { color: var(--accent, #2fc6f6); margin-top: 4px; }
.nk-layout { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 12px; align-items: start; }
.nk-tree { padding: 8px 4px; max-height: 72vh; overflow: auto; }
.nk-main { padding: 8px 10px; min-width: 0; }
.nk-wrap { max-height: 66vh; overflow: auto; }
.nk-node { display: flex; align-items: center; gap: 2px; border-radius: 6px; }
.nk-node.on { background: var(--surface-hover); }
.nk-tog { background: none; border: 0; color: var(--muted); cursor: pointer; width: 18px; padding: 2px 0; font: inherit; }
.nk-gname { background: none; border: 0; color: inherit; cursor: pointer; text-align: left; padding: 4px 4px; font: inherit; flex: 1; }
.nk-gname:hover { color: var(--accent, #2fc6f6); }
.nk-item { cursor: pointer; }
.nk-modal { width: min(1100px, 96vw); }
.nk-1c { display: flex; gap: 8px 22px; flex-wrap: wrap; padding: 6px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.nk-none { padding: 12px 14px; margin-top: 8px; }
.nk-site-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 8px; }
.nk-newbar { background: rgba(47, 198, 246, .14); border: 1px solid rgba(47, 198, 246, .4); border-radius: 8px; padding: 8px 12px; margin: 6px 0 10px; }
.nk-sec { margin: 10px 0; }
.nk-photos { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.nk-photo { position: relative; display: block; width: 150px; height: 150px; border-radius: 8px; overflow: hidden; background: #fff; border: 2px solid var(--line); }
.nk-photo.new { border-color: #2fc6f6; }
.nk-photo img { width: 100%; height: 100%; object-fit: contain; }
.nk-photo .oi-badge { position: absolute; left: 6px; top: 6px; margin: 0; }
.nk-text { line-height: 1.45; margin-top: 4px; }
.nk-text.new, .nk-har tr.new td { background: rgba(47, 198, 246, .1); }
.nk-har td:first-child { color: var(--muted); width: 40%; }
.nk-doc { display: inline-flex; align-items: center; gap: 6px; margin: 4px 6px 0 0; text-decoration: none; }
.nk-sites { width: min(760px, 96vw); }
.nk-site { padding: 10px 14px; margin: 8px 0; }
.nk-site-on { cursor: pointer; }
.nk-site .lbl { display: block; margin-top: 6px; }
@media (max-width: 800px) { .nk-layout { grid-template-columns: 1fr; } .nk-tree { max-height: 34vh; } }
/* окно товара: большие закладки "Данные 1С" / "Данные сайта", закладки карточки 1С (11.11.2026) */
.nk-bigtabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 12px; }
.nk-bigtab { padding: 10px 22px; font-size: 15px; font-weight: 600; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 10px 10px 0 0; background: transparent; color: var(--muted); cursor: pointer; margin-bottom: -2px; }
.nk-bigtab.on { background: var(--surface); color: var(--text); border-color: var(--blue); border-bottom: 2px solid var(--surface); }
.nk-c1-head { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.nk-c1-img { display: flex; align-items: center; justify-content: center; width: 220px; height: 220px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); overflow: hidden; }
.nk-c1-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.nk-c1-noimg { background: var(--surface); color: var(--muted); font-size: 12px; }
.nk-pairs td:first-child { color: var(--muted); width: 42%; }
.nk-c1-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; }
.nk-subtabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 10px; }
.nk-subtab { padding: 6px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.nk-subtab.on { color: var(--text); border-bottom-color: var(--blue); }
.nk-t1c td, .nk-t1c th { white-space: nowrap; }
@media (max-width: 640px) { .nk-c1-head { grid-template-columns: 1fr; } .nk-c1-img { width: 100%; } .nk-bigtab { padding: 8px 12px; font-size: 14px; } }
/* ТЗ 11.11.2026 п.17: "ВСЕ ЗАДАЧИ" холдинга - окно на половину экрана справа с месячным календарем */
.an-alltasks { font-size: 11px; font-weight: 700; letter-spacing: .03em; margin-top: 2px; }
.modal.side { justify-content: flex-end; padding: 0; }
.modal.side .side-body { max-width: none; width: 50vw; min-width: 340px; min-height: 100vh; border-radius: 0; overflow-y: auto; }
@media (max-width: 760px) { .modal.side .side-body { width: 100vw; min-width: 0; } }
.cal.mini .day { min-height: 74px; cursor: default; }
.cal.mini .chip { font-size: 10px; }
.at-legend { margin: 4px 0 8px; display: flex; gap: 6px; align-items: center; }
.at-legend .chip { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 5px; background: #2fc6f6; color: #04243a; }
.at-legend .chip.overdue { background: #ff5d5d; color: #fff; }
.at-legend .chip.done { background: #6b6f7a; color: #e6e8ec; }
#task, #tday { z-index: 40; }
#oilm .modal-body { width: min(1200px, calc(100vw - 16px)); max-width: calc(100vw - 16px); min-width: 0; box-sizing: border-box; }
#oilm .oilm-kpi { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
#oilm .table-wrap { overflow-x: auto; max-width: 100%; }
#oilm .oilm-filter > * { min-width: 0; }
/* колонки списка и расшифровка резерва (11.11.2026) */
.nk-res { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.nk-res:hover { color: var(--accent, #2fc6f6); }
.nk-cols { width: min(640px, 96vw); }
.nk-col-list { max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 0; }
.nk-col-row { display: flex; align-items: center; gap: 8px; padding: 3px 10px; }
.nk-col-row label { flex: 1; cursor: pointer; }
.nk-col-row .nk-col-mv { background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); cursor: pointer; padding: 0 7px; font: inherit; }
.nk-col-kind { padding: 8px 10px 2px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.nk-col-find { margin-bottom: 8px; }
.nk-tbl td.nk-c1v { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* печатные формы заказа (12.11.2026) */
.pf-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; margin: 6px 0 10px; }
.pf-row { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.pf-row.off { opacity: .6; }
.pf-q { margin-left: 24px; }
.pf-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-actions .btn-green { margin-left: auto; }
.pf-res { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.pf-file { display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding: 4px 0; }
.pf-file a { display: inline-flex; align-items: center; gap: 6px; }
/* карточка реализации (12.11.2026) */
.tag.amber { background: rgba(255, 184, 0, .36); }
.rc-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.rc-state { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; }
.rc-f > div { overflow-wrap: anywhere; }
.rc-tbl td, .rc-tbl th { font-size: 13px; }
.rc-tbl td:nth-child(2) { min-width: 220px; }

/* реализации: вкладка "За период" (12.11.2026) */
.rz-period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.rz-period .inp { width: auto; padding: 6px 10px; }
.rz-total td { border-top: 1px solid var(--line); }
/* карточка реализации - как окно заказа (12.11.2026) */
.order-modal #rc-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rc-stale { font-size: 11px; color: var(--muted); }

/* логотип SkyPrint (brand/make_logo.py) */
.login-logo img { display: block; width: 168px; max-width: 60%; height: auto; margin: 0 auto 4px; }
.login-logo { justify-content: center; }
.side-brand { justify-content: center; }
.side-logo { display: block; width: 132px; max-width: 100%; height: auto; flex: 0 0 auto; }
.side-brand .side-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
