:root {
  --ink: #0b0b0b;
  --ink-soft: #1c1b18;
  --yellow: #ffd700;
  --yellow-soft: #fff3b0;
  --paper: #ffffff;
  --bg: #f6f5f1;
  --line: #e5e2d9;
  --muted: #77736a;
  --danger: #c62828;
  --ok: #1f7a45;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 11, 11, .04), 0 12px 32px rgba(11, 11, 11, .06);
  --serif: "Georgia", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ---------- buttons ---------- */

.btn {
  font: 600 14px/1 var(--sans);
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 2px 0 var(--ink);
}
.btn-primary:hover { background: #ffe333; }
.btn-primary:disabled { opacity: .6; cursor: progress; }

.btn-ghost {
  background: transparent;
  color: #e9e5da;
  border-color: #3a3832;
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }

.btn-dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-dark:hover { background: var(--ink-soft); }

/* ---------- login ---------- */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--paper);
}

.login-brand {
  position: relative;
  background: var(--ink);
  color: #f4f1e8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px clamp(32px, 7vw, 96px);
  overflow: hidden;
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -320px;
  bottom: -320px;
  border: 1px solid rgba(255, 215, 0, .18);
  transform: rotate(45deg);
}

.login-brand::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -220px;
  bottom: -220px;
  background: rgba(255, 215, 0, .07);
  transform: rotate(45deg);
}

.brand-mark { margin-bottom: 28px; color: rgba(255, 255, 255, .35); }

.login-brand h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 54px);
  letter-spacing: .04em;
  margin: 0 0 10px;
  font-weight: 700;
}

.brand-sub {
  margin: 0 0 32px;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 11px;
  font-weight: 600;
}

.brand-note {
  max-width: 380px;
  margin: 0;
  color: #b9b4a7;
  font-size: 15px;
  line-height: 1.6;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-form {
  width: 100%;
  max-width: 360px;
  display: grid;
  gap: 16px;
}

.login-form h2 {
  font-family: var(--serif);
  font-size: 26px;
  margin: 0 0 8px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  font: 15px/1.4 var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, .45);
}

.error {
  margin: 0;
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.login-foot {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.check-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #ffd700;
  cursor: pointer;
}

#captcha-box {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
#captcha-question { font-weight: 700; color: var(--ink); }

/* ---------- app shell ---------- */

.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  background: var(--ink);
  color: #efece2;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid #262420;
  margin-bottom: 14px;
}

.sidebar-logo {
  width: 100%;
  max-width: 170px;
  height: auto;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  margin: 0 auto;
  display: block;
}

.sidebar-head strong {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .06em;
  color: #fff;
}

.sidebar-head span {
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--yellow);
}

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #cfcabd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}

.nav a:hover { background: #191814; color: #fff; }

.nav a.active {
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}

.nav a .ico {
  width: 18px;
  text-align: center;
  font-size: 13px;
  opacity: .8;
}

.nav a.active .ico { opacity: 1; }

.sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #262420;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.who { display: grid; gap: 2px; min-width: 0; }
.who span { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { font-size: 11px; color: #8d887c; }

.sidebar-foot .btn { padding: 8px 12px; font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px clamp(18px, 3vw, 36px) 18px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid transparent;
}

.topbar h1 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0;
  letter-spacing: .01em;
}

.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.topbar-right { margin-left: auto; }

.period {
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 9px;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
}

.content { padding: 6px clamp(18px, 3vw, 36px) 48px; }

/* ---------- cards ---------- */

.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.card .value {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.card .hint { margin-top: 8px; font-size: 12px; color: var(--muted); }

.card.accent { border-left: 4px solid var(--yellow); }

.empty {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
  color: var(--muted);
}

.empty strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--yellow-soft);
  border: 1px solid #e8d98a;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: #fbfaf7; }
tr:last-child td { border-bottom: 0; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 44px 24px 36px; }
  .login-brand::before, .login-brand::after { display: none; }
  .brand-note { display: none; }

  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 60px rgba(0, 0, 0, .5);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .card { padding: 14px 15px; }
  .card .value { font-size: 24px; }
  .topbar { padding: 16px 14px 12px; }
  .content { padding: 4px 14px 40px; }
  .period { display: none; }
}

/* ---------- forms & tables ---------- */

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 16px 0;
}
.toolbar label { min-width: 170px; }
.toolbar-spacer { flex: 1; }

.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1; min-width: 170px; }

.btn-sm { padding: 7px 11px; font-size: 12px; }

.badge-muted { background: #f0eee7; border-color: #ddd9cc; color: #8a857a; }

.muted { color: var(--muted); }
.small { font-size: 12px; }

table select {
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 13px;
  width: auto;
  min-width: 120px;
}

td .badge { white-space: nowrap; }

/* ---------- notifications ---------- */

.topbar-right { display: flex; align-items: center; gap: 10px; position: relative; }

.bell {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.bell:hover { border-color: var(--ink); }

.bell-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--yellow);
  border: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notif-panel {
  position: absolute;
  top: 64px;
  right: clamp(18px, 3vw, 36px);
  width: min(380px, calc(100vw - 28px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 30;
  overflow: hidden;
}

.notif-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #fbfaf7; }
.notif-item.unread { background: #fffbe6; }
.notif-item strong { display: block; font-size: 13px; }
.notif-item span { font-size: 12px; color: var(--muted); }

.notif-empty { padding: 20px 14px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- deal detail ---------- */

.badge-warn { background: #fff1d6; border-color: #ecd39a; color: #8a5b00; }
.badge-danger { background: #fdeaea; border-color: #f0c3c3; color: #a01f1f; }

.detail-head {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn-link {
  background: none;
  border: 0;
  color: var(--muted);
  font: 600 13px var(--sans);
  cursor: pointer;
  padding: 6px 0;
}
.btn-link:hover { color: var(--ink); }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.meta-grid .item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.meta-grid .item span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.meta-grid .item strong { font-family: var(--serif); font-size: 19px; }

@media (max-width: 860px) {
  .meta-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- plan table ---------- */

.plan-table th, .plan-table td { padding: 8px 10px; }
.plan-table .cell-input {
  width: 74px;
  padding: 7px 8px;
  font-size: 13px;
  text-align: right;
}
.plan-table .fact-cell { color: var(--ok); font-weight: 600; }
.plan-table td:first-child { min-width: 190px; }

.rec-item { font-size: 14px; line-height: 1.5; }
.rec-item + .rec-item { margin-top: 6px; }

.small-value { font-size: 18px !important; letter-spacing: .01em; }

.section-title {
  font-family: var(--serif);
  font-size: 22px;
  margin: 26px 0 12px;
}

/* ---------- login logo ---------- */

.brand-logo {
  width: min(300px, 78%);
  height: auto;
  background: #fff;
  padding: 18px 22px;
  border-radius: 18px;
  margin-bottom: 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

/* ---------- period switcher ---------- */

.period-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.source-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 9px 16px;
  font: 600 13px var(--sans);
  cursor: pointer;
  color: var(--ink);
}
.chip:hover { border-color: var(--ink); }
.chip-active {
  background: var(--yellow);
  border-color: var(--ink);
  box-shadow: 0 2px 0 var(--ink);
}

.year-select {
  width: auto;
  min-width: 96px;
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}

.month-chip {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 9px;
  padding: 8px 4px;
  font: 600 12px var(--sans);
  cursor: pointer;
  color: var(--ink);
}
.month-chip:hover { border-color: var(--ink); }
.month-chip.is-current { outline: 2px solid var(--yellow-soft); }
.month-chip.chip-active {
  background: var(--yellow);
  border-color: var(--ink);
}

@media (max-width: 900px) {
  .month-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- plan blocks ---------- */

.plan-block { margin-bottom: 16px; padding: 16px 16px 12px; }

.plan-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.plan-table { min-width: 860px; }
.plan-table .metric-col { min-width: 190px; text-align: left; }
.plan-table .day-head {
  font-size: 11px;
  letter-spacing: .04em;
  background: #fbfaf7;
  white-space: nowrap;
}
.plan-table .plan-col { background: #fffdf0; }
.plan-table .fact-col { background: #f7f9f7; color: var(--ink); }
.plan-table .cell-input {
  width: 58px;
  padding: 6px 6px;
  font-size: 13px;
  text-align: right;
  border-radius: 7px;
}
.plan-table .plan-readonly { font-weight: 600; }
.plan-table .total-col { white-space: nowrap; font-size: 12px; text-align: left; }
.plan-table td, .plan-table th { padding: 8px 8px; }

.date-input { width: auto; min-width: 170px; }

.today-label {
  font-weight: 700;
  font-size: 15px;
  border: 1px solid var(--line);
  background: var(--yellow-soft);
  padding: 8px 14px;
  border-radius: 999px;
}

.conv-list { margin-top: 8px; display: grid; gap: 4px; }.conv-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.conv-row strong { color: var(--ink); }

.leaders-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.leader-row { display: grid; gap: 6px; }.leader-label { font-size: 12px; font-weight: 700; color: var(--muted); }

@media (max-width: 860px) {
  .leaders-grid { grid-template-columns: 1fr; }
}

.schedule-editor {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.schedule-row { gap: 8px; }
.schedule-row input[type="date"] { width: auto; min-width: 160px; flex: 0 0 auto; }
.schedule-row input[type="number"] { min-width: 130px; }

/* строки с недоплатой в потенциалах */
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #faf8f1; }

tr.row-debt td { background: #fde9ee; }
tr.row-debt:hover td { background: #fbdde4; }
.debt-note {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #a01f1f;
}


/* ---------- отчёты по дням ---------- */

.day-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 14px;
}

.day-cell {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: 600 13px var(--sans);
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .06s ease;
}
.day-cell:hover { transform: translateY(-1px); }

.day-ok { background: #d8f0df; border-color: #a9d8b6; color: #1f6b3b; }
.day-miss { background: #fde9ee; border-color: #f6cfd9; color: #9c4a5e; }
.day-future { background: #f4f3ee; color: #9a958a; border-color: #e4e0d4; }

.day-selected {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.card.pink {
  background: #fde9ee;
  border-color: #f6cfd9;
}
.card.pink h3 { color: #9c4a5e; }

.card.ok {
  background: #e3f4e9;
  border-color: #b5ddc2;
}
.card.ok h3 { color: #1f6b3b; }

.day-debt { background: #fbd5d5; border-color: #efb0b0; color: #9c2222; }
.day-debt:hover { background: #f7c3c3; }

.conv-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.app-footer {
  margin-top: auto;
  padding: 18px clamp(18px, 3vw, 36px) 22px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .02em;
}


/* подпись внизу тёмной панели входа */
.login-brand .login-footer {
  position: absolute;
  left: clamp(32px, 7vw, 96px);
  right: clamp(32px, 7vw, 96px);
  bottom: 26px;
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: #8a857a;
  text-align: left;
  letter-spacing: .02em;
  max-width: 420px;
}

@media (max-width: 860px) {
  .login-brand .login-footer {
    position: static;
    margin-top: 22px;
    max-width: none;
  }
}

.scheme-table { min-width: 0; font-size: 13px; }
.scheme-table th { font-size: 11px; }
.scheme-table td, .scheme-table th { padding: 9px 12px; }
.scheme-formula {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fffbe6;
  border: 1px solid #ecdfa3;
  font-weight: 700;
  font-size: 13px;
}
.scheme-notes { margin: 8px 0 0; padding-left: 18px; }
.scheme-notes li { font-size: 13px; line-height: 1.5; color: #4a463d; margin-bottom: 4px; }

.bonus-label { font-weight: 700; color: #8a5b00; background: #fffbe6; }
.bonus-amount { color: #1f7b3f; }

.rec-danger {
  background: #fde9ee;
  border: 1px solid #f3b9c6;
  border-left: 4px solid #c62828;
  border-radius: 8px;
  padding: 10px 12px;
  color: #9c2222;
  font-weight: 600;
  margin-top: 8px;
}

.fact-good { color: #1f7b3f !important; font-weight: 700; }
.fact-bad { color: #c62828 !important; font-weight: 700; }

.week-head { background: #fffbe6; white-space: nowrap; }
.plan-table .plan-col, .plan-table .fact-col { min-width: 58px; }

.note-card {
  border-left: 4px solid #ffd700;
  background: #fffdf0;
  margin-bottom: 16px;
}
.note-card strong { font-size: 15px; }

.badge-info {
  background: #e8f1ff;
  color: #114c9c;
  border: 1px solid #b9d3f5;
}
.badge-dark {
  background: #1b1b1b;
  color: #ffd700;
  border: 1px solid #1b1b1b;
}

.report-card {
  padding: 12px 14px;
  border-left: 5px solid #b9b9b9;
}
.report-ok {
  border-left-color: #2e9e5b;
  background: #eef9f1;
}
.report-miss {
  border-left-color: #e56a9a;
  background: #fdeef4;
}
.report-ok .badge {
  background: #2e9e5b;
  color: #fff;
}
.report-miss .badge {
  background: #e56a9a;
  color: #fff;
}
.grid.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid.cols-2 { grid-template-columns: 1fr; } }

.badge-pink {
  background: #fdeef4;
  color: #a3245c;
  border: 1px solid #f3c4d8;
}

.help-block {
  padding: 10px 0;
  border-top: 1px solid #eee;
}
.help-block:first-of-type { border-top: none; }
.help-block .scheme-notes { margin: 6px 0 0; }

/* статусы в таблицах: по центру, одинаковый размер */
.table-wrap td select.cell-input {
  display: block;
  margin: 0 auto;
  width: 132px;
  min-width: 132px;
  text-align: center;
}
.table-wrap td:has(select.cell-input) {
  text-align: center;
  vertical-align: middle;
}
.table-wrap td .badge {
  display: inline-block;
}

.table-wrap td:has(.badge) {
  text-align: center;
}


/* статусные ячейки в таблице сделок: по центру по вертикали и горизонтали */
.table-wrap td { vertical-align: middle; }
.table-wrap td.status-cell {
  text-align: center;
  vertical-align: middle;
}
.table-wrap td.status-cell .cell-input,
.table-wrap td.status-cell select {
  display: block;
  margin: 0 auto;
  width: 130px;
  min-width: 130px;
  text-align: center;
}

