/* Кабинет поддержки: рабочая поверхность, не маркетинговая витрина */
body.is-cabinet {
  background: #eef1f4;
  color: #1c2430;
}
body.is-cabinet .site-header {
  background: #1c2430;
  border-bottom: 1px solid #2c3644;
}
body.is-cabinet .logo-text,
body.is-cabinet .site-nav a { color: #f3f0e6; }
body.is-cabinet .site-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
body.is-cabinet .btn-ghost {
  color: #f3f0e6;
  border-color: rgba(243,240,230,.35);
}
body.is-cabinet .btn-ghost:hover { color: #fff; border-color: #fff; }
body.is-cabinet .nav-toggle span { background: #f3f0e6; }
body.is-cabinet main { padding: 28px 0 72px; }
body.is-cabinet .site-footer { background: #1c2430; color: #c9c3b5; }
body.is-cabinet .site-footer a { color: #dce4f5; }

.cabinet h1 { margin: 0 0 12px; font-size: clamp(1.5rem, 3vw, 2rem); }
.cab-auth { max-width: 480px; padding-top: 24px; }
.cab-form {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #d5dce6;
}
.cab-form--wide { max-width: 760px; }
.cab-form label { font-weight: 650; margin-top: 8px; }
.cab-form input,
.cab-form select,
.cab-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #c5ced9;
  border-radius: 10px;
  font: inherit;
}
.cab-form textarea { min-height: 160px; resize: vertical; }
.cab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.cab-error { color: #9b1c1c; }
.cab-ok { color: #1f7a4d; }
.cab-links { display: flex; gap: 16px; flex-wrap: wrap; }
.cab-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.cab-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cab-filters input,
.cab-filters select {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #c5ced9;
  font: inherit;
}
.cab-list { display: grid; gap: 8px; }
.cab-item {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid #d5dce6;
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  min-height: 64px;
}
.cab-item:hover { border-color: #2451b8; }
.cab-num { font-family: var(--mono); font-weight: 700; color: #2451b8; }
.cab-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #c5ced9;
  font-size: .85rem;
  font-weight: 650;
}
.cab-status--need_info { border-color: #9a5b12; }
.cab-status--in_progress { border-color: #2451b8; }
.cab-status--resolved, .cab-status--closed { border-color: #1f7a4d; }
.cab-status--critical, .cab-prio--critical { border-color: #9b1c1c; color: #9b1c1c; }
.cab-note {
  background: #fff;
  border-left: 4px solid #2451b8;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 16px;
}
.cab-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.cab-check input { width: auto; min-height: 22px; margin-top: 4px; }
.cab-thread { display: grid; gap: 12px; margin: 20px 0; }
.cab-msg {
  background: #fff;
  border: 1px solid #d5dce6;
  border-radius: 12px;
  padding: 14px 16px;
}
.cab-msg time { color: #4a5564; font-size: .85rem; }
.cab-dash .problem-card { background: #fff; }
.cab-pager { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.cab-pager button[aria-current="page"] { background: #2451b8; color: #fff; }
.hint { color: #4a5564; font-size: .92rem; margin: 0; }
.flow--list { padding-left: 1.2em; line-height: 1.7; }

.cab-inline { display: flex; gap: 8px; align-items: stretch; }
.cab-inline input { flex: 1; }
.cab-inline .btn { min-height: 44px; white-space: nowrap; }
.cab-admin-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}
.cab-msg--internal {
  background: #fff8e8;
  border-color: #e0c56a;
}
.cab-bill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #c5ced9;
  font-size: .85rem;
  font-weight: 650;
  white-space: nowrap;
}
.cab-bill--paid { border-color: #1f7a4d; color: #1f7a4d; background: #eef8f2; }
.cab-bill--unpaid { border-color: #9b1c1c; color: #9b1c1c; background: #fdeeee; }
.cab-bill--expired { border-color: #9a5b12; color: #9a5b12; background: #fff6ea; }
.cab-bill--none { border-color: #6b7280; color: #4a5564; background: #f3f4f6; }
.cab-bill-panel {
  background: #fff;
  border: 1px solid #d5dce6;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0 20px;
}
.cab-bill-panel h2 { margin: 0 0 8px; font-size: 1.05rem; }
.cab-bill-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 160px minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
  margin-top: 12px;
}
.cab-bill-form label { display: block; font-weight: 650; margin-bottom: 4px; font-size: .85rem; }
.cab-bill-form select,
.cab-bill-form input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #c5ced9;
  border-radius: 10px;
  font: inherit;
}
.cab-bill-form .btn { min-height: 44px; white-space: nowrap; }
.cab-bill-form .cab-error { grid-column: 1 / -1; margin: 0; }
.cab-item--admin { grid-template-columns: 170px 1fr auto auto; }
.cab-item--org {
  grid-template-columns: 1fr;
  align-items: stretch;
}
.cab-item--org .cab-org-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.cab-item--visit {
  grid-template-columns: minmax(140px, 1.1fr) minmax(140px, 1.2fr) minmax(160px, 1.4fr) auto;
  align-items: start;
}
.cab-item--visit span { color: #4a5564; font-size: .92rem; }
.cab-item--visit time { color: #4a5564; font-size: .85rem; white-space: nowrap; }
.cab-bill--src { max-width: 100%; white-space: normal; }
.cab-bill--country {
  border-color: #0f766e;
  color: #0f766e;
  background: #ecfdf8;
  font-weight: 600;
}
.cab-bill--search { border-color: #2451b8; color: #2451b8; background: #eef3fc; }
.cab-bill--social { border-color: #6b21a8; color: #6b21a8; background: #f6eefe; }
.cab-bill--referral { border-color: #9a5b12; color: #9a5b12; background: #fff6ea; }
.cab-bill--direct { border-color: #6b7280; color: #4a5564; background: #f3f4f6; }
.cab-bill--internal { border-color: #2451b8; color: #1f3f8a; background: #eef3fc; }
.cab-bill--email, .cab-bill--paid { border-color: #1f7a4d; color: #1f7a4d; background: #eef8f2; }

@media (max-width: 768px) {
  .cab-grid, .cab-item, .cab-toolbar { display: flex; flex-direction: column; }
  .cab-form { padding: 16px; }
  .cab-filters { flex-direction: column; }
  .cab-filters input, .cab-filters select, .cab-filters .btn { width: 100%; }
  .cab-admin-tools, .cab-inline, .cab-bill-form { display: flex; flex-direction: column; }
}
