/* Тема: по умолчанию тёмная («серьёзная»), светлая — переключателем в меню (data-theme="light" на <html>). */
:root {
  color-scheme: dark;
  --bg: #0a0f1f; --card: #131a30; --text: #e6e9f4; --muted: #8e9ab8; --line: rgba(150, 165, 210, .15);
  --accent: #8291ff; --accent-2: #45c7f0; --accent-text: #ffffff; --ring: rgba(130, 145, 255, .28);
  --grad: linear-gradient(135deg, #6f7dff 0%, #45c7f0 100%);
  --grad-soft: linear-gradient(135deg, rgba(111, 125, 255, .22), rgba(69, 199, 240, .10));
  --ok: #4fd68a; --ok-bg: rgba(79, 214, 138, .13); --warn: #f2bd4b; --warn-bg: rgba(242, 189, 75, .13);
  --bad: #ff7a8a; --bad-bg: rgba(255, 122, 138, .14); --row-hover: rgba(255, 255, 255, .045); --chip: rgba(150, 165, 210, .14);
  --glass: rgba(12, 17, 34, .82); --field: #0d1329; --side: linear-gradient(180deg, #131a36 0%, #0b1022 100%);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .28);
  --glow-1: rgba(111, 125, 255, .20); --glow-2: rgba(69, 199, 240, .13); --glow-3: rgba(168, 85, 247, .12);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f8; --card: #ffffff; --text: #1a2038; --muted: #66708d; --line: rgba(30, 42, 90, .12);
  --accent: #4f5bd5; --accent-2: #1f9fcc; --accent-text: #ffffff; --ring: rgba(79, 91, 213, .22);
  --grad: linear-gradient(135deg, #5a67e8 0%, #2bb3dc 100%);
  --grad-soft: linear-gradient(135deg, rgba(90, 103, 232, .14), rgba(43, 179, 220, .08));
  --ok: #1c8a4d; --ok-bg: #e3f5ea; --warn: #96630a; --warn-bg: #fbf1d9;
  --bad: #c9354a; --bad-bg: #fde9ec; --row-hover: #f3f5fb; --chip: #e9ecf5;
  --glass: rgba(255, 255, 255, .85); --field: #ffffff; --side: linear-gradient(180deg, #1a2148 0%, #10152e 100%);
  --shadow: 0 1px 2px rgba(20, 30, 70, .05), 0 10px 28px rgba(20, 30, 70, .07);
  --glow-1: rgba(90, 103, 232, .13); --glow-2: rgba(43, 179, 220, .10); --glow-3: rgba(168, 85, 247, .07);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { font-weight: 650; font-size: 17px; }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }
.search { display: flex; gap: 10px; }
.search input { flex: 1; min-width: 0; font-size: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search button { font-size: 16px; font-weight: 600; padding: 0 22px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-text); cursor: pointer; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 2px 18px; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); margin-bottom: 16px; font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card h2 .sub { font-weight: 400; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.error { color: var(--bad); }
.contacts { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.contact .name { font-weight: 600; }
.contact .ph { color: var(--muted); font-size: 14px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.call:hover td { background: var(--row-hover); }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip); }
.chip.won { background: var(--ok-bg); color: var(--ok); }
.chip.lost { background: var(--bad-bg); color: var(--bad); }
.dir { white-space: nowrap; }
.dir.in::before { content: "↙ "; color: var(--ok); }
.dir.out::before { content: "↗ "; color: var(--accent); }
.res.no { color: var(--muted); }
.play { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; white-space: nowrap; }
.play:hover, .play.active { background: var(--accent); color: var(--accent-text); }
tr.player td { background: var(--row-hover); }
.player-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.player-box audio { flex: 1; min-width: 260px; }
.speed button { font-size: 12px; padding: 4px 8px; margin-left: 2px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.speed button.on { border-color: var(--accent); color: var(--accent); }
.toolbar { display: flex; gap: 16px; align-items: center; font-size: 14px; color: var(--muted); margin: -2px 0 8px; }
a { color: var(--accent); }
.status { max-width: 1100px; margin: 0 auto; padding: 0 16px 24px; color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .top { padding: 12px 16px; }
  th.opt, td.opt { display: none; }
  .search button { padding: 0 14px; }
}

/* сравнение расшифровок (/compare) */
main.wide { max-width: none; padding: 16px 16px 32px; }
.intro summary { cursor: pointer; font-weight: 600; }
.intro ol { margin: 10px 0 6px; padding-left: 22px; }
.intro li { margin: 3px 0; }
.bar { position: sticky; top: 0; z-index: 2; padding: 10px 14px; }
.bar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar-row + .bar-row { margin-top: 8px; }
.bar audio { flex: 1; min-width: 280px; }
.bar select { font-size: 15px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); max-width: 100%; }
.btn { font-size: 14px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.cols { display: grid; grid-template-columns: repeat(5, minmax(250px, 1fr)); gap: 10px; overflow-x: auto; margin-bottom: 16px; }
.col { background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-width: 0; }
.col-head { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.col-head b { font-size: 16px; }
.grades { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.grades button { font-size: 12px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.grades .g.good.on { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.grades .g.mid.on { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); font-weight: 600; }
.grades .g.bad.on { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); font-weight: 600; }
.grades .best.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.lines { position: relative; overflow-y: auto; height: calc(100vh - 250px); min-height: 320px; padding: 6px 8px 10px; font-size: 14px; }
.ln { display: grid; grid-template-columns: 34px 16px 1fr; gap: 4px; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.ln:hover { background: var(--row-hover); }
.ln.now { background: var(--warn-bg); }
.ln .tm { color: var(--muted); font-size: 11px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.ln .who { font-weight: 700; font-size: 12px; padding-top: 1px; }
.ln.m .who { color: var(--accent); }
.ln.k .who { color: var(--ok); }
.ln .tx { overflow-wrap: anywhere; }
textarea { width: 100%; margin-top: 6px; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
#callstate.todo { color: var(--warn); font-size: 14px; }
#callstate.done { color: var(--ok); font-size: 14px; font-weight: 600; }

/* текст разговора под проигрывателем */
.transcript { margin-top: 10px; }
.tr-head { font-size: 13px; margin-bottom: 4px; }
.tr-lines { position: relative; max-height: 360px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 14px; }

/* сравнение ИИ-разборов (/review) */
.rv { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr) minmax(300px, 1fr); gap: 10px; overflow-x: auto; margin-bottom: 16px; }
.lines.an { font-size: 13.5px; }
.lines.an h4 { margin: 12px 0 4px; font-size: 13px; }
.lines.an p { margin: 6px 0; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 6px; padding: 2px 0; }
.blk { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.blk .q { color: var(--muted); font-style: italic; margin-top: 2px; overflow-wrap: anywhere; }
.pickbest.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }

/* ИИ-разбор под текстом разговора */
.analysis { margin-top: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.analysis h4 { margin: 12px 0 4px; font-size: 13px; }
.analysis p { margin: 6px 0; }
.blk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; }
.chip.ai { margin-left: 6px; background: var(--chip); color: var(--accent); }

/* лента клиента */
.timeline { max-height: 460px; overflow-y: auto; font-size: 14px; }
.tl-day { position: sticky; top: 0; background: var(--card); color: var(--muted); font-size: 12px; font-weight: 600; padding: 8px 0 3px; border-bottom: 1px solid var(--line); }
.tl { display: grid; grid-template-columns: 46px 20px 1fr; gap: 4px; padding: 4px 2px; border-bottom: 1px dashed var(--line); align-items: baseline; }
.tl-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-ico { text-align: center; color: var(--muted); }
.tl.stage .tl-ico { color: var(--accent); }
.tl.call.no { color: var(--muted); }
.tl.link { cursor: pointer; }
.tl.link:hover { background: var(--row-hover); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.tl.chat .tl-ico { color: var(--ok); }
.tl.chat:not(.in) { color: var(--muted); }

/* отчёт по менеджерам (/report) */
.tbl-wrap { overflow-x: auto; }
#tbl th, #tbl td { white-space: nowrap; font-size: 14px; }
#tbl tr.picked td { background: var(--row-hover); }
#tbl tfoot td { border-top: 2px solid var(--line); }
.btn.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.bar input[type=date] { font: inherit; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
p.small { font-size: 12.5px; }
.bars { display: grid; gap: 4px; max-width: 760px; }
.bar-line { display: grid; grid-template-columns: 240px 1fr 44px; gap: 8px; align-items: center; font-size: 14px; }
.bl-track { height: 10px; background: var(--chip); border-radius: 5px; overflow: hidden; }
.bl-fill { display: block; height: 100%; background: var(--muted); }
.bl-fill.won { background: var(--ok); } .bl-fill.warn { background: var(--warn); } .bl-fill.lost { background: var(--bad); }
.bl-pct { text-align: right; font-variant-numeric: tabular-nums; }
.small-tbl { max-width: 760px; } .small-tbl td, .small-tbl th { padding: 5px 8px; font-size: 14px; }
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.rl h4 { margin: 4px 0; }
.rl-item { padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.rl-item .chip { margin-left: 6px; }
.rl-sum { color: var(--muted); font-size: 13px; margin-top: 2px; }
@media (max-width: 700px) { .bar-line { grid-template-columns: 140px 1fr 40px; } }
.top-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }

/* вход */
main.login { max-width: 380px; margin: 60px auto; padding: 0 16px; }
.login-box { display: flex; flex-direction: column; gap: 10px; }
.login-box h2 { margin: 0; }
.login-box input[type=password] { font-size: 17px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
.login-box button { font-size: 16px; font-weight: 600; padding: 10px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-text); cursor: pointer; }
a.logout { font-size: 14px; margin-left: 16px; }

/* ---------- оформление в стиле Apple: мягкие цвета, скругления, спокойные градиенты ---------- */
html { background: var(--bg); }
body {
  min-height: 100vh; letter-spacing: -.01em; -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 420px at 12% -8%, var(--glow-1), transparent 70%),
    radial-gradient(800px 420px at 92% -12%, var(--glow-2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
.top { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); padding: 14px 28px; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: -.02em; background: linear-gradient(90deg, var(--accent), #8e5cf0); -webkit-background-clip: text; background-clip: text; color: transparent; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.pill { padding: 5px 12px; font-weight: 500; }
main { padding-top: 32px; }
.card { border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); }
.card h2 { font-size: 17px; font-weight: 650; letter-spacing: -.015em; margin-bottom: 12px; }
.search input { border-radius: 14px; padding: 14px 18px; background: var(--field); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.search input:focus, .login-box input[type=password]:focus, textarea:focus, .bar select:focus, .bar input[type=date]:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring);
}
.search button, .login-box button {
  border-radius: 14px; background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 6px 16px var(--ring); transition: filter .15s, transform .05s;
}
.search button:hover, .login-box button:hover { filter: brightness(1.06); }
.search button:active, .login-box button:active, .btn:active, .play:active { transform: scale(.98); }
.hint { margin: 10px 6px 22px; }
.notice { border-radius: 14px; padding: 12px 16px; }
th { font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding: 8px 10px; }
td { padding: 11px 10px; }
tr:last-child > td { border-bottom: 0; }
.chip { padding: 3px 10px; font-weight: 500; }
.play { border-radius: 999px; border-color: transparent; background: var(--chip); padding: 6px 14px; transition: background .15s, color .15s; }
.play:hover, .play.active { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-text); }
.btn, .speed button, .grades button { border-radius: 999px; background: var(--field); transition: border-color .15s, background .15s, color .15s; }
.btn { padding: 6px 14px; }
.btn.on, .speed button.on { background: var(--ring); border-color: transparent; color: var(--accent); }
.pickbest.on { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-text); }
.bar { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); top: 8px; }
.bar select, .bar input[type=date], textarea { border-radius: 10px; background: var(--field); }
.col { border-radius: 18px; box-shadow: var(--shadow); }
.tr-lines, .analysis { border-radius: 14px; background: var(--field); }
.tr-lines { padding: 10px 12px; }
.analysis { padding: 14px 16px; }
tr.player td { background: var(--row-hover); }
.tl, .blk, .rl-item { border-bottom-style: solid; }
.tl { padding: 6px 4px; border-radius: 8px; }
.bl-track { height: 8px; border-radius: 999px; }
.bl-fill { border-radius: 999px; }
.bl-fill.won { background: linear-gradient(90deg, #34c759, var(--ok)); }
.status { padding-top: 4px; }
::selection { background: var(--ring); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* вход */
main.login { margin-top: 12vh; max-width: 400px; }
.login-box { gap: 14px; padding: 28px 26px; border-radius: 22px; }
.login-box h2 { font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
.login-box p { margin: 0; }
.login-box input[type=password] { border-radius: 12px; padding: 12px 14px; background: var(--field); transition: border-color .15s, box-shadow .15s; }
.login-box button { padding: 12px; }

/* главная: сводка */
a.brand, a.brand:hover { text-decoration: none; }
.search { max-width: 760px; margin: 0 auto; }
.hint { max-width: 760px; margin-left: auto; margin-right: auto; padding: 0 6px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 2px 18px; }
.dash-head h1 { margin: 0 0 2px; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--chip); }
.seg button { font: inherit; font-size: 14px; padding: 6px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; transition: background .15s; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi-value { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--muted); font-size: 12.5px; }
.kpi.accent { border-color: transparent; color: #fff; background: linear-gradient(135deg, #2b8cff, #7a5af5); }
.kpi.accent .kpi-label, .kpi.accent .kpi-sub { color: rgba(255, 255, 255, .82); }
.kpi.won .kpi-value { color: var(--ok); } .kpi.warn .kpi-value { color: var(--warn); } .kpi.lost .kpi-value { color: var(--bad); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.dash-tbl td, .dash-tbl th { white-space: nowrap; font-size: 14px; }
.dash-tbl td:not(:first-child), .dash-tbl th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.card h2 a.sub { margin-left: auto; color: var(--accent); }
.bar-line.dash-bar { grid-template-columns: 150px 1fr 36px; }
.sys { display: grid; gap: 8px; font-size: 14px; }
.sys-line { display: grid; grid-template-columns: 12px 100px 1fr; gap: 8px; align-items: center; }
.sys .bl-track { display: block; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: #34c759; } .dot.bad { background: var(--bad); }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } .dash-head h1 { font-size: 24px; } }

/* чек-лист РОПа в разборе звонка */
.ck { display: grid; gap: 2px; }
.ck-row { display: grid; grid-template-columns: 118px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: start; }
.ck-row:last-child { border-bottom: 0; }
.ck-row .chip { text-align: center; }
.ck-row.na { opacity: .6; }
.ck-name { font-weight: 600; }
.ck-meta { color: var(--muted); font-size: 12.5px; }
.blk .chip { margin-left: 6px; }

/* профиль менеджера (/manager) */
main.prof { max-width: 1200px; margin: 0 auto; padding: 16px 16px 40px; }
.prof-head h1 { font-size: 24px; margin: 0 0 4px; }
.prof-head p { margin: 8px 0 0; }
.bar select#who { font-size: 16px; font-weight: 600; }
main.prof .kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; margin-bottom: 16px; }
main.prof .kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: help; }
main.prof .kpi-l { font-size: 12.5px; color: var(--muted); min-height: 2.6em; }
main.prof .kpi-v { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
main.prof .kpi-s { font-size: 12px; color: var(--muted); }
main.prof .kpi.good { border-color: var(--ok); } .kpi.good .kpi-v { color: var(--ok); }
main.prof .kpi.bad { border-color: var(--bad); } .kpi.bad .kpi-v { color: var(--bad); }
main.prof .kpi-s .good { color: var(--ok); } .kpi-s .bad { color: var(--bad); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 0 16px; }
.gp { border-left: 3px solid var(--line); padding: 6px 0 8px 12px; margin-bottom: 10px; font-size: 14px; }
.gp.bad { border-color: var(--bad); } .gp.warn { border-color: var(--warn); } .gp.info { border-color: var(--accent); } .gp.good { border-color: var(--ok); }
.gp-t { font-weight: 650; margin-bottom: 2px; }
.gp-calls { margin: 4px 0 0; padding-left: 18px; }
.gp-calls li { margin: 2px 0; overflow-wrap: anywhere; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
main.prof .bar { position: static; }
td.nowrap { white-space: nowrap; }
.blocks-tbl { max-width: none; }
.blocks-tbl td.bar-cell { width: 34%; min-width: 120px; }
.blocks-tbl .bl-track { display: block; position: relative; overflow: visible; }
.blocks-tbl .bl-fill { border-radius: 5px; }
.bl-team { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); opacity: .6; }
.hours-tbl th, .hours-tbl td { padding: 4px 6px; text-align: center; }
.hours-tbl td:first-child { text-align: left; white-space: nowrap; }
tr.hl td { font-weight: 650; }
tr.muted td { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rl-item > .chip.lost { margin-left: 6px; }

/* ================= интерфейс v3: боковое меню, тёмная тема с градиентами ================= */
html { background: var(--bg); }
body {
  background:
    radial-gradient(1100px 520px at 18% -10%, var(--glow-1), transparent 65%),
    radial-gradient(900px 480px at 100% 0%, var(--glow-2), transparent 62%),
    radial-gradient(900px 600px at 60% 110%, var(--glow-3), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent); }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin: 0 0 14px; }
p.lead { margin: -6px 0 18px; max-width: 760px; }
main, main.wide, main.prof { padding-top: 28px; }

/* шапка: на узком экране — полоса сверху, на широком — боковое меню (класс has-menu ставит auth.js) */
.top { background: var(--side); border-bottom: 1px solid var(--line); gap: 14px; padding: 12px 18px; -webkit-backdrop-filter: none; backdrop-filter: none; color: #e6e9f4; }
.brand, a.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: #fff;
  background: none; -webkit-background-clip: border-box; background-clip: border-box; white-space: nowrap; }
.brand::before { content: ""; width: 30px; height: 30px; border-radius: 9px; background: var(--grad); box-shadow: 0 6px 18px rgba(80, 110, 255, .45); flex: none; }
.menu { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.mg { display: none; }
.mi { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 14.5px; font-weight: 500; color: #b4bedb; white-space: nowrap; text-decoration: none; transition: background .15s, color .15s; }
.mi:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.mi.on { background: linear-gradient(90deg, rgba(111, 125, 255, .38), rgba(69, 199, 240, .14)); color: #fff; box-shadow: inset 3px 0 0 #7f8dff; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.top-right { gap: 4px; }
.top .pill { background: rgba(255, 255, 255, .08); color: #b4bedb; }
.top .pill.ok { background: rgba(79, 214, 138, .16); color: #6fe3a1; }
.top .pill.bad { background: rgba(255, 122, 138, .18); color: #ff98a5; }
a.logout { margin-left: 0; }
@media (min-width: 1000px) {
  body.has-menu { padding-left: 252px; }
  body.has-menu .top { position: fixed; z-index: 10; left: 0; top: 0; bottom: 0; width: 252px; flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 20px 14px 16px; border-bottom: 0; border-right: 1px solid var(--line); overflow-y: auto; }
  body.has-menu .brand { padding: 2px 8px 18px; }
  body.has-menu .menu { flex-direction: column; flex: 1; overflow: visible; gap: 2px; }
  body.has-menu .mg { display: block; padding: 16px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #6f7a9c; }
  body.has-menu .mg:first-child { padding-top: 4px; }
  body.has-menu .top-right { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(150, 165, 210, .15); }
  body.has-menu .top .pill { text-align: center; margin: 0 4px 8px; }
  body.has-menu main { max-width: 1240px; }
  body.has-menu main.wide { max-width: none; padding-left: 28px; padding-right: 28px; }
  body.has-menu .bar { top: 12px; }
}

/* карточки и поля */
.card, .col, main.prof .kpi { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card h2 { font-size: 17px; }
.search input, .login-box input[type=password], textarea, select, input[type=text], input[type=date], .bar select, .bar input[type=date] {
  background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font: inherit; }
select, input[type=text] { padding: 9px 12px; }
textarea { padding: 10px 12px; width: 100%; }
select:focus, input[type=text]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.search button, .login-box button, button.primary {
  border: 0; border-radius: 12px; padding: 11px 20px; font: inherit; font-weight: 650; color: #fff; cursor: pointer;
  background: var(--grad); box-shadow: 0 8px 22px rgba(80, 110, 255, .32); transition: filter .15s, transform .05s; }
.search button:hover, .login-box button:hover, button.primary:hover { filter: brightness(1.08); }
.btn, .speed button, .grades button { background: var(--field); border: 1px solid var(--line); color: var(--text); text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.on, .speed button.on { background: var(--grad-soft); border-color: var(--accent); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.play { background: var(--chip); color: var(--accent); }
.play:hover, .play.active, .pickbest.on { background: var(--grad); color: #fff; }
.seg { background: var(--chip); flex-wrap: wrap; }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(80, 110, 255, .35); }
.bar { background: var(--glass); }
.tr-lines, .analysis { background: var(--field); }
.tl-day { background: var(--card); }
th { color: var(--muted); }
.chip { background: var(--chip); color: var(--text); }
.chip.won { background: var(--ok-bg); color: var(--ok); } .chip.lost { background: var(--bad-bg); color: var(--bad); }
.chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.ai { background: var(--chip); color: var(--accent); }
a.chip { text-decoration: none; }
.notice { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--line); }
.ok-text { color: var(--ok); }
.bl-track { background: var(--chip); }
.bl-fill { background: var(--muted); }
.bl-fill.won { background: linear-gradient(90deg, #34c77b, #4fd68a); } .bl-fill.warn { background: linear-gradient(90deg, #e0a52e, #f2bd4b); }
.bl-fill.lost { background: linear-gradient(90deg, #e85a70, #ff7a8a); }
.bl-team { background: var(--text); }

/* дашборд */
.dash-head h1 { font-size: 30px; }
.kpi { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); opacity: .9; }
.kpis > .kpi:nth-child(2)::before { background: linear-gradient(90deg, #a855f7, #6f7dff); }
.kpis > .kpi:nth-child(3)::before { background: linear-gradient(90deg, #45c7f0, #34d399); }
.kpis > .kpi:nth-child(5)::before { background: linear-gradient(90deg, #f2bd4b, #fb7185); }
.kpis > .kpi:nth-child(6)::before { background: linear-gradient(90deg, #fb7185, #a855f7); }
.kpi-value { background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 62%, var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi.won .kpi-value, .kpi.warn .kpi-value, .kpi.lost .kpi-value { background: none; }
.kpi.won .kpi-value { color: var(--ok); } .kpi.warn .kpi-value { color: var(--warn); } .kpi.lost .kpi-value { color: var(--bad); }
.kpi.accent { border-color: transparent; background: linear-gradient(135deg, #5f6dff 0%, #8b5cf6 55%, #45c7f0 130%); box-shadow: 0 14px 34px rgba(95, 109, 255, .35); }
.kpi.accent::before { display: none; }
.kpi.accent .kpi-value { background: none; color: #fff; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
main.prof .kpi { cursor: help; }
main.prof .kpi::before { display: none; }

/* вход */
main.login { margin-top: 14vh; }
.login-box { background: var(--card); border: 1px solid var(--line); }
.login-box h2 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* замечания РОПа */
main.notes { max-width: 980px; }
.note-form { display: grid; gap: 12px; }
.note-form label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.note-form label > * { font-weight: 400; color: var(--text); }
.nf-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.nf-row .grow { flex: 1; min-width: 240px; }
.nf-row select { min-width: 220px; }
.note { border-left: 3px solid var(--warn); }
.note.done { border-left-color: var(--ok); opacity: .72; }
.note-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 13.5px; }
.note-who { font-size: 16px; font-weight: 650; color: var(--text); }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-actions { display: flex; gap: 8px; margin-top: 12px; }
.card.empty { text-align: center; padding: 34px 20px; }

/* чек-лист РОПа */
#tabs { margin-bottom: 16px; }
.rules li { margin: 6px 0; }
.ck-item { border-bottom: 1px solid var(--line); padding: 8px 0; }
.ck-item:last-child { border-bottom: 0; }
.ck-item summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ck-desc { display: grid; gap: 8px; padding: 10px 0 4px 4px; font-size: 14px; }
.ck-desc .chip { margin-right: 4px; }
.kv .chip { margin: 0 6px 4px 0; }
@media (max-width: 999px) {
  .top { flex-wrap: wrap; }
  .menu { order: 3; flex: 1 0 100%; padding-bottom: 2px; }
  .top-right { margin-left: auto; }
  .top-right .mi span { display: none; }
}

/* ================= новые разделы (ноябрь 2026) ================= */
.chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-ax { fill: var(--muted); font-size: 11px; } .ch-ax2 { fill: var(--accent-2); } .ch-we { opacity: .55; }
.ch-bar { fill: url(#none); fill: var(--accent); opacity: .85; } .ch-bar:hover { opacity: 1; }
.ch-val { fill: var(--text); font-size: 11px; font-weight: 600; }
.ch-line { fill: none; stroke: var(--accent-2); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: var(--card); stroke: var(--accent-2); stroke-width: 2; }
.plan-num { font-size: 16px; margin-bottom: 10px; } .plan-num b { font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.plan-track { display: block; height: 10px; margin-bottom: 10px; }
.sys-line { grid-template-columns: 12px 118px 1fr; }
select.st-sel { appearance: none; -webkit-appearance: none; border: 1px solid transparent; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer; text-align: center; text-align-last: center; }
select.st-sel:hover { border-color: var(--accent); }
.ck-row { grid-template-columns: 128px 1fr; }
.ck-fixed { color: var(--accent-2); font-size: 12.5px; font-weight: 600; }
.verdict { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.btn.on.ok { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.btn.on.bad { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }
.an-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.small-btn { font-size: 12px; padding: 2px 10px; margin-left: 8px; }
.rl-item .ln { display: grid; grid-template-columns: 44px 18px 1fr; gap: 6px; padding: 3px 0 0; font-size: 14px; }
.rl-item .ln .tm { color: var(--muted); font-size: 12px; }
td .small, .small { font-size: 12.5px; }
@media print {
  :root, :root[data-theme="light"] { color-scheme: light; --bg: #fff; --card: #fff; --text: #111; --muted: #555; --line: #ccc; --field: #fff; --chip: #eee; --shadow: none; --glass: #fff; }
  html, body { background: #fff !important; }
  body.has-menu { padding-left: 0; }
  .top, .btn, button, .filters, #add, .note-actions { display: none !important; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  main, body.has-menu main, body.has-menu main.wide { max-width: none; padding: 0 8px; }
  .kpi-value { background: none; color: #111; -webkit-background-clip: border-box; }
  .tbl-wrap { overflow: visible; }
}

/* память замечаний РОПа: пояснение к исправленному пункту и отметка «учтено замечаний» */
.ck-why-box { margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ck-why-box[hidden] { display: none; }
input.ck-why { flex: 1; min-width: 220px; max-width: 560px; font: inherit; font-size: 13px; padding: 4px 10px; color: var(--text);
  background: var(--field); border: 1px solid var(--line); border-radius: 8px; }
input.ck-why:focus { outline: none; border-color: var(--accent); }
input.ck-why::placeholder { color: var(--muted); opacity: .8; }
.fb-used { white-space: nowrap; }
@media print { .ck-why-box { display: none !important; } }
.ck-row > div { min-width: 0; }
.ck-why-box .muted { overflow-wrap: anywhere; }
@media (max-width: 700px) {      /* телефон: поле во всю ширину колонки; 16px — чтобы Safari не увеличивал страницу при вводе */
  input.ck-why { flex: 1 1 100%; min-width: 0; width: 100%; max-width: none; font-size: 16px; }
}

/* редактор чек-листа РОПа (страница /checklist) */
#bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
#bar .notice, #bar .ce-ok { margin: 0; flex: 1 1 320px; }
.ce-ok { padding: 12px 16px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); border: 1px solid var(--line); font-size: 14px; margin-bottom: 16px; }
.ce-f { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 12px; min-width: 0; }
.ce-f > input[type=text], .ce-f > textarea, .ce-f > select { font-weight: 400; color: var(--text); width: 100%; min-width: 0; box-sizing: border-box; }
.ce-f textarea { resize: vertical; line-height: 1.4; }
.ce-l { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.ce-cnt { font-weight: 400; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ce-cnt.over { color: var(--bad); font-weight: 650; }
.ce-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ce-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.ce-row .grow { flex: 1; }
.ce-item { padding: 10px 0; }
.ce-item > summary { align-items: center; }
.ce-item[open] > summary { margin-bottom: 12px; }
.ce-new { color: var(--accent); }
.ce-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 6px; margin-bottom: 12px; background: var(--field); }
.ce-box .ce-f > input[type=text], .ce-box .ce-f > textarea, .ce-box .ce-f > select { background: var(--card); }
.ce-stages { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ce-stages .chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; font-size: 13px; }
.ce-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 999px; }
.ce-x:hover { color: var(--bad); background: var(--bad-bg); }
.ce-pick { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 8px 0 12px; background: var(--field); }
.ce-pick input[type=text] { width: 100%; box-sizing: border-box; background: var(--card); }
.ce-pick-list { max-height: 280px; overflow: auto; margin-top: 8px; display: grid; gap: 4px; }
.ce-opt { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; text-align: left; font: inherit; font-size: 14px;
  padding: 8px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; }
.ce-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--card); }
.ce-opt:disabled { cursor: default; opacity: .55; }
.ce-opt small { color: var(--muted); font-size: 12px; }
.ce-meter { margin: 6px 0 2px; font-size: 13.5px; }
.ce-meter-bar { height: 8px; border-radius: 999px; background: var(--chip); overflow: hidden; margin: 6px 0; }
.ce-meter-fill { height: 100%; width: 0; border-radius: 999px; background: var(--ok); transition: width .2s; }
.ce-meter.warn .ce-meter-fill { background: var(--warn); } .ce-meter.bad .ce-meter-fill { background: var(--bad); }
.ce-meter.warn .ce-meter-t { color: var(--warn); } .ce-meter.bad .ce-meter-t { color: var(--bad); font-weight: 650; }
#save { position: sticky; bottom: 10px; z-index: 5; margin-top: 18px; }
#save .card { border-color: var(--accent); margin-bottom: 0; padding: 12px 18px; }
#save h2 { margin-bottom: 6px; }
.ce-savebar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.ce-savebar .ce-f { flex: 1 1 280px; margin-bottom: 0; }
.ce-savebar .ce-row { margin: 0; flex-wrap: nowrap; }
#ce-dirty { margin-top: 6px; }
.ce-errors { max-height: 30vh; overflow: auto; margin-bottom: 10px; font-size: 14px; }
.ce-errors-h { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.ce-errors-min { margin: 0 0 10px; }
.ce-errlink { display: block; width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; overflow-wrap: anywhere; }
.ce-errlink:hover, .ce-errlink:focus-visible { text-decoration-style: solid; }
.ce-f { scroll-margin-top: 90px; scroll-margin-bottom: 45vh; }
.ce-f.ce-bad > input[type=text], .ce-f.ce-bad > textarea, .ce-f.ce-bad > select { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad-bg); }
.ce-f.ce-bad .ce-l > span:first-child { color: var(--bad); }
#bar .notice .ce-row { display: inline-flex; margin: 6px 0 0; }
#out[inert], #tabs[inert], #bar[inert] { opacity: .6; }
#save ul { margin: 6px 0 12px; padding-left: 20px; }
#save li { margin: 4px 0; overflow-wrap: anywhere; }
.ce-confirm { max-height: 60vh; overflow: auto; }
.ce-hist { border-bottom: 1px solid var(--line); padding: 12px 0; }
.ce-hist:last-child { border-bottom: 0; }
.ce-hist-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ce-hist-h .btn { margin-left: auto; }
.ce-hist ul { margin: 6px 0; padding-left: 20px; font-size: 14px; }
.ce-hist li { margin: 3px 0; overflow-wrap: anywhere; }
.ce-hist summary { cursor: pointer; color: var(--accent); font-size: 13.5px; }
.ce-add { margin-top: 6px; }
@media (max-width: 700px) {      /* телефон: одна колонка, крупные кнопки; 16px — чтобы Safari не увеличивал страницу при вводе */
  .ce-grid2 { grid-template-columns: 1fr; }
  .ce-f > input[type=text], .ce-f > textarea, .ce-f > select, .ce-pick input[type=text] { font-size: 16px; }
  .ce-row .btn, #bar .btn, .ce-add { padding: 9px 14px; }
  .ce-hist-h .btn { margin-left: 0; }
  #save { bottom: 0; }
  #save .card { border-radius: 18px 18px 0 0; margin-left: -8px; margin-right: -8px; padding: 14px 16px; }
  .ce-confirm { max-height: 50vh; }
  .ce-errors { max-height: 20vh; }      /* на телефоне список ошибок не должен закрывать поля; его можно скрыть кнопкой */
}
@media print { #save, #bar, .ce-pick { display: none !important; } }

/* Страница «Уведомления» (/alerts): получатели Telegram, настройки, журнал */
.al-steps { margin: 8px 0 12px; padding-left: 22px; }
.al-steps li { margin: 8px 0; overflow-wrap: anywhere; }
.al-cmd { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--chip); font: 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; overflow-wrap: anywhere; }
.al-steps li > div > .al-cmd { margin: 6px 0; padding: 6px 10px; }
.al-chat { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.al-chat.off .al-who b { color: var(--muted); }
.al-who .chip { margin-left: 8px; }
.al-acts { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.al-acts .small-btn { margin-left: 0; }
.al-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.al-check input, .al-set input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; }
.al-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.al-codebox { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--accent); border-radius: 14px; background: var(--grad-soft); }
.al-code { font: 700 34px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; margin: 4px 0 6px; user-select: all; }
.al-set { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; cursor: pointer; }
.al-set input[type=checkbox] { margin-top: 2px; }
.al-set > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.al-set select { max-width: 100%; margin-top: 4px; }
.al-pad { width: 18px; flex: none; }
.al-times { padding: 0 0 10px 30px; font-size: 14px; }
.al-times input[type=time] { font: inherit; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--text); }
.al-times input[type=time]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.al-log td, .al-log th { padding: 7px 8px; font-size: 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.al-log th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.al-log td:first-child { white-space: nowrap; }
details.intro.card > summary { cursor: pointer; font-weight: 600; }
@media (max-width: 700px) {      /* телефон: 16px в полях — чтобы Safari не увеличивал страницу при вводе */
  .al-code { font-size: 28px; }
  .al-chat { align-items: flex-start; flex-direction: column; }
  .al-set select, .al-times input[type=time] { font-size: 16px; }
  .al-btns .btn { padding: 9px 14px; }
  .al-log { min-width: 520px; }
}

/* Нарушения в карточке разбора: свёрнутые «Не подтвердились» */
.analysis details { margin-top: 6px; }
.analysis details summary { cursor: pointer; font-size: 13px; }
