:root {
  --ink: #353535;
  --ink-rgb: 53, 53, 53;
  --brand: #ffcc00;
  --brand-rgb: 255, 204, 0;
  --brand-soft: #ffe16a;
  --brand-pale: #fff0a8;
  --surface: #f6fdf7;
  --surface-rgb: 246, 253, 247;
  --bg: #171717;
  --bg-deep: #0f0f0f;
  --bg-elevated: rgba(var(--surface-rgb), 0.94);
  --bg-soft: rgba(var(--surface-rgb), 0.78);
  --bg-soft-2: rgba(var(--brand-rgb), 0.14);
  --line: rgba(var(--ink-rgb), 0.13);
  --line-strong: rgba(var(--ink-rgb), 0.24);
  --text: var(--ink);
  --muted: rgba(var(--ink-rgb), 0.66);
  --muted-strong: rgba(var(--ink-rgb), 0.82);
  --accent: #6f5900;
  --accent-soft: rgba(var(--brand-rgb), 0.22);
  --accent-strong: #2c2c2c;
  --teal: #006d75;
  --teal-soft: rgba(0, 109, 117, 0.12);
  --gold: #8a6f00;
  --gold-soft: rgba(var(--brand-rgb), 0.2);
  --success: #24784e;
  --success-soft: rgba(36, 120, 78, 0.12);
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.11);
  --warning: #8a5a00;
  --warning-soft: rgba(var(--brand-rgb), 0.28);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.2);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-ui: "Bahnschrift", "Aptos", "Segoe UI Variable", sans-serif;
  --font-display: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at 14% 6%, rgba(var(--brand-rgb), 0.28), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(var(--brand-rgb), 0.16), transparent 24%),
    linear-gradient(135deg, var(--bg-deep) 0%, #242424 44%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--surface-rgb), 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--surface-rgb), 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 88%);
  opacity: 0.42;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

code,
pre {
  font-family: "Cascadia Code", "Consolas", monospace;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(var(--brand-rgb), 0.16), transparent 48%),
    linear-gradient(295deg, rgba(var(--surface-rgb), 0.07), transparent 52%);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 420px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy-block,
.status-card,
.stat-tile,
.chat-list-panel,
.chat-panel,
.notice {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 204, 0, 0.1), transparent 48%),
    var(--bg-elevated);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-xl);
}

.hero-copy-block {
  padding: 28px;
  animation: fade-up 560ms ease both;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 4vw, 4.35rem);
  line-height: 0.94;
  max-width: 12ch;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 1.38rem;
}

h3 {
  font-size: 1rem;
}

.hero-copy {
  max-width: 64ch;
  margin: 16px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.stat-tile {
  position: relative;
  overflow: hidden;
  padding: 18px;
  animation: fade-up 640ms ease both;
}

.stat-tile::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% 20%;
  height: 90px;
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.22), transparent 62%);
  pointer-events: none;
}

.stat-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.stat-tile strong {
  font-size: 1.22rem;
  color: var(--accent);
}

.status-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  animation: fade-up 720ms ease both;
}

.status-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.status-pill,
.payment-status-badge,
.list-item__status,
.log-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
}

.status-running,
.payment-status-completed,
.payment-status-running,
.payment-status-open {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(36, 120, 78, 0.24);
}

.status-starting,
.status-stopping,
.payment-status-pending,
.payment-status-starting,
.payment-status-stopping,
.payment-status-scheduled,
.payment-status-closed {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: rgba(var(--brand-rgb), 0.46);
}

.status-starting::before,
.status-stopping::before {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  background: transparent;
  animation: spin 0.8s linear infinite;
}

.status-stopped,
.payment-status-stopped,
.payment-status-waiting_confirmation {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(0, 109, 117, 0.22);
}

.payment-status-failed,
.payment-status-cancelled,
.log-level-error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(180, 35, 24, 0.24);
}

.status-meta,
.chat-item__preview,
.chat-item__meta,
.chat-subtitle,
.composer-hint,
.empty-state,
.list-item__description,
.message__meta {
  color: var(--muted);
}

.status-meta {
  line-height: 1.62;
  font-size: 0.94rem;
}

.status-actions,
.composer-row,
.payment-actions,
.admin-actions-row,
.admin-search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.action-button {
  appearance: none;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(var(--surface-rgb), 0.64);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.action-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transform: translateX(-120%);
  transition: transform 320ms ease;
}

.action-button:hover:not(:disabled)::after {
  transform: translateX(120%);
}

.action-button:hover:not(:disabled),
.view-switch__button:hover,
.scope-switch__button:hover:not(:disabled),
.chat-item:hover {
  transform: translateY(-2px);
}

.action-button:hover:not(:disabled) {
  border-color: rgba(var(--ink-rgb), 0.34);
  box-shadow: var(--shadow-md);
}

.action-button:disabled,
.scope-switch__button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-button--primary {
  color: var(--ink);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%);
  border-color: rgba(var(--ink-rgb), 0.14);
  box-shadow: 0 10px 24px rgba(var(--brand-rgb), 0.24);
}

.action-button--success {
  color: var(--surface);
  background: linear-gradient(135deg, var(--success) 0%, #2f9662 100%);
  border-color: transparent;
}

.action-button--danger {
  color: var(--surface);
  background: linear-gradient(135deg, var(--danger) 0%, #d33b2e 100%);
  border-color: transparent;
}

.notice {
  padding: 15px 18px;
  margin-bottom: 18px;
  animation: fade-up 280ms ease both;
}

.notice-hidden,
.is-hidden {
  display: none !important;
}

.notice-error {
  color: var(--danger);
  background: rgba(255, 245, 243, 0.94);
  border-color: rgba(180, 35, 24, 0.24);
}

.notice-success {
  color: var(--success);
  background: rgba(242, 255, 247, 0.94);
  border-color: rgba(36, 120, 78, 0.24);
}

.view-switch {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.76);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.view-switch__button,
.scope-switch__button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.view-switch__button.is-active,
.scope-switch__button.is-active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-pale) 100%);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), 0.12);
}

.scope-switch {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scope-switch__button span {
  margin-left: 6px;
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px;
  min-height: 70vh;
}

.workspace--admin {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 420px);
}

.workspace--logs {
  grid-template-columns: minmax(0, 1.5fr) 320px;
}

.workspace--products {
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 420px);
}

.workspace--statistics {
  grid-template-columns: minmax(0, 1fr);
}

.chat-list-panel,
.chat-panel {
  padding: 22px;
  animation: fade-up 420ms ease both;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-header--chat {
  margin-bottom: 12px;
}

.panel-header--stack {
  flex-direction: column;
  align-items: stretch;
}

.counter-badge {
  min-width: 42px;
  padding: 10px 12px;
  text-align: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(70vh - 110px);
  overflow-y: auto;
  padding-right: 4px;
}

.chat-item,
.list-card,
.admin-card,
.log-item {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 204, 0, 0.08), transparent 48%),
    var(--bg-soft);
  box-shadow: var(--shadow-md);
}

.chat-item {
  padding: 16px;
  text-align: left;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.chat-item:hover {
  border-color: rgba(var(--ink-rgb), 0.24);
}

.chat-item.active {
  border-color: rgba(var(--ink-rgb), 0.34);
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.24), rgba(var(--brand-rgb), 0.1)),
    rgba(var(--surface-rgb), 0.96);
}

.chat-item--unread {
  border-color: rgba(var(--brand-rgb), 0.8);
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.28), rgba(var(--brand-rgb), 0.08)),
    rgba(var(--surface-rgb), 0.95);
  box-shadow:
    0 0 0 1px rgba(var(--brand-rgb), 0.36),
    var(--shadow-md);
}

.chat-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.chat-item__header-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(var(--brand-rgb), 0.95);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
}

.chat-item__title {
  font-weight: 700;
  color: var(--accent);
}

.chat-item__preview,
.list-item__description {
  line-height: 1.5;
}

.chat-item__meta {
  margin-top: 10px;
  font-size: 0.86rem;
}

.chat-subtitle {
  max-width: 46ch;
  line-height: 1.55;
  text-align: right;
}

.messages {
  min-height: 420px;
  max-height: calc(70vh - 240px);
  overflow-y: auto;
  padding: 8px 2px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(78%, 640px);
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 204, 0, 0.06), transparent 48%),
    rgba(var(--surface-rgb), 0.96);
  box-shadow: var(--shadow-md);
}

.message--incoming {
  align-self: flex-start;
  border-bottom-left-radius: 8px;
}

.message--outgoing {
  align-self: flex-end;
  border-bottom-right-radius: 8px;
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.22), transparent 48%),
    rgba(255, 248, 219, 0.96);
}

.message--failed {
  border-color: rgba(180, 35, 24, 0.28);
  background: rgba(255, 245, 243, 0.96);
}

.message__kind {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.message__text {
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message__attachment {
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
}

.message__attachment-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.message__attachment img {
  width: min(100%, 320px);
  border-radius: 18px;
  border: 1px solid var(--line);
}

.message__attachment video {
  width: min(100%, 320px);
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #000;
}

.message__media-hint {
  width: min(100%, 320px);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--muted);
  line-height: 1.5;
}

.message__file-link {
  display: inline-flex;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--accent-soft);
  color: var(--accent);
}

.message__action-button {
  padding: 10px 14px;
  font-size: 0.92rem;
  box-shadow: none;
}

.message__error {
  font-size: 0.86rem;
  color: var(--danger);
}

.composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.field-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(var(--surface-rgb), 0.7);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(var(--ink-rgb), 0.42);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(var(--ink-rgb), 0.34);
  background: rgba(var(--surface-rgb), 0.92);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.24);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.file-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px dashed rgba(var(--ink-rgb), 0.28);
  background: rgba(var(--surface-rgb), 0.68);
  color: var(--accent);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.file-picker:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--ink-rgb), 0.44);
}

.file-picker input {
  display: none;
}

.file-name {
  color: var(--muted);
}

.composer-row--footer {
  justify-content: space-between;
}

.composer-hint {
  margin: 0;
  line-height: 1.55;
}

.payment-detail {
  min-height: 420px;
  padding: 8px 2px 12px;
}

.payment-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.payment-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-tile {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(var(--surface-rgb), 0.62);
}

.detail-tile--wide {
  grid-column: 1 / -1;
}

.detail-tile__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.detail-tile__value {
  font-size: 1rem;
  line-height: 1.55;
  word-break: break-word;
  color: var(--muted-strong);
}

.detail-stack {
  display: grid;
  gap: 12px;
}

.payment-actions {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.list-card,
.admin-card {
  padding: 18px;
  border-radius: var(--radius-lg);
}

.admin-main-panel,
.admin-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.products-main-panel,
.products-side-panel,
.statistics-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}

.products-map-card {
  padding: 12px;
}

.products-map {
  width: 100%;
  min-height: 420px;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.products-point-list-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 420px;
}

.products-point-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--brand-rgb), 0.64) rgba(var(--surface-rgb), 0.34);
}

.products-point-scroll::-webkit-scrollbar {
  width: 12px;
}

.products-point-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.34);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
}

.products-point-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.92), rgba(var(--brand-rgb), 0.54));
  border: 2px solid rgba(var(--surface-rgb), 0.58);
}

.products-point-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(var(--brand-rgb), 1), rgba(var(--brand-rgb), 0.68));
}

.products-point-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.products-point-sort {
  display: grid;
  gap: 6px;
  min-width: 180px;
  flex: 1 1 180px;
}

.products-point-sort .field-label {
  margin: 0;
}

.products-point-groups {
  display: grid;
  gap: 14px;
  min-height: 100%;
}

.products-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(var(--surface-rgb), 0.6);
  overflow: hidden;
}

.products-group__title {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  background: rgba(var(--brand-rgb), 0.14);
}

.products-point-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.products-point-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.products-point-item {
  display: grid;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(var(--surface-rgb), 0.76);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.products-point-item:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--ink-rgb), 0.32);
}

.products-point-item.is-selected {
  border-color: rgba(var(--brand-rgb), 0.48);
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.1), transparent 52%),
    rgba(var(--surface-rgb), 0.88);
}

.products-point-item.is-active {
  border-color: rgba(var(--brand-rgb), 0.76);
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.18), transparent 48%),
    rgba(var(--surface-rgb), 0.95);
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.2);
}

.products-point-item.is-inactive {
  opacity: 0.72;
}

.products-point-item:focus-visible {
  border-color: rgba(var(--brand-rgb), 0.76);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.18);
}

.products-point-item__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 12px;
  align-items: start;
}

.products-point-item__text {
  min-width: 0;
}

.products-point-item__title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: var(--accent);
}

.products-point-item__meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.products-point-thumb {
  display: inline-flex;
  width: 86px;
  height: 86px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--surface-rgb), 0.9);
  overflow: hidden;
  cursor: pointer;
}

.products-point-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.products-coords-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.products-point-image-preview {
  display: grid;
}

.products-point-image-preview__card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(var(--surface-rgb), 0.72);
}

.products-point-image-preview__image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.products-point-image-preview__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.products-image-editor {
  display: grid;
  gap: 10px;
}

.products-image-editor canvas {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--surface-rgb), 0.84);
  cursor: crosshair;
}

.products-catalog-list {
  display: grid;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.products-catalog-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(var(--surface-rgb), 0.66);
  display: grid;
  gap: 10px;
}

.products-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.products-color-preview-wrap {
  display: grid;
  gap: 8px;
}

.products-color-preview {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.products-catalog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.products-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.products-image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.72);
  backdrop-filter: blur(8px);
}

.products-image-lightbox__figure {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(var(--surface-rgb), 0.16);
  border-radius: 18px;
  background: rgba(19, 19, 19, 0.94);
  color: #f5f5f5;
  box-shadow: var(--shadow-lg);
}

.products-image-lightbox__close {
  justify-self: end;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

.products-image-lightbox__image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.products-image-lightbox__caption {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.5;
}

.admin-card--compact {
  padding: 16px;
}

.admin-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-card__header--toggle {
  margin-bottom: 0;
}

.admin-card--collapsible {
  overflow: clip;
}

.admin-card__toggle {
  appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.admin-card__toggle:focus-visible {
  outline: 2px solid rgba(var(--brand-rgb), 0.62);
  outline-offset: 4px;
  border-radius: 8px;
}

.admin-card__chevron {
  color: var(--muted);
  font-size: 1rem;
  transition: transform 200ms ease;
}

.admin-card__body {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 14px;
  opacity: 1;
  transition:
    grid-template-rows 220ms ease,
    opacity 220ms ease,
    margin-top 220ms ease;
}

.admin-card__body-inner {
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 12px;
}

.admin-card.is-collapsed .admin-card__body {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
}

.admin-card.is-collapsed .admin-card__chevron {
  transform: rotate(-90deg);
}

.admin-search-row {
  margin-bottom: 14px;
}

.admin-search-row input {
  flex: 1 1 220px;
}

.admin-form-grid {
  display: grid;
  gap: 12px;
}

.admin-search-results,
.admin-broadcast-list {
  max-height: 260px;
}

.admin-purchase-history {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-purchase-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 204, 0, 0.08), transparent 48%),
    rgba(var(--surface-rgb), 0.62);
}

.admin-purchase-card__image-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.admin-purchase-card__image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(var(--surface-rgb), 0.8);
}

.admin-purchase-card__image--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.admin-purchase-card__body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-purchase-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-purchase-card__location {
  padding-top: 12px;
  border-top: 1px solid rgba(var(--ink-rgb), 0.08);
}

.admin-purchase-card__actions {
  margin-top: 12px;
}

.admin-history {
  min-height: 260px;
  max-height: 420px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 20px;
  text-align: center;
  line-height: 1.7;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
  background: rgba(var(--surface-rgb), 0.58);
}

.empty-state--compact {
  min-height: 92px;
  padding: 12px;
  border-radius: var(--radius-md);
}

.skrill-worker-panel {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.skrill-worker-preview {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(var(--surface-rgb), 0.58);
  overflow: hidden;
}

.skrill-worker-preview img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: rgba(var(--ink-rgb), 0.05);
}

.skrill-worker-log {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.skrill-worker-log .log-item {
  padding: 10px 12px;
  box-shadow: none;
}

.logs-toolbar {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 120px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.logs-toolbar__group {
  display: grid;
  gap: 8px;
}

.logs-toolbar__group--wide {
  min-width: 0;
}

.logs-toolbar__actions {
  display: flex;
  justify-content: flex-end;
}

.logs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(70vh - 200px);
  overflow-y: auto;
  padding-right: 4px;
}

.log-item {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.log-item:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--ink-rgb), 0.22);
}

.log-item__headline {
  line-height: 1.62;
  font-weight: 600;
  color: var(--accent);
  word-break: break-word;
}

.log-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.log-item__details {
  margin-top: 14px;
}

.log-item__details summary {
  cursor: pointer;
  color: var(--muted-strong);
}

.log-item__details pre {
  margin: 10px 0 0;
  padding: 14px;
  overflow: auto;
  border-radius: var(--radius-sm);
  background: rgba(var(--ink-rgb), 0.06);
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  color: var(--ink);
  line-height: 1.55;
}

.log-badge {
  min-height: 30px;
  padding: 6px 10px;
  background: rgba(var(--surface-rgb), 0.72);
  border-color: rgba(var(--ink-rgb), 0.14);
  color: var(--muted-strong);
}

.statistics-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.statistics-toolbar__group {
  display: grid;
  gap: 8px;
}

.statistics-toolbar__actions {
  display: flex;
  justify-content: flex-end;
}

.statistics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.statistics-summary__tile {
  box-shadow: var(--shadow-md);
}

.statistics-card {
  display: grid;
  gap: 14px;
}

.statistics-chart {
  min-height: 280px;
}

.statistics-chart__frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(var(--surface-rgb), 0.66);
}

.statistics-chart__svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
}

.statistics-chart__axis,
.statistics-chart__grid {
  stroke: rgba(var(--ink-rgb), 0.16);
  stroke-width: 1;
}

.statistics-chart__grid {
  stroke-dasharray: 4 6;
}

.statistics-chart__axis-label {
  fill: var(--muted);
  font-size: 12px;
}

.statistics-chart__line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.statistics-chart__point {
  stroke: rgba(var(--surface-rgb), 0.98);
  stroke-width: 2;
}

.statistics-chart__hit {
  fill: transparent;
  cursor: crosshair;
}

.statistics-chart__tooltip {
  position: absolute;
  z-index: 2;
  display: none;
  max-width: 260px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.92);
  color: var(--surface);
  font-size: 0.82rem;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.statistics-chart__tooltip.is-visible {
  display: block;
}

.statistics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.statistics-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.7);
  border: 1px solid var(--line);
  color: var(--muted-strong);
}

.statistics-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(var(--surface-rgb), 0.92);
}

.statistics-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.statistics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: rgba(var(--surface-rgb), 0.56);
}

.statistics-table th,
.statistics-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.09);
  white-space: nowrap;
}

.statistics-table th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.statistics-table td {
  color: var(--muted-strong);
}

.statistics-table tr:last-child td {
  border-bottom: 0;
}

.logs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.24);
}

::-webkit-scrollbar-track {
  background: transparent;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1220px) {
  .workspace--admin,
  .workspace--logs,
  .workspace--products,
  .workspace--statistics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-subtitle {
    text-align: left;
    max-width: none;
  }

  .chat-list,
  .messages,
  .logs-list {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .logs-toolbar,
  .statistics-toolbar,
  .statistics-summary {
    grid-template-columns: 1fr;
  }

  .logs-toolbar__actions,
  .statistics-toolbar__actions {
    justify-content: stretch;
  }

  .logs-toolbar__actions .action-button,
  .statistics-toolbar__actions .action-button {
    width: 100%;
  }

  .payment-grid,
  .admin-grid,
  .admin-purchase-card,
  .admin-purchase-card__grid,
  .products-coords-grid,
  .products-catalog-grid {
    grid-template-columns: 1fr;
  }

  .products-point-item__content {
    grid-template-columns: 1fr;
  }

  .products-point-thumb {
    width: 100%;
    max-width: 180px;
    height: 140px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1440px);
  }

  .hero-copy-block,
  .status-card,
  .chat-list-panel,
  .chat-panel,
  .stat-tile {
    padding: 18px;
    border-radius: 24px;
  }

  .view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    border-radius: 24px;
  }

  .view-switch__button,
  .scope-switch__button {
    width: 100%;
  }

  .message {
    max-width: 100%;
  }

  .products-map {
    min-height: 320px;
  }

  .composer-row--footer {
    align-items: stretch;
  }

  .status-actions,
  .payment-actions,
  .admin-actions-row,
  .admin-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .status-actions .action-button,
  .payment-actions .action-button,
  .admin-actions-row .action-button {
    width: 100%;
  }

  .products-point-toolbar,
  .products-point-image-preview__meta {
    align-items: stretch;
  }
}
