:root {
  color-scheme: dark;
  --bg: #060713;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f8fbff;
  --muted: #9aa7bd;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f4c76b;
  --danger: #ff6b8a;
  --radius-xl: 34px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 5%, rgba(34, 211, 238, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 8%, rgba(139, 92, 246, 0.22), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(244, 199, 107, 0.12), transparent 26rem),
    var(--bg);
  color: var(--text);
}

a { color: var(--accent-2); text-decoration: none; }
button {
  border: 0;
  border-radius: 16px;
  padding: 0.9rem 1.15rem;
  color: #071018;
  background: linear-gradient(135deg, #ffffff, #c7d2fe 42%, var(--accent-2));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 22px 55px rgba(139, 92, 246, 0.28); }

.shell { display: grid; grid-template-columns: 292px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line);
  padding: 1.35rem;
  background: linear-gradient(180deg, rgba(10, 13, 28, 0.9), rgba(9, 11, 23, 0.62));
  backdrop-filter: blur(28px);
  position: sticky;
  top: 0;
  height: 100vh;
  isolation: isolate;
}
.brand { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 2rem; padding: 0.65rem; color: var(--text); }
.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(34, 211, 238, 0.45);
  box-shadow: 0 18px 50px rgba(34, 211, 238, 0.22);
}
.brand div { min-width: 0; }
.brand strong {
  display: block;
  max-width: 190px;
  line-height: 1.15;
}
.brand strong span, .mobile-topbar strong span { display: block; }
.brand small, .eyebrow, .stat-card span, .hero p { color: var(--muted); }
nav { display: grid; gap: 0.45rem; }
nav a, .logout button {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-weight: 700;
}
nav a:hover, .logout button:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  transform: translateX(2px);
}
.logout button {
  min-width: 112px;
  padding: 0.65rem 0.95rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
}

.sidebar-footer {
  position: absolute;
  left: 1.35rem;
  right: 1.35rem;
  bottom: 1.35rem;
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
}

.sidebar-footer .logout {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.sidebar-footer .logout button {
  width: 100%;
}

button.sidebar-gear,
a.sidebar-gear {
  flex: 0 0 2.95rem;
  width: 2.95rem;
  min-width: 2.95rem;
  max-width: 2.95rem;
  padding: 0.65rem;
  border-radius: 14px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  transform: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

button.sidebar-gear:hover {
  transform: translateY(-1px);
}

a.sidebar-gear {
  transform: none;
}

a.sidebar-gear:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

.mobile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.dialog-appearance-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.88rem;
}
.dialog-appearance-form input[type="password"] {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 0.72rem 0.95rem;
  background: rgba(5, 8, 20, 0.55);
  color: var(--text);
}

.dialog-appearance {
  margin: auto;
  max-width: 420px;
  width: calc(100vw - 2rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0;
  color: var(--text);
  background: linear-gradient(175deg, rgba(18, 22, 42, 0.98), rgba(8, 10, 24, 0.96));
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.52);
}
.dialog-appearance::backdrop {
  background: rgba(5, 6, 12, 0.62);
  backdrop-filter: blur(6px);
}
.dialog-appearance-form {
  padding: 1.35rem 1.5rem;
  display: grid;
  gap: 1rem;
}
.dialog-appearance-form h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.appearance-dialog-lead {
  margin: -0.3rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.48;
}
.dialog-appearance-error {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 107, 138, 0.12);
  border: 1px solid rgba(255, 107, 138, 0.35);
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
}
.dialog-appearance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}
.appearance-html-block {
  width: 100%;
  font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.42;
}

.content {
  padding: 2rem;
  padding-left: max(2rem, env(safe-area-inset-left));
  padding-right: max(2rem, env(safe-area-inset-right));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  max-width: 1520px;
  width: 100%;
}
.hero {
  padding: 2.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045)),
    radial-gradient(circle at 92% 18%, rgba(34, 211, 238, 0.22), transparent 18rem);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  margin-bottom: 1.2rem;
}
.hero.compact { padding: 1.7rem 2rem; }
.hero h1 { margin: 0.35rem 0; font-size: clamp(2rem, 5vw, 4.7rem); line-height: 0.95; letter-spacing: -0.06em; }
.hero.compact h1 { font-size: clamp(1.8rem, 4vw, 3.2rem); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.76rem; font-weight: 900; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat-card, .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}
.stat-card { padding: 1.45rem; position: relative; overflow: hidden; }
.stat-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 110px;
  height: 80px;
  border-radius: 80px 0 24px 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.08));
  opacity: 0.55;
}
.stat-card strong { display: block; margin-top: 0.7rem; font-size: 2rem; letter-spacing: -0.04em; }
.stat-card.accent { background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(34, 211, 238, 0.12)); }

.panel { padding: 1.2rem; overflow-x: auto; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.9rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.badge { padding: 0.32rem 0.65rem; border-radius: 999px; background: rgba(139, 92, 246, 0.18); color: #dbeafe; font-size: 0.82rem; border: 1px solid rgba(255,255,255,0.08); }
.mini { padding: 0.45rem 0.65rem; border-radius: 10px; font-size: 0.8rem; }

label { display: grid; gap: 0.45rem; color: var(--muted); font-weight: 700; margin-bottom: 0.9rem; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.95rem 1rem;
  color: var(--text);
  background: rgba(4, 7, 18, 0.52);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
input:focus, textarea:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.11), inset 0 1px 0 rgba(255,255,255,0.08);
  background: rgba(8, 12, 28, 0.72);
}
textarea { resize: vertical; }
.compose { margin-bottom: 1.2rem; max-width: 760px; }
.compose-note { margin: 0 0 1rem; font-size: 0.93rem; color: var(--muted); line-height: 1.45; max-width: 920px; }
.notify-log-table td:nth-child(n + 4),
.notify-log-table th:nth-child(n + 4) { text-align: right; }
.notify-log-table td:first-child { white-space: nowrap; }
.settings-hero {
  margin-bottom: 1.2rem;
}
.settings-hero > div:first-child {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 2.1rem;
  background:
    radial-gradient(circle at 86% 0%, rgba(139, 92, 246, 0.32), transparent 18rem),
    linear-gradient(135deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}
.settings-hero h1 { margin: 0.35rem 0; font-size: clamp(2.3rem, 6vw, 5.3rem); line-height: 0.92; letter-spacing: -0.075em; }
.settings-hero p { max-width: 720px; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.settings-layout { max-width: 1180px; }
.settings-stack {
  display: grid;
  gap: 1.25rem;
}
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.span-2 { grid-column: 1 / -1; }
.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.105), rgba(255,255,255,0.045));
  box-shadow: 0 24px 70px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(24px);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.card-head h2 { margin: 0.2rem 0 0; letter-spacing: -0.045em; font-size: 1.45rem; }
.status-pill {
  padding: 0.46rem 0.7rem;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.24);
  font-weight: 800;
  font-size: 0.78rem;
}
.timeline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.timeline-grid .span-full {
  grid-column: 1 / -1;
}
.broadcast-inline-grid {
  margin: 0.5rem 0 0.25rem;
}
.field-card {
  margin: 0;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(5, 8, 20, 0.38);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text);
}
.field-card span, .quiet-label { color: var(--muted); }
.field-card span { font-size: 0.88rem; line-height: 1.45; font-weight: 600; }
.datetime-trigger {
  width: 100%;
  text-align: left;
  color: var(--text);
  background: rgba(4, 7, 18, 0.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  margin-top: 0.35rem;
}
.quiet-label { margin-bottom: 1rem; }
.toggle { margin: 0; display: inline-flex; }
.toggle input { display: none; }
.toggle span {
  width: 58px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.18s ease;
}
.toggle span::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}
.toggle input:checked + span { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.toggle input:checked + span::after { transform: translateX(24px); }
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.55rem 0 1rem;
}
.preset-grid button {
  padding: 0.75rem 0.8rem;
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: none;
}
.preset-grid button.is-active {
  color: #071018;
  background: linear-gradient(135deg, #fff, #bfdbfe 45%, var(--accent-2));
}
.condition-box {
  padding: 0.9rem;
  border-radius: 20px;
  background: rgba(5, 8, 20, 0.36);
  border: 1px solid rgba(255,255,255,0.09);
  margin-bottom: 1rem;
}
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: var(--text);
}
.checkbox-line input {
  width: 18px;
  height: 18px;
}
.save-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(139, 92, 246, 0.13));
}
.save-bar div { display: grid; gap: 0.2rem; }
.save-bar span { color: var(--muted); }
.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.settings-stack > .glass-card,
.settings-stack > .settings-form {
  margin: 0;
}
.control-button {
  min-height: 64px;
  font-size: 1rem;
}
.control-button.danger {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 107, 138, 0.92), rgba(139, 92, 246, 0.7));
}
.control-button.success {
  background: linear-gradient(135deg, #fff, #a7f3d0 45%, var(--accent-2));
}

.bot-config-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.2rem;
}
.bot-config-hero > div {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 12%, rgba(34, 211, 238, 0.24), transparent 18rem),
    radial-gradient(circle at 12% 82%, rgba(139, 92, 246, 0.2), transparent 17rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(24px);
}
.bot-config-hero > div:first-child {
  padding: clamp(1.45rem, 3vw, 2.5rem);
}
.bot-config-hero h1 {
  margin: 0.35rem 0;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}
.bot-config-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}
.hero-preview-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  min-height: 220px;
  padding: 1.35rem;
}
.hero-preview-card::before {
  content: "";
  position: absolute;
  inset: 1.2rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035)),
    radial-gradient(circle at 70% 25%, rgba(244, 199, 107, 0.22), transparent 9rem);
  border: 1px dashed rgba(255,255,255,0.16);
}
.hero-preview-card strong,
.hero-preview-card small,
.preview-dot {
  position: relative;
  z-index: 1;
}
.hero-preview-card strong {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}
.hero-preview-card small {
  color: var(--muted);
  margin-top: 0.35rem;
}
.preview-dot {
  width: 54px;
  height: 54px;
  margin-bottom: 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 55px rgba(34, 211, 238, 0.3);
}
.settings-section {
  position: relative;
  overflow: hidden;
  padding: clamp(1.15rem, 2vw, 1.65rem);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.settings-section::after {
  content: "";
  position: absolute;
  right: -58px;
  top: -70px;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 68%);
  pointer-events: none;
}
.settings-section:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.28);
  box-shadow: 0 30px 85px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.section-enter {
  opacity: 0;
  transform: translateY(18px);
  animation: sectionFadeUp 0.55s ease forwards;
}
.section-enter:nth-child(2) { animation-delay: 0.06s; }
.section-enter:nth-child(3) { animation-delay: 0.11s; }
.section-enter:nth-child(4) { animation-delay: 0.16s; }
.section-enter:nth-child(5) { animation-delay: 0.21s; }
.section-enter:nth-child(6) { animation-delay: 0.26s; }
.section-hint {
  max-width: 720px;
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.section-title-block {
  margin-bottom: 1rem;
}
.section-title-block h2 {
  margin: 0.2rem 0 0;
  letter-spacing: -0.045em;
  font-size: 1.45rem;
}
.bot-settings-form {
  gap: 1.2rem;
}
.plans-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.15rem;
}
.tariff-card {
  position: relative;
  padding: 1rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(5, 8, 20, 0.54), rgba(5, 8, 20, 0.32)),
    radial-gradient(circle at 90% 12%, rgba(139, 92, 246, 0.18), transparent 12rem);
  border: 1px solid rgba(255,255,255,0.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.tariff-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.32);
}
.tariff-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.tariff-index {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  border-radius: 999px;
  color: #071018;
  background: linear-gradient(135deg, #fff, #bfdbfe 45%, var(--accent-2));
  font-weight: 900;
}
.danger-mini {
  color: #fff;
  background: rgba(255, 107, 138, 0.18);
  border: 1px solid rgba(255, 107, 138, 0.28);
  box-shadow: none;
}
.danger-mini:hover {
  box-shadow: 0 14px 34px rgba(255, 107, 138, 0.16);
}
.telegram-button-preview {
  padding: 0.85rem 1rem;
  border-radius: 18px;
  color: #071018;
  background: linear-gradient(135deg, #fff, #dbeafe 48%, var(--accent-2));
  font-weight: 900;
  text-align: center;
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.18);
}
.new-plan-form {
  display: grid;
  gap: 0.2rem;
}
.empty-state {
  padding: 1.2rem;
  border: 1px dashed rgba(34, 211, 238, 0.28);
  border-radius: 24px;
  background: rgba(34, 211, 238, 0.07);
  display: grid;
  gap: 0.35rem;
}
.empty-state span {
  color: var(--muted);
}

@keyframes sectionFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.login-body { display: grid; place-items: center; padding: 1rem; }
.login-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 2rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}
.login-card h1 { margin: 0.4rem 0; font-size: 2.4rem; letter-spacing: -0.06em; }
.alert { padding: 0.8rem 1rem; border-radius: 16px; background: rgba(255, 107, 138, 0.16); color: #ffd0da; margin: 1rem 0; border: 1px solid rgba(255,107,138,0.22); }
.success-alert { background: rgba(34, 197, 94, 0.14); color: #bbf7d0; border-color: rgba(34,197,94,0.24); }

.stats-reset-notice { margin: 0 0 1rem; }
.stats-reset-compact {
  margin: 0 0 1rem;
}
.bb-compact {
  padding: 0.42rem 0.75rem;
  font-size: 0.84rem;
  white-space: nowrap;
}
.stats-reset-eyebrow { color: #f87171; }
.stats-reset-dialog { max-width: 28rem; }
.stats-reset-list {
  margin: 0.75rem 0;
  padding-left: 1.2rem;
  color: #ffd0da;
  line-height: 1.55;
}
.stats-reset-list strong { color: #fff; font-variant-numeric: tabular-nums; }
.stats-reset-keep { margin: 0 0 0.5rem; color: #bbf7d0; font-size: 0.92rem; line-height: 1.5; }
.stats-reset-warn {
  margin: 0 0 1rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 107, 138, 0.1);
  border: 1px solid rgba(255, 107, 138, 0.28);
  color: #ffd0da;
  font-size: 0.9rem;
  line-height: 1.45;
}
.muted-copy { color: var(--muted); line-height: 1.55; margin: 0 0 1rem; }
.info-card {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(5, 8, 20, 0.36);
  border: 1px solid rgba(255,255,255,0.09);
  display: grid;
  gap: 0.35rem;
}
.info-card span { color: var(--muted); line-height: 1.45; }
.mobile-topbar, .mobile-backdrop { display: none; }
.mobile-title { color: var(--text); }
.mobile-menu-button { box-shadow: none; }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 1rem;
}
.charts-column { display: grid; gap: 1rem; }
.chart-panel h2 { margin: 0 0 1rem; }
.metric-list { display: grid; gap: 0.85rem; }
.metric-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  color: var(--muted);
}
.metric-row i {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.metric-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.metric-row strong { color: var(--text); font-size: 0.86rem; white-space: nowrap; }
.date-filter {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.date-filter-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  min-width: 0;
}
.date-filter-field {
  margin: 0;
  min-width: 0;
}
.date-filter-field input[type="date"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.72rem 0.65rem;
  border-radius: 14px;
}
.date-filter-submit {
  align-self: flex-start;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
}
/* Узкая колонка графиков при двухколоночном дашборде */
.chart-panel .date-filter-fields {
  grid-template-columns: 1fr;
}
@media (max-width: 900px) {
  .chart-panel .date-filter-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.chart-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.chart-summary div {
  padding: 0.8rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.chart-summary span { display: block; color: var(--muted); font-size: 0.78rem; margin-bottom: 0.25rem; }
.chart-summary strong { font-size: 1.2rem; }
.empty-note { color: var(--muted); margin: 0; }
.photo-preview {
  width: min(360px, 100%);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}
.photo-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.calendar-popover {
  position: fixed;
  z-index: 5;
  width: min(340px, calc(100vw - 24px));
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(10, 13, 28, 0.96);
  box-shadow: 0 26px 80px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(24px);
  display: none;
}
.calendar-popover.is-open { display: block; }
.calendar-head, .calendar-actions, .time-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.calendar-head strong { letter-spacing: -0.03em; }
.calendar-head button, .calendar-actions button {
  padding: 0.55rem 0.7rem;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  box-shadow: none;
}
.calendar-week, .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.calendar-week span {
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
}
.calendar-grid button {
  padding: 0.55rem 0;
  color: var(--text);
  background: rgba(255,255,255,0.055);
  border: 1px solid transparent;
  box-shadow: none;
}
.calendar-grid button.is-selected {
  color: #071018;
  background: linear-gradient(135deg, #fff, var(--accent-2));
}
.time-grid {
  margin: 0.9rem 0;
}
.time-grid label { flex: 1; margin: 0; }
.time-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  color: var(--text);
  background: #0b1022;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .mobile-topbar {
    display: flex;
    position: fixed;
    z-index: 70;
    left: 0;
    right: 0;
    top: 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.75rem
      max(1rem, env(safe-area-inset-left));
    background: rgba(6, 7, 19, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(22px);
  }
  .mobile-topbar strong {
    font-size: 0.95rem;
    line-height: 1.15;
    max-width: 230px;
  }
  .mobile-menu-button {
    padding: 0.65rem 0.85rem;
    flex: 0 0 auto;
  }
  .mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(0,0,0,0.54);
    backdrop-filter: blur(6px);
  }
  body.menu-open .mobile-backdrop { display: block; }
  .sidebar {
    position: fixed;
    z-index: 90;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(330px, 86vw);
    height: 100vh;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
  }
  body.menu-open .mobile-topbar {
    opacity: 0;
    pointer-events: none;
  }
  body.menu-open .sidebar { transform: translateX(0); }
  .shell .sidebar nav.sidebar-nav {
    margin-bottom: 1rem;
  }
  .sidebar-footer {
    position: static;
    margin-top: 0.85rem;
  }
  .content { padding-top: 5rem; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .settings-hero { grid-template-columns: 1fr; }
  .bot-config-hero { grid-template-columns: 1fr; }
  .settings-form { grid-template-columns: 1fr; }
  .control-grid { grid-template-columns: 1fr; }
  .plans-admin-grid { grid-template-columns: 1fr; }
  .settings-stack { gap: 1rem; }
  .span-2 { grid-column: auto; }
  .panel { overflow-x: visible; }
  /* Карточные таблицы на мобилке ломают редактируемые <th>; в режиме правки держим обычную таблицу */
  body.aui-edit-mode .panel table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
  }
  body.aui-edit-mode .panel thead { display: table-header-group; }
  body.aui-edit-mode .panel tbody { display: table-row-group; }
  body.aui-edit-mode .panel tr { display: table-row; padding: 0; border: 0; background: transparent; border-radius: 0; }
  body.aui-edit-mode .panel th,
  body.aui-edit-mode .panel td {
    display: table-cell;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    white-space: normal;
  }
  body.aui-edit-mode .panel td::before {
    content: none;
    display: none;
  }

  body:not(.aui-edit-mode) table,
  body:not(.aui-edit-mode) thead,
  body:not(.aui-edit-mode) tbody,
  body:not(.aui-edit-mode) tr,
  body:not(.aui-edit-mode) th,
  body:not(.aui-edit-mode) td { display: block; }
  body:not(.aui-edit-mode) thead { display: none; }
  body:not(.aui-edit-mode) tbody { display: grid; gap: 0.8rem; }
  body:not(.aui-edit-mode) tr {
    padding: 0.85rem;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;
    background: rgba(5, 8, 20, 0.34);
  }
  body:not(.aui-edit-mode) td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    white-space: normal;
    word-break: break-word;
  }
  body:not(.aui-edit-mode) td:last-child { border-bottom: 0; }
  body:not(.aui-edit-mode) td .badge {
    justify-self: start;
    display: inline-flex;
    width: auto;
    max-width: max-content;
  }
  body:not(.aui-edit-mode) td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 900;
  }
}

@media (max-width: 560px) {
  .content {
    padding: 1rem;
    padding-top: max(5rem, calc(4rem + env(safe-area-inset-top)));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .stats-grid { grid-template-columns: 1fr; }
  .timeline-grid { grid-template-columns: 1fr; }
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .save-bar { align-items: stretch; flex-direction: column; }
  .metric-row { grid-template-columns: 48px 1fr auto; }
  .date-filter-fields { grid-template-columns: 1fr; }
  .date-filter-submit { width: 100%; align-self: stretch; }
  body:not(.aui-edit-mode) td { grid-template-columns: 96px minmax(0, 1fr); }
  .hero h1, .settings-hero h1 { font-size: clamp(2rem, 13vw, 3.2rem); }
}

/* Modern bot settings page */
.bot-settings-surface {
  width: 100%;
  color: #f5f5f5;
}
.bot-settings-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(0.2rem, 1vw, 0.8rem);
}
.bot-settings-surface .bot-config-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(1rem, 2.2vw, 2rem);
  align-items: stretch;
  min-height: 430px;
  padding: clamp(1.25rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: #050505;
  box-shadow: 0 34px 90px rgba(0,0,0,0.42);
  overflow: hidden;
}
.bot-settings-surface .hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(0.4rem, 2vw, 1.2rem);
}
.bot-settings-surface .eyebrow {
  color: #a3a3a3;
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 0.82rem;
  font-weight: 800;
}
.bot-settings-surface .bot-config-hero h1 {
  max-width: 620px;
  margin: 0.65rem 0 1.15rem;
  color: #fff;
  font-size: clamp(3rem, 7vw, 5.7rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}
.bot-settings-surface .bot-config-hero p {
  max-width: 610px;
  color: #b8b8b8;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.62;
}
.bot-settings-surface .hero-preview-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: clamp(1rem, 2.4vw, 2rem);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 74% 18%, rgba(255,255,255,0.12), transparent 12rem),
    linear-gradient(145deg, #151515, #0b0b0b);
  overflow: hidden;
}
.bot-settings-surface .hero-preview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 58% 45%, #000, transparent 68%);
  opacity: 0.55;
}
.mini-window {
  position: relative;
  z-index: 1;
  width: min(390px, 100%);
  padding: 1.15rem;
  border-radius: 18px;
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 28px 80px rgba(0,0,0,0.45);
}
.mini-window > span {
  color: #a3a3a3;
  font-size: 0.86rem;
  font-weight: 800;
}
.mini-window strong {
  display: block;
  margin: 0.8rem 0 1rem;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.mini-input {
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-radius: 12px;
  color: #bdbdbd;
  background: #171717;
}
.mini-input b { color: #fff; }
.mini-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.mini-row span {
  padding: 0.9rem;
  border-radius: 12px;
  color: #e8e8e8;
  background: #171717;
  font-weight: 800;
}
.mini-window button,
.bot-settings-surface button {
  background: #f4f4f4;
  color: #050505;
  box-shadow: none;
  border-radius: 12px;
}
.bot-accordion-list,
.bot-settings-form {
  display: grid;
  gap: 0.85rem;
}
.settings-accordion {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: #070707;
  box-shadow: 0 18px 58px rgba(0,0,0,0.24);
  overflow: hidden;
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}
.settings-accordion:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.18);
  background: #0a0a0a;
}
.settings-accordion[open] {
  border-color: rgba(255,255,255,0.22);
  background: #0a0a0a;
}
.settings-accordion summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: clamp(1rem, 2vw, 1.35rem);
  cursor: pointer;
  list-style: none;
}
.settings-accordion summary::-webkit-details-marker { display: none; }
.accordion-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #050505;
  background: #f4f4f4;
  font-weight: 900;
  font-size: 0.84rem;
}
.accordion-title {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}
.accordion-title strong {
  color: #fff;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.accordion-title small {
  color: #9c9c9c;
  line-height: 1.45;
}
.accordion-status {
  justify-self: end;
  white-space: nowrap;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: #d8d8d8;
  background: #171717;
  border: 1px solid rgba(255,255,255,0.08);
  font-weight: 800;
  font-size: 0.82rem;
}
.accordion-chevron {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #171717;
  position: relative;
  transition: transform 0.22s ease, background 0.22s ease;
}
.accordion-chevron::before,
.accordion-chevron::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 18px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: #f5f5f5;
}
.accordion-chevron::after {
  transform: rotate(90deg);
  transition: transform 0.22s ease;
}
.settings-accordion[open] .accordion-chevron {
  background: #f4f4f4;
  transform: rotate(180deg);
}
.settings-accordion[open] .accordion-chevron::before,
.settings-accordion[open] .accordion-chevron::after {
  background: #050505;
}
.settings-accordion[open] .accordion-chevron::after {
  transform: rotate(0deg);
}
.accordion-panel {
  padding: 0 clamp(1rem, 2vw, 1.35rem) clamp(1rem, 2vw, 1.35rem);
  animation: accordionFade 0.24s ease;
}
.accordion-panel::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 1.15rem;
  background: rgba(255,255,255,0.08);
}
.accordion-switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}
.bot-settings-surface label,
.bot-settings-surface .quiet-label {
  color: #a8a8a8;
  font-weight: 800;
}
.bot-settings-surface input,
.bot-settings-surface textarea {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  color: #fff;
  background: #171717;
  box-shadow: none;
}
.bot-settings-surface input:focus,
.bot-settings-surface textarea:focus {
  border-color: rgba(255,255,255,0.28);
  background: #1f1f1f;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.06);
}
.bot-settings-surface .info-card,
.bot-settings-surface .tariff-card,
.bot-settings-surface .empty-state {
  border-color: rgba(255,255,255,0.08);
  border-radius: 16px;
  background: #111;
  box-shadow: none;
}
.bot-settings-surface .tariff-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.2);
}
.bot-settings-surface .tariff-index,
.bot-settings-surface .telegram-button-preview {
  color: #050505;
  background: #f4f4f4;
  box-shadow: none;
}
.bot-settings-surface .danger-mini,
.bot-settings-surface .control-button.danger {
  color: #fff;
  background: #3a1118;
  border: 1px solid rgba(255, 107, 138, 0.28);
}
.bot-settings-surface .control-button.success {
  color: #050505;
  background: #f4f4f4;
}
.bot-settings-surface .muted-copy,
.bot-settings-surface .info-card span,
.bot-settings-surface .save-bar span {
  color: #9c9c9c;
}
.bot-settings-surface .save-bar {
  position: sticky;
  bottom: 1rem;
  z-index: 4;
  margin-top: 0.3rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  background: rgba(12,12,12,0.86);
  backdrop-filter: blur(18px);
}
.bot-settings-surface .save-bar button {
  min-height: 54px;
  padding-inline: 1.3rem;
}
.bot-settings-surface .toggle span {
  background: #202020;
  border-color: rgba(255,255,255,0.12);
}
.bot-settings-surface .toggle input:checked + span {
  background: #f4f4f4;
}
.bot-settings-surface .toggle input:checked + span::after {
  background: #050505;
}
.bot-settings-surface .photo-preview {
  border-color: rgba(255,255,255,0.1);
  border-radius: 16px;
}

@keyframes accordionFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .bot-settings-surface .bot-config-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .bot-settings-surface .hero-preview-card {
    min-height: 260px;
  }
  .settings-accordion summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .accordion-status {
    display: none;
  }
}

@media (max-width: 640px) {
  .bot-settings-shell {
    padding: 0;
  }
  .bot-settings-surface .bot-config-hero {
    padding: 1rem;
    border-radius: 16px;
  }
  .settings-accordion summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .accordion-number {
    display: none;
  }
  .accordion-switch-row,
  .mini-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   BENTO SETTINGS PAGE
   ============================================================ */
.bento-page {
  max-width: 1200px;
  padding-bottom: 5rem;
}

/* --- spotlight glow on every bento-item --- */
.bento-item {
  position: relative;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  background: #080808;
  overflow: hidden;
  transition: border-color .2s ease;
}
.bento-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    700px circle at var(--mouse-x, -9999px) var(--mouse-y, -9999px),
    rgba(255,255,255,0.055),
    transparent 40%
  );
  opacity: 0;
  transition: opacity .35s ease;
}
.bento-item:hover::before { opacity: 1; }
.bento-item:hover { border-color: rgba(255,255,255,0.14); }
.bento-item > * { position: relative; z-index: 1; }

/* --- hero grid --- */
.bento-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: .9rem;
  margin-bottom: .9rem;
}
.bento-hero-main {
  grid-column: span 2;
  grid-row: span 2;
  padding: clamp(1.5rem,3vw,2.6rem);
  background: #060606;
}
.bento-stat-card,
.bento-status-card,
.bento-quickctrl-card { padding: 1.25rem; }

.bento-eyebrow {
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #444;
}
.bento-h1 {
  color: #fff;
  font-size: clamp(3.4rem,7vw,6.2rem);
  line-height: .9;
  letter-spacing: -.075em;
  margin: .65rem 0 1.1rem;
}
.bento-desc {
  color: #555;
  font-size: clamp(.95rem,1.5vw,1.06rem);
  line-height: 1.62;
  max-width: 540px;
}

.bento-stat-label {
  display: block;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: .4rem;
}
.bento-stat-val {
  display: block;
  font-size: clamp(3rem,6vw,5.2rem);
  color: #fff;
  line-height: .92;
  letter-spacing: -.07em;
  margin-bottom: .3rem;
}
.bento-stat-sub { color: #444; font-size: .82rem; }

.bento-status-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: .7rem 0 .55rem;
}
.dot-on  { background: #22c55e; box-shadow: 0 0 16px rgba(34,197,94,.5); }
.dot-off { background: #ef4444; box-shadow: 0 0 16px rgba(239,68,68,.5); }
.bento-status-text {
  display: block;
  font-size: clamp(1.55rem,3vw,2.35rem);
  color: #fff;
  letter-spacing: -.05em;
  line-height: 1;
}

.bento-quick-form { display: grid; gap: .6rem; margin-top: .75rem; }

/* --- buttons (bb = bento button) --- */
.bb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .78rem 1.1rem;
  border-radius: 12px;
  border: 0;
  font-weight: 800;
  font-size: .88rem;
  cursor: pointer;
  width: 100%;
  transition: opacity .18s ease, transform .18s ease;
}
.bb:hover { opacity: .8; transform: translateY(-1px); }
.bb-white  { background: #f0f0f0; color: #080808; box-shadow: 0 10px 36px rgba(240,240,240,.12); }
.bb-ghost  { background: rgba(255,255,255,.07); color: #d0d0d0; border: 1px solid rgba(255,255,255,.09); }
.bb-danger { background: rgba(239,68,68,.14); color: #f87171; border: 1px solid rgba(239,68,68,.24); }
.bb-ghost-danger { background: transparent; color: #f87171; border: 1px solid rgba(239,68,68,.22); width: auto; padding: .42rem .7rem; font-size: .8rem; }

/* --- accordion list --- */
.bento-sections,
.bento-main-form {
  display: grid;
  gap: .75rem;
}
.bento-acc[open] { border-color: rgba(255,255,255,.16); }

.bento-acc-head {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto auto;
  gap: .9rem;
  align-items: center;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.bento-acc-head::-webkit-details-marker { display: none; }

.bento-acc-n {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.09);
  font-size: .74rem;
  font-weight: 900;
  color: #444;
}
.bento-acc-text { display: grid; gap: .18rem; }
.bento-acc-text strong {
  font-size: clamp(1rem,2vw,1.22rem);
  color: #e0e0e0;
  letter-spacing: -.03em;
}
.bento-acc-text span { font-size: .84rem; color: #555; }

.bento-badge {
  padding: .42rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  font-size: .76rem;
  font-weight: 800;
  color: #777;
  white-space: nowrap;
}

.bento-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  position: relative;
  transition: transform .22s ease, background .22s ease;
  flex-shrink: 0;
}
.bento-arrow::before,
.bento-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: #666;
  transition: transform .22s ease, background .22s ease;
}
.bento-arrow::before { transform: translate(-50%,-50%) rotate(-45deg) translateX(3px); }
.bento-arrow::after  { transform: translate(-50%,-50%) rotate(45deg)  translateX(-3px); }
details[open] .bento-arrow { background: rgba(255,255,255,.1); transform: rotate(90deg); }
details[open] .bento-arrow::before,
details[open] .bento-arrow::after { background: #ccc; }

.bento-acc-body {
  padding: 0 1.3rem 1.3rem;
  animation: bento-fadein .22s ease;
}
.bento-acc-body::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 1.1rem;
  background: rgba(255,255,255,.06);
}
@keyframes bento-fadein {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- form grid --- */
.bento-fg { display: grid; gap: .8rem; }
.bento-fg.two-col { grid-template-columns: repeat(2,minmax(0,1fr)); }
.span-full { grid-column: 1/-1; }

.bl {
  display: grid;
  gap: .42rem;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #555;
}
.bl input,
.bl textarea {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: .82rem .95rem;
  color: #e0e0e0;
  background: #0f0f0f;
  font-size: .94rem;
  box-shadow: none;
  transition: border-color .18s ease, background .18s ease;
}
.bl input:focus,
.bl textarea:focus {
  border-color: rgba(255,255,255,.24);
  background: #151515;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.05);
}
.bl input[type="file"] { padding: .6rem .8rem; color: #666; }

.bento-switchrow {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: .9rem;
}
.bento-muted { color: #555; font-size: .9rem; line-height: 1.55; margin: 0; }

.bento-infobox {
  padding: .9rem 1rem;
  border-radius: 14px;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,.07);
}
.bento-infobox strong { display: block; color: #aaa; font-size: .86rem; margin-bottom: .3rem; }
.bento-infobox p { color: #555; font-size: .82rem; margin: 0; line-height: 1.5; }

/* toggle overrides inside bento */
.bento-acc-body .toggle span { background: #1a1a1a; border-color: rgba(255,255,255,.1); }
.bento-acc-body .toggle input:checked + span { background: #e8e8e8; }
.bento-acc-body .toggle input:checked + span::after { background: #080808; }

/* --- tariff cards --- */
.bento-tariff-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .85rem;
  margin-bottom: 1rem;
}
.bento-tariff-card {
  padding: .95rem;
  border-radius: 16px;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,.08);
  transition: border-color .2s ease;
}
.bento-tariff-card:hover { border-color: rgba(255,255,255,.18); }
.bento-tariff-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.bento-tariff-idx {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  color: #bbb;
  font-size: .76rem;
  font-weight: 900;
}
.bento-tg-preview {
  margin-top: .7rem;
  padding: .65rem .9rem;
  border-radius: 11px;
  background: #e8e8e8;
  color: #080808;
  font-weight: 800;
  font-size: .86rem;
  text-align: center;
}
.bento-empty {
  grid-column: 1/-1;
  padding: 1.2rem;
  border: 1px dashed rgba(255,255,255,.1);
  border-radius: 16px;
  display: grid;
  gap: .35rem;
}
.bento-empty strong { color: #666; }
.bento-empty span   { color: #444; font-size: .86rem; }

.bento-divider {
  margin: 1.1rem 0 .8rem;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #3a3a3a;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.bento-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.06); }

.bento-checkline {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .84rem;
  font-weight: 700;
  color: #666;
  text-transform: none;
  letter-spacing: 0;
}
.bento-checkline input { width: 16px; height: 16px; }

.bento-photo-preview {
  width: min(320px,100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: .85rem;
}
.bento-photo-preview img { display: block; width: 100%; height: auto; }

/* --- save bar --- */
.bento-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.3rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(10,10,10,.88);
  backdrop-filter: blur(18px);
  position: sticky;
  bottom: 1rem;
  z-index: 5;
  margin-top: .3rem;
}
.bento-save-info { display: grid; gap: .15rem; }
.bento-save-info strong { color: #d8d8d8; font-size: .92rem; }
.bento-save-info span   { color: #484848; font-size: .8rem; }
.bento-save-btn { min-height: 50px; padding-inline: 1.4rem; width: auto; }

/* --- alerts --- */
.bento-alert {
  padding: .8rem 1rem;
  margin-bottom: .85rem;
  border-radius: 14px;
  background: rgba(239,68,68,.1);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.22);
  font-size: .9rem;
}
.bento-alert-ok { background: rgba(34,197,94,.1); color: #86efac; border-color: rgba(34,197,94,.22); }

.bento-valign-end { display: flex; align-items: flex-end; }

/* --- responsive --- */
@media (max-width: 900px) {
  .bento-hero-grid { grid-template-columns: 1fr 1fr; }
  .bento-hero-main { grid-column: 1/-1; grid-row: auto; }
  .bento-tariff-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bento-hero-grid { grid-template-columns: 1fr; }
  .bento-acc-head { grid-template-columns: minmax(0,1fr) auto; }
  .bento-acc-n { display: none; }
  .bento-badge { display: none; }
  .bento-fg.two-col { grid-template-columns: 1fr; }
  .bento-save-bar { flex-direction: column; align-items: stretch; }
  .bento-save-btn { width: 100%; }
}

/* ============================================================
   BENTO v3 — gray, no-glow, solid buttons
   ============================================================ */

/* remove spotlight pseudo */
.bento-item::before { display: none !important; }

/* gray card surfaces */
.bento-item {
  background: #1e1e21;
  border-color: rgba(255,255,255,0.09);
  border-radius: 16px;
}
.bento-item:hover { border-color: rgba(255,255,255,0.16); }
.bento-hero-main  { background: #17171a; }
.bento-stat-card,
.bento-status-card,
.bento-quickctrl-card { background: #1e1e21; }

/* remove status dot glows */
.dot-on  { background: #22c55e; box-shadow: none; }
.dot-off { background: #ef4444; box-shadow: none; }

/* accordion cards */
.bento-acc              { background: #1e1e21; }
.bento-acc[open]        { background: #1e1e21; border-color: rgba(255,255,255,0.15); }
.bento-acc:not([open]):hover { border-color: rgba(255,255,255,0.14); }

/* inputs */
.bl input,
.bl textarea {
  background: #2a2a2e;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  color: #e0e0e0;
  box-shadow: none;
}
.bl input:focus,
.bl textarea:focus {
  background: #313136;
  border-color: rgba(255,255,255,0.22);
  box-shadow: none;
  outline: none;
}
.bl input[type="file"] { color: #888; padding: .55rem .8rem; }

/* nested info / tariff cards */
.bento-infobox  { background: #272729; border-color: rgba(255,255,255,0.08); box-shadow: none; }
.bento-tariff-card { background: #272729; border-color: rgba(255,255,255,0.09); box-shadow: none; }
.bento-tariff-card:hover { border-color: rgba(255,255,255,0.2); }

/* toggle overrides */
.bento-acc-body .toggle span { background: #2e2e32; border-color: rgba(255,255,255,0.12); }
.bento-acc-body .toggle input:checked + span { background: #22c55e; }
.bento-acc-body .toggle input:checked + span::after { background: #fff; }

/* ---- SOLID BUTTONS (bb = bento button) ---- */
.bb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  padding: .76rem 1.1rem;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  width: 100%;
  transition: filter .16s ease, transform .16s ease;
  box-shadow: none;
}
.bb:hover { filter: brightness(1.08); transform: translateY(-1px); opacity: 1; }

.bb-white { background: #f0f0f0; color: #111; }
.bb-green { background: #22c55e; color: #fff; }
.bb-red   { background: #ef4444; color: #fff; }
.bb-ghost { background: #2a2a2e; color: #c8c8c8; border: 1px solid rgba(255,255,255,0.1); }

/* save bar */
.bento-save-bar {
  background: #1e1e21;
  border-color: rgba(255,255,255,0.1);
  backdrop-filter: none;
}
.bento-save-info strong { color: #d8d8d8; }
.bento-save-info span   { color: #555; }
.bento-save-btn { min-height: 46px; padding-inline: 1.4rem; width: auto; }

/* ---- TRASH BUTTON ---- */
.bento-trash-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.22);
  color: #f87171;
  cursor: pointer;
  padding: 0;
  transition: background .16s ease;
  box-shadow: none;
}
.bento-trash-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: none;
  opacity: 1;
  filter: none;
}

/* ---- ADD CARD ---- */
.bento-tariff-add-card {
  border: 1.5px dashed rgba(255,255,255,0.13);
  border-radius: 14px;
  background: #1e1e21;
  min-height: 160px;
  display: flex;
  flex-direction: column;
}
.bento-add-idle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bento-add-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  font-weight: 700;
  font-size: .86rem;
  padding: 1.4rem;
  width: 100%;
  transition: color .2s ease;
  box-shadow: none;
}
.bento-add-trigger:hover { color: #bbb; transform: none; filter: none; opacity: 1; }
.bento-add-plus {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,0.2);
  font-size: 1.55rem;
  color: #555;
  line-height: 1;
  transition: border-color .2s ease, color .2s ease;
}
.bento-add-trigger:hover .bento-add-plus {
  border-color: rgba(255,255,255,0.4);
  color: #ccc;
}
.bento-add-form { padding: 1rem; display: flex; flex-direction: column; }
.bento-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .8rem;
}
.bento-add-header strong { color: #d0d0d0; font-size: .94rem; }
.bento-add-close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #888;
  cursor: pointer;
  font-size: .78rem;
  padding: 0;
  box-shadow: none;
  transition: background .16s ease;
  /* override .bb */
  width: 26px !important;
}
.bento-add-close:hover { background: rgba(255,255,255,0.14); transform: none; filter: none; opacity: 1; }

/* hero heading */
.bento-h1 { letter-spacing: -.07em; line-height: .9; }
.bento-desc { color: #666; }
.bento-eyebrow { color: #555; }

/* bento-tg-preview solid */
.bento-tg-preview { background: #e8e8e8; color: #111; box-shadow: none; }

/* alerts */
.bento-alert { box-shadow: none; }
.bento-alert-ok { background: rgba(34,197,94,.12); color: #86efac; border-color: rgba(34,197,94,.22); }

/* ==================== BENTO v4 — arrows, tooltips, no-glow, link-buttons ==================== */

/* Hero grid: 3 cards (no quick-actions card) */
.bento-hero-grid {
  grid-template-columns: 1.6fr 1fr !important;
  grid-template-rows: auto auto;
}
.bento-hero-main { grid-column: 1 !important; grid-row: span 2 !important; }
.bento-stat-card  { grid-column: 2; grid-row: 1; }
.bento-status-card{ grid-column: 2; grid-row: 2; }

/* ---- Clean chevron arrow ---- */
.bento-arrow {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background .2s ease;
  position: static !important;
  transform: none !important;
}
.bento-arrow::before { display: none !important; }
.bento-arrow::after {
  content: "";
  display: block;
  width: 8px; height: 8px;
  border-right: 2px solid #777;
  border-bottom: 2px solid #777;
  transform: rotate(45deg);
  margin-top: -3px;
  background: none !important;
  position: static !important;
  transition: transform .22s ease, border-color .22s ease;
}
details[open] .bento-arrow            { background: rgba(255,255,255,.12); }
details[open] .bento-arrow::after     { transform: rotate(-135deg); margin-top: 3px; border-color: #ccc; }

/* ---- Подсказки (?): показ через JS (#admin-tooltip-layer), не через ::after — иначе обрезает overflow у карточек ---- */
.bl-tip {
  display: inline-grid;
  place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.12);
  color: #777;
  font-size: .65rem;
  font-weight: 900;
  cursor: help;
  flex-shrink: 0;
  position: relative;
  transition: background .15s ease, color .15s ease;
  outline: none;
}
.bl-tip:hover,
.bl-tip:focus-visible,
.bl-tip.is-tip-open {
  background: rgba(255,255,255,.18);
  color: #eee;
}
.bl-tip::after {
  display: none !important;
  content: none !important;
}

.bl-tip-marker {
  cursor: default;
  margin-top: 0.12rem;
}
.aui-tip-edit-inline {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  flex: 1 1 100%;
  min-width: min(100%, 12rem);
  max-width: 100%;
}
textarea.aui-tip-editor {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.38;
  min-height: 2.5rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}
.bl-title:has(.aui-tip-edit-inline) {
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

#admin-tooltip-layer {
  display: none;
  position: fixed;
  z-index: 6;
  left: 0;
  top: 0;
  box-sizing: border-box;
  max-width: min(400px, calc(100vw - 24px));
  padding: 10px 14px;
  background: #232328;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  color: #e8e8ec;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.48;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  pointer-events: none;
  box-shadow: 0 12px 40px rgba(0,0,0,.55), 0 0 1px rgba(0,0,0,.8);
}

#admin-tooltip-layer.is-visible { display: block; }

/* ---- Label row above fields ---- */
.bl-title {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #888;
}

/* ---- Bot control row ---- */
.bento-ctrl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}

/* ---- Custom URL buttons list ---- */
.bento-custom-btns-list {
  display: grid;
  gap: .5rem;
  margin-bottom: 1rem;
}
.bento-custom-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .78rem 1rem;
  border-radius: 12px;
  background: #252527;
  border: 1px solid rgba(255,255,255,.08);
}
.bento-custom-btn-info {
  display: grid;
  gap: .18rem;
  min-width: 0;
  flex: 1;
}
.bento-custom-btn-info strong { color: #e0e0e0; font-size: .92rem; }
.bento-custom-btn-info a {
  color: #777;
  font-size: .78rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bento-custom-btn-info a:hover { color: #aaa; }

/* ---- Remove ALL hover glows ---- */
.bento-item:hover,
.bento-acc:hover,
.bento-tariff-card:hover,
.bento-stat-card:hover,
.bento-status-card:hover,
.bento-hero-main:hover {
  box-shadow: none !important;
  filter: none !important;
}
.bb:hover {
  filter: brightness(1.06) !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
.bento-trash-btn:hover {
  filter: brightness(1.1) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Make sure .bl label works with .bl-title child */
.bl > .bl-title { display: inline-flex; }

/* span-full helper in two-col grid */
.bento-fg.two-col .span-full { grid-column: span 2; }

/* ==================== BENTO v5 — bigger, tooltip-fix, inline add-tariff ==================== */

/* ---- Larger spacing/typography across settings ---- */
.bento-acc > summary.bento-acc-head { padding: 1.45rem 1.6rem; gap: 1.05rem; }
.bento-acc-head .bento-acc-n        { width: 38px; height: 38px; font-size: .92rem; }
.bento-acc-head strong              { font-size: 1.08rem; }
.bento-acc-head .bento-acc-text > span { font-size: .85rem; }
.bento-badge                        { padding: .42rem .85rem; font-size: .78rem; }
.bento-acc-body                     { padding: 1.6rem; }

.bento-fg                           { gap: 1.05rem; }
.bento-fg.two-col                   { gap: 1.05rem 1.25rem; }
.bl input,
.bl textarea,
.bl select {
  padding: .85rem 1rem !important;
  font-size: .98rem !important;
  border-radius: 10px !important;
}
.bl-title                           { font-size: .8rem; }
.bento-divider                      { margin: 1.7rem 0 1.1rem; font-size: .82rem; }
.bento-tariff-card                  { padding: 1.2rem; gap: 1rem; }
.bento-tariff-card .bento-fg.two-col { gap: .9rem 1rem; }
.bento-tg-preview                   { padding: .85rem 1rem; font-size: .95rem; }
.bb                                 { padding: .85rem 1.4rem; font-size: .94rem; }

.bento-tariff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.bento-tariff-add {
  border: 1.5px dashed rgba(255,255,255,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  display: flex;
  flex-direction: column;
  min-height: 220px;
  overflow: visible;
}
.bento-tariff-add-trigger {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: 2rem 1rem;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: color .18s ease, background .18s ease;
}
.bento-tariff-add-trigger:hover {
  color: #ddd;
  background: rgba(255,255,255,.03);
}
.bento-tariff-add-plus {
  font-size: 2.3rem;
  font-weight: 300;
  line-height: 1;
  color: #888;
  margin-bottom: .3rem;
}
.bento-tariff-add-trigger:hover .bento-tariff-add-plus { color: #fff; }
.bento-tariff-add-label {
  font-weight: 700;
  color: #d8d8d8;
  font-size: .98rem;
}
.bento-tariff-add-sub {
  font-size: .8rem;
  color: #777;
}
.bento-tariff-add-form {
  padding: 1.1rem 1.2rem 1.2rem;
  background: #1c1c1f;
  border-top: 1px solid rgba(255,255,255,.06);
}
.bento-tariff-add-form[hidden] { display: none; }
.bento-tariff-add-hint {
  margin: -.25rem 0 .85rem;
  font-size: .82rem;
  line-height: 1.5;
  color: #909094;
}
.bento-tariff-add-hint strong { color: #c8c8cc; font-weight: 650; }
.bento-tariff-add-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .9rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.bento-tariff-add-head strong { color: #fff; font-size: 1rem; }
.bento-add-close {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: none;
  color: #888;
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s ease, color .15s ease;
}
.bento-add-close:hover { background: rgba(255,255,255,.12); color: #fff; }
.bento-add-submit { width: 100%; margin-top: .95rem; }

/* ---- Hide active add-card trigger button when form is shown ---- */
.bento-tariff-add.is-open .bento-tariff-add-trigger { display: none; }

/* ---- Support button URL builder (section 06) ---- */
.bento-link-builder {
  padding: 1.15rem 1.2rem;
  background: #1d1d20;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
}
.bento-link-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
}
.bento-link-builder-hint {
  margin: .9rem 0 0;
  font-size: .78rem;
  color: #777;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .bento-link-builder-grid { grid-template-columns: 1fr; }
  .bento-ctrl-row { grid-template-columns: 1fr; }
  .bento-tariff-grid { grid-template-columns: 1fr; }
}

/* ==================== BENTO v6 — mobile fixes, tooltip viewport, alignments ==================== */

/* h1 как stack из строк, корректно ужимается на моби */
.bento-h1 {
  display: flex;
  flex-direction: column;
  line-height: .92;
  letter-spacing: -.06em;
  word-break: keep-all;
  hyphens: none;
}
.bento-h1 > span { display: block; }

/* test-revoke button align: invisible title-row makes button align with input */
.bl-title-spacer {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}
.bl .bb { width: 100%; }

@media (max-width: 720px) {
  .bento-h1 { font-size: clamp(2.2rem, 11vw, 3.4rem) !important; }
  .bento-hero-main { padding: 1.4rem 1.3rem !important; }
  .bento-desc { font-size: .92rem; }

  /* На моби test-revoke кнопке не нужен спейсер — стек */
  .bl-title-spacer { display: none; }

  /* увеличим аккордеон заголовок под палец */
  .bento-acc > summary.bento-acc-head { padding: 1.15rem 1.1rem; }
  .bento-acc-body { padding: 1.15rem 1.1rem; }
}

@media (max-width: 420px) {
  .bento-h1 { font-size: clamp(1.85rem, 12vw, 2.4rem) !important; }
  .bento-eyebrow { font-size: .68rem !important; }
}

/* ==================== BENTO v7 — proper mobile layout + fixed tooltip ==================== */

/* Hero stats wrapper (used as a sub-grid below hero on mobile) */
.bento-hero-stats {
  display: contents;
}

/* ---- MOBILE: ≤ 720px ---- */
@media (max-width: 720px) {

  /* Hero: full-width main, then 2 stat cards side-by-side below */
  .bento-hero-grid {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    gap: .8rem !important;
  }
  .bento-hero-main {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    padding: 1.8rem 1.4rem !important;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .65rem;
  }
  .bento-hero-stats { display: contents; }
  .bento-stat-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
    padding: 1.1rem 1rem !important;
  }
  .bento-status-card {
    grid-column: 2 !important;
    grid-row: 2 !important;
    padding: 1.1rem 1rem !important;
  }
  .bento-h1 {
    font-size: clamp(2.4rem, 12vw, 3.6rem) !important;
    line-height: .92 !important;
    margin: 0 !important;
  }
  .bento-eyebrow { margin-bottom: .15rem; }
  .bento-desc { margin: .15rem 0 0 !important; }
  .bento-stat-val { font-size: 2rem !important; }
  .bento-stat-label { font-size: .65rem !important; }
  .bento-status-text { font-size: 1.05rem !important; }

  /* Accordion summary: drop the n-badge and side-badge to free width */
  .bento-acc > summary.bento-acc-head {
    padding: 1rem 1rem !important;
    gap: .7rem !important;
    grid-template-columns: minmax(0, 1fr) 28px !important;
  }
  .bento-acc-head .bento-acc-n { display: none !important; }
  .bento-acc-head .bento-badge { display: none !important; }
  .bento-acc-head strong { font-size: .98rem !important; line-height: 1.25; }
  .bento-acc-head .bento-acc-text > span { font-size: .78rem !important; }
  .bento-acc-body { padding: 1rem 1rem 1.15rem !important; }

  /* Forms: stack to one column always */
  .bento-fg.two-col { grid-template-columns: 1fr !important; }
  .bento-fg.two-col .span-full { grid-column: 1 / -1; }
  .bento-ctrl-row { grid-template-columns: 1fr !important; }
  .bento-tariff-grid { grid-template-columns: 1fr !important; }
  .bento-link-builder-grid { grid-template-columns: 1fr !important; }

  /* Save bar stacks */
  .bento-save-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .9rem !important;
    padding: 1.1rem !important;
  }
  .bento-save-btn { width: 100% !important; }

  /* Inputs and buttons a touch bigger on mobile */
  .bl input,
  .bl textarea {
    font-size: 1rem !important;
    padding: .9rem 1rem !important;
  }
  .bb { font-size: .95rem !important; padding: .9rem 1rem !important; }

  /* Hide spacer label on mobile (used for test-revoke alignment) */
  .bl-title-spacer { display: none !important; }
}


@media (max-width: 420px) {
  .bento-h1 { font-size: clamp(2rem, 13vw, 3rem) !important; }
  .bento-stat-val { font-size: 1.7rem !important; }
  .bento-hero-main { padding: 1.6rem 1.2rem !important; min-height: 200px; }
}

/* ==================== RICH TEXT EDITOR ==================== */

.rich-editor {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: #1a1a1d;
  overflow: hidden;
  transition: border-color .15s ease;
}
.rich-editor:focus-within { border-color: rgba(255,255,255,.18); }

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem;
  padding: .42rem .55rem;
  background: #222226;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.rich-btn {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 .55rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #c0c0c0;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.rich-btn:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.rich-btn:active { background: rgba(255,255,255,.12); }
.rich-btn b, .rich-btn i, .rich-btn u, .rich-btn s { font-style: italic; font-weight: 700; }
.rich-btn i { font-weight: 500; }
.rich-btn u { text-decoration: underline; font-weight: 600; }
.rich-btn s { text-decoration: line-through; font-weight: 600; font-style: normal; }

.rich-tb-sep {
  flex: 1;
}

.rich-btn-preview {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
  padding: 0 .75rem;
  font-size: .8rem;
  font-weight: 600;
  color: #b0b0b0;
  border-color: rgba(255,255,255,.08);
}
.rich-btn-preview:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
}
.rich-btn-preview.is-active {
  background: rgba(80, 220, 130, .14);
  border-color: rgba(80, 220, 130, .35);
  color: #86efac;
}

.rich-editor textarea {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  resize: vertical;
  min-height: 100px;
}
.rich-editor textarea:focus { outline: none; box-shadow: none; }

/* ---- Telegram-style rich preview (incoming bot message) ---- */
.rich-preview-holder {
  border-top: 1px solid rgba(255,255,255,.06);
  background: #121214;
}

.rich-editor .rich-preview-holder {
  margin-top: 0.35rem;
}

.rich-preview.rich-preview--telegram {
  padding: 0.4rem 0 0.55rem;
  overflow: visible;
  background: transparent;
  border: none;
}

/* Корпус телефона: фиксированная высота; длинное сообщение прокручивается внутри области чата */
.iphone-preview-device {
  position: relative;
  width: 100%;
  max-width: 402px;
  height: min(688px, calc(100vh - 140px));
  max-height: 688px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.25rem;
  padding: 13px;
  border-radius: 48px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background:
    linear-gradient(155deg, rgba(92, 92, 96, 0.95) 0%, rgba(56, 56, 58, 0.98) 38%, rgba(28, 28, 30, 1) 100%);
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.22),
    inset 0 -3px 10px rgba(0, 0, 0, 0.55),
    0 26px 56px rgba(0, 0, 0, 0.58),
    0 6px 14px rgba(0, 0, 0, 0.35);
}

.iphone-preview-island {
  position: absolute;
  top: 21px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 34px;
  border-radius: 20px;
  background: radial-gradient(120% 160% at 50% 0%, #2a2a2c 0%, #0a0a0b 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -2px 6px rgba(0, 0, 0, 0.85),
    0 2px 6px rgba(0, 0, 0, 0.45);
  z-index: 5;
  pointer-events: none;
}

.iphone-preview-screen-rim {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 38px;
  overflow: hidden;
  background: #000;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.rich-preview::before {
  display: none !important;
}

.tg-preview-phone {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  border: none;
  box-shadow: none;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.iphone-preview-device .tg-preview-statusbar {
  flex-shrink: 0;
  justify-content: space-between;
  padding-left: max(28px, calc(env(safe-area-inset-left, 0px) + 14px));
  padding-right: max(28px, calc(env(safe-area-inset-right, 0px) + 14px));
  padding-top: 38px;
  min-height: 56px;
  height: auto;
}

.iphone-preview-device .tg-preview-statusbar::before {
  content: "◀ Telegram";
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #5294e2;
  opacity: 0.95;
}

.iphone-preview-device .tg-preview-appbar {
  flex-shrink: 0;
  padding-top: 10px;
}

.tg-preview-statusbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  height: 26px;
  padding: 0 10px;
  background: #17212b;
  color: #8b9cae;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tg-preview-appbar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  min-height: 48px;
  padding: 8px 14px 10px;
  background: #17212b;
  border-bottom: 1px solid rgba(0,0,0,.35);
}
.tg-preview-appbar-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: none;
  color: #7f98b0;
  line-height: 1.2;
}
.tg-preview-appbar-sub {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
  margin-top: 1px;
}

.tg-preview-chat {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px 11px 18px;
  background: #0e1621;
  background-image:
    radial-gradient(ellipse 140% 120% at 50% 85%, rgba(30, 116, 164, .12) 0%, transparent 52%),
    linear-gradient(180deg, #101a24 0%, #0e1621 100%);
}

.tg-preview-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}

.tg-preview-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2ca5e0, #229ed9);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}

.tg-preview-col {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tg-preview-sender-name {
  font-size: 14px;
  font-weight: 600;
  color: #5294e2;
  line-height: 1.2;
  padding-left: 4px;
}

.tg-preview-bubble {
  display: inline-flex;
  flex-direction: column;
  align-self: flex-start;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 16px 5px;
  background: #182533;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.tg-preview-photo-wrap {
  display: block;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  margin: 0;
  line-height: 0;
  text-align: center;
}

.tg-preview-photo-wrap[hidden] {
  display: none !important;
}

.tg-preview-photo-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.tg-preview-bubble--with-photo .tg-preview-body {
  padding-top: 7px;
}

.tg-preview-body {
  padding: 8px 11px 6px 13px;
  font-size: 15px;
  line-height: calc(20 / 15);
  font-weight: 400;
  color: #dfe8f0;
  letter-spacing: normal;
  text-transform: none;
  font-family: inherit;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tg-preview-body br { line-height: inherit; }

.tg-preview-bubble-meta {
  align-self: flex-end;
  padding: 0 9px 7px 13px;
  margin-top: -2px;
}

.tg-preview-time {
  font-size: 11px;
  font-weight: 500;
  color: rgba(182, 207, 224, .75);
  letter-spacing: .01em;
}

.tg-preview-body b,
.tg-preview-body strong { font-weight: 600; color: #ffffff; }
.tg-preview-body i,
.tg-preview-body em { font-style: italic; }
.tg-preview-body u { text-decoration: underline; text-underline-offset: 1px; }
.tg-preview-body s,
.tg-preview-body strike { text-decoration: line-through; color: #b8ccd8; }
.tg-preview-body a {
  color: #6ab3f3;
  text-decoration: none;
  cursor: pointer;
}
.tg-preview-body a:hover { text-decoration: underline; }
.tg-preview-body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  background: rgba(0,0,0,.25);
  padding: 1px 5px 2px;
  border-radius: 4px;
  color: #e8f4ff;
}
.tg-preview-body pre {
  margin: 4px 0;
  padding: 8px 10px;
  background: rgba(0,0,0,.28);
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: #dfe8f0;
  overflow-x: auto;
}
.tg-preview-body blockquote {
  border-left: 2px solid #3a6ea5;
  padding: 2px 0 2px 10px;
  margin: 6px 0;
  color: #b8cdd8;
}

.tg-preview-body tg-spoiler {
  background: #2a3f50;
  color: #2a3f50;
  border-radius: 3px;
  padding: 1px 5px 2px;
  transition: color .15s ease, background .15s ease;
  cursor: pointer;
}
.tg-preview-body tg-spoiler:hover,
.tg-preview-body tg-spoiler.is-revealed {
  color: #dfe8f0;
  background: rgba(42, 63, 80, .7);
}

/* Кнопки в предпросмотре rich-editors */
.tg-preview-extras {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
}
.tg-preview-keyboard-hint {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6d8399;
  margin-bottom: 2px;
}
.tg-preview-inline-wrap {
  padding: 8px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.tg-preview-inline-row {
  display: flex;
  justify-content: stretch;
  margin-bottom: 6px;
}
.tg-preview-inline-row:last-child { margin-bottom: 0; }
.tg-preview-inline-btn {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #6ab3f3;
  background: rgba(106, 179, 243, 0.12);
  border: 1px solid rgba(106, 179, 243, 0.35);
}
.tg-preview-reply-wrap {
  padding: 8px 6px 10px;
  border-radius: 10px;
  background: #17212b;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tg-preview-reply-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.tg-preview-reply-row:last-child { margin-bottom: 0; }
.tg-preview-reply-btn {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #dfe8f0;
  background: #213041;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@media (max-width: 720px) {
  .iphone-preview-device {
    max-width: min(402px, calc(100vw - 24px));
    height: min(620px, calc(100vh - 120px));
    max-height: 620px;
    padding: 11px;
    border-radius: 42px;
    margin-top: 0.25rem;
  }
  .iphone-preview-island {
    width: 104px;
    height: 31px;
    top: 18px;
  }
  .iphone-preview-screen-rim {
    border-radius: 34px;
  }
  .tg-preview-body {
    font-size: 14.5px;
  }
  .tg-preview-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .compose.panel,
  .compose {
    max-width: 100%;
  }
  .hero.compact {
    padding: 1.15rem 1.05rem;
  }
}

/* Rich toolbar mobile (restored after preview refactor) */
@media (max-width: 720px) {
  .rich-toolbar { padding: .35rem .4rem; gap: .15rem; }
  .rich-btn { min-width: 30px; height: 30px; padding: 0 .4rem; font-size: .85rem; }
  .rich-btn-preview span { display: none; }
  .rich-btn-preview { padding: 0 .55rem; }
}

.settings-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: min(560px, 96vw);
  background: rgba(12, 15, 30, 0.97);
  color: var(--text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line);
}
.settings-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}
.settings-dialog-form {
  padding: 1.35rem;
}
.settings-dialog-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.sales-delete-form-remote {
  margin: 0;
  padding: 0;
  border: none;
}

/* —— Страница «Тарифы» (/admin/settings) —— */
.sales-page .sales-desc { max-width: 46rem; }
.sales-tariffs-sublead {
  margin: 0 0 0.75rem;
  line-height: 1.45;
  font-size: 0.88rem;
  color: var(--muted, #909094);
}

/* Аккордеон: плавное раскрытие и крупнее заголовки в свернутом виде */
.sales-sections.bento-acc-animated > .bento-acc > .bento-acc-slide {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}
.sales-sections.bento-acc-animated > .bento-acc[open] > .bento-acc-slide {
  grid-template-rows: 1fr;
}
.sales-sections.bento-acc-animated > .bento-acc > .bento-acc-slide > .bento-acc-body {
  min-height: 0;
  overflow: hidden;
}
.sales-sections.bento-acc-animated .bento-acc-body {
  animation: none;
}
@media (min-width: 761px) {
  .sales-sections.bento-acc-animated .bento-acc-head {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) auto auto !important;
  }
}
.sales-sections.bento-acc-animated > .bento-acc > summary.bento-acc-head {
  padding: 1.75rem 1.9rem !important;
  gap: 1.15rem !important;
}
.sales-sections.bento-acc-animated .bento-acc-head .bento-acc-n {
  width: 44px !important;
  height: 44px !important;
  font-size: 0.98rem !important;
}
.sales-sections.bento-acc-animated .bento-acc-head strong {
  font-size: 1.18rem !important;
}
.sales-sections.bento-acc-animated .bento-acc-head .bento-acc-text > span {
  font-size: 0.94rem !important;
  color: #87878f !important;
}
.sales-sections.bento-acc-animated .bento-acc-head .bento-arrow {
  width: 34px !important;
  height: 34px !important;
}
@media (max-width: 760px) {
  .sales-sections.bento-acc-animated > .bento-acc > summary.bento-acc-head {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.65rem !important;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: unset !important;
    padding: 1.35rem 1.15rem !important;
  }
  .sales-sections.bento-acc-animated .bento-acc-head > .bento-acc-n {
    display: none !important;
  }
  .sales-sections.bento-acc-animated .bento-acc-head > .bento-acc-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100%;
    align-self: center;
  }
  .sales-sections.bento-acc-animated .bento-acc-head strong {
    font-size: 1.05rem !important;
  }
  .sales-sections.bento-acc-animated .bento-acc-head .bento-acc-text strong,
  .sales-sections.bento-acc-animated .bento-acc-head .bento-acc-text > span {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.42;
    font-size: 0.88rem !important;
  }
  .sales-sections.bento-acc-animated .bento-acc-head > .bento-badge {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-self: center;
  }
  .sales-sections.bento-acc-animated .bento-acc-head > .bento-arrow {
    flex: 0 0 auto !important;
    margin-left: auto;
    align-self: flex-start;
  }
}
.sales-hero { gap: 0.85rem !important; }
.sales-save-bar.sales-save-bar {
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Кнопки раздела — единый ритм, без «маленькая / огромная» */
.sales-page .sales-btn-inline {
  width: auto !important;
  min-width: 7.5rem;
  padding: 0.82rem 1.15rem !important;
  font-size: 0.9rem !important;
  font-weight: 750 !important;
  border-radius: 13px !important;
}
.sales-page .sales-btn-inline.bb-ghost {
  min-width: 6.75rem;
}
.sales-save-bar .bento-save-btn {
  min-height: unset !important;
  padding: 0.82rem 1.35rem !important;
  font-size: 0.9rem !important;
}
.sales-page .sales-btn-icon-only.bb-ghost-danger {
  min-width: 2.95rem !important;
  min-height: 2.95rem !important;
  width: auto !important;
  padding: 0 !important;
  font-size: 1.4rem !important;
  font-weight: 500;
  line-height: 1;
  border-radius: 14px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.sales-sale-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.sales-sale-grid { gap: 0.65rem !important; margin-top: 0.35rem !important; }

.sales-sale-card {
  padding: 0.75rem 0.82rem !important;
  gap: 0.35rem;
  display: flex;
  flex-direction: column;
  min-height: 0 !important;
}
.sales-sale-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sales-sale-card-top .bento-tariff-idx { flex-shrink: 0; }
.sales-sale-card-title { font-size: 0.95rem; letter-spacing: -0.02em; flex: 1; min-width: 0; }
.sales-sale-dates {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sales-sale-plans {
  font-size: 0.82rem;
  color: rgba(248,251,255,.88);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sales-sale-actions {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.sales-empty-msg { margin: 0.25rem 0 0; font-size: 0.9rem; }

.sales-modal-field-note {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.sales-wait-inline {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sales-subtle-cap {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.compact-checkbox { font-size: 0.82rem !important; margin-top: 0.4rem !important; }
.compact-bl .bl-title { font-size: 0.82rem !important; }
.compact-reminder .preset-grid.compact-presets {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.34rem !important;
  margin: 0.45rem 0 0.95rem !important;
  max-width: 100%;
}
.compact-reminder .preset-grid.compact-presets button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center !important;
  padding: 0.36rem 0.2rem !important;
  border-radius: 10px !important;
  font-size: 0.78rem !important;
  font-weight: 850 !important;
  min-height: 2.05rem !important;
  overflow: visible !important;
  text-overflow: unset !important;
  white-space: nowrap !important;
  min-width: 0 !important;
  width: 100%;
  box-sizing: border-box;
}

/* Мобильный аккордеон страницы «Настройки бота»: тот же flex, чтобы заголовки не ломались */
@media (max-width: 760px) {
  .bot-settings-surface details.bento-item.bento-acc > summary.bento-acc-head {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.65rem !important;
    width: 100%;
    grid-template-columns: unset !important;
  }
  .bot-settings-surface .bento-acc-head > .bento-acc-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .bot-settings-surface .bento-acc-head .bento-acc-text strong,
  .bot-settings-surface .bento-acc-head .bento-acc-text > span {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.42;
  }
  .bot-settings-surface .bento-acc-head > .bento-arrow {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

/* Модальное окно продажи — в духе bento-карточек */
.settings-dialog.sales-dialog.bento-sales-dialog {
  box-sizing: border-box;
  width: min(960px, 96vw);
  max-width: min(960px, 96vw);
  border-radius: 20px;
  background: #080808;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255,255,255,.06);
  overflow: visible;
}
.settings-dialog.sales-dialog.bento-sales-dialog .settings-dialog-form.sales-modal-form {
  padding: clamp(1.35rem, 3vw, 2rem);
  display: grid;
  gap: 1rem;
  max-height: min(86vh, 880px);
  overflow-x: hidden;
  overflow-y: auto;
}
.sales-modal-head {
  margin: 0 0 0.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sales-modal-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.sales-modal-heading {
  margin: 0 !important;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem) !important;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #fff;
}
.sales-modal-datetime-grid.timeline-grid {
  gap: 1rem !important;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}
.sales-modal-form .field-card {
  padding: 1.05rem 1.1rem;
  border-radius: 16px;
  min-width: 0;
}
.sales-modal-form .datetime-trigger {
  padding: 0.78rem 0.95rem;
  border-radius: 12px;
  font-size: 0.92rem;
  min-height: 2.875rem;
  font-variant-numeric: tabular-nums;
}
.sales-modal-caption {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  margin: 0;
}
.sales-plan-field {
  display: grid;
  gap: 0.38rem;
}
.sales-plan-hint {
  margin: 0 0 0.35rem;
  font-size: 0.84rem !important;
  line-height: 1.45;
}
.sales-plan-empty {
  margin: 0;
  padding: 0.6rem 0;
}
.sales-plan-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.55rem;
  margin-top: 0.15rem;
  max-height: min(260px, 38vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.1rem;
  scrollbar-gutter: stable;
}
.sales-plan-choice {
  margin: 0;
  cursor: pointer;
  user-select: none;
  border-radius: 14px;
  position: relative;
}
.sales-plan-choice input.dlg-pick-plan {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.sales-plan-choice-body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.62rem;
  min-height: 3.05rem;
  padding: 0.62rem 0.72rem;
  border-radius: 14px;
  background: linear-gradient(160deg, #2a2a2d 0%, #232325 48%, #1c1c1e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
  pointer-events: none;
}
.sales-plan-choice:hover .sales-plan-choice-body {
  border-color: rgba(255, 255, 255, 0.18);
}
.sales-plan-choice:focus-within .sales-plan-choice-body {
  outline: 2px solid rgba(34, 211, 238, 0.35);
  outline-offset: 2px;
}
.sales-plan-choice:has(.dlg-pick-plan:checked) .sales-plan-choice-body {
  border-color: rgba(34, 211, 238, 0.45);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.12), #252528 52%, #1e2128);
  box-shadow: inset 0 1px 0 rgba(34, 211, 238, 0.12), 0 12px 32px rgba(0, 0, 0, 0.25);
}
.sales-plan-choice-indicator {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.sales-plan-choice-indicator::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: transparent;
  transition: transform 0.16s ease, background 0.16s ease;
  transform: scale(0);
}
.sales-plan-choice:has(.dlg-pick-plan:checked) .sales-plan-choice-indicator {
  border-color: rgba(34, 211, 238, 0.75);
  background: rgba(34, 211, 238, 0.12);
}
.sales-plan-choice:has(.dlg-pick-plan:checked) .sales-plan-choice-indicator::after {
  background: #67e8f9;
  transform: scale(1);
}
.sales-plan-choice-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  text-align: left;
}
.sales-plan-choice-title {
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: rgba(249, 250, 251, 0.96);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sales-plan-choice-days {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sales-plan-choice-price {
  font-size: 0.93rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #e0fdfa;
  white-space: nowrap;
}
.sales-modal-form textarea {
  min-height: 6.5rem;
}
.sales-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: stretch;
  padding-top: 0.85rem;
  margin-top: 0.35rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 460px) {
  .sales-modal-actions {
    grid-template-columns: 1fr;
  }
}
/* Две главные кнопки модалки — одинаковый размер, без «тяжёлой» bento-save */
.sales-modal-actions .sales-modal-btn.bb {
  width: 100% !important;
  min-height: 3rem;
  padding: 0.78rem 1rem !important;
  font-size: 0.9rem !important;
  font-weight: 750 !important;
  border-radius: 13px !important;
  box-sizing: border-box;
}
.sales-modal-actions .bb-white {
  background: rgba(255,255,255,.08) !important;
  color: #f4f4f5 !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: none !important;
}
.sales-modal-actions .bb-white:hover {
  background: rgba(255,255,255,.11) !important;
}

/* Sidebar: основные разделы */
.shell .sidebar nav.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 5.5rem;
}
.sidebar-nav-label {
  margin: 0.75rem 0 0.2rem;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(154, 167, 189, 0.95);
}
.sidebar-nav-label:first-child {
  margin-top: 0;
}
.shell .sidebar hr.sidebar-divider {
  margin: 0.85rem 0;
}
nav.sidebar-nav a.sidebar-link-primary {
  font-weight: 850;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.21), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(34, 211, 238, 0.38);
}

/* Инструкция и оформление */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}
.guide-toc {
  position: sticky;
  top: 1.25rem;
  padding: 1.05rem 1.1rem;
}
.guide-toc-title {
  margin: 0 0 0.55rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.guide-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-weight: 650;
}
.guide-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.guide-block {
  padding: 1.25rem 1.35rem;
}
.guide-block h2 {
  margin-top: 0;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}
.guide-block h3 {
  margin: 1.1rem 0 0.4rem;
  font-size: 1.07rem;
  color: #e5eefc;
}
.guide-ol,
.guide-block ul:not(.guide-toc ul) {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  line-height: 1.45;
}

.appearance-gate-panel {
  padding: 1.4rem;
  margin-top: 0.85rem;
}
.appearance-fieldset {
  border: none;
  margin: 0 0 1rem;
}
.appearance-legend {
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0 0 0.5rem;
}
.appearance-key-row .appearance-key {
  display: block;
  margin: -0.1rem 0 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}
.appearance-default-ref {
  display: block;
  margin: 0.15rem 0 0.4rem;
  font-size: 0.76rem !important;
  line-height: 1.35;
}
.appearance-save-row {
  margin: 1.2rem 0 0;
}
.appearance-lock-row {
  margin-top: 0.85rem;
}
.bb-ghost-appearance {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--muted) !important;
  box-shadow: none !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 14px !important;
  padding: 0.55rem 0.95rem !important;
  font-size: 0.82rem !important;
}

@media (max-width: 960px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }
  .guide-toc {
    position: relative;
    top: auto;
  }
}

/* Live admin UI editing (⚙ пароль → поля формы admin-ui-live-form) */
body.aui-edit-mode .content {
  padding-bottom: 6rem;
}
.aui-live-toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 10, 20, 0.92), rgba(6, 7, 16, 0.98));
  backdrop-filter: blur(16px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}
.aui-live-toolbar #admin-ui-live-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
}
.aui-live-toolbar-msg {
  flex: 1 1 100%;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  margin: 0;
}
.aui-live-toolbar button[type="submit"] {
  flex: 0 0 auto;
  white-space: nowrap;
}
.aui-live-toolbar form[method="post"][action*="lock"] {
  flex: 0 0 auto;
  margin: 0;
}
.aui-toolbar-meta,
.aui-toolbar-mini {
  display: grid;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  flex: 0 1 auto;
  min-width: 0;
}
.aui-toolbar-meta-field,
.aui-toolbar-mini-field {
  min-width: 8rem;
  max-width: 14rem;
  font-weight: 600;
}
.hero .aui-live-input,
.hero h1 .aui-live-input {
  font: inherit;
  letter-spacing: inherit;
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.hero .aui-live-area,
.hero .eyebrow + .aui-live-input {
  line-height: 1.45;
}
.aui-live-input,
.aui-live-area {
  font: inherit;
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  min-width: 0;
  width: 100%;
}
.aui-live-area {
  resize: vertical;
  min-height: 2.75rem;
  line-height: 1.4;
}
.brand-as-block {
  align-items: flex-start;
}
.brand-dash-link {
  margin-left: auto;
  align-self: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-2);
  white-space: nowrap;
}
.aui-brand-emoji-input {
  width: 2.75rem;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}
.sidebar-nav-row {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.45rem;
  margin: 0.1rem 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-nav-row .sidebar-nav-caption {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  font-weight: 700;
  border-radius: 12px;
}
.sidebar-nav-open {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.35rem;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent-2);
  font-size: 0.95rem;
}
.sidebar-nav-open:hover {
  background: rgba(34, 211, 238, 0.2);
}
.sidebar-nav-cap.aui-live-input {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}
.guide-live-panel {
  padding: 1rem 1.1rem;
}
.guide-live-hint {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}
textarea.aui-guide-html {
  min-height: 22rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.78rem;
  line-height: 1.4;
}

@media (max-width: 960px) {
  .aui-live-toolbar {
    gap: 0.45rem;
    padding-inline: max(1rem, env(safe-area-inset-left))
      max(1rem, env(safe-area-inset-right));
  }
}

/* Neutral launch theme: calmer, modern admin surface inspired by OpenAI-style product UI. */
:root {
  --bg: #0f0f10;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.105);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #f4f4f5;
  --accent-2: #d4d4d8;
  --accent-3: #a1a1aa;
}

body {
  background: linear-gradient(180deg, #151517 0%, #0f0f10 44%, #0b0b0c 100%) !important;
}

a { color: #e5e7eb; }

button,
.bb,
.bb-green,
.bb-white {
  background: #f4f4f5 !important;
  color: #111113 !important;
  box-shadow: none !important;
}

button:hover,
.bb:hover {
  transform: translateY(-1px);
  box-shadow: none !important;
}

.bb-ghost,
.logout button,
button.sidebar-gear,
a.sidebar-gear {
  background: rgba(255,255,255,0.065) !important;
  color: #e4e4e7 !important;
  border-color: rgba(255,255,255,0.11) !important;
}

.sidebar {
  background: rgba(15, 15, 16, 0.94) !important;
  border-right-color: rgba(255,255,255,0.09) !important;
  box-shadow: none !important;
}

.brand-mark {
  background: #1f1f22 !important;
  border-color: rgba(255,255,255,0.1) !important;
  box-shadow: none !important;
}

nav a:hover,
.logout button:hover,
a.sidebar-gear:hover,
button.sidebar-gear:hover,
.sidebar-nav-open,
.sidebar-nav-open:hover {
  background: rgba(255,255,255,0.09) !important;
  color: #ffffff !important;
}

nav.sidebar-nav a.sidebar-link-primary {
  background: rgba(255,255,255,0.085) !important;
  border: 1px solid rgba(255,255,255,0.105);
}

.hero,
.settings-hero > div:first-child,
.bot-config-hero > div,
.bento-item,
.bento-hero-main,
.bento-stat-card,
.bento-status-card,
.bento-quickctrl-card,
.bento-acc,
.panel,
.stat-card,
.chart-card,
.chart-panel,
.compose.panel {
  background: rgba(255,255,255,0.055) !important;
  border-color: rgba(255,255,255,0.105) !important;
  box-shadow: none !important;
}

.hero,
.settings-hero > div:first-child,
.bot-config-hero > div {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04)) !important;
}

.stat-card::after,
.bento-item::before,
.hero-preview-card::before {
  display: none !important;
}

.badge,
.bento-badge,
.bento-acc-n,
.bento-tariff-idx {
  background: rgba(255,255,255,0.075) !important;
  color: #e4e4e7 !important;
  border-color: rgba(255,255,255,0.1) !important;
}

input,
textarea,
select,
.bl input,
.bl textarea,
.field-card,
.bento-tariff-card,
.bento-infobox,
.bento-tariff-add,
.bento-tariff-add-form,
.sales-plan-choice-body {
  background: rgba(255,255,255,0.055) !important;
  border-color: rgba(255,255,255,0.105) !important;
  box-shadow: none !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255,255,255,0.24) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08) !important;
}

.bento-save-bar {
  background: rgba(20,20,22,0.92) !important;
  border-color: rgba(255,255,255,0.11) !important;
  box-shadow: none !important;
}

.dot-on {
  background: #22c55e !important;
  box-shadow: none !important;
}

.dot-off {
  background: #ef4444 !important;
  box-shadow: none !important;
}

/* Friendly admin polish: clearer green actions, transparent cards, softer hierarchy. */
:root {
  --bg: #101112;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.105);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #22c55e;
  --accent-2: #5eead4;
  --accent-3: #a7f3d0;
  --muted: #a6adb8;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.11), transparent 30rem),
    radial-gradient(circle at 88% 12%, rgba(94, 234, 212, 0.08), transparent 28rem),
    linear-gradient(180deg, #151619 0%, #101112 46%, #0b0c0d 100%) !important;
}

a,
.panel-head a,
.bento-custom-btn-info a {
  color: #7dd3fc;
}

.bb-green,
.bento-save-btn,
button[type="submit"]:not(.bb-danger):not(.bb-ghost):not(.bb-ghost-appearance),
.date-filter-submit {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  border: 1px solid rgba(134, 239, 172, 0.35) !important;
}

.bb-white,
button:not(.bb-danger):not(.bb-ghost):not(.bb-ghost-appearance):not(.bento-tariff-add-trigger):not(.bento-trash-btn):not(.sidebar-gear):not(.sidebar-nav-open) {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f4f4f5 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.bb-danger,
button.bb-danger {
  background: rgba(239, 68, 68, 0.13) !important;
  color: #fecaca !important;
  border: 1px solid rgba(248, 113, 113, 0.28) !important;
}

.stats-reset-compact {
  display: flex;
  justify-content: flex-end;
  margin: -0.25rem 0 0.9rem !important;
}

#stats-reset-open-btn.bb-compact {
  min-height: 0;
  width: auto;
  padding: 0.38rem 0.62rem !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  background: rgba(248, 113, 113, 0.08) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(248, 113, 113, 0.22) !important;
}

#stats-reset-open-btn.bb-compact:hover {
  background: rgba(248, 113, 113, 0.14) !important;
}

.hero,
.settings-hero > div:first-child,
.bot-config-hero > div,
.bento-item,
.bento-hero-main,
.bento-stat-card,
.bento-status-card,
.bento-quickctrl-card,
.bento-acc,
.panel,
.stat-card,
.chart-card,
.chart-panel,
.compose.panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.082), rgba(255,255,255,0.048)) !important;
  border-color: rgba(255,255,255,0.13) !important;
}

.stat-card.accent,
.bento-status-card:has(.dot-on),
.bento-alert-ok {
  background:
    linear-gradient(180deg, rgba(34,197,94,0.16), rgba(34,197,94,0.065)) !important;
  border-color: rgba(34,197,94,0.26) !important;
}

.badge,
.bento-badge,
.bento-acc-n,
.bento-tariff-idx {
  background: rgba(255,255,255,0.09) !important;
  color: #f4f4f5 !important;
}

.dot-on {
  background: #22c55e !important;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.12) !important;
}

.bento-tariff-add {
  background:
    linear-gradient(180deg, rgba(34,197,94,0.055), rgba(255,255,255,0.035)) !important;
  border: 1.5px dashed rgba(134, 239, 172, 0.34) !important;
  color: #d1d5db !important;
}

.bento-tariff-add-trigger {
  background: transparent !important;
  color: #cbd5e1 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.bento-tariff-add-trigger:hover {
  background: rgba(34,197,94,0.06) !important;
  color: #ffffff !important;
}

.bento-tariff-add-plus {
  color: #86efac !important;
}

.bento-tariff-add-label {
  color: #f4f4f5 !important;
}

.bento-tariff-add-sub {
  color: #a6adb8 !important;
}

input,
textarea,
select,
.bl input,
.bl textarea,
.field-card,
.bento-tariff-card,
.bento-infobox,
.bento-tariff-add-form,
.sales-plan-choice-body {
  background: rgba(255,255,255,0.07) !important;
  border-color: rgba(255,255,255,0.13) !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(94,234,212,0.42) !important;
  box-shadow: 0 0 0 3px rgba(94,234,212,0.09) !important;
}

/* Payments page: employee-friendly wording and roomy order details. */
.payments-page {
  display: grid;
  gap: 1.15rem;
}

.payments-page .hero,
.payments-page .panel {
  margin-bottom: 0 !important;
}

.payment-status-panel,
.payment-form-panel,
.payment-table-panel {
  display: grid;
  gap: 1rem;
}

.payment-table-head,
.payment-status-panel .panel-head {
  align-items: flex-start;
  gap: 1rem;
}

.payment-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.payment-status-card {
  min-height: 5.4rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  align-content: space-between;
  gap: 0.45rem;
}

.payment-status-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.payment-status-card strong {
  color: #ffffff;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1;
}

.payment-status-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.command-center {
  min-height: min(58vh, 520px);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem) 0;
}

.command-center-inner {
  width: min(920px, 100%);
  display: grid;
  justify-items: center;
  gap: 1.35rem;
  text-align: center;
}

.command-center h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.command-tiles {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.command-tile {
  min-height: 10.5rem;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  text-align: left;
  text-decoration: none;
  display: grid;
  align-content: space-between;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.command-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(187, 247, 208, 0.34);
  background: rgba(255, 255, 255, 0.09);
}

.command-tile span {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #0f172a;
  background: #e5e7eb;
  font-weight: 900;
}

.command-tile strong {
  display: block;
  margin-top: 1.25rem;
  font-size: 1.12rem;
}

.command-tile p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.command-tile-primary {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(255, 255, 255, 0.065));
  border-color: rgba(34, 197, 94, 0.3);
}

.command-tile-primary span {
  background: #bbf7d0;
}

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

.soft-note {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 16px;
  background: rgba(34, 197, 94, 0.08);
  color: #d8f3df;
}

.payment-form-settings {
  display: grid;
  gap: 1rem;
}

.payment-settings-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 0.42fr) minmax(0, 1fr);
  gap: 0.9rem;
}

.payment-settings-grid .span-full {
  grid-column: 1 / -1;
}

.payment-form-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  line-height: 1.45;
}

.payment-form-help b {
  color: #ffffff;
  font-weight: 750;
}

.badge-ok {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #bbf7d0 !important;
  border-color: rgba(34, 197, 94, 0.28) !important;
}

.badge-wait {
  background: rgba(250, 204, 21, 0.13) !important;
  color: #fde68a !important;
  border-color: rgba(250, 204, 21, 0.24) !important;
}

.badge-muted {
  background: rgba(148, 163, 184, 0.13) !important;
  color: #cbd5e1 !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

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

.payments-table {
  min-width: 1120px;
}

.payments-table th,
.payments-table td {
  vertical-align: top;
}

.payments-table td {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.order-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-weight: 800;
}

.cell-main,
.cell-sub {
  display: block;
}

.cell-main {
  color: #ffffff;
  font-weight: 750;
  line-height: 1.35;
}

.cell-sub {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
  word-break: break-word;
}

.buyer-cell {
  min-width: 12rem;
}

.payment-action-cell {
  min-width: 8.5rem;
}

.payment-action-cell form {
  margin: 0;
}

.payment-action-cell .mini {
  padding: 0.5rem 0.75rem !important;
  border-radius: 999px !important;
  white-space: nowrap;
}

.empty-table-cell {
  padding: 2rem 1rem !important;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .payment-status-grid {
    grid-template-columns: 1fr;
  }

  .payment-settings-grid,
  .payment-form-help {
    grid-template-columns: 1fr;
  }

  .payment-form-help {
    display: grid;
  }

  .payments-table {
    min-width: 980px;
  }
}

/* Bot testing mode. */
.test-mode-box {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.test-mode-box.is-on {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.055));
  border-color: rgba(34, 197, 94, 0.28);
}

.test-mode-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.test-mode-top strong {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.test-mode-top p,
.test-mode-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.test-mode-box textarea {
  min-height: 5.3rem;
}

.test-mode-save {
  justify-self: start;
}

@media (max-width: 700px) {
  .test-mode-top {
    flex-direction: column;
  }
}

/* Operator UX refresh: compact workflows, calmer navigation, mobile-first controls. */
.section-jumpbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.48rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: #f4f4f5;
  font-size: 0.86rem;
  font-weight: 760;
  white-space: nowrap;
}

.section-jumpbar a:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
  color: #ffffff;
}

.section-jumpbar a.is-active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(20, 184, 166, 0.82));
  border-color: rgba(134, 239, 172, 0.5);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(34, 197, 94, 0.18);
}

.section-pane-hidden {
  display: none !important;
}

.section-pane-active {
  outline: 1px solid rgba(34, 197, 94, 0.26);
  outline-offset: 2px;
}

.operator-help-card {
  display: grid;
  grid-template-columns: minmax(12rem, 0.85fr) minmax(0, 2fr);
  gap: 1rem;
  align-items: start;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.1), rgba(255, 255, 255, 0.045));
}

.operator-help-card.compact {
  grid-template-columns: minmax(10rem, 0.7fr) minmax(0, 2.3fr);
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.85rem;
  border-radius: 16px;
}

.operator-help-card.compact.mini {
  grid-template-columns: 1fr;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  margin: 0.35rem 0 0.75rem;
  background: rgba(34, 197, 94, 0.075);
}

.operator-help-card span {
  display: block;
  color: #86efac;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.operator-help-card strong {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.25;
}

.operator-help-card ol {
  margin: 0;
  padding-left: 1.25rem;
  color: #d4d4d8;
  font-size: 0.9rem;
  line-height: 1.55;
}

.operator-help-card.compact ol {
  display: grid;
  gap: 0.18rem;
  font-size: 0.86rem;
}

.operator-help-card.compact strong {
  font-size: 0.95rem;
}

.operator-help-card li + li {
  margin-top: 0.25rem;
}

.operator-workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0 0 1rem;
}

.operator-action-card {
  min-height: 10.2rem;
  padding: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.045));
  color: #f4f4f5;
  display: grid;
  align-content: space-between;
  gap: 0.75rem;
}

.operator-action-card.primary {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.05));
  border-color: rgba(34, 197, 94, 0.28);
}

.operator-action-card span {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #d4d4d8;
  font-size: 0.78rem;
  font-weight: 900;
}

.operator-action-card strong {
  display: block;
  color: #ffffff;
  font-size: 1.02rem;
  line-height: 1.15;
}

.operator-action-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.operator-action-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.section-jumpbar {
  position: sticky;
  top: 0.65rem;
  z-index: 15;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.55rem;
  margin: 0 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 999px;
  background: rgba(16, 17, 18, 0.78);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.section-jumpbar::-webkit-scrollbar {
  display: none;
}

.bento-page > .bento-hero-grid,
.hero {
  margin-bottom: 1rem !important;
}

.bento-sections,
.sales-sections {
  gap: 0.8rem !important;
}

.bento-acc-head {
  min-height: 4.8rem;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.bento-acc-body {
  padding-top: 1rem !important;
}

.bento-acc-text strong {
  font-size: 1rem !important;
}

.bento-acc-text > span {
  max-width: 46rem;
  line-height: 1.35 !important;
}

.bl-title {
  line-height: 1.25;
}

.sidebar {
  padding-top: 1.1rem !important;
}

.sidebar-nav-label {
  margin-top: 0.75rem;
}

nav.sidebar-nav a.sidebar-link-primary {
  background: rgba(34, 197, 94, 0.11) !important;
  border-color: rgba(34, 197, 94, 0.22) !important;
}

/* Operator polish: friendlier navigation, compact previews and clearer payment actions. */
.sidebar {
  padding: 1rem !important;
  background:
    linear-gradient(180deg, rgba(24, 24, 26, 0.96), rgba(13, 14, 15, 0.96)) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.brand {
  margin-bottom: 1.15rem !important;
  padding: 0.8rem !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
}

.shell .sidebar nav.sidebar-nav {
  gap: 0.48rem !important;
}

.sidebar-nav-label {
  margin: 0.9rem 0 0.32rem !important;
  padding-left: 0.75rem;
  letter-spacing: 0.12em !important;
  color: rgba(212, 212, 216, 0.72) !important;
}

.shell .sidebar hr.sidebar-divider {
  height: 0;
  margin: 0.55rem 0 0.2rem !important;
  border: 0 !important;
}

nav.sidebar-nav a,
.logout button {
  min-height: 2.85rem;
  padding: 0.78rem 0.9rem !important;
  border: 1px solid transparent;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  color: #f4f4f5 !important;
}

nav.sidebar-nav a:hover,
nav.sidebar-nav a.sidebar-link-primary,
.logout button:hover {
  background: rgba(255, 255, 255, 0.075) !important;
  border-color: rgba(255, 255, 255, 0.105) !important;
  transform: none !important;
}

nav.sidebar-nav a.sidebar-link-primary {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.sidebar-footer {
  left: 1rem !important;
  right: 1rem !important;
  bottom: 1rem !important;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-footer .logout button,
button.sidebar-gear,
a.sidebar-gear {
  border-radius: 16px !important;
}

.section-jumpbar {
  border-radius: 24px !important;
  padding: 0.45rem !important;
  background: rgba(255, 255, 255, 0.045) !important;
}

.section-jumpbar a {
  min-height: 2.2rem !important;
  padding: 0.45rem 0.8rem !important;
  border-radius: 18px !important;
}

.section-jumpbar a.is-active {
  background: #20b987 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: none !important;
}

.friendly-note {
  margin: 0;
  max-width: 62rem;
  color: #d4d4d8;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.48;
  text-transform: none;
  letter-spacing: 0;
}

.friendly-inline-control {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.friendly-inline-control input {
  width: 6.2rem !important;
  min-height: 2.35rem;
  padding: 0.45rem 0.7rem !important;
  border-radius: 14px !important;
  text-align: center;
}

.friendly-inline-control span {
  padding-right: 0.65rem;
  color: #d4d4d8;
  font-size: 0.92rem;
  font-weight: 550;
  text-transform: none;
  letter-spacing: 0;
}

.friendly-switch-card {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.friendly-checkline {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  margin: 0 !important;
  color: #f4f4f5;
  font-size: 0.92rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.friendly-checkline input {
  width: 1.05rem !important;
  height: 1.05rem !important;
  margin: 0;
  accent-color: #22c55e;
}

.payment-settings-grid--soft {
  grid-template-columns: minmax(13rem, 0.34fr) minmax(0, 1fr);
}

.payment-settings-grid--single {
  grid-template-columns: 1fr;
}

.payment-form-help--simple {
  border-radius: 18px;
  align-items: center;
}

.guide-toc {
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

.guide-toc a {
  border-radius: 12px;
  padding: 0.42rem 0.55rem;
}

.guide-block {
  scroll-margin-top: 1.1rem;
}

.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.payment-action-form {
  margin: 0;
}

.payment-action-cell .mini,
.mini {
  min-height: 2.25rem !important;
  padding: 0.48rem 0.72rem !important;
  border-radius: 14px !important;
  font-size: 0.82rem !important;
  line-height: 1.1 !important;
}

.danger-mini {
  background: rgba(255, 107, 138, 0.11) !important;
  color: #fecdd3 !important;
  border: 1px solid rgba(255, 107, 138, 0.22) !important;
}

.danger-mini:hover {
  background: rgba(255, 107, 138, 0.17) !important;
}

.rich-preview-holder {
  max-height: 560px;
  overflow: auto;
  border-radius: 0 0 18px 18px;
  background: rgba(18, 18, 20, 0.72) !important;
  scrollbar-width: thin;
}

.rich-preview.rich-preview--telegram {
  pointer-events: auto;
}

.iphone-preview-device {
  max-width: 344px !important;
  height: min(560px, calc(100vh - 150px)) !important;
  max-height: 560px !important;
  padding: 10px !important;
  border-radius: 38px !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -2px 8px rgba(0, 0, 0, 0.45),
    0 16px 34px rgba(0, 0, 0, 0.38) !important;
}

.iphone-preview-island {
  top: 17px !important;
  width: 92px !important;
  height: 27px !important;
}

.iphone-preview-screen-rim {
  border-radius: 30px !important;
}

.iphone-preview-device .tg-preview-statusbar {
  padding-top: 29px !important;
  min-height: 47px !important;
}

.tg-preview-chat {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: auto !important;
  scrollbar-width: thin;
}

.tg-preview-avatar {
  width: 32px !important;
  height: 32px !important;
  font-size: 12px !important;
}

.tg-preview-body {
  font-size: 13.5px !important;
}

.tg-preview-statusbar {
  background: #17212b !important;
  color: #8ea4b8 !important;
}

.iphone-preview-device .tg-preview-statusbar::before {
  content: "‹ Telegram" !important;
  color: #62a7ee !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  font-size: 11px !important;
}

.tg-preview-appbar {
  min-height: 52px !important;
  padding: 7px 14px 9px !important;
  background: #17212b !important;
}

.tg-preview-appbar-title {
  color: #8ea4b8 !important;
  font-size: 11px !important;
  letter-spacing: 0 !important;
}

.tg-preview-appbar-sub {
  color: #f8fafc !important;
  font-size: 14px !important;
}

.tg-preview-inline-wrap {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.tg-preview-keyboard-hint {
  display: none !important;
}

.tg-preview-inline-row {
  margin-bottom: 1px !important;
}

.tg-preview-inline-btn {
  min-height: 33px;
  padding: 7px 10px !important;
  border-radius: 7px !important;
  color: #5fb2f2 !important;
  background: rgba(41, 66, 87, 0.98) !important;
  border: 0 !important;
}

.tg-preview-reply-wrap {
  padding: 8px 7px calc(8px + env(safe-area-inset-bottom)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #17212b !important;
}

.tg-preview-reply-row {
  gap: 6px !important;
  margin-bottom: 6px !important;
}

.tg-preview-reply-btn {
  min-height: 36px;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  color: #f3f6f8 !important;
  background: #243447 !important;
  border: 0 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.26) !important;
}

.login-body {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(7, 8, 10, 0.76), rgba(7, 8, 10, 0.34)),
    url("/static/backbackbot.png") center / cover no-repeat !important;
}

.login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(34, 197, 94, 0.16), transparent 24rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.42));
}

.login-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: rgba(17, 18, 20, 0.76) !important;
  backdrop-filter: blur(22px);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38) !important;
}

@media (max-width: 760px) {
  .payment-settings-grid--soft {
    grid-template-columns: 1fr;
  }

  .iphone-preview-device {
    max-width: min(318px, calc(100vw - 42px)) !important;
    height: min(460px, calc(100vh - 170px)) !important;
  }

  .login-body {
    background-position: center top !important;
  }
}

@media (max-width: 1180px) {
  .operator-workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .operator-workflow {
    grid-template-columns: 1fr;
  }

  .operator-action-card {
    min-height: 8.4rem;
  }

  .section-jumpbar {
    border-radius: 18px;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
  }

  .section-jumpbar a {
    min-height: 2.2rem;
    font-size: 0.82rem;
  }

  .operator-help-card {
    grid-template-columns: 1fr;
  }

  .operator-help-card.compact {
    grid-template-columns: 1fr;
  }

  .bento-acc-head {
    min-height: 4.2rem;
  }
}
