/* infoLogia One — дизайн жүйесі.
   Бренд түсі логотиптен: #34409D. Ескі айнымалы атаулары (--accent, --surface-2, --green-soft…)
   модуль шаблондарында қолданылады, сондықтан олар жаңа токендерге сілтеме ретінде сақталды. */
:root {
  --brand: #34409D; --brand-700: #2B3584; --brand-900: #1E2563; --brand-300: #A9B0E3; --brand-100: #E8EAF7; --brand-50: #F3F4FB;
  --bg: #FFFFFF; --canvas: #F7F8FA; --surface: #FFFFFF; --surface-2: #F3F4F7; --hover: #EEF0F4;
  --border: #E6E8EE; --border-strong: #D5D8E1;
  --text: #13162B; --text-2: #4A5068; --muted: #737990;
  --green: #17845A; --green-soft: #E6F4EE; --red: #CC3A3A; --red-soft: #FBEBEB;
  --amber: #A8620A; --amber-soft: #FBF1E2; --blue: #2C74C9; --blue-soft: #E7F0FB; --violet: #6B4FC8; --violet-soft: #EFEBFA;
  --accent: var(--brand); --accent-soft: var(--brand-100); --accent-text: var(--brand);
  --shadow: 0 1px 2px rgba(19, 22, 43, .06); --shadow-pop: 0 8px 24px rgba(19, 22, 43, .10), 0 1px 3px rgba(19, 22, 43, .08);
  --radius: 12px; --r: 8px; --sidebar: 240px;
  color-scheme: light;
}
/* Қараңғы тема: жүйе баптауы бойынша, немесе қолмен (html[data-theme]) */
:root[data-theme="dark"] {
  --brand: #8590F2; --brand-700: #9CA5F5; --brand-900: #C9CEFA; --brand-300: #4B55A8; --brand-100: #232A55; --brand-50: #1A1F40;
  --bg: #0E1019; --canvas: #0B0C14; --surface: #141724; --surface-2: #1B1F2F; --hover: #21263A;
  --border: #252A3C; --border-strong: #31374D;
  --text: #ECEEF6; --text-2: #B4B9CC; --muted: #8B91A7;
  --green: #4CC594; --green-soft: #12301F; --red: #F07B7B; --red-soft: #3A1A1D;
  --amber: #E9AE4F; --amber-soft: #33260F; --blue: #6FA8F0; --blue-soft: #142740; --violet: #A994F2; --violet-soft: #251E42;
  --shadow: none; --shadow-pop: 0 8px 24px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #8590F2; --brand-700: #9CA5F5; --brand-900: #C9CEFA; --brand-300: #4B55A8; --brand-100: #232A55; --brand-50: #1A1F40;
    --bg: #0E1019; --canvas: #0B0C14; --surface: #141724; --surface-2: #1B1F2F; --hover: #21263A;
    --border: #252A3C; --border-strong: #31374D;
    --text: #ECEEF6; --text-2: #B4B9CC; --muted: #8B91A7;
    --green: #4CC594; --green-soft: #12301F; --red: #F07B7B; --red-soft: #3A1A1D;
    --amber: #E9AE4F; --amber-soft: #33260F; --blue: #6FA8F0; --blue-soft: #142740; --violet: #A994F2; --violet-soft: #251E42;
    --shadow: none; --shadow-pop: 0 8px 24px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-feature-settings: "cv11"; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 650; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; letter-spacing: -.005em; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ico.lg { width: 18px; height: 18px; }
.ico.sm { width: 13px; height: 13px; vertical-align: -2px; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex-shrink: 0; background: var(--canvas); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; font-weight: 650; font-size: 14px; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: block; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.nav { padding: 4px 8px 12px; flex: 1; overflow-y: auto; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 4px; }
.nav-label { font-size: 12px; color: var(--muted); padding: 4px 8px; font-weight: 550; }
.nav a { display: flex; align-items: center; gap: 10px; height: 31px; padding: 0 8px; border-radius: 6px; color: var(--text-2); font-weight: 500; font-size: 13.5px; }
.nav a .ico { color: var(--muted); }
.nav a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow), inset 0 0 0 1px var(--border); }
.nav a.active .ico { color: var(--brand); }
.nav .count { margin-left: auto; background: var(--brand); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 600; }
.sidebar-user { border-top: 1px solid var(--border); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.sidebar-user .who { flex: 1; min-width: 0; line-height: 1.3; }
.sidebar-user .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 600; }
.sidebar-user .who a { color: inherit; }
.sidebar-user form { margin: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.header { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 28px; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.header .crumb { font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header .crumb span { color: var(--muted); font-weight: 500; }
.header .spacer { flex: 1; }
.header .nav-btn { display: none; }
.header .brand-logo { display: none; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: var(--r); color: var(--text-2); position: relative; border: 0; background: none; cursor: pointer; padding: 0; font: inherit; }
.icon-btn:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 8px; height: 8px; border-radius: 4px; background: var(--red); box-shadow: 0 0 0 2px var(--bg); }
.content { padding: 28px 28px 56px; width: 100%; max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.topbar, .tabbar { display: none; }

/* Components */
.card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head > a.small { color: var(--muted); font-weight: 500; }
.card-head > a.small:hover { color: var(--text); }
/* Панель: тақырыбы сызықпен бөлінген, ішіндегі тізім жиекке дейін */
.panel { padding: 0; overflow: hidden; }
.panel .card-head { padding: 13px 16px; margin: 0; border-bottom: 1px solid var(--border); }
.panel .list li { padding: 10px 16px; }
.panel .list li:hover { background: var(--canvas); }
.panel .empty { padding: 22px 16px; }
.panel > .table-wrap .table th:first-child, .panel > .table-wrap .table td:first-child { padding-left: 16px; }
.panel > .table-wrap .table th:last-child, .panel > .table-wrap .table td:last-child { padding-right: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.stack > * + * { margin-top: 16px; }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: block; color: inherit; }
a.stat:hover { text-decoration: none; border-color: var(--border-strong); }
.stat .label { color: var(--text-2); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .label .ico { color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .value small, .stat .value .muted { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat .hint { font-size: 12.5px; color: var(--muted); }
.stat.danger .value { color: var(--red); }
.stat.ok .value { color: var(--green); }
/* KPI жолы: бір панель, ішінде бөлінген ұяшықтар */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.kpis .stat { border: 0; border-radius: 0; box-shadow: none; }
.kpis .stat + .stat { border-left: 1px solid var(--border); }
.kpis a.stat:hover { background: var(--canvas); }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 13px; border-radius: var(--r); font: inherit; font-weight: 550; cursor: pointer; font-size: 13px; white-space: nowrap; box-shadow: var(--shadow); line-height: 1; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(30, 37, 99, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
:root[data-theme="dark"] .btn.primary { color: #0E1019; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0E1019; } }
.btn.danger { color: var(--red); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn:disabled { opacity: .55; cursor: default; }
.btn kbd { font: 500 11px/1 "Inter", sans-serif; opacity: .65; margin-left: 2px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 550; background: var(--surface-2); color: var(--text-2); white-space: nowrap; line-height: 1; vertical-align: middle; }
.badge.new { background: var(--blue-soft); color: var(--blue); }
.badge.in_progress { background: var(--amber-soft); color: var(--amber); }
.badge.review { background: var(--brand-100); color: var(--brand); }
.badge.done, .badge.approved { background: var(--green-soft); color: var(--green); }
.badge.returned, .badge.overdue, .badge.missing, .badge.urgent { background: var(--red-soft); color: var(--red); }
.badge.high { background: var(--amber-soft); color: var(--amber); }
.badge.low { background: var(--surface-2); color: var(--muted); }
.badge.normal { display: none; }
.badge.submitted { background: var(--blue-soft); color: var(--blue); }
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Задача мәртебесі мен басымдығы */
.st { width: 14px; height: 14px; flex-shrink: 0; vertical-align: -2px; }
.prio { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; flex-shrink: 0; }
.prio i { width: 3px; border-radius: 1px; background: var(--border-strong); }
.prio i:nth-child(1) { height: 5px; } .prio i:nth-child(2) { height: 8px; } .prio i:nth-child(3) { height: 12px; }
.prio.low i:nth-child(1) { background: var(--text-2); }
.prio.normal i:nth-child(-n+2) { background: var(--text-2); }
.prio.high i { background: var(--amber); }
.prio-urgent { width: 14px; height: 14px; border-radius: 3px; background: var(--red); color: #fff; font: 700 10px/14px "Inter", sans-serif; text-align: center; flex-shrink: 0; }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 11.5px; flex-shrink: 0; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .meta { min-width: 0; }
.person .meta b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .meta span { color: var(--muted); font-size: 12.5px; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 550; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover td { background: var(--canvas); }
.table tr:last-child td { border-bottom: 0; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table th.sortable::after { content: "↕"; margin-left: 4px; opacity: .35; font-size: 11px; }
.table th.sortable[data-dir="asc"]::after { content: "↑"; opacity: 1; color: var(--brand); }
.table th.sortable[data-dir="desc"]::after { content: "↓"; opacity: 1; color: var(--brand); }
.table th.sortable[data-dir] { color: var(--text); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 650; border-top: 1px solid var(--border-strong); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 550; color: var(--text); }
.list .title:hover { color: var(--brand); text-decoration: none; }
.tline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tline .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* Forms */
.form { max-width: 720px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 550; margin-bottom: 6px; font-size: 13px; }
.field .help { color: var(--muted); font-size: 12px; margin-top: 4px; }
.field .error, .errorlist { color: var(--red); font-size: 12.5px; margin: 4px 0 0; padding: 0; list-style: none; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=search], input[type=url], input[type=tel], select, textarea {
  width: 100%; min-height: 36px; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); }
.field.checkbox label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input, .filters select { width: auto; min-width: 160px; min-height: 32px; padding: 5px 10px; font-size: 13px; }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: var(--r); padding: 2px; gap: 2px; }
.tabs a { height: 28px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; color: var(--text-2); font-weight: 550; font-size: 13px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow), 0 0 0 1px var(--border); }

.messages { margin-bottom: 16px; }
.msg { padding: 10px 14px; border-radius: 10px; background: var(--green-soft); color: var(--green); font-weight: 500; margin-bottom: 8px; }
.msg.error { background: var(--red-soft); color: var(--red); }
.msg.info { background: var(--blue-soft); color: var(--blue); }
.msg.warning { background: var(--amber-soft); color: var(--amber); }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.column { background: var(--canvas); border-radius: var(--radius); padding: 6px; min-height: 320px; }
.column.drop { outline: 2px dashed var(--brand); outline-offset: -2px; }
.column-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 10px; font-weight: 600; font-size: 13.5px; }
.column-head [data-count] { color: var(--muted); font-weight: 500; }
.column-head .spacer { flex: 1; }
.column-head .icon-btn { width: 24px; height: 24px; color: var(--muted); }
.cards { min-height: 40px; }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; cursor: grab; box-shadow: var(--shadow); }
.tcard:hover { border-color: var(--border-strong); }
.tcard:active { cursor: grabbing; }
.tcard.dragging { opacity: .5; }
.tcard a.t { color: var(--text); font-weight: 550; display: block; margin-bottom: 10px; line-height: 1.38; }
.tcard a.t:hover { color: var(--brand); text-decoration: none; }
.tcard .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tcard .row .spacer { flex: 1; }
.tcard .row .badge { height: 20px; font-size: 11.5px; padding: 0 6px; }
.tcard.overdue { box-shadow: var(--shadow), inset 2px 0 0 var(--red); }
.due { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.due.late { color: var(--red); font-weight: 600; }

/* Org */
.dep-block { border-left: 3px solid var(--brand); }
.dep-children { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 14px; }
.sub-dep { background: var(--canvas); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.people { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.people a:hover { text-decoration: none; }
.people a:hover b { color: var(--brand); }
.dep-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

/* Services */
.service { display: flex; gap: 14px; align-items: flex-start; color: var(--text); }
.service:hover { text-decoration: none; border-color: var(--border-strong); }
/* Күй нүктесі (WA шлюзі т.б.) */
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 8px; vertical-align: 1px; }
.sdot.green { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.sdot.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.sdot.amber { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.service .ico-box { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0; background: var(--brand-50); color: var(--brand); }
.service b { display: block; font-size: 14.5px; }
.service .url { color: var(--brand); font-size: 12.5px; }

/* Comments */
.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment .body { flex: 1; min-width: 0; white-space: pre-wrap; word-wrap: break-word; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.desc { white-space: pre-wrap; }

/* Кіру беттері: сол жақта бренд, оң жақта форма */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art { background: #34409D; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-art .wm { width: 120px; height: auto; display: block; position: relative; }
.auth-art h2 { font-size: 40px; line-height: 1.12; letter-spacing: -.025em; font-weight: 650; margin: auto 0 18px; max-width: 460px; position: relative; }
.auth-art p { margin: 0; color: rgba(255, 255, 255, .74); font-size: 15px; max-width: 420px; position: relative; }
.auth-art .foot { margin-top: 40px; font-size: 12.5px; color: rgba(255, 255, 255, .55); position: relative; }
.auth-art .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); }
.auth-form { display: grid; place-items: center; padding: 40px 20px; }
.auth-box { width: 100%; max-width: 360px; }
.auth-box > .brand-logo { width: 44px; height: 44px; }
.auth-box h1 { font-size: 24px; margin: 20px 0 4px; }
.auth-box .lead { color: var(--muted); margin: 0 0 24px; }
.auth-box .field input { min-height: 42px; font-size: 15px; }
.auth-box .btn.block, .btn.block { width: 100%; height: 42px; justify-content: center; font-size: 14px; }
.auth-box .card { padding: 0; border: 0; box-shadow: none; background: none; }
.auth-box .card + .card { margin-top: 0; }
.label-row { display: flex !important; justify-content: space-between; align-items: baseline; }
.label-row a { font-weight: 500; }
.otp-input { letter-spacing: .5em; font-size: 22px !important; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.ok-line { color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.auth-box > .messages .msg + .msg { margin-top: 8px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 22px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.notif { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.notif:hover { text-decoration: none; }
.notif.unread b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: middle; }

/* Responsive */
@media (max-width: 1100px) { .g4, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis .stat:nth-child(3) { border-left: 0; } .kpis .stat:nth-child(n+3) { border-top: 1px solid var(--border); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); background: var(--canvas); }
  .layout { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-pop); width: 280px; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; }
  .backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 50; }
  .header { padding: 0 12px 0 16px; background: var(--canvas); border-bottom: 0; height: 56px; }
  .header .brand-logo { display: block; width: 30px; height: 30px; margin-right: 4px; }
  .header .crumb { font-size: 17px; font-weight: 650; }
  .header .crumb span { display: none; }
  .content { padding: 4px 16px 32px; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 22px; }
  .g2, .g3, .g4, .g-main, .form-row { grid-template-columns: minmax(0, 1fr); }
  .stat-row.g4, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(4, minmax(260px, 84vw)); scroll-snap-type: x mandatory; }
  .column { scroll-snap-align: start; }
  .kv { grid-template-columns: 110px 1fr; }
  .filters input, .filters select { min-width: 0; flex: 1 1 140px; }
  .btn { height: 38px; }
  .btn.sm { height: 32px; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], input[type=tel], select, textarea { font-size: 16px; min-height: 42px; }
  /* Төменгі мәзір */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 550 10.5px/1.2 "Inter", sans-serif; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .ico { width: 22px; height: 22px; }
  .tabbar .on { color: var(--brand); }
  .tabbar .fab { width: 44px; height: 44px; border-radius: 14px; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(52, 64, 157, .35); margin-top: -2px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-form { place-items: start center; padding-top: 48px; }
}
.filters input[type=checkbox] { min-width: 0; width: 16px; flex: none; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
/* Баптаулар: жолдар редакторы */
.rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.frow { display: flex; gap: 8px; align-items: flex-start; }
.frow .grow { flex: 1; min-width: 0; }
.field-row { background: var(--surface-2); border-radius: 10px; padding: 10px; }
.frow .move { display: flex; flex-direction: column; }
.frow-sub { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.frow-sub select { width: auto; flex: none; }
.frow-sub input[type=text] { flex: 1 1 180px; width: auto; }
.frow-sub .chk { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.frow.removed { opacity: .45; }
.frow.removed .grow { text-decoration: line-through; }
.frow.removed [data-remove] { color: var(--green); }
ul#id_departments, #id_departments { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
#id_departments label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
input[type=color] { width: 64px; height: 38px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.grid > .card + .card { margin-top: 0; }

/* ---------- WhatsApp топтары ---------- */
.grow { flex: 1; min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.seg a { padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg a + a { border-left: 1px solid var(--border); }
.seg a.on { background: var(--accent-soft); color: var(--accent-text); }
.seg a:hover { text-decoration: none; }
.wa-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.wa-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.wa-row:last-child { border-bottom: 0; }
.wa-bar { display: grid; grid-template-columns: minmax(80px, 1fr) 2fr auto; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.wa-bar i { display: block; height: 8px; border-radius: 4px; background: var(--accent); min-width: 2px; }
.wa-hist { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.wa-hist > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.wa-hist i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 1px; }
.wa-hist span { font-size: 10.5px; color: var(--muted); height: 13px; }
.wa-msg { padding: 14px 0; border-bottom: 1px solid var(--border); }
.wa-msg:last-of-type { border-bottom: 0; }
.wa-msg.deleted { opacity: .55; }
.wa-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; margin-bottom: 6px; }
.wa-text { white-space: normal; overflow-wrap: anywhere; line-height: 1.55; }
.wa-media { display: block; max-width: min(100%, 420px); max-height: 420px; border-radius: 10px; margin: 6px 0; background: var(--surface-2); }
.wa-msg audio { width: min(100%, 360px); margin: 6px 0; }
.wa-poll { margin-top: 6px; max-width: 460px; }
.wa-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.wa-qr-box { text-align: center; padding: 12px 0; }
.wa-qr-box img { width: 260px; height: 260px; margin-top: 12px; border-radius: 10px; background: #fff; padding: 8px; }

/* Telegram каналдар */
.tg-own td { background: var(--accent-soft, var(--surface-2)); }
.tg-text { overflow-wrap: anywhere; }
.filters .badge.on { background: var(--accent); color: #fff; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
label.check input { width: auto; }
.ai-list { margin: 0; padding-left: 18px; line-height: 1.6; }
.ai-list li { margin-bottom: 6px; }
.badge.ai-high { background: var(--red-soft); color: var(--red); }
.badge.ai-medium { background: var(--amber-soft, var(--surface-2)); color: var(--amber, var(--muted)); }
.ai-schedule { display: grid; gap: 4px; margin-top: 12px; padding: 12px; background: var(--surface-2); border-radius: 10px; }
.ai-post { display: flex; flex-direction: column; gap: 10px; }
.ai-text { background: var(--surface-2); border-radius: 10px; padding: 12px; line-height: 1.55; }
.ai-post .btn { align-self: flex-start; }
.badge.wa-st-churn { background: var(--red-soft); color: var(--red); }
.badge.wa-st-dying { background: var(--amber-soft, var(--surface-2)); color: var(--amber, var(--muted)); }
.badge.wa-st-growing { background: var(--green-soft); color: var(--green); }

/* Вебинарлар пульті */
.badge.live-live { background: var(--red-soft); color: var(--red); }
.badge.live-waiting, .badge.live-scheduled { background: var(--blue-soft); color: var(--blue); }
.badge.live-replay { background: var(--green-soft); color: var(--green); }
.live-feed { height: 60vh; min-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; background: var(--surface-2); }
.live-msg { padding: 8px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.live-msg:last-child { border-bottom: 0; }
.live-msg-head { display: flex; align-items: center; gap: 8px; }
.live-msg-btns { margin-left: auto; display: flex; gap: 2px; opacity: .35; }
.live-msg:hover .live-msg-btns { opacity: 1; }
.live-msg-btns button { border: 0; background: transparent; cursor: pointer; padding: 3px 5px; border-radius: 6px; font-size: 13px; color: var(--muted); display: grid; place-items: center; }
.live-msg-btns button.on { color: var(--brand); }
.live-msg-btns button:hover { background: var(--surface); }
.live-msg.staff b { color: var(--accent-text); }
.live-msg.hidden { opacity: .4; text-decoration: line-through; }
.live-msg.pending { background: var(--amber-soft); margin: 0 -12px; padding: 8px 12px; }
.live-msg.pinned { background: var(--accent-soft); margin: 0 -12px; padding: 8px 12px; }
.live-say { display: flex; gap: 8px; margin-top: 10px; }
.list li.live-offer-row { flex-wrap: wrap; justify-content: flex-start; }
.live-offer-row .grow { flex-basis: 100%; }
.live-extra { margin-bottom: 16px; }
.live-extra-form { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.live-extra-form label { display: grid; gap: 2px; }
.live-extra-ctrl { display: flex; gap: 6px; align-items: center; }
.live-extra-ctrl input { width: 110px; text-align: center; font-weight: 700; font-size: 16px; }
.live-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; font-size: 13.5px; }
.live-links .kv { grid-template-columns: 1fr; gap: 2px; }
.live-links .kv dd { min-width: 0; overflow-wrap: anywhere; margin-bottom: 8px; }
.live-links code { overflow-wrap: anywhere; }
.live-msg.filtered { background: var(--red-soft); margin: 0 -12px; padding: 8px 12px; opacity: .75; }
select.lead-status { width: auto; padding: 5px 8px; font-weight: 600; font-size: 13px; }
select.lead-status.s-new { background: var(--blue-soft); color: var(--blue); }
select.lead-status.s-contacted { background: var(--amber-soft); color: var(--amber); }
select.lead-status.s-sold { background: var(--green-soft); color: var(--green); }
select.lead-status.s-refused { background: var(--surface-2); color: var(--muted); }

/* Вебинар отчеты */
.live-note { background: var(--amber-soft); color: var(--amber); border-color: transparent; font-weight: 500; }
.live-stats { margin-bottom: 16px; }
.live-stats .value small { font-size: 14px; font-weight: 600; color: var(--muted); }
.live-chart-wrap { overflow-x: auto; }
.live-chart { width: 100%; min-width: 480px; height: auto; display: block; }
.live-chart .grid { stroke: var(--border); stroke-width: 1; }
.live-chart .ylab, .live-chart .xlab { fill: var(--muted); font-size: 11px; }
.live-chart .ylab { text-anchor: end; }
.live-chart .xlab { text-anchor: middle; }
.live-chart .mark { stroke: var(--muted); stroke-dasharray: 3 3; opacity: .6; }
.live-chart .offer { stroke: var(--amber); stroke-width: 2; }
.live-chart .area { fill: var(--accent); opacity: .12; }
.live-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.live-chart .dot { fill: transparent; }
.live-chart .dot:hover { fill: var(--accent); }
.live-legend.offer { display: inline-block; width: 12px; height: 2px; background: var(--amber); vertical-align: middle; }
.live-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.live-filter input { width: 180px; }
.live-filter select { width: auto; }
.nowrap { white-space: nowrap; }
.live-transcript { max-height: 70vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px; background: var(--surface-2); }
.live-tr { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.live-tr:last-child { border-bottom: 0; }
.live-tr .t { flex: 0 0 74px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.live-tr .b { min-width: 0; }
.live-tr.staff b { color: var(--accent-text); }
.live-tr.off { opacity: .55; }
@media (max-width: 860px) {
  .card-head:has(.live-filter) { flex-wrap: wrap; }
  .live-filter, .live-filter input { width: 100%; }
  .live-filter input { flex: 1; }
}

/* Автовебинар: сценарий, сеанстар */
.live-msg.scripted { opacity: .7; }
.live-msg.scripted b::after { content: " ⚙"; font-weight: 400; color: var(--muted); }
.live-script { width: 100%; border-collapse: collapse; }
.live-script td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.live-script td.t { width: 72px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.live-script td.n { width: 160px; font-weight: 600; }
.live-script td.x { width: 34px; text-align: right; }
.live-script tr.staff td.n { color: var(--accent-text); }
.live-script tr.offer td { background: var(--green-soft); }
.live-script-wrap { max-height: 65vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.live-script-add { display: grid; grid-template-columns: 90px 160px 1fr auto auto; gap: 8px; align-items: end; }
.live-script-add .field { margin: 0; }
.live-bulk textarea { width: 100%; min-height: 360px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
@media (max-width: 720px) { .live-script-add { grid-template-columns: 1fr 1fr; } .live-script td.n { width: 110px; } }
.live-script td.x { width: 76px; }
.live-script-btns { display: inline-flex; gap: 2px; }
.live-script tr.editing td { background: var(--accent-soft); }
.live-script tr.editing .live-script-add { grid-template-columns: 80px 150px 1fr; }
.live-script tr.editing .live-switch { grid-column: 1 / 3; }
.live-script tr.editing .actions { justify-self: end; }
@media (max-width: 720px) { .live-script tr.editing .live-script-add { grid-template-columns: 1fr 1fr; } .live-script tr.editing .field:nth-of-type(3) { grid-column: 1 / -1; } }

/* Шарттар (dogovor) */
.badge.dg-sent { background: var(--blue-soft); color: var(--blue); }
.badge.dg-opened { background: var(--amber-soft); color: var(--amber); }
.badge.dg-issue, .badge.dg-expired { background: var(--red-soft); color: var(--red); }
.badge.dg-signed { background: var(--green-soft); color: var(--green); }
.badge.dg-cancelled { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.dg-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.dg-checks.col { flex-direction: column; flex-wrap: nowrap; }
.dg-checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
.dg-scroll { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 9px; padding: 10px; }
.dg-copy { display: flex; gap: 8px; }
.dg-copy input { flex: 1; min-width: 0; }
h1 .badge { vertical-align: middle; font-size: 12.5px; }

/* Тема ауыстырғыш: жарықта ай, қараңғыда күн белгісі */
.ico.theme-light { display: none; }
:root[data-theme="dark"] .ico.theme-dark { display: none; }
:root[data-theme="dark"] .ico.theme-light { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico.theme-dark { display: none; }
  :root:not([data-theme="light"]) .ico.theme-light { display: inline; }
}

/* Басты бет: «Сіздің бүгінгі күніңіз» */
.focus { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--brand-100); background: var(--brand-50); border-radius: var(--radius); margin-bottom: 16px; flex-wrap: wrap; }
.focus-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.focus b { display: block; font-weight: 600; }
.focus .grow span { color: var(--text-2); font-size: 13px; }
@media (max-width: 860px) { .focus .btn { width: 100%; justify-content: center; } }

/* Сүзгі чиптері мен іздеу өрісі */
.filters .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: var(--r); border: 1px dashed var(--border-strong); color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip.on { border-style: solid; background: var(--brand-50); border-color: var(--brand-100); color: var(--brand); }
.search { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--muted); min-width: 220px; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.filters .search input { border: 0; box-shadow: none; padding: 0; min-height: 0; min-width: 0; flex: 1; background: none; }
@media (max-width: 860px) { .search { flex: 1 1 100%; min-width: 0; height: 40px; } .filters .spacer { display: none; } }

/* Шарт формасы: үлгі + «Үлгіні ашу», комбинацияға сай емес пән */
.dg-tpl { display: flex; gap: 8px; align-items: stretch; }
.dg-tpl select { flex: 1; min-width: 0; }
.dg-tpl .btn { white-space: nowrap; gap: 6px; }
.dg-checks label.off { opacity: .4; cursor: not-allowed; }

/* Вебинар формасы: бөлімдер */
.lw-form { max-width: 760px; }
.lw-sec { margin-bottom: 14px; }
.lw-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0 0 14px; }
.lw-sec h3 { font-size: 14px; margin: 4px 0 10px; }
.lw-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-size: 12.5px; font-weight: 700; flex: none; }
.lw-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lw-kind { position: relative; display: grid; gap: 6px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); }
.lw-kind input { position: absolute; opacity: 0; pointer-events: none; }
.lw-kind b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.lw-kind span { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.lw-kind.on { border-color: var(--brand); background: var(--brand-50); }
.lw-kind.on b { color: var(--brand); }
.lw-url { margin: -6px 0 14px; overflow-wrap: anywhere; }
.lw-url b { color: var(--text); font-weight: 600; }
.lw-sub { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.lw-days { display: flex; flex-wrap: wrap; gap: 6px; }
.lw-days .chip { position: relative; }
.lw-virt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.lw-how, .lw-more { margin-top: 6px; font-size: 13px; }
.lw-how summary, .lw-more summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.lw-how ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.6; color: var(--text-2); }
.lw-more .form-row { margin-top: 10px; }
.lw-publish { border-width: 1.5px; }
.lw-publish .field { margin: 0; }
.lw-publish label { font-size: 15px !important; font-weight: 650 !important; }
.lw-publish:not(.on) { border-color: var(--amber); background: var(--amber-soft); }
.lw-publish.on { border-color: var(--green); background: var(--green-soft); }
.lw-actions { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--canvas) 35%); }
@media (max-width: 720px) { .lw-kinds { grid-template-columns: 1fr; } .lw-virt { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Вебинар формасы: мұқаба және видео тексеру */
.lw-cover { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.lw-cover-prev { width: 224px; aspect-ratio: 16/9; border-radius: var(--r); border: 1px dashed var(--border-strong); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; position: relative; color: var(--muted); font-size: 13px; }
.lw-cover-prev span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lw-cover-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lw-cover-prev img + span { display: none; }
.lw-cover-act { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1; min-width: 200px; }
.lw-cover-act input[type=file] { display: none; }
.lw-cover-act .btn { cursor: pointer; }
.lw-gal-title { margin: 14px 0 8px; font-size: 13px; color: var(--text-2); }
.lw-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.lw-gal button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; cursor: pointer; background: var(--surface-2); }
.lw-gal button:hover { border-color: var(--brand-100); }
.lw-gal button.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.lw-gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lw-check { display: flex; gap: 12px; align-items: center; margin: -4px 0 12px; padding: 10px 12px; border-radius: var(--r); font-size: 13px; }
.lw-check img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; flex: none; }
.lw-check div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lw-check span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-check.wait { background: var(--surface-2); color: var(--muted); }
.lw-check.ok { background: var(--green-soft); color: var(--green); }
.lw-check.bad { background: var(--red-soft); color: var(--red); }
.lw-form input.ok { border-color: var(--green); }
.lw-form input.bad { border-color: var(--red); }

/* Эфир пульті: сауалнама */
.list li.live-poll-row { display: block; }
.live-poll-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.live-poll-head .grow { flex: 1 0 100%; margin-bottom: 4px; }
.live-poll-head .title { font-weight: 600; }
.live-poll-head form { margin: 0; }
.live-poll-bars { display: grid; gap: 6px; margin-top: 10px; }
.live-poll-row:not(.on) .live-poll-bars { opacity: .7; }
.live-poll-bar { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; overflow: hidden; }
.live-poll-bar span { position: relative; z-index: 1; }
.live-poll-bar .n { color: var(--text-2); white-space: nowrap; }
.live-poll-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand-100); transition: width .4s; }
.badge.poll-open { background: var(--green-soft); color: var(--green); }
.badge.poll-results { background: var(--brand-50); color: var(--brand); }

/* Вебинар отчеті: воронка, шығып кету графигі, отыру уақыты */
.rp-grid { margin-bottom: 16px; }
.rp-grid > .card { margin-bottom: 0; }
.rp-funnel { display: grid; gap: 12px; }
.rp-step-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.rp-step-head b { font-size: 16px; }
.rp-step-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.rp-step-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; min-width: 2px; }
.rp-step:last-child .rp-step-bar i { background: var(--green); }
.rp-step .muted { margin-top: 3px; }
.rp-insight { background: var(--amber-soft); color: var(--text); padding: 10px 12px; border-radius: var(--r); font-size: 13.5px; margin: 0 0 12px; }
.rp-leave { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 18px; }
.rp-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.rp-col i { display: block; width: 100%; background: var(--brand-300); border-radius: 5px 5px 0 0; min-height: 2px; }
.rp-col.top i { background: var(--amber); }
.rp-col-n { font-size: 11px; color: var(--text-2); margin-bottom: 2px; }
.rp-col-x { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.rp-sub { font-size: 15px; margin: 18px 0 10px; }
.rp-watch { display: grid; gap: 8px; }
.rp-watch-row { display: grid; grid-template-columns: 120px 1fr 36px 36px; gap: 10px; align-items: center; font-size: 13px; }
.rp-watch-row b { text-align: right; }
.rp-poll { display: grid; gap: 6px; align-content: start; }
@media (max-width: 760px) { .rp-watch-row { grid-template-columns: 96px 1fr 30px 34px; } }

/* Шарттар статистикасы (/dogovor/stats/) */
.dg-st-filters { align-items: center; }
.dg-st-grid .card h2, .dg-st-grid + .card h2 { margin-top: 0; }
.dg-funnel { display: grid; gap: 12px; margin-top: 8px; }
.dg-funnel-row { display: grid; grid-template-columns: 96px 1fr 44px 44px; align-items: center; gap: 10px; font-size: 13.5px; }
.dg-funnel-row span { color: var(--text-2); }
.dg-funnel-bar { height: 22px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.dg-funnel-bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; min-width: 2px; }
.dg-funnel-row:last-child .dg-funnel-bar i { background: var(--green); }
.dg-funnel-row b { text-align: right; font-variant-numeric: tabular-nums; }
.dg-funnel-row em { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.dg-chart { display: flex; align-items: stretch; gap: 3px; height: 160px; margin-top: 8px; overflow-x: auto; }
.dg-col { flex: 1 0 14px; display: flex; flex-direction: column; min-width: 14px; }
.dg-col-bars { flex: 1; display: flex; align-items: flex-end; gap: 1px; border-bottom: 1px solid var(--border); }
.dg-col-bars i { flex: 1; border-radius: 3px 3px 0 0; min-height: 0; }
.dg-col-bars i.s, .dg-legend i.s { background: var(--brand-100); }
.dg-col-bars i.ok, .dg-legend i.ok { background: var(--green); }
.dg-col span { font-size: 10px; color: var(--muted); text-align: center; margin-top: 4px; white-space: nowrap; overflow: hidden; }
.dg-chart:has(.dg-col:nth-child(15)) .dg-col span { visibility: hidden; }
.dg-chart:has(.dg-col:nth-child(15)) .dg-col:nth-child(5n+1) span { visibility: visible; overflow: visible; }
.dg-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.dg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dg-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dg-mini { display: flex; align-items: center; gap: 8px; }
.dg-mini .progress { flex: 1; margin: 0; }
.dg-mini b { font-size: 12.5px; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
