/* LTT Hub. Палитра сайта ltt.kz: тёмно-синий фон, фирменный синий #10557A, жёлтый акцент #FED14A. */
:root {
  --navy: #06182A; --navy-2: #0B3850; --blue: #10557A; --blue-d: #0C4361; --yellow: #FED14A;
  --bg: #F2F5F8; --card: #FFFFFF; --ink: #10222F; --ink-2: #44586A; --muted: #6B7F90; --line: #E3E9EF;
  --good: #1E8A53; --good-bg: #E4F4EA; --warn: #9A6400; --warn-bg: #FFF2CC; --bad: #C2362B; --bad-bg: #FCE7E4; --gray-bg: #EBEFF3;
  --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.45 Roboto, "Segoe UI", system-ui, -apple-system, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0; }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.sr { position: absolute; left: -9999px; }

/* каркас */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--navy) 0%, #082338 55%, var(--navy-2) 100%); color: #C9D6E0; padding: 18px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand:hover { text-decoration: none; }
.brand b { display: block; font-size: 17px; font-style: italic; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.brand i { display: block; font-style: normal; font-size: 11px; color: #8FA6B8; }
.side-h { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #6F889B; padding: 18px 10px 8px; }
.nav { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: #C9D6E0; border-left: 3px solid transparent; margin-bottom: 2px; }
.nav:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.nav b { display: block; font-weight: 600; color: #fff; }
.nav i { display: block; font-style: normal; font-size: 11px; color: #8FA6B8; }
.nav.on { background: rgba(16,85,122,.55); border-left-color: var(--yellow); }
.nav.on .ic { color: var(--yellow); }
.ic { width: 20px; height: 20px; flex: none; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.ava { width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--navy); display: grid; place-items: center; font-weight: 700; flex: none; }
.me-t { min-width: 0; flex: 1; }
.me-t b { display: block; color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-t i { display: block; font-style: normal; font-size: 11px; color: #8FA6B8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.out { background: none; border: 0; color: #8FA6B8; cursor: pointer; padding: 6px; border-radius: 8px; }
.out:hover { color: #fff; background: rgba(255,255,255,.08); }

.main { padding: 22px 28px 40px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.top h1 { font-size: 26px; font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--navy); }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* чипы, вкладки, кнопки */
.chips, .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters { margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.chip:hover { border-color: var(--blue); text-decoration: none; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip b { font-weight: 600; opacity: .8; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 14px; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 500; }
.tab:hover { text-decoration: none; color: var(--blue); }
.tab.on { color: var(--blue); border-bottom-color: var(--yellow); }
.btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); }
.btn.wide { width: 100%; padding: 11px; text-align: center; display: block; }
a.btn:hover { text-decoration: none; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; }
input[type=search] { min-width: 260px; }
input[type=number] { width: 90px; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.lnk { background: none; border: 0; padding: 2px 4px; color: var(--blue); cursor: pointer; }
.lnk:hover { text-decoration: underline; }
.lnk.warn { color: var(--warn); } .lnk.bad { color: var(--bad); }

/* карточки и показатели */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card h2 { font-size: 16px; font-weight: 700; }
.cs { margin: 3px 0 12px; color: var(--muted); font-size: 12.5px; }
.pad { padding: 18px 20px 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.k7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; color: var(--ink); display: block; min-width: 0; border-top: 3px solid var(--blue); }
.kpi .kl { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; font-size: 24px; font-weight: 700; margin: 6px 0 2px; white-space: nowrap; }
.kpi i { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.kpi.link:hover { text-decoration: none; border-color: var(--blue); }
.kpi.warn { border-top-color: var(--yellow); }
.kpi.warn b { color: var(--warn); }
.kpi.sel { background: #EAF2F7; border-color: var(--blue); }
.kpis.k7 .kpi { padding: 12px; }
.kpis.k7 .kpi b { font-size: 18px; }
.kpis.k7 .kpi .kl { letter-spacing: .03em; }

/* таблицы */
.scroll { overflow-x: auto; }
.scroll.tall { max-height: 420px; overflow-y: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFC; position: sticky; top: 0; }
.t td { padding: 9px 12px; border-bottom: 1px solid #EEF2F5; vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: #F7FAFC; }
.t .num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t .c { text-align: center; }
.t .hot { color: var(--bad); font-weight: 600; }
.card:not(.flush) table.t th:first-child, .card:not(.flush) table.t td:first-child { padding-left: 0; }
.clip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
td.clip { display: table-cell; }
.mini { vertical-align: middle; }
.st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.st-signed { background: var(--good-bg); color: var(--good); }
.st-waiting { background: var(--warn-bg); color: var(--warn); }
.st-none, .st-rejected { background: var(--bad-bg); color: var(--bad); }
.st-paper { background: var(--gray-bg); color: var(--ink-2); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 4px 0 16px; }
.foot-note { color: var(--muted); font-size: 12.5px; margin: 0 4px; }
.list { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }
.list li { margin-bottom: 6px; }

/* графики */
.chart { width: 100%; height: auto; display: block; }
.chart .ax { font-size: 11px; fill: var(--muted); }
.chart .val { font-size: 12px; font-weight: 600; fill: var(--ink); }
.chart .hit:hover { fill: rgba(16,85,122,.07); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; font-size: 12.5px; color: var(--ink-2); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.tv { margin-top: 8px; font-size: 12.5px; }
.tv summary { cursor: pointer; color: var(--muted); }
.tv table { margin-top: 8px; }
.tip { position: fixed; z-index: 50; background: var(--navy); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; line-height: 1.5; white-space: pre-line; pointer-events: none; max-width: 280px; box-shadow: 0 6px 20px rgba(6,24,42,.25); }

/* расшифровки по нажатию */
details.x { border-bottom: 1px solid #EEF2F5; }
details.x:last-child { border-bottom: 0; }
details.x > summary { display: flex; align-items: center; gap: 12px; padding: 9px 0; cursor: pointer; list-style: none; }
details.x > summary::-webkit-details-marker { display: none; }
details.x > summary::before { content: "›"; color: var(--muted); font-size: 16px; width: 10px; transition: transform .15s; }
details.x[open] > summary::before { transform: rotate(90deg); }
details.x > summary:hover .x-n { color: var(--blue); }
.x-n { flex: 1; min-width: 0; font-weight: 500; }
.x-c { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.x-s { color: var(--muted); font-size: 12px; white-space: nowrap; }
details.x > .x-b { padding: 0 0 12px 22px; }
details.x > .x-b table.t th:first-child, details.x > .x-b table.t td:first-child { padding-left: 0; }
.card.flush details.x > summary { padding-left: 20px; padding-right: 20px; }
.card.flush details.x > .x-b { padding-left: 42px; padding-right: 20px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; background: var(--gray-bg); color: var(--ink-2); font-size: 11.5px; white-space: nowrap; vertical-align: middle; }
.grp { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 2px; }
.grp:first-of-type { margin-top: 0; }
h2.gap { margin-top: 18px; }
.t tfoot td { font-weight: 700; border-top: 1px solid var(--line); background: #FAFBFC; }
.t .sub { color: var(--muted); font-weight: 400; }
.t th.g, .t td.g { border-left: 1px solid var(--line); }
.soon { background: #FFF8E1; }
.pend-sum { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 2px 0 10px; }
.pend-sum b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pend-st { margin-bottom: 14px; }
.formula { background: #F4F8FB; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-variant-numeric: tabular-nums; }
.formula b { font-size: 18px; }

/* сообщения */
.note { padding: 10px 12px; border-radius: 8px; margin: 0 0 14px; font-size: 13px; }
.note.good { background: var(--good-bg); color: var(--good); }
.note.bad { background: var(--bad-bg); color: var(--bad); }

/* админка */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.row2 input { width: 100%; }
.rolepick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pick { cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); background: #fff; }
.pick input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.pick input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.roles { max-width: 460px; }
.role { margin: 2px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #98A8B5; font-size: 12px; cursor: pointer; }
.role:hover { border-color: var(--blue); color: var(--blue); }
.role.on { background: var(--good); border-color: var(--good); color: #fff; }
.role[disabled] { opacity: .5; cursor: progress; }
.acts form { display: flex; gap: 6px; flex-wrap: wrap; }
form.inline { margin-top: 4px; }
form.inline select { font-size: 12px; padding: 3px 6px; }
.inline-form { display: flex; align-items: center; gap: 8px; }
.invite { border-top: 3px solid var(--yellow); }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.matrix .yes { color: var(--good); font-size: 16px; } .matrix .no { color: #C5D0D9; }

/* вход */
body.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(1200px 600px at 20% 0%, #0E4563 0%, var(--navy) 60%); color: #fff; }
.auth-box { width: 100%; max-width: 380px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 28px; backdrop-filter: blur(6px); }
.auth-box img { display: block; margin: 0 auto 18px; }
.auth-box h1 { font-size: 22px; font-style: italic; font-weight: 800; text-transform: uppercase; text-align: center; margin-bottom: 16px; }
.auth-box label { display: block; font-size: 12px; color: #A9BDCC; margin-bottom: 12px; }
.auth-box input { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; }
.auth-box input:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }
.auth-box .btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--navy); font-weight: 700; margin-top: 6px; }
.auth-box .btn.primary:hover { background: #FFDD73; }
.hint { color: #A9BDCC; font-size: 12.5px; text-align: center; margin: 14px 0 0; }
.auth-box .hint b { color: #fff; }
.auth-foot { color: #6F889B; font-size: 12px; margin-top: 18px; }

@media (max-width: 1200px) { .kpis, .kpis.k7 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; gap: 6px; }
  .brand { border: 0; padding: 0 8px 0 0; } .brand i, .side-h, .nav i, .me-t { display: none; }
  .side nav { display: flex; overflow-x: auto; flex: 1; gap: 2px; }
  .nav { border-left: 0; border-bottom: 3px solid transparent; padding: 8px; margin: 0; }
  .nav.on { border-bottom-color: var(--yellow); }
  .me { margin: 0; border: 0; padding: 0; }
  .main { padding: 16px; }
  .grid2, .row2 { grid-template-columns: 1fr; }
  .kpis, .kpis.k3, .kpis.k4, .kpis.k7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  input[type=search] { min-width: 0; flex: 1; }
  .kpi b { font-size: 20px; }
}
