:root {
  /* Surfaces — opaque, neutral slate. Flat layers instead of glassmorphism. */
  --bg: #0d1117;
  --bg-accent: var(--bg);
  --surface: #161b22;
  --surface-strong: #1c2230;
  --surface-dark: #10141b;
  --surface-muted: #1a2030;

  /* Text */
  --text: #e6edf6;
  --muted: #8b97a8;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.22);

  /* Elevation — subtle, realistic depth (not the big blurred AI glow) */
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.38);

  /* Radii — tight, modern (Linear/Stripe-like) instead of pill-soft 28px */
  --radius-xl: 12px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;

  /* Accent — single restrained orange, used flat */
  --orange: #f5793b;
  --orange-deep: #e15f2a;
  --accent: var(--orange);
  --accent-soft: rgba(245, 121, 59, 0.12);
  --blue: #4d79f0;
  --green: #2ea878;
  --red: #e15565;

  /* Focus ring */
  --ring: rgba(245, 121, 59, 0.55);

  --font: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-accent);
}

body.is-loading-admin .shell {
  opacity: 0;
}

body.is-loading-admin {
  overflow: hidden;
}

body.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

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

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: block;
}

.brand h1,
.hero h2,
.panel-head h3,
.login-card h3 {
  margin: 0;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 16px;
  border-radius: 22px;
  background: rgba(23, 32, 51, 0.8);
  border: 1px solid var(--line);
}

.admin-profile__avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(242, 95, 50, 0.24);
}

.admin-profile__body {
  min-width: 0;
}

.admin-profile__name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.admin-profile__meta,
.admin-profile__status {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.admin-profile__status {
  margin-top: 2px;
  color: var(--green);
  font-weight: 700;
}

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

.nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.sidebar-note,
.hero-text,
#loginHint {
  color: var(--muted);
  line-height: 1.55;
}

.task-type-hint {
  margin: 8px 0 0;
}

.sidebar-logout {
  margin-top: auto;
  width: 100%;
}

.sidebar .admin-profile {
  margin-top: 6px;
}

.hero .eyebrow {
  display: none;
}

.content {
  padding: 28px;
  display: grid;
  align-content: start;
  gap: 20px;
}

.hero,
.login-card,
.table-card,
.panel,
.metric-card,
.summary-card,
.settings-card,
.roadmap-card,
.editor-card {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero,
.login-card,
.table-card,
.panel {
  border-radius: var(--radius-xl);
}

.hero {
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hero--compact {
  align-items: center;
}

.hero-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  box-shadow: 0 18px 36px rgba(242, 95, 50, 0.28);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
}

.primary-button.is-busy,
.secondary-button.is-busy {
  position: relative;
  pointer-events: none;
  opacity: 0.88;
  overflow: hidden;
}

.primary-button.is-busy::after,
.secondary-button.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 70%);
  animation: button-shine 1.1s linear infinite;
}

@keyframes button-shine {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.login-card {
  max-width: 480px;
  padding: 26px;
}

.login-card--standalone {
  width: min(100%, 480px);
}

.login-layout {
  width: 100%;
  display: grid;
  place-items: center;
}

/* ── Логотип на странице входа ── */
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(242, 95, 50, 0.3);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.brand h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

/* ── Заголовок блока входа ── */
.login-card__header {
  margin-bottom: 20px;
}

.login-card__header h3 {
  margin: 4px 0 6px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.phone-requisites {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.phone-requisite-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.phone-requisite-inputs {
  flex: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  min-width: 0;
}

.phone-requisite-remove {
  flex: 0 0 auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
}

@media (max-width: 560px) {
  .phone-requisite-inputs {
    grid-template-columns: 1fr;
  }
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.app {
  display: grid;
  gap: 20px;
}

.stats-grid,
.summary-grid,
.settings-grid,
.roadmap-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
}

.dashboard-card {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(61, 104, 234, 0.16), transparent 34%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.dashboard-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-card__title {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.dashboard-card__tag {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 143, 80, 0.12);
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.dashboard-stat--live {
  position: relative;
  grid-column: 1 / -1;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(74, 222, 128, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(19, 26, 42, 0.96), rgba(22, 32, 53, 0.92));
  border-color: rgba(74, 222, 128, 0.28);
  box-shadow: 0 18px 36px rgba(4, 12, 28, 0.36);
}

.dashboard-stat--live::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.14), transparent 35%);
  pointer-events: none;
}

.dashboard-stat__value {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.dashboard-stat--live .dashboard-stat__value {
  position: relative;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.dashboard-stat__label {
  position: relative;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-stat__meta {
  position: relative;
  margin-top: 8px;
  color: rgba(229, 237, 248, 0.72);
  font-size: 11px;
  line-height: 1.45;
}

.dashboard-stat__live {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(196, 255, 214, 0.88);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.dashboard-stat__pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.38);
  animation: live-pulse 1.8s ease-in-out infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.38);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(74, 222, 128, 0);
    transform: scale(1.08);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    transform: scale(1);
  }
}

.dashboard-charts {
  display: grid;
  gap: 10px;
}

.dashboard-chart {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 34%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.dashboard-chart--revenue {
  background:
    radial-gradient(circle at top right, rgba(255, 143, 80, 0.16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(255, 143, 80, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.dashboard-chart--activity {
  background:
    radial-gradient(circle at top right, rgba(61, 104, 234, 0.14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(61, 104, 234, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

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

.dashboard-chart__title {
  font-size: 14px;
  font-weight: 800;
}

.dashboard-chart__text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-chart__value {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-chart__legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.dashboard-chart__legend-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-chart__legend-item.is-accent {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-chart__legend-label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.dashboard-chart__legend-value {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chart__svg {
  width: 100%;
  height: 136px;
  display: block;
  cursor: crosshair;
}

.dashboard-chart--users {
  background:
    radial-gradient(circle at top right, rgba(34, 201, 126, 0.12), transparent 34%),
    radial-gradient(circle at bottom left, rgba(167, 139, 250, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.chart-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(18, 18, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100px;
  max-width: 180px;
}

.chart-tooltip__date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.chart-tooltip__value {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.chart-tooltip__line {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

.summary-grid,
.settings-grid,
.roadmap-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-card,
.summary-card,
.settings-card,
.roadmap-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.editor-card {
  margin-top: 18px;
  border-radius: var(--radius-lg);
  padding: 18px;
}

.moderators-card {
  margin-top: 8px;
}

.editor-form,
.settings-form,
.moderator-form {
  display: grid;
  gap: 14px;
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.small-button {
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.small-button--danger {
  background: rgba(223, 77, 92, 0.12);
  color: var(--red);
}

.small-button--success {
  background: rgba(15, 159, 110, 0.12);
  color: var(--green);
}

.category-modal__danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(223, 77, 92, 0.22);
  border-radius: 18px;
  background: rgba(223, 77, 92, 0.08);
}

.category-modal__danger-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.category-modal__danger-text {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.category-modal__danger .small-button {
  white-space: nowrap;
}

.complaint-row.is-expanded > td {
  border-bottom-color: transparent;
}

.complaint-details-row td {
  padding-top: 0;
  padding-bottom: 18px;
}

.complaint-thread {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
}

.complaint-thread__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 14px;
}

.complaint-thread__meta {
  display: flex;
  gap: 10px 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.complaint-thread__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}

.complaint-thread__msg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.complaint-thread__msg--reporter {
  align-items: flex-start;
}

.complaint-thread__msg--reported {
  align-items: flex-end;
}

.complaint-thread__bubble {
  max-width: min(100%, 760px);
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  line-height: 1.45;
  white-space: pre-wrap;
}

.complaint-thread__msg--reporter .complaint-thread__bubble {
  background: rgba(61, 104, 234, 0.18);
}

.complaint-thread__msg--reported .complaint-thread__bubble {
  background: rgba(15, 159, 110, 0.16);
}

.complaint-thread__empty {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 2px;
}

.metric-card__value {
  font-size: 32px;
  font-weight: 800;
  margin: 8px 0 0;
}

.metric-card--accent {
  background: linear-gradient(135deg, #212a3b, #324258);
  color: #fff;
}

.metric-card--accent .eyebrow,
.metric-card--accent .metric-card__meta {
  color: rgba(255, 255, 255, 0.72);
}

.metric-card__meta,
.summary-card p,
.settings-card p,
.roadmap-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.panel {
  padding: 22px;
  display: none;
}

.panel.is-active {
  display: block;
}

.panel-head {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pill {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(61, 104, 234, 0.2);
  color: #c7d7ff;
  font-size: 13px;
  font-weight: 700;
}

.table-card {
  padding: 8px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
}

.status--success::before {
  background: var(--green);
}

.status--danger::before {
  background: var(--red);
}

.status--warning::before {
  background: var(--orange);
}

.status--idle::before {
  background: var(--blue);
}

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

.toast {
  position: fixed;
  left: 20px;
  bottom: 20px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(9, 16, 28, 0.9);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.18s ease;
  border: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(12px);
  z-index: 1100;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 20, 0.74);
  backdrop-filter: blur(8px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: 90vh;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal__dialog .panel-head {
  flex-shrink: 0;
}

.modal__dialog .settings-form {
  overflow-y: auto;
  flex: 1;
}

.admin-shop-body {
  padding: 24px;
}

.shop-page {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.shop-page__header {
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(18, 28, 48, 0.96), rgba(11, 17, 31, 0.96));
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.shop-page__back-row,
.shop-page__title-row,
.shop-page__tabs,
.shop-inline-tools,
.inline-balance-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.shop-catalog-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
}

.shop-catalog-layout {
  display: grid;
  grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.shop-products-card,
.shop-categories-card {
  margin-top: 0;
}

.shop-products-card {
  grid-column: 1 / -1;
  width: 100%;
}

.shop-categories-card {
  display: block;
}

.shop-categories-card table {
  min-width: 0;
}

.shop-products-head {
  align-items: flex-start;
}

.catalog-add-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(242, 95, 50, 0.28);
}

.modal__dialog--wide {
  width: min(100%, 860px);
}

.modal__dialog--compact {
  width: min(100%, 420px);
}

.product-modal-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.product-image-field {
  display: grid;
  gap: 12px;
}

.product-image-preview {
  min-height: 220px;
  border-radius: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
}

.product-image-preview.has-image {
  border-style: solid;
}

.product-image-preview img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.product-upload-button {
  text-align: center;
}

.product-checkbox-field {
  min-height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.field--with-action {
  position: relative;
}

.field--with-action .small-button {
  justify-self: start;
  margin-top: -2px;
}

.is-masked {
  -webkit-text-security: disc;
  color: transparent;
  text-shadow: 0 0 10px rgba(229, 237, 248, 0.95);
  caret-color: var(--text);
}

.products-table {
  min-width: 680px; /* уменьшено с 940px — таблица умещается без горизонтального скролла */
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px 0;
}

.drag-cell {
  width: 52px;
}

.drag-handle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: grab;
}

.product-select-handle.is-selected {
  background: rgba(15, 159, 110, 0.18);
  color: #fff;
  border-color: rgba(15, 159, 110, 0.55);
}

[data-product-row].is-dragging {
  opacity: 0.45;
}

[data-product-row].drag-over td {
  background: rgba(61, 104, 234, 0.08);
}

[data-product-row].is-selected td {
  background: rgba(15, 159, 110, 0.08);
}

.product-name-cell {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.is-indented .product-name-cell {
  padding-left: 18px;
}

.group-row td {
  padding-top: 18px;
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-corner-toggle {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.product-corner-toggle.is-on {
  background: var(--green);
}

.product-corner-toggle.is-off {
  background: var(--red);
}

.product-thumb {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

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

.table-subtext {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.product-content-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  letter-spacing: 0.18em;
}

.add-menu-actions {
  display: grid;
  gap: 12px;
}

.shop-inline-select {
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 16, 29, 0.9);
  color: var(--text);
}

.two-column-grid,
.three-column-grid {
  display: grid;
  gap: 14px;
}

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

.three-column-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-balance-form input {
  flex: 0 1 180px;
}

/* ─── MOBILE TOPBAR ─────────────────────────────────── */
.mobile-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 150;
  background: rgba(13, 22, 40, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.mobile-topbar__title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.hamburger-button {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.18s ease;
}

.hamburger-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger-button span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* ─── SIDEBAR OVERLAY ────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 20, 0.62);
  backdrop-filter: blur(4px);
  z-index: 200;
  cursor: pointer;
}

body.sidebar-open .sidebar-overlay {
  display: block;
}

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

  .mobile-topbar {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 85vw);
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.32, 0, 0.16, 1);
    border-right: 1px solid var(--line);
    border-bottom: none;
    overflow-y: auto;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .content {
    padding: 16px;
  }

  .panel {
    padding: 16px;
  }

  .panel-head {
    flex-wrap: wrap;
    gap: 10px;
  }

  .shop-catalog-grid,
  .shop-catalog-layout,
  .two-column-grid,
  .three-column-grid {
    grid-template-columns: 1fr;
  }

  .product-modal-grid {
    grid-template-columns: 1fr;
  }

  .notifications-dropdown {
    left: 0;
    width: 100vw;
    border-radius: 0;
    max-height: 60vh;
  }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions button {
    flex: 1;
  }

  .panel,
  .hero,
  .login-card {
    padding: 18px;
  }

  .editor-actions > * {
    flex: 1 1 auto;
  }

  .modal {
    padding: 14px;
  }

  .modal__dialog {
    padding: 18px;
  }

  .shop-inline-tools {
    width: 100%;
  }

  .shop-inline-tools .shop-inline-select {
    flex: 1 1 120px;
  }

  .catalog-add-button {
    flex: 0 0 44px;
  }

  .category-modal__danger {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===================== NOTIFICATIONS ===================== */
.sidebar-notifications {
  position: relative;
  width: 100%;
  margin-bottom: 8px;
}

.notifications-dropdown {
  position: fixed;
  top: 0;
  left: 280px; /* совпадает с шириной сайдбара */
  width: 360px;
  max-height: 70vh;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notifications-dropdown.is-hidden { display: none; }

.notifications-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.notifications-list {
  overflow-y: auto;
  flex: 1;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.notification-item:last-child { border-bottom: none; }

.notification-item.is-unread { background: rgba(61, 104, 234, 0.08); }

.notification-item__title {
  font-weight: 700;
  font-size: .875rem;
  margin-bottom: 2px;
  color: var(--text);
}

.notification-item__body {
  font-size: .8rem;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.notification-item__meta {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 4px;
}

.pill--success { background: rgba(34,197,94,.15); color: #16a34a; }
.pill--danger  { background: rgba(239,68,68,.15);  color: #dc2626; }


/* ── User profile actions grid ── */
.user-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: .75rem 0 1rem;
}
.user-actions-group {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: .75rem 1rem;
}
.small-button--warning {
  background: rgba(251,146,60,.15);
  color: #f97316;
  border-color: rgba(251,146,60,.3);
}
.small-button--warning:hover {
  background: rgba(251,146,60,.25);
}

/* =====================================================================
   REDESIGN 2025 — Grouped nav, side drawer, sub-tabs, cert badges
   ===================================================================== */

/* ── Grouped sidebar nav ── */
.nav-group { margin-bottom: 6px; }
.nav-group__label {
  padding: 0 14px;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(145, 160, 182, 0.45);
  display: block;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.18s;
}
.nav-link.is-active .nav-icon,
.nav-link:hover .nav-icon { opacity: 1; }
.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}

/* ── Side drawer (replaces inline bot editor) ── */
.side-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 24, 0.72);
  backdrop-filter: blur(7px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.side-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(600px, 100vw);
  background: #0d1628;
  border-left: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: -32px 0 80px rgba(2, 8, 24, 0.65);
  z-index: 901;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0, 0.16, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.side-drawer.is-open { transform: translateX(0); }

.side-drawer__head {
  position: sticky;
  top: 0;
  background: rgba(13, 22, 40, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 1;
  backdrop-filter: blur(12px);
}
.side-drawer__title-group { min-width: 0; }
.side-drawer__eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}
.side-drawer__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.side-drawer__body {
  padding: 20px;
  flex: 1;
  display: grid;
  gap: 20px;
  align-content: start;
}
.drawer-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  gap: 14px;
}
.drawer-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.drawer-section__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.shop-open-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(61, 104, 234, 0.12);
  color: #c7d7ff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: 0.18s ease;
}
.shop-open-button:hover {
  background: rgba(61, 104, 234, 0.22);
  transform: translateY(-1px);
}
.bot-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

/* ── Settings sub-tabs ── */
.settings-subtabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 5px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 20px;
}
.settings-subtab {
  border: 0;
  border-radius: 13px;
  padding: 9px 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: 0.18s ease;
  white-space: nowrap;
}
.settings-subtab.is-active {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.settings-tab-panel { display: none; }
.settings-tab-panel.is-active { display: block; }

/* ── Domain SSL cert badges ── */
.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.cert-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.cert-badge--none { background: rgba(145,160,182,0.1); color: var(--muted); }
.cert-badge--pending { background: rgba(255,143,80,0.12); color: var(--orange); }
.cert-badge--issued { background: rgba(15,159,110,0.14); color: var(--green); }
.cert-badge--error { background: rgba(223,77,92,0.12); color: var(--red); }

/* ── Domain add row ── */
.domain-add-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.domain-add-row .field { flex: 1 1 220px; margin: 0; }
.domain-add-row .field input { border-radius: 14px; padding: 12px 14px; }

.domain-stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.domain-stat-pill {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  white-space: nowrap;
}
.domain-stat-pill--users { color: #3d68ea; background: rgba(61, 104, 234, 0.12); }
.domain-stat-pill--logins { color: #0f9f6e; background: rgba(15, 159, 110, 0.1); }
.domain-stat-pill--visits { color: var(--muted); background: rgba(255, 255, 255, 0.05); }

/* ── Bot card in bots table ── */
.bot-row-name { font-weight: 700; }
.bot-row-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.bots-table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Shop page: vertical sidebar layout ── */
.shop-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.shop-sidebar {
  position: sticky;
  top: 20px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 10px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 3px;
}
.shop-sidebar .nav-link {
  font-size: 13px;
  padding: 11px 13px;
  border-radius: 14px;
}
.shop-content { min-width: 0; }
.shop-content .panel { display: none; }
.shop-content .panel.is-active { display: block; }

/* ── Improved panel card ── */
.panel { border-radius: var(--radius-xl); }

/* ── Summary card improvements ── */
.summary-card { cursor: default; }
.summary-card h4 { margin: 10px 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -0.025em; }

/* ── Table improvements ── */
.table-card { border-radius: var(--radius-lg); overflow: hidden; }

/* ── Open shop link in table ── */
.open-shop-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 12px;
  background: rgba(15, 159, 110, 0.1);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(15, 159, 110, 0.2);
  transition: 0.18s ease;
}
.open-shop-link:hover {
  background: rgba(15, 159, 110, 0.2);
  transform: translateY(-1px);
}

.log-box {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.5;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── DRAWER STYLES ── */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer:not(.is-hidden) {
  pointer-events: auto;
  opacity: 1;
}

.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.drawer__panel {
  position: relative;
  margin-left: auto;
  width: min(100%, 420px);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.drawer:not(.is-hidden) .drawer__panel {
  transform: translateX(0);
}

.drawer__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.drawer__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.drawer__close-button {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.drawer__close-button:hover {
  background: rgba(148, 163, 184, 0.1);
}

.drawer__content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Status Card */
.status-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--line);
}

.status-card__header {
  margin-bottom: 12px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(223, 77, 92, 0.1);
  color: var(--red);
}

.status-badge.is-active {
  background: rgba(15, 159, 110, 0.1);
  color: var(--green);
}

.status-card__body {
  font-size: 14px;
  color: var(--muted);
}

.status-card__body p {
  margin: 0;
}

/* Form Styles */
.drawer-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group .field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(61, 104, 234, 0.05);
}

.form-actions {
  display: flex;
  gap: 10px;
}

/* Control Buttons */
.control-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.button {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.3);
}

.button--success {
  background: rgba(15, 159, 110, 0.1);
  color: var(--green);
  border-color: rgba(15, 159, 110, 0.2);
}

.button--success:hover {
  background: rgba(15, 159, 110, 0.15);
  border-color: rgba(15, 159, 110, 0.3);
}

.button--danger {
  background: rgba(223, 77, 92, 0.1);
  color: var(--red);
  border-color: rgba(223, 77, 92, 0.2);
}

.button--danger:hover {
  background: rgba(223, 77, 92, 0.15);
  border-color: rgba(223, 77, 92, 0.3);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Logs Section */
.logs-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.logs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logs-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.logs-container {
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  max-height: 300px;
  overflow-y: auto;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.logs-placeholder {
  text-align: center;
  padding: 20px 12px;
  color: var(--muted);
  font-size: 12px;
}

.log-entry {
  padding: 4px 0;
  word-break: break-word;
  white-space: pre-wrap;
}

.log-entry.error {
  color: var(--red);
}

.log-entry.warning {
  color: var(--orange);
}

.log-entry.success {
  color: var(--green);
}

.log-entry.info {
  color: var(--blue);
}

.is-selected-row td {
  background: rgba(255, 255, 255, 0.04);
}

.task-review-detail-card {
  margin-top: 18px;
}

.task-review-detail-empty {
  padding: 20px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.task-review-detail {
  display: grid;
  gap: 18px;
}

.task-review-meta {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.task-review-template {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.task-review-template__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.task-review-template pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
}

.task-review-gallery {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.task-review-shot {
  display: grid;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.task-review-shot img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.task-review-shot span {
  font-size: 12px;
  color: var(--muted);
}

/* ─── SHOP MOBILE BAR ────────────────────────────────── */
.shop-mobile-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  margin-bottom: 8px;
}

.shop-mobile-bar__section {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* Compact shop header */
#shopTitle {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0;
}

body.shop-sidebar-open .sidebar-overlay {
  display: block;
}

@media (max-width: 860px) {
  .shop-page__header {
    padding: 14px 16px;
    gap: 8px;
    border-radius: var(--radius-lg);
  }

  .shop-page__title-row .admin-profile__avatar {
    width: 34px;
    height: 34px;
    font-size: 14px;
    box-shadow: none;
  }

  #shopTitle {
    font-size: 16px;
  }

  #shopSubtitle {
    display: none;
  }

  .shop-mobile-bar {
    display: flex;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 84vw);
    z-index: 300;
    padding: 16px 10px;
    border-radius: 0;
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.32, 0, 0.16, 1);
    overflow-y: auto;
    display: grid;
    gap: 3px;
    align-content: start;
  }

  body.shop-sidebar-open .shop-sidebar {
    transform: translateX(0);
  }

  .side-drawer { width: 100vw; }

  .drawer__panel {
    width: 100% !important;
  }
}

/* ============================================================
   РЕДИЗАЙН-СЛОЙ (2026)
   Цель: убрать «AI-look» (глассморфизм, крупные скругления,
   градиентные кнопки, цветные свечения) и сделать панель плоской,
   плотной и сдержанной — в духе Linear / Stripe / Shopify Admin.
   Слой намеренно вынесен в конец файла, чтобы изменения были
   обратимы и не трогали историческую разметку выше.
   ============================================================ */

/* 1. Плоские поверхности — глассморфизм убран целиком.
   Поверхности теперь непрозрачные, поэтому без blur ничего не «просвечивает». */
.sidebar,
.hero,
.login-card,
.table-card,
.panel,
.metric-card,
.summary-card,
.settings-card,
.roadmap-card,
.editor-card,
.modal__backdrop,
.modal__dialog,
.notifications-dropdown,
.bot-drawer,
.dashboard-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.sidebar,
.hero,
.login-card,
.table-card,
.panel,
.metric-card,
.summary-card,
.settings-card,
.roadmap-card,
.editor-card,
.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sidebar {
  background: var(--surface-dark);
}

/* 2. Карточки и панели — убираем декоративные радиальные градиенты в углах */
.dashboard-card,
.dashboard-stat--live {
  background: var(--surface) !important;
}
.dashboard-stat--live::before { display: none; }
.dashboard-stat--live {
  border-color: var(--line-strong) !important;
  box-shadow: none !important;
}
.dashboard-stat {
  background: var(--surface-muted);
  border-radius: var(--radius-md);
}

/* 3. Кнопки — плоский акцент вместо градиента и оранжевого свечения */
.primary-button,
.secondary-button,
.small-button {
  border-radius: var(--radius-sm) !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
  font-weight: 600;
}
.primary-button {
  background: var(--accent) !important;
  box-shadow: none !important;
}
.primary-button:hover {
  background: var(--orange-deep) !important;
  transform: none !important;
}
.secondary-button {
  background: var(--surface-strong) !important;
  border: 1px solid var(--line-strong) !important;
}
.secondary-button:hover {
  background: var(--surface-muted) !important;
  border-color: var(--muted) !important;
  transform: none !important;
}
/* Спокойный индикатор загрузки вместо «бегущего блика» */
.primary-button.is-busy::after,
.secondary-button.is-busy::after {
  animation: none !important;
  background: none !important;
}
.primary-button.is-busy,
.secondary-button.is-busy { opacity: 0.65; }

/* 4. Аватар и логотип — плоский фон, без свечения */
.admin-profile__avatar,
.brand-mark {
  background: var(--accent) !important;
  box-shadow: none !important;
  border-radius: var(--radius-md) !important;
}

/* 5. Фон тела — ровный, без светящихся углов */
body { background: var(--bg) !important; }

/* 6. Скругления приводим к новой шкале */
.hero,
.login-card,
.table-card,
.panel { border-radius: var(--radius-lg) !important; }
.metric-card,
.dashboard-card,
.summary-card,
.settings-card,
.roadmap-card,
.editor-card,
.modal__dialog,
.bot-drawer { border-radius: var(--radius-lg) !important; }
.nav-link { border-radius: var(--radius-sm) !important; }

/* 7. Навигация — чёткое активное состояние слева, тонкая и спокойная */
.nav-link {
  transition: background-color 0.12s ease, color 0.12s ease !important;
}
.nav-link.is-active {
  background: var(--accent-soft) !important;
  color: var(--text) !important;
  box-shadow: inset 2px 0 0 var(--accent) !important;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* 8. Таблицы — плотнее, с разделителями, zebra и hover на строках */
table { min-width: 640px; }
th {
  position: sticky;
  top: 0;
  background: var(--surface-strong);
  z-index: 1;
}
th, td { padding: 10px 14px !important; }
tbody tr { transition: background-color 0.1s ease; }
tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }
tbody tr:hover td { background: rgba(255, 255, 255, 0.04); }

/* 9. Поля ввода — единый стиль + видимый фокус (раньше :focus почти не было) */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="date"],
select,
textarea {
  background: var(--surface-dark);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-link:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
input::placeholder, textarea::placeholder { color: var(--muted); }

/* 10. Тэги/бейджи статусов — приглушённые «soft» цвета вместо ярких заливок */
.dashboard-card__tag {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* 11. Модалки — спокойный затемнённый фон без сильного блюра */
.modal__backdrop {
  background: rgba(2, 6, 14, 0.62) !important;
}
.modal__dialog {
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}

/* 12. Глобально тише все переходы и убираем «парящие» сдвиги при hover */
* { transition-duration: 0.12s; }

/* 13. Мягкое появление контента — убираем «резкое» мигание при рендере.
   Панель и карточки плавно проявляются вместо мгновенной подмены DOM. */
.panel.is-active { animation: admin-fade-in 0.18s ease both; }
.metric-card,
.dashboard-card { animation: admin-fade-in 0.2s ease both; }
@keyframes admin-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .panel.is-active,
  .metric-card,
  .dashboard-card { animation: none; }
}

/* ===== Пополнения (deposits) ===== */
.deposits-table .deposit-row--expandable {
  cursor: pointer;
}

.deposits-table .deposit-row--expandable:hover {
  background: rgba(255, 255, 255, 0.03);
}

.deposits-table .deposit-row.is-expanded {
  background: rgba(255, 255, 255, 0.04);
}

.deposits-table .deposit-row.is-expanded > td {
  border-bottom-color: transparent;
}

.deposit-proof-flag {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.deposit-proof-flag.is-attached {
  color: #4ea876;
  font-weight: 600;
}

.deposit-detail-row > td {
  padding: 0;
  background: rgba(0, 0, 0, 0.2);
}

.deposit-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px;
  padding: 18px 20px 22px;
}

.deposit-detail__info {
  display: grid;
  gap: 12px;
  align-content: start;
}

.deposit-field {
  display: grid;
  gap: 3px;
}

.deposit-field__label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.deposit-field__value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.deposit-detail__proof {
  display: grid;
  gap: 8px;
  align-content: start;
}

.deposit-detail__proof-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.deposit-proof-link {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b0b0b;
  text-decoration: none;
}

.deposit-proof-img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  background: #0b0b0b;
}

.deposit-proof-hint {
  display: block;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}

.deposit-proof-empty {
  display: grid;
  gap: 6px;
  place-items: center;
  padding: 32px 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.deposit-proof-empty span {
  font-size: 26px;
}

.deposit-proof-empty p {
  margin: 0;
  font-size: 13px;
}

@media (max-width: 720px) {
  .deposit-detail {
    grid-template-columns: 1fr;
  }
}
