:root {
  /* Фирменные цвета «Тоёка»: бордовый, золото, крем */
  --brand: #8a000f; --brand-dark: #6d000c; --gold: #cd9739; --cream: #f4eee2;
  --bg: #faf7f1; --card: #fff; --text: #2a1a1c; --muted: #7a6a66; --line: #eadfd3;
  --primary: var(--brand); --danger: #b3261e; --warn: #9a6200; --ok: #2e7d32;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
main { padding: 16px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
a { color: var(--primary); }
.top { background: var(--brand); border-bottom: 3px solid var(--gold); padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; }
.top .logo img { height: 40px; display: block; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; flex: 1; }
.top nav a:not(.btn) { text-decoration: none; color: var(--cream); }
.top nav a:not(.btn):hover { color: var(--gold); }
.top nav .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--brand-dark); font-weight: 600; }
.who { display: flex; gap: 8px; align-items: center; color: var(--cream); font-size: 13px; opacity: .9; }
.who button.link { color: var(--gold); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.narrow { max-width: 380px; margin: 40px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 10px; }
.grid .wide { grid-column: span 2; }
label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
input, select, textarea { font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); width: 100%; }
input[type=checkbox] { width: 20px; height: 20px; }
.btn { display: inline-block; font: inherit; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.big { padding: 12px 28px; font-size: 16px; }
.btn.small { padding: 4px 10px; }
button.link { border: 0; background: none; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
details > summary { cursor: pointer; }
details.card > summary.btn { list-style: none; }
details[open] > summary { margin-bottom: 12px; }
.item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0 0 12px; }
.item-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.item.is-rejected { background: #fff5f5; }
.item .rejected-only { display: none; }
.item.is-rejected .rejected-only { display: flex; }
.item.is-rejected .accepted-only { display: none; }
.actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }
.total { font-weight: 600; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; background: #fafbfc; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.rejected td { color: var(--muted); text-decoration: line-through; }
tr.rejected td:last-child, tr.rejected td:nth-last-child(2) { text-decoration: none; }
tr.overdue td { background: #fff5f5; }
table.journal { font-size: 13px; }
tr.colnums th { text-align: center; padding: 2px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #eef0f3; color: var(--muted); white-space: nowrap; }
.tag.danger { background: #fdecea; color: var(--danger); font-weight: 600; }
.tag.warn { background: #fff4e0; color: var(--warn); }
.tag.ok { background: #e8f5e9; color: var(--ok); }
.cert-expired { color: var(--danger); font-weight: 600; }
.cert-missing { color: var(--warn); }
.badge { background: var(--gold); color: var(--brand-dark); border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.btn.primary:hover { background: var(--brand-dark); }
h1 { color: var(--brand); }
th { background: #f7f0e6 !important; }
.login-logo { display: block; margin: 0 auto 16px; background: var(--brand); border-radius: 10px; padding: 12px; width: 100%; max-width: 320px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters label { width: auto; }
form.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
form.inline input[type=date] { width: auto; padding: 4px; }
.notes { list-style: none; padding: 0; }
.notes li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.notes li.unread { border-left: 4px solid var(--danger); }
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .wide { grid-column: 1 / -1; }
}
@media print {
  .top, .filters, .actions, button { display: none !important; }
  main { padding: 0; max-width: none; }
  .table-wrap { border: 0; overflow: visible; }
  th, td { border: 1px solid #999; }
  @page { size: A4 landscape; margin: 10mm; }
}
.hint { margin: 0 0 8px; color: var(--primary); }
.warnings { margin-top: 10px; background: #fff4e0; color: var(--warn); border-radius: 8px; padding: 4px 12px; }
#recognize-status { display: inline-block; margin-left: 8px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 6px 12px; border-radius: 16px; text-decoration: none; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tabs a.active .muted { color: var(--cream); }
.filters a.active { font-weight: 600; color: var(--text); }
.issue-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.issue p { margin: 8px 0; }
.issue.status-resolved, .issue.status-skipped { opacity: .75; }
.issue-form { display: flex; flex-direction: column; gap: 8px; }
.issue-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cert-status { white-space: nowrap; }
.danger-link { color: var(--danger) !important; }
details.cert { border-top: 1px solid var(--line); padding: 10px 0; }
details.cert > summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
details.add { margin-top: 12px; }
details.add > summary { list-style: none; display: inline-block; }
.add-product { flex: 1 1 100%; }
.add-product > summary { list-style: none; display: inline-block; }
#product-search { max-width: 360px; }
.tag.muted { background: #eef0f3; color: var(--muted); }
.item-main { display: grid; grid-template-columns: minmax(200px, 3fr) 80px repeat(3, minmax(80px, 1fr)) minmax(130px, 1.3fr); gap: 10px; margin-bottom: 8px; }
.item-cert { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 10px; }
.item-cert details[open] { flex: 1 1 100%; }
.cert-state.ok { color: var(--ok); }
.cert-state.warn { color: var(--warn); }
.cert-state.danger { color: var(--danger); font-weight: 600; }
.hint .warn { color: var(--warn); font-weight: 600; }
.totals { font-weight: 600; }
.totals .check-ok { color: var(--ok); }
.totals .check-bad { color: var(--danger); }
@media (max-width: 800px) {
  .item-main { grid-template-columns: 1fr 1fr; }
  .item-main .f-name { grid-column: 1 / -1; }
}
input.need { border-color: var(--danger); background: #fff3f2; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tag.pay-new { background: #fff4e0; color: var(--warn); }
.tag.pay-in_bank { background: #f6ecd7; color: #7a5518; }
.tag.pay-paid { background: #e8f5e9; color: var(--ok); }
.draft-note { background: #fff4e0; border-color: #f0d9a8; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cert-cell { min-width: 220px; }
.cert-fix[open] { margin-top: 6px; }
.cert-fix-box { border-top: 1px solid var(--line, #e6dccb); padding-top: 8px; margin-top: 8px; }
.cert-fix-box p { margin: 0; }
.pay-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-bar { position: sticky; bottom: 0; background: var(--brand); color: var(--cream); padding: 10px 14px; border-radius: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: 0 -4px 12px rgba(0,0,0,.12); }
.pay-bar .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--brand-dark); font-weight: 600; }
.pay-bar input[type=date] { width: auto; padding: 4px; }
.paid-group { display: inline-flex; gap: 6px; align-items: center; }
.cert-choice { flex: 1 1 100%; background: #fff4e0; border-radius: 8px; padding: 6px 10px; }
.cert-choice p { margin: 0 0 4px; }
.cert-choice .warn { color: var(--warn); font-weight: 600; }
.delete-receipt { margin: 20px 0; text-align: right; }
.who a.me { color: var(--cream); }
.who a.me:hover { color: var(--gold); }
.ok-note { color: var(--ok); font-weight: 600; }
.cert-choice label.check { display: flex; gap: 8px; align-items: center; justify-content: flex-start; margin: 2px 0; font-size: 13px; }
.cert-choice input[type=radio] { width: 16px; height: 16px; flex: none; }
[hidden] { display: none !important; }
.item-cert { display: block; margin-bottom: 10px; }
.cert-modes { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.cert-modes .cert-title { color: var(--muted); }
.cert-modes label.check { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; }
.cert-modes input[type=radio] { width: 16px; height: 16px; }
.item-cert .cert-state { margin: 4px 0; }
.cert-ref-box { display: flex; flex-direction: column; max-width: 520px; margin-top: 4px; }
.cert-manual { margin-top: 4px; }
.flash { border-color: #d9c69b; background: #fffaf0; }
.flash li.warn { color: var(--warn); font-weight: 600; }
h2 .btn.small { margin-left: 10px; font-size: 13px; vertical-align: middle; }
.picked-files { margin: 4px 0 0; padding-left: 20px; color: var(--text); }
.picked-files li { margin: 2px 0; }
.picked-files .add-more { list-style: none; margin-left: -20px; }
tr.row-error td { background: #ffd9dc !important; color: #8b0010; font-weight: 600; }
tr.row-error td:first-child { box-shadow: inset 4px 0 0 var(--danger); }
.error-banner { background: #ffd9dc; color: #8b0010; font-weight: 700; padding: 10px 14px; border-radius: 8px; }
.warn-banner { background: #fff4e0; color: var(--warn); padding: 10px 14px; border-radius: 8px; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.card.month { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.card.month:hover { border-color: var(--gold); }
.card.month.has-errors { border-left: 5px solid var(--danger); }
.title-page { display: none; text-align: center; }
.title-page .tp-name { font-size: 34px; margin: 60px 0 8px; color: var(--text); }
.title-page .tp-sub { font-size: 18px; font-weight: 600; }
.title-page .tp-org { font-size: 16px; margin-top: 40px; }
.title-page .tp-period { font-size: 18px; margin: 40px 0; }
.title-page .tp-dates, .title-page .tp-resp { font-size: 15px; text-align: left; margin-left: 50%; }
dialog { border: 0; border-radius: 12px; padding: 20px; max-width: 520px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(40, 0, 5, .45); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media print {
  .no-print { display: none !important; }
  .title-page { display: block; page-break-after: always; min-height: 90vh; }
  tr.row-error td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media screen { .title-page { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 20px 20px; margin-bottom: 14px; }
  .title-page .tp-name { margin-top: 20px; } .title-page .tp-org { margin-top: 10px; } .title-page .tp-period { margin: 16px 0; } }
.toast { position: fixed; top: 70px; right: 16px; z-index: 50; padding: 10px 16px; border-radius: 10px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); animation: toast-out 4s forwards; }
.toast-ok { background: #e8f5e9; color: var(--ok); border: 1px solid #b7dfba; }
.toast-error { background: #ffd9dc; color: #8b0010; border: 1px solid #f1a3aa; animation: none; }
@keyframes toast-out { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media print { .toast { display: none; } }
@media print {
  .title-page { padding-top: 40mm; }
  .title-page .tp-org { font-size: 16pt; } .title-page .tp-address { font-size: 13pt; }
  .title-page .tp-name { font-size: 40pt; margin-top: 30mm; } .title-page .tp-sub { font-size: 18pt; }
  .title-page .tp-basis { font-size: 11pt; } .title-page .tp-period { font-size: 18pt; margin: 20mm 0; }
  .title-page .tp-dates, .title-page .tp-resp { font-size: 14pt; }
}

.services { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.svc { color: var(--cream); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.svc .dot { width: 10px; height: 10px; border-radius: 50%; background: #9a8f8a; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.svc-on .dot { background: #3fbf5f; }
.svc-off .dot { background: #ff3b3b; }
/* Показатели */
.dash-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.dash-head h1 { margin-bottom: 0; }
.dash-head input[type=month] { width: auto; padding: 4px 6px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 6px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 24px; font-weight: 600; margin: 2px 0 4px; white-space: nowrap; }
.delta { font-size: 13px; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.delta .muted { color: var(--muted); }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .base { stroke: #cbbfb2; stroke-width: 1; }
svg.chart .axis { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
svg.chart .bar path { fill: var(--brand); }
svg.chart .bar.weekend path { fill: var(--gold); }
svg.chart .bar .hit { fill: transparent; }
svg.chart .bar:hover path { opacity: .75; }
svg.chart .avg { stroke: var(--text); stroke-width: 1; opacity: .45; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); margin-bottom: 6px; }
.legend .key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.legend .key:first-child { margin-left: 0; }
.key-weekday { background: var(--brand); }
.key-weekend { background: var(--gold); }
.key-line { display: inline-block; width: 16px; border-top: 1px solid var(--text); opacity: .45; margin-left: 8px; }
.peaks { margin: 0; padding-left: 22px; }
table.heatmap { width: auto; min-width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; }
table.heatmap th, table.heatmap td { text-align: center; padding: 6px 4px; min-width: 34px; border: 2px solid var(--card); }
table.heatmap tbody th { text-align: left; }
.meter-cell { width: 30%; vertical-align: middle; }
.meter { display: block; height: 8px; background: #f2e6d6; border-radius: 4px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
tr.weekend-row td { background: #fcf7ee; }
details.card > summary h2 { margin: 0; }
.chart-wrap { overflow-x: auto; }
@media (max-width: 700px) { svg.chart { min-width: 640px; } }
.tips { list-style: none; padding: 0; margin: 0 0 8px; }
.tip { border-left: 4px solid var(--line); padding: 8px 12px; margin-bottom: 8px; background: #fcf9f4; border-radius: 0 8px 8px 0; }
.tip-down { border-left-color: var(--danger); }
.tip-up { border-left-color: var(--ok); }
.tip-idea { border-left-color: var(--gold); }
.tip-mark { display: inline-block; font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 6px; white-space: nowrap; }
table.weeks td.wk-low, span.wk-low { background: #fdecea; color: var(--danger); font-weight: 600; padding: 0 4px; }
table.weeks td.wk-high, span.wk-high { background: #e8f5e9; color: var(--ok); font-weight: 600; padding: 0 4px; }
table.weeks td.wk-low, table.weeks td.wk-high { padding: 8px 10px; }
.nowrap { white-space: nowrap; }
table.weeks { font-variant-numeric: tabular-nums; }
/* Разделы: «Входной контроль» и «Управление», под шапкой — пункты раздела */
.top nav.sections { gap: 6px; }
.top nav.sections a { padding: 6px 14px; border-radius: 18px; font-weight: 600; }
.top nav.sections a.active { background: var(--cream); color: var(--brand) !important; }
.subnav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.subnav a:not(.btn) { text-decoration: none; color: var(--text); padding: 4px 0; border-bottom: 2px solid transparent; }
.subnav a:not(.btn):hover { color: var(--brand); }
.subnav a.active { color: var(--brand); border-bottom-color: var(--gold); font-weight: 600; }
.subnav .btn.primary { font-weight: 600; }
/* Обзор: карточки-ссылки на отчёты */
.overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
a.ov-card { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
a.ov-card:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(138, 0, 15, .08); }
.ov-card .ov-title { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.ov-card .ov-title::after { content: "→"; color: var(--brand); }
.ov-card.soon .ov-title::after { content: ""; }
.ov-card .ov-value { font-size: 24px; font-weight: 600; }
.ov-card svg { width: 100%; height: 44px; margin-top: auto; }
.ov-card svg rect { fill: var(--brand); }
.ov-card svg rect.weekend { fill: var(--gold); }
.mini-heat { display: grid; gap: 2px; margin-top: auto; }
.mini-heat span { display: block; height: 9px; border-radius: 2px; background: #f7f0e6; }
.ov-card.soon { background: #fcf9f4; border-style: dashed; }
.tips a { white-space: nowrap; }
@media (max-width: 600px) { .top nav.sections a { padding: 4px 10px; font-size: 14px; } .subnav { gap: 4px 14px; } }
ul.fields { columns: 3 260px; column-gap: 20px; list-style: none; padding: 0; margin: 0; font-size: 11px; line-height: 1.3; }
ul.fields li { break-inside: avoid; padding: 1px 0; }
ul.fields code { color: var(--muted); font-size: 10px; }
.steps { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.steps .step { flex: 1 1 140px; background: #fcf9f4; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.steps .step.start { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; text-align: center; font-weight: 600; }
.steps .arrow { align-self: center; color: var(--gold); font-weight: 700; }
.step-name { font-size: 13px; color: var(--muted); }
.step-value { font-size: 22px; font-weight: 600; }
@media (max-width: 600px) { .steps .arrow { display: none; } }
table.orders { font-size: 13px; font-variant-numeric: tabular-nums; }
tr.late-row td { background: #fff5f5; }
table.heatmap td a.cell { display: block; color: inherit; text-decoration: none; margin: -6px -4px; padding: 6px 4px; }
table.heatmap td a.cell:hover { outline: 2px solid var(--gold); outline-offset: -2px; }
a.tile { text-decoration: none; color: inherit; display: block; }
a.tile:hover { border-color: var(--gold); }
.ov-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: var(--brand-dark); font-size: 12px; font-weight: 700; margin-left: 6px; }
.ov-card .ov-title .ov-left { display: inline-flex; align-items: center; }
.norm-form { display: inline-flex; gap: 6px; align-items: center; }
.norm-form input { width: 70px; padding: 4px 6px; }
/* Кружок с числом подсказок — бордовый, в правом верхнем углу карточки */
a.ov-card { position: relative; }
a.ov-card .ov-badge { position: absolute; top: -9px; right: -9px; margin: 0; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--brand); color: var(--gold); border: 2px solid var(--bg); font-size: 13px; font-weight: 700; box-shadow: 0 1px 4px rgba(138, 0, 15, .25); }
.forecast .ov-value { font-size: 26px; font-weight: 600; }
.dish-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.dish-cols h3 { font-size: 15px; margin: 4px 0 8px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
/* Справка «?» в правом верхнем углу блока */
section.card, details.card, .tiles.has-help { position: relative; }
details.help { position: absolute; top: 10px; right: 10px; z-index: 5; }
.tiles.has-help > details.help { top: -10px; right: -10px; }
details.help > summary { list-style: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--gold); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid var(--bg); box-shadow: 0 1px 4px rgba(138, 0, 15, .25); }
details.help > summary::-webkit-details-marker { display: none; }
details.help[open] > summary { margin: 0; background: var(--gold); color: var(--brand); }
.help-pop { position: absolute; right: 0; top: 30px; width: min(380px, calc(100vw - 40px)); background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 8px; padding: 10px 14px; box-shadow: 0 6px 24px rgba(42, 26, 28, .18); font-size: 13px; line-height: 1.45; color: var(--text); font-weight: normal; }
.help-pop p { margin: 6px 0; }
section.card > h2, details.card > summary { padding-right: 34px; }
.tiles.has-help { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* Справка «?» — бледная, не отвлекает */
details.help > summary { background: transparent; color: #b3a49a; border: 1px solid #e3d8cc; box-shadow: none; font-weight: 600; font-size: 13px; width: 22px; height: 22px; }
details.help > summary:hover { color: var(--brand); border-color: var(--gold); background: #fff; }
details.help[open] > summary { background: #fff; color: var(--brand); border-color: var(--gold); }
.help-pop { border-top: 3px solid var(--gold); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; margin-bottom: 8px; }
.check-grid label.check { font-size: 14px; align-items: flex-start; }
.inline-label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
.inline-label input { width: auto; }
.period-nav .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-right: 6px; }
.period-nav .seg a { padding: 4px 12px; text-decoration: none; color: var(--text); font-size: 14px; background: #fff; }
.period-nav .seg a + a { border-left: 1px solid var(--line); }
.period-nav .seg a.active { background: var(--brand); color: #fff; }
.period-nav input[type=date] { width: auto; padding: 4px 6px; }
ul.buckets { list-style: none; padding: 0; margin: 4px 0 0; font-size: 13px; }
ul.buckets li { display: grid; grid-template-columns: 110px 1fr 28px; gap: 6px; align-items: center; padding: 2px 0; }
ul.buckets strong { text-align: right; }
.bucket-bar { height: 6px; background: #f2e6d6; border-radius: 3px; overflow: hidden; }
.bucket-bar span { display: block; height: 100%; background: var(--brand); }
.bonus-input { width: 70px; padding: 3px 6px; text-align: right; }
.comp-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
details.comp-rules > summary { cursor: pointer; }
details.comp-rules .norm-form { flex-wrap: wrap; margin-top: 8px; }
/* Шестерёнка «Настройки» в шапке — только у управляющего */
.top a.gear { color: var(--cream); font-size: 20px; line-height: 1; padding: 4px 8px; border-radius: 50%; text-decoration: none; opacity: .9; }
.top a.gear:hover { color: var(--gold); opacity: 1; }
.top a.gear.active { background: var(--cream); color: var(--brand) !important; opacity: 1; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.settings-grid .card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.settings-grid .card a.more { margin-top: auto; }
