﻿/* MES-aligned cabinet + admin shell */

:root {
  --sidebar: #0c1518;
  --sidebar-2: #122024;
  --topbar-h: 76px;
  --accent-dark: #0f8f7e;
}

body.admin-body,
body.is-cabinet,
body.is-admin {
  min-height: 100vh;
  background: var(--bg);
}

.admin-shell {
  min-height: 100vh;
}

.sidebar-backdrop[hidden] {
  display: none !important;
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  color: #eef0f2;
  background: var(--sidebar);
  flex-direction: column;
  transition: transform 0.25s;
}

.sidebar__workspace {
  display: flex;
  margin: 14px 14px 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  background: var(--sidebar-2);
  color: inherit;
  text-decoration: none;
  align-items: center;
  gap: 11px;
}

.sidebar__workspace:hover {
  color: inherit;
  text-decoration: none;
}

.workspace-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.sidebar__workspace > div,
.user-menu div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sidebar__workspace b {
  font-size: 12px;
  color: #fff;
}

.sidebar__workspace small,
.user-menu small {
  color: #717983;
  font-size: 9px;
}

.sidebar__nav {
  flex: 1;
  padding: 6px 12px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar__nav::-webkit-scrollbar {
  display: none;
}

.nav-caption {
  display: block;
  padding: 18px 12px 8px;
  color: #5f6670;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar__nav a,
.sidebar__footer a {
  display: flex;
  min-height: 43px;
  margin: 3px 0;
  padding: 0 12px;
  border-radius: 8px;
  color: #9299a2;
  text-decoration: none;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  transition: 0.18s;
}

.sidebar__nav a span {
  width: 21px;
  color: #6f7781;
  text-align: center;
  font-size: 16px;
}

.sidebar__nav a:hover,
.sidebar__footer a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.sidebar__nav a.active,
.sidebar__footer a.active {
  color: #fff;
  background: rgba(26, 168, 150, 0.09);
}

.sidebar__nav a.active span {
  color: var(--accent);
}

.sidebar__footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-main {
  display: flex;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  flex-direction: column;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: var(--topbar-h);
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: space-between;
}

.breadcrumbs {
  display: flex;
  flex-direction: column;
}

.breadcrumbs span {
  color: #949aa2;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.breadcrumbs b {
  font-size: 15px;
}

.topbar__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.system-time {
  display: flex;
  padding-right: 18px;
  border-right: 1px solid var(--line);
  color: #9298a0;
  flex-direction: column;
  align-items: flex-end;
  font-size: 9px;
}

.system-time b {
  color: #32373d;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.icon-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #6d747d;
  background: #fff;
  place-items: center;
  cursor: pointer;
}

.menu-button {
  display: none;
}

.user-menu {
  display: flex;
  min-width: 205px;
  align-items: center;
  gap: 10px;
}

.user-menu b {
  overflow: hidden;
  max-width: 135px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.avatar {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  border-radius: 9px;
  color: #0f8f7e;
  background: var(--accent-soft);
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
  text-decoration: none;
}

.avatar:hover {
  text-decoration: none;
}

.logout-form {
  display: inline-flex;
  margin: 0;
}

.logout-form__btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  width: auto;
  height: auto;
  padding: 0 2px;
}

.user-menu .logout-form__btn:hover {
  color: var(--accent-dark);
}

.admin-content {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px 22px 36px;
  flex: 1;
  box-sizing: border-box;
}

.admin-footer {
  display: flex;
  min-height: 60px;
  padding: 15px 34px;
  border-top: 1px solid var(--line);
  color: #9298a0;
  background: #fff;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
}

.admin-footer > div {
  display: flex;
  gap: 18px;
}

.admin-footer > div span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.green-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #19a974;
  box-shadow: 0 0 0 3px rgba(25, 169, 116, 0.14);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(12, 21, 24, 0.5);
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .menu-button {
    display: grid;
  }

  .topbar {
    padding: 0 16px;
    height: 64px;
  }

  .topbar__title {
    margin-left: 12px;
  }

  .system-time,
  .user-menu div {
    display: none;
  }

  .user-menu {
    min-width: 0;
  }

  .admin-content {
    padding: 18px 16px 32px;
  }

  .admin-footer {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-grid,
  .stats-grid,
  .page-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
}

/* MES hero headings */
.admin-content > .page-heading,
.admin-content > .page-heading--hero {
  position: relative;
  display: flex;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 14px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(45, 212, 191, 0.2), transparent 55%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(59, 130, 246, 0.1), transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #134e4a 48%, #0f766e 100%);
  box-shadow: 0 8px 32px rgba(15, 118, 110, 0.12);
  color: #fff;
}

.admin-content > .page-heading .eyebrow {
  margin-bottom: 8px;
  color: #99f6e4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-content > .page-heading h1 {
  margin: 0 0 4px;
  color: #fff;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.admin-content > .page-heading p {
  margin: 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.admin-content > .page-heading .heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.admin-content > .page-heading .page-heading__aside {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.admin-content > .page-heading .heading-actions .btn,
.admin-content > .page-heading .heading-actions a.btn {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.admin-content > .page-heading .heading-actions .btn-primary {
  color: #fff;
  background: var(--accent, #1aa896);
  border-color: var(--accent-dark, #0f8f7e);
}

.admin-content > .page-heading .heading-actions .btn-ghost {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
}

.admin-content > .page-heading .heading-actions .btn-danger {
  color: #fff;
  background: #dc2626;
  border-color: #b91c1c;
}

.admin-content > .page-heading .heading-actions form,
.admin-content > .page-heading .heading-actions .inline-form {
  display: inline-flex;
  margin: 0;
  gap: 8px;
}

.sidebar__nav a {
  position: relative;
}

.sidebar__nav a.has-badge {
  padding-right: 42px;
}

.nav-badge {
  position: absolute;
  right: 10px;
  display: inline-grid;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  place-items: center;
}

.settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.settings-layout > .settings-tabs {
  display: flex;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
}

.settings-layout > .settings-tabs button {
  display: flex;
  width: 100%;
  min-height: 42px;
  padding: 6px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #4b5563;
  text-align: left;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.person > div {
  min-width: 0;
}

.person b {
  display: block;
  font-size: 13px;
}

.person small {
  display: block;
  color: var(--muted, #8a9199);
  font-size: 12px;
}

.table-action {
  border: 0;
  padding: 4px 6px;
  background: transparent;
  color: var(--accent-dark, #0f8f7e);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

a.table-action:hover,
.table-action:hover {
  text-decoration: underline;
}

.table-action.danger {
  color: #b91c1c;
}

.table-actions form {
  display: inline-flex;
  margin: 0;
  align-items: center;
  gap: 6px;
}

.settings-panels {
  min-width: 0;
}

.settings-form__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #e5e7eb);
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 2;
}

.settings-form__actions .btn-primary {
  min-width: 140px;
}

.modal__head h2 {
  margin: 4px 0 0;
}

.modal__head .eyebrow {
  color: #0f8f7e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

dialog.modal {
  margin: auto;
  width: fit-content;
  height: fit-content;
  max-height: calc(100vh - 32px);
  overflow: auto;
  pointer-events: none;
}

.nav-badge:empty {
  display: none;
}

.settings-tabs__group {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.settings-tabs__label {
  display: block;
  padding: 10px 12px 6px;
  color: #8a9199;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.settings-tabs button {
  display: flex;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #4b5563;
  text-align: left;
  align-items: center;
  gap: 10px;
  font: inherit;
  cursor: pointer;
}

.settings-tabs button span:first-child {
  width: 22px;
  color: #8a9199;
  text-align: center;
}

.settings-tabs button b {
  display: block;
  font-size: 13px;
}

.settings-tabs button small {
  display: block;
  color: #8a9199;
  font-size: 11px;
  font-weight: 500;
}

.settings-tabs button.is-active,
.settings-tabs button.active {
  color: #30353b;
  background: #e6f7f4;
}

.account-layout {
  gap: 0;
}

[hidden] {
  display: none !important;
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.panel__header h2 {
  margin: 0 0 4px;
}

.panel__header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-section-icon {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--accent-dark, #0f8f7e);
  background: #e6f7f4;
  place-items: center;
  font-size: 15px;
}

.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(640px, calc(100vw - 24px));
}

.modal.modal--wide {
  max-width: min(820px, calc(100vw - 24px));
  width: min(820px, calc(100vw - 24px));
}

.modal::backdrop {
  background: rgba(12, 21, 24, 0.55);
}

.modal__card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cron-panel-body {
  padding: 8px 22px 22px;
  display: grid;
  gap: 14px;
}

.cron-card-grid {
  display: grid;
  gap: 12px;
}

.cron-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.cron-card--all {
  border-color: #fcd34d;
  background: #fffbeb;
}

.cron-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cron-card header > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.cron-card header b {
  font-size: 14px;
}

.cron-card header code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 11px;
}

.cron-card__interval {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cron-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.cron-copy {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
}

.cron-copy__row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cron-copy__row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #374151;
  font-size: 11px;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.cron-copy__row .btn {
  flex: 0 0 auto;
}

.col-actions {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

.col-actions .table-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  max-width: none;
}

.col-actions .btn {
  flex: 0 0 auto;
}

.btn.act-icon,
a.btn.act-icon,
button.btn.act-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4b5563;
  box-shadow: none;
  font-size: 0;
  line-height: 0;
  place-items: center;
}

.btn.act-icon:hover,
a.btn.act-icon:hover,
button.btn.act-icon:hover {
  background: #f3f6f8;
  color: #0f172a;
  border-color: #c5ced6;
}

.btn.act-icon.act-icon--primary {
  background: var(--accent);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn.act-icon.act-icon--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn.act-icon.act-icon--danger {
  color: #b91c1c;
}

.btn.act-icon.act-icon--danger:hover {
  background: var(--danger-soft);
  border-color: #f3c4cc;
  color: #9f1239;
}

.btn.act-icon.act-icon--on {
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-color: #b7e6de;
}

.btn.act-icon.is-copied {
  background: var(--ok-soft);
  border-color: #a7e3c8;
  color: var(--ok);
}

.act-icon__svg {
  width: 16px;
  height: 16px;
  display: block;
}

.act-text-danger {
  color: #b91c1c;
}

.col-actions .table-actions--rows {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.table-actions__row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.col-actions form {
  display: inline-flex;
  margin: 0;
}

.mgr-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
}

.mgr-cell__name {
  font-weight: 600;
  line-height: 1.25;
}

.act-btn.is-reassign {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
}

.act-btn.is-reassign:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.col-actions input[name="reason"] {
  display: none !important;
}

.act-btn,
button.act-btn {
  display: inline-grid;
  width: 26px;
  min-width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #334155;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

a.act-btn:hover,
.act-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.act-btn.is-ok {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}

.act-btn.is-ok:hover {
  border-color: #15803d;
  color: #166534;
}

.act-btn.is-danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.act-btn.is-danger:hover {
  border-color: #b91c1c;
  color: #991b1b;
}

table.data .avatar {
  width: 26px;
  height: 26px;
  font-size: 9px;
}

.admin-content > .page-heading .heading-actions .btn,
.admin-content > .page-heading .heading-actions a.btn {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.act-btn.is-danger:hover {
  border-color: #b91c1c;
  color: #991b1b;
}

.panel > form.stack {
  padding: 12px 14px 14px;
}

.card-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.card-tabs a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #4b5563;
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.card-tabs a.is-active {
  border-color: var(--accent);
  color: var(--accent-dark, #0f8f7e);
  background: #e6f7f4;
}

.crm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.ticket-desk {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ticket-side {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.ticket-side__client {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.ticket-side__avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  color: #0f766e;
  background: #e6f7f4;
}

.ticket-side__who {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ticket-side__name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.ticket-side__name:hover {
  color: var(--accent);
  text-decoration: none;
}

.ticket-side__who span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-side__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ticket-chip {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f7faf9 100%);
}

.ticket-chip span {
  color: #8a9199;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ticket-chip b {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.ticket-side__form {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.ticket-side__form label,
.ticket-side__assign label,
.ticket-side__assign-label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.ticket-side__form .btn {
  justify-self: start;
}

.ticket-side__assign {
  display: grid;
  gap: 6px;
  margin: 0;
}

.ticket-side__assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-side__assign-row select {
  flex: 1;
  min-width: 0;
}

.ticket-side__notes {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ticket-side__notes-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ticket-side__notes-head span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ticket-side__notes-head small {
  color: var(--muted);
  font-size: 11px;
}

.ticket-side__notes-form {
  display: grid;
  gap: 8px;
}

.ticket-side__notes-form textarea {
  min-height: 110px;
  resize: vertical;
}

.ticket-side__notes-form .btn {
  justify-self: start;
}

.ticket-side__notes-text {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.ticket-main {
  min-width: 0;
}

.ticket-main__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.ticket-main__head h2 {
  margin: 0;
}

.ticket-main .chat-shell {
  min-height: 520px;
  max-height: min(720px, 74vh);
}

.support-home {
  display: grid;
  gap: 18px;
  padding: 20px 22px;
}

.support-home__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.support-stat {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(230, 247, 244, 0.65) 0%, #fff 60%);
}

.support-stat b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f766e;
  line-height: 1.1;
}

.support-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.support-home__list {
  display: grid;
  gap: 12px;
}

.support-home__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-home__list-head h2 {
  margin: 0;
  font-size: 16px;
}

.support-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 36px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fafbfc;
  text-align: center;
}

.support-empty__ico {
  font-size: 28px;
  opacity: 0.7;
}

.support-empty p {
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}

.support-empty small {
  color: var(--muted);
  margin-bottom: 6px;
}

.support-tickets {
  display: grid;
  gap: 10px;
}

.support-ticket {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.support-ticket:hover {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.support-ticket.is-closed {
  opacity: 0.78;
  background: #fafbfc;
}

.support-ticket__main {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.support-ticket__main:hover {
  text-decoration: none;
  color: inherit;
}

.support-ticket__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.support-ticket__id {
  font-size: 12px;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: 0.02em;
}

.support-ticket__subject {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.support-ticket__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.support-ticket__meta .dot {
  opacity: 0.45;
}

.support-ticket__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.support-ticket__actions form {
  display: inline-flex;
  margin: 0;
}

@media (max-width: 720px) {
  .support-home__stats {
    grid-template-columns: 1fr;
  }

  .support-ticket {
    grid-template-columns: 1fr;
  }

  .support-ticket__actions {
    justify-content: flex-start;
  }

  .table-actions {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .table-scroll {
    margin-inline: -8px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.buy-desk {
  display: grid;
  gap: 22px;
  padding: 22px 24px;
}

.buy-renew {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 119, 6, 0.28);
  border-radius: 12px;
  background: #fffbeb;
}

.buy-renew > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.buy-renew b {
  font-size: 14px;
  word-break: break-all;
}

.buy-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.buy-fact {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(230, 247, 244, 0.7) 0%, #fff 58%);
}

.buy-fact b {
  font-size: 15px;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: -0.02em;
}

.buy-fact span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.buy-form {
  display: grid;
  gap: 20px;
  margin: 0;
}

.buy-section__head {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}

.buy-section__head h2 {
  margin: 0;
  font-size: 16px;
}

.buy-section__head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.buy-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.buy-plan {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.buy-plan:hover {
  border-color: rgba(15, 118, 110, 0.35);
}

.buy-plan.is-selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 70%);
  box-shadow: 0 0 0 1px rgba(26, 168, 150, 0.25);
}

.buy-plan.is-trial .buy-plan__tag {
  background: #ecfdf5;
  color: #047857;
}

.buy-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.buy-plan__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.buy-plan__name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.buy-plan__tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6f7f4;
  color: #0f766e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.buy-plan__price {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.buy-plan__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.buy-fields {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 12px;
}

.buy-field {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.buy-field small {
  font-weight: 600;
  color: var(--muted);
}

.buy-field--wide {
  grid-column: 1 / -1;
}

.buy-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 14px;
}

.buy-submit .muted {
  margin: 0;
  max-width: 42ch;
  font-size: 12px;
}

.buy-steps {
  display: grid;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.buy-steps > h2 {
  margin: 0;
  font-size: 16px;
}

.buy-steps__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.buy-steps__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

.buy-steps__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.buy-steps__list b {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.buy-steps__list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.buy-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 16px;
  border: 1px dashed rgba(15, 118, 110, 0.28);
  border-radius: 14px;
  background: #f7faf9;
}

.buy-help b {
  display: block;
  margin-bottom: 2px;
}

.buy-help p {
  margin: 0;
  font-size: 13px;
}

.buy-help__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 900px) {
  .buy-facts,
  .buy-steps__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .buy-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .buy-facts,
  .buy-steps__list {
    grid-template-columns: 1fr;
  }
}



.crm-chat {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding: 4px 2px 8px;
}

.chat-panel > h2 {
  margin-bottom: 10px;
}

.chat-shell {
  display: flex;
  flex-direction: column;
  min-height: 460px;
  max-height: min(680px, 72vh);
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(ellipse 70% 50% at 0% 0%, rgba(45, 212, 191, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(15, 118, 110, 0.06), transparent 50%),
    linear-gradient(180deg, #eef5f4 0%, #f3f6f7 100%);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.chat-shell__stream {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  scroll-behavior: smooth;
}

.chat-shell__empty {
  margin: auto;
  text-align: center;
  color: #64748b;
}

.chat-shell__empty-ico {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  opacity: 0.7;
}

.chat-shell__empty p {
  margin: 0 0 4px;
  font-weight: 700;
  color: #334155;
}

.chat-shell__empty small {
  font-size: 12px;
}

.chat-day {
  display: flex;
  justify-content: center;
  margin: 4px 0 2px;
}

.chat-day span {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 100%;
}

.chat-row.is-mine {
  justify-content: flex-end;
}

.chat-row.is-theirs {
  justify-content: flex-start;
}

.chat-row__avatar {
  flex: 0 0 auto;
  margin-bottom: 2px;
}

.avatar--sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 10px;
}

.chat-bubble {
  max-width: min(72%, 540px);
  padding: 10px 14px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.chat-row.is-mine .chat-bubble {
  background: linear-gradient(160deg, #0f766e 0%, #0d9488 100%);
  border-color: transparent;
  color: #ecfdf8;
  border-bottom-right-radius: 5px;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.22);
}

.chat-row.is-theirs .chat-bubble {
  border-bottom-left-radius: 5px;
}

.chat-bubble__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 11px;
}

.chat-bubble__meta b {
  font-weight: 750;
  color: #0f766e;
}

.chat-row.is-mine .chat-bubble__meta b {
  color: rgba(236, 253, 248, 0.95);
}

.chat-bubble__meta time {
  color: #94a3b8;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chat-row.is-mine .chat-bubble__meta time {
  color: rgba(236, 253, 248, 0.72);
}

.chat-bubble__body {
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 14px;
  color: #1e293b;
  word-break: break-word;
}

.chat-row.is-mine .chat-bubble__body {
  color: #fff;
}

.chat-composer {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(15, 118, 110, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.chat-composer--locked {
  text-align: center;
  padding: 16px;
}

.chat-composer__box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.chat-composer__field {
  margin: 0;
}

.chat-composer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 140px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: #f8fafc;
  padding: 12px 14px;
  box-shadow: none;
}

.chat-composer textarea:focus {
  outline: none;
  border-color: #0f766e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.chat-composer__send {
  min-height: 48px;
  border-radius: 14px;
  padding-inline: 18px;
}

.chat-composer__hint {
  margin: 0;
  font-size: 11px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.avatar.has-photo {
  padding: 0;
  background: #dbe7e4;
}

.avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar--lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 16px;
}

.topbar.topbar--custom {
  color: #eef0f2;
  border-bottom-color: transparent;
}

.topbar.topbar--custom .breadcrumbs span,
.topbar.topbar--custom .system-time span {
  color: rgba(238, 240, 242, 0.72);
}

.topbar.topbar--custom .breadcrumbs b,
.topbar.topbar--custom .system-time b,
.topbar.topbar--custom .user-menu b {
  color: #fff;
}

.topbar.topbar--custom .user-menu small {
  color: rgba(238, 240, 242, 0.7);
}

.topbar.topbar--custom .icon-button,
.topbar.topbar--custom .menu-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.appearance-grid {
  display: grid;
  gap: 22px;
  padding: 16px 18px 20px;
}

.appearance-card {
  gap: 12px;
}

.appearance-card h3 {
  margin: 0;
  font-size: 15px;
}

.appearance-card > .muted {
  margin: 0;
}

.appearance-avatar-preview {
  display: flex;
  align-items: center;
  gap: 16px;
}

.appearance-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px dashed rgba(15, 118, 110, 0.28);
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.04);
}

.appearance-upload__label {
  flex: 0 0 100%;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.appearance-upload__btn {
  display: inline-flex;
  cursor: pointer;
  margin: 0;
}

.appearance-upload__name {
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appearance-card__actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.header-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.header-preset {
  position: relative;
  display: grid;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.header-preset input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.header-preset__swatch {
  display: block;
  height: 48px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: #e8ecee;
}

.header-preset.is-active .header-preset__swatch,
.header-preset:has(input:checked) .header-preset__swatch {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.crm-msg {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafb;
}

.crm-msg.is-staff {
  background: #e6f7f4;
  border-color: #b7e6df;
}

.crm-msg.is-client {
  background: #fff;
}

.crm-msg header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
}

.crm-msg header time {
  color: #8a9199;
  white-space: nowrap;
}

.crm-msg p {
  margin: 0;
  white-space: pre-wrap;
}

.mgr-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px 24px;
  margin: 0 0 16px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(120deg, #0f766e 0%, #134e4a 42%, #0f172a 100%);
  box-shadow: 0 14px 36px rgba(15, 118, 110, 0.18);
  color: #ecfdf8;
}

.mgr-card__media {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 8px 18px 18px;
}

.mgr-card__photo,
.mgr-card .avatar {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  font-size: 20px;
  font-weight: 800;
  color: #0f766e;
  background: #ecfdf8;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.35),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.mgr-card .avatar.has-photo {
  background: #0f172a;
}

.mgr-card__badge {
  position: absolute;
  left: 18px;
  bottom: 10px;
  display: none;
}

.mgr-card__content {
  min-width: 0;
  padding: 18px 0;
}

.mgr-card__label {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #99f6e4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mgr-card__name {
  margin: 0 0 4px;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
}

.mgr-card__role {
  margin: 0 0 12px;
  color: rgba(204, 251, 241, 0.78);
  font-size: 13px;
  font-weight: 600;
}

.mgr-card__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mgr-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ecfdf8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.mgr-card__chip:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}

.mgr-card__chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mgr-card__chip-ico {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
}

.mgr-card__chip--muted {
  opacity: 0.75;
  cursor: default;
  pointer-events: none;
}

.mgr-card--empty {
  grid-template-columns: 1fr;
  padding: 18px 20px;
  background:
    linear-gradient(125deg, #334155 0%, #1e293b 55%, #0f172a 100%);
}

.mgr-card__empty-text {
  margin: 8px 0 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 13px;
  line-height: 1.45;
}

.client-manager-panel > .mgr-card {
  margin-bottom: 0;
}

.client-manager-assign {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #e5e7eb);
}

.client-manager-assign select {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.assign-manager-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.mgr-picker {
  display: grid;
  gap: 6px;
  max-height: min(52vh, 380px);
  overflow: auto;
  padding: 2px;
}

.mgr-picker__item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.mgr-picker__item:hover {
  border-color: #c5ced6;
  background: #f8fafb;
}

.mgr-picker__item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mgr-picker__item input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.mgr-picker__item b {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.mgr-picker__item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.mgr-picker__avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.assign-manager-form select {
  max-width: 140px;
  min-width: 0;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  line-height: 1.2;
}

.mgr-card__action {
  padding: 18px 18px 18px 0;
}

.mgr-card__action .btn {
  min-height: 42px;
  padding-inline: 18px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #0f766e;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.mgr-card__action .btn:hover {
  background: #ecfdf8;
  color: #115e59;
}

.avatar--xl {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  font-size: 22px;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px rgba(15, 118, 110, 0.28),
    0 12px 28px rgba(15, 118, 110, 0.16);
}

  min-width: 0;
}

  display: inline-block;
  margin-bottom: 6px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
}

  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  font-size: 13px;
}

  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

  color: #0f766e;
  text-decoration: underline;
}

  position: relative;
  flex: 0 0 auto;
}

.client-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.client-overview {
  display: grid;
  gap: 20px;
  padding: 22px 24px;
}

.client-overview__identity {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px 18px;
  align-items: center;
}

.client-overview__avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  color: #0f766e;
  background: #e6f7f4;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.client-overview__who {
  min-width: 0;
}

.client-overview__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.client-overview__name {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.client-overview__sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.client-overview__sub .dot {
  opacity: 0.45;
}

.client-overview__verify {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.client-overview__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.client-overview__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.client-fact {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f7faf9 100%);
}

.client-fact__label {
  color: #8a9199;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-fact__value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.client-overview__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.client-stat {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background:
    linear-gradient(135deg, rgba(230, 247, 244, 0.7) 0%, #fff 55%);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.client-stat:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.client-stat b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f766e;
  line-height: 1.1;
}

.client-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.client-overview__manager {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.client-overview__manager.is-empty {
  background: #fafbfc;
  border-style: dashed;
}

.client-overview__manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-overview__manager-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.client-overview__manager-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.client-mgr {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  align-items: center;
}

.client-mgr__avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #0f766e;
  background: #e6f7f4;
  grid-row: span 2;
}

.client-mgr__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.client-mgr__body b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.client-mgr__body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.client-mgr__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  grid-column: 2;
}

.client-mgr__links a {
  color: #0f766e;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.client-mgr__links a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .client-overview__identity {
    grid-template-columns: auto 1fr;
  }

  .client-overview__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .client-overview__facts,
  .client-overview__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .client-overview__facts,
  .client-overview__stats {
    grid-template-columns: 1fr;
  }

  .client-mgr {
    grid-template-columns: auto 1fr;
  }

  .client-mgr__links {
    grid-column: 1 / -1;
  }
}

.client-meta > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.client-meta dt {
  margin: 0;
  color: #8a9199;
  font-size: 12px;
}

.client-meta dd {
  margin: 0;
  font-weight: 600;
}

.toolbar .checkbox-field {
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .admin-content > .page-heading,
  .admin-content > .page-heading--hero {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .cron-copy__row {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-grid {
    grid-template-columns: 1fr;
  }

  .ticket-desk {
    grid-template-columns: 1fr;
  }

  .ticket-main .chat-shell {
    min-height: 420px;
  }

    flex-direction: column;
    align-items: stretch;
  }

    flex-direction: column;
    align-items: flex-start;
  }

    width: 100%;
  }

    width: 100%;
    justify-content: center;
  }

  .mgr-card {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .mgr-card__media {
    padding: 16px 16px 0;
  }

  .mgr-card__content {
    padding: 12px 16px 4px;
  }

  .mgr-card__action {
    padding: 8px 16px 16px;
  }

  .mgr-card__action .btn {
    width: 100%;
    justify-content: center;
  }

  .chat-composer__box {
    grid-template-columns: 1fr;
  }

  .chat-composer__send {
    width: 100%;
  }

  .chat-bubble {
    max-width: calc(100% - 44px);
  }

  .notif-item {
    flex-direction: column;
  }
}

.verify-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.verify-badges .badge {
  font-size: 11px;
}

.verify-banner a {
  margin-left: 8px;
  font-weight: 600;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.notif-item {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel, #fff);
}

.notif-item.is-unread {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.06);
}

.notif-item__main {
  min-width: 0;
  flex: 1;
}

.notif-item__main p {
  margin: 6px 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.notif-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.verify-phone-box {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chat-templates-wrap {
  margin-bottom: 8px;
}

.chat-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.chat-templates select {
  min-width: 180px;
  max-width: 100%;
}

.crm-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: start;
}

.crm-kanban__col {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel, #fff);
  min-height: 120px;
}

.crm-kanban__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.crm-kanban__cards {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.crm-kanban__card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
}

.crm-kanban__card:hover {
  border-color: var(--accent);
}

.crm-kanban__ltv {
  font-size: 12px;
  color: var(--muted);
}

.crm-kanban__empty {
  padding: 8px;
  font-size: 13px;
}

.timeline-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.timeline-feed li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}

.timeline-feed time {
  font-size: 12px;
  color: var(--muted);
}

.timeline-feed--full li {
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 8px 12px;
}

.client-stat--static {
  cursor: default;
  text-decoration: none;
}

.tag-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.col-check {
  width: 36px;
}

.bulk-panel {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.bulk-panel summary {
  cursor: pointer;
  font-weight: 600;
}

/* ——— FAQ (кабинет) ——— */
.faq-page {
  display: grid;
  gap: 16px;
}

.faq-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.faq-quick__card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, #fff 0%, #f4f8f7 100%);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.faq-quick__card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 143, 126, 0.08);
}

.faq-quick__icon {
  font-size: 20px;
  line-height: 1;
  color: var(--accent-dark, #0f8f7e);
}

.faq-quick__label {
  font-weight: 700;
  font-size: 15px;
}

.faq-quick__hint {
  font-size: 12px;
  color: var(--muted);
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 16px;
  align-items: start;
}

.faq-panel__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 20px;
  margin-bottom: 16px;
}

.faq-panel__head h2 {
  margin: 0;
  font-size: 18px;
}

.faq-search input {
  min-width: min(280px, 100%);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}

.faq-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.faq-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.faq-cat:hover {
  border-color: var(--accent);
}

.faq-cat.is-active {
  border-color: var(--accent);
  background: #e6f7f4;
  color: var(--accent-dark, #0f8f7e);
}

.faq-cat__count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.faq-section {
  margin-bottom: 24px;
}

.faq-section:last-child {
  margin-bottom: 0;
}

.faq-section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.faq-section__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e6f7f4;
  color: var(--accent-dark, #0f8f7e);
  font-size: 18px;
}

.faq-section__head h3 {
  margin: 0;
  font-size: 16px;
}

.faq-section__head p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.faq-accordion {
  display: grid;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.faq-item[open] {
  border-color: rgba(15, 143, 126, 0.35);
  box-shadow: 0 4px 16px rgba(15, 143, 126, 0.06);
}

.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  font-size: 15px;
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__toggle {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #f0f4f3;
  flex-shrink: 0;
  position: relative;
}

.faq-item__toggle::before,
.faq-item__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--muted);
  transform: translate(-50%, -50%);
  transition: transform 0.2s;
}

.faq-item[open] .faq-item__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-item__a {
  padding: 0 16px 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  border-top: 1px solid var(--line);
  background: #fafcfb;
}

.faq-answer p {
  margin: 12px 0 0;
}

.faq-answer p:first-child {
  margin-top: 14px;
}

.faq-answer__steps {
  margin: 12px 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 8px;
}

.faq-answer__note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff8e6;
  border: 1px solid #f0e0b0;
  font-size: 13px;
}

.faq-aside {
  display: grid;
  gap: 12px;
}

.faq-aside-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.faq-aside-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.faq-aside-card--accent {
  border-color: rgba(15, 143, 126, 0.35);
  background: linear-gradient(160deg, #e6f7f4 0%, #fff 70%);
}

.faq-aside-card--contact {
  background: linear-gradient(165deg, #0f8f7e 0%, #0c6b5f 100%);
  border: none;
  color: #fff;
}

.faq-aside-card--contact h3,
.faq-aside-card--contact .muted {
  color: rgba(255, 255, 255, 0.92);
}

.faq-aside-card--contact .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.faq-aside-mono {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f4f6f5;
  margin: 0 0 10px;
}

.faq-aside-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.faq-aside-card--contact .faq-aside-list {
  color: rgba(255, 255, 255, 0.85);
}

.faq-aside-list code {
  font-size: 12px;
}

.faq-aside-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.faq-checklist {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.faq-checklist li::before {
  content: "○";
  margin-right: 8px;
  color: var(--muted);
}

.faq-checklist li.is-done::before {
  content: "✓";
  color: var(--accent-dark, #0f8f7e);
}

.faq-checklist a {
  color: inherit;
  font-weight: 600;
}

.faq-empty-search {
  margin-top: 12px;
  text-align: center;
}

@media (max-width: 960px) {
  .faq-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faq-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .faq-quick {
    grid-template-columns: 1fr;
  }
}

/* ——— Настройки: оплата ——— */
.settings-guide {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcfb;
  margin-bottom: 16px;
}

.settings-guide--muted {
  background: #f4f6f5;
}

.settings-guide h2,
.settings-guide h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.settings-guide__steps {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 14px;
}

.settings-guide__steps p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.settings-pay-status {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.settings-pay-status.is-ok {
  border-color: rgba(15, 143, 126, 0.4);
  background: #e6f7f4;
}

.settings-pay-status.is-warn {
  border-color: #f0c060;
  background: #fff8e6;
}

.settings-pay-issues {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 13px;
  color: #8a4b00;
}

/* ——— Кабинет: платежи ——— */
.payments-page {
  display: grid;
  gap: 16px;
}

.payments-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.payments-stat {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.payments-stat b {
  font-size: 22px;
  line-height: 1.1;
}

.payments-stat span {
  font-size: 13px;
  color: var(--muted);
}

.payments-stat small {
  font-size: 12px;
  color: var(--accent-dark, #0f8f7e);
  font-weight: 600;
}

.payments-stat--info {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.payments-stat__ico {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e6f7f4;
  color: var(--accent-dark, #0f8f7e);
  font-weight: 700;
}

.payments-pending__list {
  display: grid;
  gap: 10px;
}

.payments-pending__card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff8e6;
  border-color: #f0e0b0;
}

.payments-pending__sum {
  font-weight: 700;
  font-size: 16px;
}

.payments-pending__acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.payments-help__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.payments-help__grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.payments-help__grid p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.payments-method {
  font-weight: 600;
  font-size: 13px;
}

.pay-page {
  display: grid;
  gap: 16px;
}

.pay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 16px;
  align-items: start;
}

.pay-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  border-color: #f0d080;
  background: linear-gradient(135deg, #fff9e8 0%, #fff 60%);
}

.pay-alert__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #f0d080;
  font-size: 20px;
}

.pay-alert p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.pay-order-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.pay-order-card__head h2 {
  margin: 0;
  font-size: 20px;
}

.pay-order-card__amount {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 18px;
  border-radius: 12px;
  background: #f4f8f7;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.pay-order-card__amount span {
  font-size: 13px;
  color: var(--muted);
}

.pay-order-card__amount b {
  font-size: 28px;
  color: var(--accent-dark, #0f8f7e);
}

.pay-order-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 0 0 20px;
}

.pay-order-card__facts div {
  display: grid;
  gap: 2px;
}

.pay-order-card__facts dt {
  font-size: 12px;
  color: var(--muted);
}

.pay-order-card__facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pay-actions__hint {
  margin: 12px 0 0;
  font-size: 13px;
}

.pay-done {
  padding: 14px;
  border-radius: 12px;
  background: #e6f7f4;
  border: 1px solid rgba(15, 143, 126, 0.3);
}

.pay-aside {
  display: grid;
  gap: 12px;
}

.pay-aside-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.pay-aside-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.pay-aside-card--muted {
  background: #f8f9f8;
}

.pay-aside-card--muted p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.pay-aside-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 13px;
  line-height: 1.5;
}

.pay-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.pay-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.pay-steps li span {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f0f4f3;
  font-weight: 700;
  font-size: 12px;
}

.pay-steps li.is-current {
  color: var(--text);
  font-weight: 600;
}

.pay-steps li.is-current span {
  background: var(--accent, #0f8f7e);
  color: #fff;
}

/* ——— Кабинет: заявка / заказ ——— */
.order-page {
  display: grid;
  gap: 16px;
}

.order-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 0;
}

.order-progress__step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.order-progress__step.is-done {
  color: var(--accent-dark, #0f8f7e);
  border-color: rgba(15, 143, 126, 0.35);
  background: #f4fbf9;
}

.order-progress__step.is-current {
  border-color: var(--accent, #0f8f7e);
  box-shadow: 0 4px 16px rgba(15, 143, 126, 0.12);
  color: var(--text);
}

.order-progress__dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #eef2f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.order-progress__step.is-done .order-progress__dot {
  background: var(--accent, #0f8f7e);
  color: #fff;
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 16px;
  align-items: start;
}

.order-summary__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.order-summary__head h2 {
  margin: 8px 0 4px;
  font-size: 20px;
}

.order-summary__amount {
  text-align: right;
}

.order-summary__amount span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.order-summary__amount b {
  font-size: 26px;
  color: var(--accent-dark, #0f8f7e);
}

.order-summary__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 0 0 16px;
}

.order-summary__facts dt {
  font-size: 12px;
  color: var(--muted);
}

.order-summary__facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.order-pay-box,
.order-key-box {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8fbfb;
}

.order-pay-box h3,
.order-key-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.order-pay-box__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.order-pay-box__hint {
  margin: 12px 0 0;
  font-size: 13px;
}

.order-key-box__key {
  font-size: 15px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px dashed var(--line);
  margin: 8px 0;
}

.order-alert {
  padding: 14px;
  border-radius: 12px;
}

.order-alert--bad {
  background: #fff0f0;
  border: 1px solid #f0c0c0;
}

.order-timeline h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.order-timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.order-timeline__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}

.order-timeline__list time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.order-aside {
  display: grid;
  gap: 12px;
}

.order-aside-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.order-aside-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.order-aside-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.order-aside-card--muted {
  background: #f8f9f8;
}

.order-next-steps,
.order-aside-links {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 13px;
  line-height: 1.55;
}

.order-aside-links {
  display: grid;
  gap: 6px;
  list-style: none;
  padding: 0;
}

@media (max-width: 900px) {
  .payments-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payments-help__grid {
    grid-template-columns: 1fr;
  }

  .payments-pending__card {
    grid-template-columns: 1fr;
  }

  .pay-layout {
    grid-template-columns: 1fr;
  }

  .pay-order-card__facts {
    grid-template-columns: 1fr;
  }

  .order-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-layout {
    grid-template-columns: 1fr;
  }

  .order-summary__facts {
    grid-template-columns: 1fr;
  }
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.report-stats .stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel, #fff);
  text-decoration: none;
  color: inherit;
}

.report-stats .stat-card b {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.report-stats .stat-card small {
  color: var(--muted);
  font-size: 12px;
}

/* —— Профиль (MES-style обложка) —— */
.profile-view-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 0;
  padding: 16px 18px 20px;
}

.profile-view-meta > div {
  margin: 0;
}

.profile-view-meta dt {
  margin: 0 0 4px;
  color: var(--muted, #8a9199);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.profile-view-meta dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

@media (max-width: 700px) {
  .profile-view-meta {
    grid-template-columns: 1fr;
  }
}

.profile-panels {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  color: var(--muted, #8a9199);
  font-size: 12px;
}

.password-rules span::before {
  margin-right: 6px;
  color: var(--accent, #1aa896);
  content: "✓";
  font-weight: 800;
}

.sn-profile {
  position: relative;
  margin-bottom: 20px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

.sn-profile__cover-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.38) 55%, rgba(15, 23, 42, 0.55) 100%),
    radial-gradient(560px 200px at 80% 15%, rgba(255, 255, 255, 0.16), transparent 60%);
  pointer-events: none;
}

.sn-cover--steel {
  background:
    radial-gradient(800px 220px at 20% 30%, rgba(26, 168, 150, 0.45), transparent 55%),
    linear-gradient(135deg, #111827 0%, #334155 48%, #0f766e 100%);
}

.sn-cover--amber {
  background:
    radial-gradient(700px 200px at 70% 10%, rgba(255, 255, 255, 0.25), transparent 50%),
    linear-gradient(120deg, #0b3d3a 0%, var(--accent, #1aa896) 45%, #5eead4 100%);
}

.sn-cover--forge {
  background:
    radial-gradient(420px 180px at 30% 80%, rgba(20, 184, 166, 0.35), transparent 55%),
    linear-gradient(145deg, #0c1a1c 0%, #134e4a 40%, var(--accent, #1aa896) 78%, #5eead4 100%);
}

.sn-cover--ocean {
  background:
    radial-gradient(600px 200px at 15% 20%, rgba(125, 211, 252, 0.35), transparent 55%),
    linear-gradient(125deg, #0c4a6e 0%, #0369a1 42%, #14b8a6 100%);
}

.sn-cover--forest {
  background:
    radial-gradient(500px 180px at 75% 30%, rgba(167, 243, 208, 0.28), transparent 55%),
    linear-gradient(135deg, #052e16 0%, #166534 50%, #65a30d 100%);
}

.sn-cover--copper {
  background:
    radial-gradient(480px 180px at 20% 40%, rgba(254, 215, 170, 0.35), transparent 55%),
    linear-gradient(130deg, #431407 0%, #9a3412 40%, #c2410c 70%, #fdba74 100%);
}

.sn-cover--night {
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.55), transparent 40%),
    radial-gradient(2px 2px at 60% 50%, rgba(255, 255, 255, 0.4), transparent 40%),
    radial-gradient(2px 2px at 80% 20%, rgba(255, 255, 255, 0.35), transparent 40%),
    linear-gradient(150deg, #020617 0%, #1e293b 55%, #312e81 100%);
}

.sn-cover--graphite {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 18px),
    linear-gradient(135deg, #0f172a 0%, #475569 50%, #94a3b8 100%);
}

.sn-profile__cover-edit {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  color: #fff;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(6px);
}

.sn-profile__cover-edit:hover,
.sn-profile__cover-edit.is-open {
  background: rgba(15, 23, 42, 0.62);
}

.sn-cover-picker {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 52px 12px 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
}

.sn-cover-picker__grid {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.sn-cover-option {
  position: relative;
  display: grid;
  width: 72px;
  height: 44px;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  place-items: end start;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.sn-cover-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sn-cover-option span {
  margin: 0 0 4px 6px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.sn-cover-option.is-active,
.sn-cover-option:has(input:checked) {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.35);
}

.sn-profile__card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  min-height: 168px;
  padding: 56px 22px 22px;
  background: transparent;
}

.sn-profile__avatar-wrap {
  position: relative;
  width: 112px;
  height: 112px;
}

.sn-profile__avatar {
  width: 112px;
  height: 112px;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  background: var(--accent, #1aa896);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  object-fit: cover;
}

.sn-profile__avatar--initials {
  display: grid;
  place-items: center;
  color: #17191c;
  font-size: 34px;
  font-weight: 800;
}

.sn-profile__avatar-form {
  position: absolute;
  right: -2px;
  bottom: -2px;
  margin: 0;
}

.sn-profile__avatar-btn {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent-hover, #0f8f7e);
  color: #fff;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.sn-profile__avatar-btn input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0.01;
  cursor: pointer;
}

.sn-profile__avatar-btn span {
  position: relative;
  z-index: 1;
  line-height: 1;
}

.sn-profile__info h1 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 26px;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
}

.sn-profile__info > p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.sn-profile__meta {
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 12px !important;
}

.sn-profile__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}

.sn-profile__nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline: 12px;
  text-decoration: none;
  min-height: 36px;
}

.sn-profile__btn-ghost {
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: rgba(15, 23, 42, 0.28) !important;
  color: #fff !important;
}

.sn-profile__btn-ghost:hover {
  background: rgba(15, 23, 42, 0.45) !important;
}

.sn-profile__avatar-form.is-uploading .sn-profile__avatar-btn {
  opacity: 0.7;
  pointer-events: none;
}

.sn-profile__avatar-status {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 3;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}

.appearance-avatar-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
}

.appearance-avatar-pick input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.avatar-crop {
  max-width: 760px;
  width: min(760px, 100%);
}

.avatar-crop__stage {
  position: relative;
  width: min(280px, 100%);
  height: 280px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  background: #0f172a;
  touch-action: none;
  cursor: grab;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.avatar-crop__stage:active {
  cursor: grabbing;
}

.avatar-crop__stage img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  user-select: none;
  pointer-events: none;
}

.avatar-crop__zoom {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.avatar-crop__zoom input[type="range"] {
  width: 100%;
}

@media (max-width: 900px) {
  .sn-profile__card {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    padding-top: 52px;
  }

  .sn-profile__actions {
    width: 100%;
  }
}

/* ——— Unified UX layout (новые разделы) ——— */
.ux-page {
  display: grid;
  gap: 20px;
}

.ux-page > .panel,
.ux-main > .panel,
.ux-page .panel + .panel {
  margin-top: 0;
}

.ux-split,
.faq-layout,
.pay-layout,
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 20px;
  align-items: start;
}

.ux-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.ux-aside,
.faq-aside,
.pay-aside,
.order-aside {
  display: grid;
  gap: 14px;
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
}

.ux-section.panel {
  padding: 0;
}

.ux-section.panel > .panel__header,
.ux-section.panel > .ux-section__head {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fafcfb 0%, #fff 100%);
}

.ux-section.panel > .panel__header h2,
.ux-section.panel > .ux-section__head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.ux-section.panel > .panel__header p,
.ux-section.panel > .ux-section__head p {
  margin: 4px 0 0;
  font-size: 13px;
}

.ux-section__body {
  padding: 18px 20px;
}

.ux-section__body--flush {
  padding: 0;
}

.ux-section__body--faq {
  padding: 16px 20px 20px;
}

.ux-section--warn > .panel__header {
  background: linear-gradient(180deg, #fff8e6 0%, #fff 100%);
  border-bottom-color: #f0e0b0;
}

.ux-section--warn > .panel__header h2 {
  color: #8a4b00;
}

.ux-kpi-row,
.payments-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ux-kpi,
.payments-stat {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 88px;
}

.ux-kpi b,
.payments-stat b {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
}

.ux-kpi span,
.payments-stat span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.ux-kpi small,
.payments-stat small {
  font-size: 12px;
  color: var(--accent-dark, #0f8f7e);
  font-weight: 600;
}

.ux-kpi--info,
.payments-stat--info {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  min-height: 0;
}

.ux-kpi__ico,
.payments-stat__ico {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e6f7f4;
  color: var(--accent-dark, #0f8f7e);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.ux-tiles,
.faq-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ux-tile,
.faq-quick__card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ux-tile:hover,
.faq-quick__card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 143, 126, 0.1);
  text-decoration: none;
  color: inherit;
}

.ux-tile__icon,
.faq-quick__icon {
  font-size: 20px;
  line-height: 1;
  color: var(--accent-dark, #0f8f7e);
}

.ux-tile__title,
.faq-quick__label {
  font-weight: 700;
  font-size: 15px;
}

.ux-tile__hint,
.faq-quick__hint {
  font-size: 12px;
  color: var(--muted);
}

.ux-side-card,
.faq-aside-card,
.order-aside-card,
.pay-aside-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ux-side-card h3,
.faq-aside-card h3,
.order-aside-card h3,
.pay-aside-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.ux-side-card p,
.order-aside-card p,
.pay-aside-card--muted p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.ux-side-card--accent,
.faq-aside-card--accent {
  border-color: rgba(15, 143, 126, 0.35);
  background: linear-gradient(165deg, #e6f7f4 0%, #fff 70%);
}

.ux-side-card--muted,
.order-aside-card--muted,
.pay-aside-card--muted,
.faq-aside-card--contact {
  background: #f8f9f8;
}

.ux-side-card--contact,
.faq-aside-card--contact {
  border-color: var(--accent);
  background: linear-gradient(160deg, #0f8f7e 0%, #0a6b5e 100%);
  color: #fff;
}

.ux-side-card--contact h3,
.faq-aside-card--contact h3,
.ux-side-card--contact .muted,
.faq-aside-card--contact .muted {
  color: rgba(255, 255, 255, 0.92);
}

.ux-side-card--contact .btn-ghost,
.faq-aside-card--contact .btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.ux-side-list,
.faq-aside-list,
.pay-aside-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 13px;
  line-height: 1.55;
}

.ux-side-actions,
.faq-aside-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.ux-stepbar,
.order-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ux-stepbar__step,
.order-progress__step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ux-stepbar__step.is-done,
.order-progress__step.is-done {
  color: var(--accent-dark, #0f8f7e);
  border-color: rgba(15, 143, 126, 0.35);
  background: #f4fbf9;
}

.ux-stepbar__step.is-current,
.order-progress__step.is-current {
  border-color: var(--accent, #0f8f7e);
  box-shadow: 0 4px 16px rgba(15, 143, 126, 0.12);
  color: var(--text);
}

.ux-stepbar__dot,
.order-progress__dot {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #eef2f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.ux-stepbar__step.is-done .ux-stepbar__dot,
.order-progress__step.is-done .order-progress__dot {
  background: var(--accent, #0f8f7e);
  color: #fff;
}

.ux-facts,
.order-summary__facts,
.pay-order-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 0;
}

.ux-facts div,
.order-summary__facts div,
.pay-order-card__facts div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcfb;
}

.ux-facts dt,
.order-summary__facts dt,
.pay-order-card__facts dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.ux-facts dd,
.order-summary__facts dd,
.pay-order-card__facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.ux-highlight,
.order-pay-box,
.order-key-box,
.pay-done {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #f4fbf9 0%, #fff 100%);
}

.ux-highlight h3,
.order-pay-box h3,
.order-key-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.ux-highlight--success,
.pay-done {
  background: #e6f7f4;
  border-color: rgba(15, 143, 126, 0.35);
}

.ux-highlight--warn,
.pay-alert {
  border-color: #f0d080;
  background: linear-gradient(135deg, #fff9e8 0%, #fff 60%);
}

.ux-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.ux-callout__icon,
.pay-alert__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 20px;
  flex-shrink: 0;
}

.ux-callout--warn .ux-callout__icon,
.pay-alert__icon {
  border-color: #f0d080;
  background: #fff9e8;
}

.ux-callout p,
.pay-alert p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.ux-info-grid,
.payments-help__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ux-info-grid article,
.payments-help__grid article {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcfb;
}

.ux-info-grid h3,
.payments-help__grid h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.ux-info-grid p,
.payments-help__grid p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.ux-pending-list,
.payments-pending__list {
  display: grid;
  gap: 12px;
}

.ux-pending-card,
.payments-pending__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #f0e0b0;
  border-radius: 12px;
  background: #fffaf0;
}

.ux-pending-card__sum,
.payments-pending__sum {
  font-weight: 800;
  font-size: 17px;
  white-space: nowrap;
}

.ux-pending-card__acts,
.payments-pending__acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ux-amount-row,
.order-summary__amount,
.pay-order-card__amount {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #f4f8f7;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.ux-amount-row span,
.order-summary__amount span,
.pay-order-card__amount span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.ux-amount-row b,
.order-summary__amount b,
.pay-order-card__amount b {
  font-size: 28px;
  color: var(--accent-dark, #0f8f7e);
  font-weight: 800;
}

.ux-summary-head,
.order-summary__head,
.pay-order-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.ux-summary-head h2,
.order-summary__head h2,
.pay-order-card__head h2 {
  margin: 8px 0 4px;
  font-size: 20px;
}

.ux-timeline,
.order-timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ux-timeline li,
.order-timeline__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  background: #fff;
}

.ux-timeline time,
.order-timeline__list time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 600;
}

.ux-steps,
.pay-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ux-steps li,
.pay-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.ux-steps li span,
.pay-steps li span {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f0f4f3;
  font-weight: 700;
  font-size: 12px;
}

.ux-steps li.is-current,
.pay-steps li.is-current {
  color: var(--text);
  font-weight: 600;
}

.ux-steps li.is-current span,
.pay-steps li.is-current span {
  background: var(--accent, #0f8f7e);
  color: #fff;
}

.ux-toolbar-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.crm-kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 20px;
}

.crm-kanban__col {
  min-height: 200px;
  border-radius: 14px;
  background: #fafcfb;
}

.crm-kanban__head {
  padding: 12px 14px;
  background: #fff;
  border-radius: 14px 14px 0 0;
}

.crm-kanban__cards {
  padding: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.crm-kanban__card {
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.crm-kanban__meta {
  font-size: 11px;
  color: var(--muted);
}

.ux-page .report-stats {
  padding: 16px 20px;
}

.ux-page .report-stats .stat-card {
  border-radius: 14px;
  min-height: 72px;
}

.ux-section__body--flush .card-tabs {
  padding: 12px 20px 0;
  margin: 0;
}

.ux-section.panel > .panel__header .faq-search input {
  min-width: min(240px, 100%);
}

.ux-section__body--flush .table-scroll table.data th:first-child,
.ux-section__body--flush .table-scroll table.data td:first-child {
  padding-left: 20px;
}

.ux-section__body--flush .table-scroll table.data th:last-child,
.ux-section__body--flush .table-scroll table.data td:last-child {
  padding-right: 20px;
}

.finance-type-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4fbf9;
  border: 1px solid rgba(15, 143, 126, 0.2);
  font-size: 13px;
  line-height: 1.5;
}

.finance-type-checklist {
  margin: 10px 0 0;
  padding-left: 1.2rem;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.finance-field--off {
  display: none !important;
}

.finance-extra-profiles {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafcfb;
}

.finance-extra-profiles summary {
  cursor: pointer;
  list-style: none;
}

.finance-extra-profiles summary::-webkit-details-marker {
  display: none;
}

.finance-entity-form--optional {
  opacity: 0.92;
}

.finance-entity-form {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fafcfb;
}

.settings-pay-panel {
  display: grid;
  gap: 20px;
}

.settings-pay-panel .settings-guide {
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (max-width: 1100px) {
  .crm-kanban {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .ux-split,
  .faq-layout,
  .pay-layout,
  .order-layout {
    grid-template-columns: 1fr;
  }

  .ux-aside,
  .faq-aside,
  .pay-aside,
  .order-aside {
    position: static;
  }

  .ux-tiles,
  .faq-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ux-kpi-row,
  .payments-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ux-info-grid,
  .payments-help__grid {
    grid-template-columns: 1fr;
  }

  .ux-pending-card,
  .payments-pending__card {
    grid-template-columns: 1fr;
  }

  .ux-stepbar,
  .order-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ux-facts,
  .order-summary__facts,
  .pay-order-card__facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .ux-tiles,
  .faq-quick {
    grid-template-columns: 1fr;
  }

  .ux-kpi-row,
  .payments-stats {
    grid-template-columns: 1fr;
  }

  .crm-kanban {
    grid-template-columns: 1fr;
  }
}

/* In-app notifications (MES-aligned) */
.notify-menu { position: relative; z-index: 45; }
.notify-menu .icon-button.has-unread i[data-notify-badge]:not(:empty) {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; color: #fff; background: #d65b69;
  font-size: 8px; font-style: normal; font-weight: 800; line-height: 16px; text-align: center;
}
.notify-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 40;
  width: min(360px, 82vw); overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface, #fff); box-shadow: 0 18px 40px rgba(20, 24, 30, .16);
}
.notify-dropdown[hidden] { display: none !important; }
.notify-dropdown__head {
  display: flex; padding: 12px 14px; border-bottom: 1px solid #eef0f2;
  align-items: center; justify-content: space-between; gap: 10px;
}
.notify-dropdown__head b { font-size: 12px; }
.notify-dropdown__head button {
  border: 0; color: var(--accent-dark, #0f8f7e); background: transparent;
  cursor: pointer; font-size: 10px; font-weight: 700;
}
.notify-dropdown__list { max-height: 340px; overflow: auto; }
.notify-dropdown__list .empty-state { padding: 18px 14px; color: #9298a0; font-size: 12px; }
.notify-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px;
  border-bottom: 1px solid #f1f3f5; align-items: start;
}
.notify-row:last-child { border-bottom: 0; }
.notify-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; color: inherit; text-decoration: none;
}
.notify-item.is-unread b { color: #0f172a; }
.notify-item b { font-size: 12px; line-height: 1.3; }
.notify-item span { color: #5b6570; font-size: 11px; line-height: 1.4; }
.notify-item small { color: #9298a0; font-size: 10px; }
.notify-row__actions { display: flex; padding: 8px 8px 0 0; gap: 4px; }
.notify-row__btn {
  width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: #6d747d; cursor: pointer; line-height: 1;
}
.notify-row__btn--danger { color: #b42318; }
.notify-row--success { border-left: 3px solid #16a34a; }
.notify-row--warning { border-left: 3px solid #f59e0b; }
.notify-row--danger, .notify-row--incident { border-left: 3px solid #dc2626; }
.notify-row--info { border-left: 3px solid #3b82f6; }
.notify-toast-stack {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  display: flex; flex-direction: column; gap: 10px; width: min(340px, calc(100vw - 28px));
}
.notify-toast {
  padding: 12px 14px; border: 1px solid var(--line); border-left-width: 3px;
  border-radius: 12px; background: #fff; box-shadow: 0 16px 36px rgba(15, 23, 42, .14);
  cursor: pointer;
}
.notify-toast--info { border-left-color: #3b82f6; }
.notify-toast--success { border-left-color: #16a34a; }
.notify-toast--warning { border-left-color: #f59e0b; }
.notify-toast--danger, .notify-toast--incident { border-left-color: #dc2626; }
.notify-toast__head { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.notify-toast__head b { font-size: 12px; }
.notify-toast__head button { border: 0; background: transparent; cursor: pointer; color: #9298a0; }
.notify-toast p { margin: 6px 0 0; color: #5b6570; font-size: 11px; }

