/* Проверки ДЦ — светлая тема, брендбук Пикассо (#931680 -> #F8B24D). */

:root {
  --brand: #931680;
  --brand-dark: #6d1060;
  --grad: linear-gradient(90deg, #931680, #d4478f, #f0779a, #F8B24D);
  --ink: #23202b;
  --ink-soft: #6b6575;
  --line: #e8e3ee;
  --bg: #f7f5fa;
  --card: #ffffff;
  --ok: #1e8e4c;
  --ok-bg: #e7f6ed;
  --fail: #c9283c;
  --fail-bg: #fdecee;
  --na: #8a8494;
  --na-bg: #f0eef3;
  --amber: #b97b0e;
  --amber-bg: #fdf3e0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Stem", "Golos Text", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1 { font-size: 24px; font-weight: 600; margin: 22px 0 10px; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.hint { color: var(--ink-soft); margin: 4px 0 18px; }

/* ---- шапка ---- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 26px; height: 58px; }
.grad-line { height: 3px; background: var(--grad); }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 14px; height: 14px; border-radius: 4px; background: var(--grad); align-self: center; }
.brand-mark.big { display: block; width: 42px; height: 42px; border-radius: 12px; margin: 0 auto 12px; }
.brand-name { font-weight: 600; font-size: 17px; }
.brand-sub { color: var(--ink-soft); font-size: 13px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-soft); }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.act { background: #f4e9f2; color: var(--brand); font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 12px; }
.uname { color: var(--ink-soft); font-size: 13px; }
.logout { color: var(--brand); text-decoration: none; font-size: 13px; }

/* ---- кнопки ---- */
.btn { display: inline-block; border: 1px solid transparent; border-radius: 9px; padding: 9px 16px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-wide { width: 100%; }
.btn-big { padding: 12px 28px; font-size: 16px; }
.btn-sm { padding: 4px 10px; font-size: 13px; font-weight: 500; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---- панели и формы ---- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; margin-bottom: 16px; }
label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.alert { background: var(--fail-bg); color: var(--fail); border-radius: 9px; padding: 10px 14px; margin: 10px 0; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }

/* ---- вход ---- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: var(--bg); margin: 0; font-family: "Stem", "Golos Text", system-ui, sans-serif; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 36px; width: 360px; box-shadow: 0 10px 40px rgba(147, 22, 128, .07); }
.login-logo { text-align: center; margin-bottom: 18px; }
.login-title { font-size: 21px; font-weight: 600; }
.login-sub { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }

/* ---- чек-лист ---- */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.skip-label { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.skip-label input { width: auto; margin: 0; display: inline-block; }
.sec.skipped h2 { color: var(--na); }
.item { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: none; }
.item-text { font-size: 14.5px; }
.item.is-fail .item-text { color: var(--fail); }
.fail-block { grid-column: 1 / -1; background: var(--fail-bg); border-radius: 10px; padding: 10px 12px; }
.fail-block textarea { margin-bottom: 8px; }
.photo-label { margin-bottom: 0; color: var(--fail); font-weight: 500; }

/* трехпозиционный переключатель */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { margin: 0; padding: 6px 13px; font-size: 13px; color: var(--ink-soft);
  cursor: pointer; user-select: none; border-left: 1px solid var(--line); background: #fff; }
.seg label:first-of-type { border-left: none; }
.seg input:checked + label.seg-ok { background: var(--ok); color: #fff; }
.seg input:checked + label.seg-fail { background: var(--fail); color: #fff; }
.seg input:checked + label.seg-na { background: var(--na); color: #fff; }

.submit-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 20px 0 40px; }
.counter { color: var(--ink-soft); }

/* ---- список ---- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-top: 22px; }
.page-head h1 { margin: 0; }
.filters { display: flex; gap: 10px; margin: 16px 0; }
.filters select { width: auto; display: inline-block; margin: 0; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; padding: 11px 12px; color: var(--ink-soft); font-weight: 500;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: none; }
.row-link { cursor: pointer; }
.row-link:hover { background: var(--bg); }
.num { font-weight: 600; }
.muted { color: var(--na); }
.score { font-weight: 600; padding: 3px 9px; border-radius: 7px; }
.score.good { background: var(--ok-bg); color: var(--ok); }
.score.mid { background: var(--amber-bg); color: var(--amber); }
.score.bad { background: var(--fail-bg); color: var(--fail); }
.badge { padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.b-open { background: var(--amber-bg); color: var(--amber); }
.b-done { background: var(--ok-bg); color: var(--ok); }
.big-badge { font-size: 14px; padding: 5px 14px; }
.overdue { color: var(--fail); font-weight: 600; }
.empty { text-align: center; color: var(--ink-soft); padding: 60px 0; }

/* ---- карточка ---- */
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 20px; margin-bottom: 16px; }
@media (max-width: 720px) { .meta-grid { grid-template-columns: 1fr 1fr; } }
.meta-k { display: block; font-size: 12px; color: var(--ink-soft); }
.score-line { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px; }
.score-bar { flex: 1; height: 10px; background: var(--na-bg); border-radius: 6px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 6px; }
.score-fill.good { background: var(--ok); }
.score-fill.mid { background: #e09c1d; }
.score-fill.bad { background: var(--fail); }
.score-text { white-space: nowrap; }
.comment { background: var(--bg); border-radius: 10px; padding: 10px 14px; }
.card-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.toggle-all { display: flex; align-items: center; gap: 7px; margin: 0; }
.toggle-all input { width: auto; margin: 0; display: inline-block; }
.citem { padding: 10px 0; border-top: 1px solid var(--line); }
.citem:first-of-type { border-top: none; }
.citem-head { display: flex; gap: 10px; align-items: baseline; }
.citem-text { font-size: 14.5px; }
.mark { flex-shrink: 0; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.mark-ok { background: var(--ok-bg); color: var(--ok); }
.mark-fail { background: var(--fail-bg); color: var(--fail); }
.mark-na { background: var(--na-bg); color: var(--na); }
.citem-note { margin: 6px 0 0 4px; padding-left: 10px; border-left: 3px solid var(--fail); color: var(--ink); }
.gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.gallery img { width: 130px; height: 98px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.sec-skipped h2 { color: var(--na); margin-bottom: 2px; }
.row-actions { white-space: nowrap; }
.row-actions .btn { margin-left: 6px; }
