:root {
  --bg-0: #010403;
  --bg-1: #03100a;
  --bg-2: #062015;
  --bg-vignette: rgba(0, 5, 3, 0.82);
  --bg-grid: rgba(109, 255, 175, 0.028);
  --line-soft: rgba(126, 255, 190, 0.13);
  --line-mid: rgba(126, 255, 190, 0.34);
  --line-hard: rgba(126, 255, 190, 0.68);
  --accent: #8affc8;
  --accent-strong: #1fc778;
  --accent-cyan: #50ff94;
  --accent-cyan-soft: rgba(80, 255, 148, 0.32);
  --text-main: #e9fff4;
  --text-soft: #a9d9c1;
  --text-dim: #70a68b;
  --warn: #dcf87e;
  --danger: #ff9e9e;
  --panel: rgba(4, 18, 12, 0.74);
  --panel-strong: rgba(6, 25, 16, 0.9);
  --shadow-main: 0 28px 72px rgba(0, 0, 0, 0.62);
  --shadow-glow: 0 18px 44px rgba(29, 202, 123, 0.12);
  --shadow-inset: inset 0 1px 0 rgba(192, 255, 220, 0.08), inset 0 0 0 1px rgba(126, 255, 190, 0.035);
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 9px;
  --radius-sm: 6px;
  --glow-primary: 0 0 8px rgba(80, 255, 148, 0.45), 0 0 22px rgba(80, 255, 148, 0.22), 0 0 44px rgba(80, 255, 148, 0.10);
  --glow-primary-intense: 0 0 10px rgba(80, 255, 148, 0.7), 0 0 28px rgba(80, 255, 148, 0.38), 0 0 56px rgba(80, 255, 148, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --glow-btn-rest: 0 0 6px rgba(80, 255, 148, 0.28), 0 0 18px rgba(80, 255, 148, 0.12);
  --glow-inset-card: inset 0 0 60px rgba(80, 255, 148, 0.04), inset 0 1px 0 rgba(192, 255, 220, 0.09);
  --glass-bg: rgba(4, 18, 12, 0.72);
  --glass-blur: blur(14px) saturate(180%);
  --phosphor-text: 0 0 8px rgba(80, 255, 148, 0.32), 0 0 20px rgba(80, 255, 148, 0.12);
  --transition-spring: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 240ms ease, border-color 240ms ease;
  /* Spacing scale (use for new components; existing rules migrate gradually). */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  /* Type scale. */
  --fs-xs: 0.72rem;
  --fs-sm: 0.84rem;
  --fs-base: 0.95rem;
  --fs-md: 1.05rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.6rem;
  --fs-2xl: 2.1rem;
  /* Calm neutral dashboard palette (admin work surfaces). */
  --admin-bg: #090d0b;
  --admin-panel: #0e1512;
  --admin-panel-raised: #121b16;
  --admin-border: rgba(150, 196, 172, 0.12);
  --admin-border-strong: rgba(150, 196, 172, 0.22);
  --admin-hover: rgba(150, 196, 172, 0.06);
  --admin-active: rgba(80, 255, 148, 0.1);
  /* Font-weight scale (new components; existing rules migrate gradually). */
  --fw-regular: 500;
  --fw-medium: 600;
  --fw-semibold: 700;
  --fw-bold: 800;
  --fw-heavy: 900;
  /* Motion durations. */
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 280ms;
  /* Status accent colors (shared by badges/banners). */
  --status-ok: #6dffb0;
  --status-ok-soft: rgba(109, 255, 175, 0.14);
  --status-warn-soft: rgba(220, 248, 126, 0.16);
  --status-danger-soft: rgba(255, 122, 122, 0.16);
  --status-info: #7cc6ff;
  --status-info-soft: rgba(124, 198, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  color: var(--text-main);
  font-family: "Manrope", "Segoe UI", sans-serif;
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 255, 154, 0.84) rgba(4, 22, 15, 0.78);
}

body {
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-0);
  background-image:
    radial-gradient(72% 58% at 8% -10%, rgba(57, 184, 118, 0.14), transparent 70%),
    radial-gradient(68% 52% at 96% 0%, rgba(24, 119, 74, 0.18), transparent 72%),
    linear-gradient(120deg, rgba(130, 255, 193, 0.028) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 44%, var(--bg-0) 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(6, 28, 18, 0.82), rgba(3, 14, 9, 0.9));
  border-left: 1px solid rgba(108, 255, 174, 0.11);
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(3, 15, 10, 0.94);
  background: linear-gradient(180deg, rgba(41, 188, 120, 0.95), rgba(24, 132, 83, 0.95));
  box-shadow: inset 0 0 0 1px rgba(136, 255, 198, 0.18), 0 0 16px rgba(88, 255, 161, 0.25);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(61, 225, 143, 0.98), rgba(28, 149, 94, 0.98));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at center, transparent 42%, var(--bg-vignette) 100%);
}

#matrixCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  opacity: 0.22;
  pointer-events: none;
}

.scanlines,
.noise,
.matrix-dimmer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
}

.scanlines {
  z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(10, 255, 141, 0.03) 0,
    rgba(10, 255, 141, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.12;
}

.noise {
  z-index: 1;
  background-image: radial-gradient(rgba(122, 255, 173, 0.12) 0.35px, transparent 0.35px);
  background-size: 4px 4px;
  opacity: 0.018;
}

.matrix-dimmer {
  z-index: 3;
  background: radial-gradient(
    ellipse at center,
    rgba(1, 7, 4, 0.72) 0%,
    rgba(1, 7, 4, 0.42) 44%,
    rgba(1, 7, 4, 0.12) 100%
  );
}

.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  width: 0;
  z-index: 30;
  background: rgba(89, 214, 139, 0.55);
  box-shadow: none;
  transition: width 150ms linear;
}

.fx-off #matrixCanvas,
.fx-off .scanlines,
.fx-off .noise,
.fx-off .matrix-dimmer,
.fx-off .top-progress {
  display: none;
}

.fx-off .topbar,
.fx-off .game-card,
.fx-off .guide-panel,
.fx-off .landing-card,
.fx-off .control-bar {
  backdrop-filter: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 2.8vw, 42px);
  border-bottom: 1px solid rgba(109, 255, 175, 0.18);
  background: rgba(2, 12, 8, 0.7);
  backdrop-filter: var(--glass-blur);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(80, 255, 148, 0) 24%, rgba(80, 255, 148, 0.34) 50%, rgba(96, 255, 161, 0) 76%, transparent 100%);
  background-size: 200% 100%;
  opacity: 0.46;
  animation: topbarBorderSweep 13s ease-in-out infinite;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(121, 255, 195, 0.32));
}

.brand-text {
  font-family: "Russo One", "Manrope", sans-serif;
  letter-spacing: 0.09em;
  font-size: 0.95rem;
}

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.session-btn {
  border: 1px solid rgba(109, 255, 175, 0.44);
  border-radius: 999px;
  background: rgba(7, 31, 23, 0.86);
  color: #dfffe9;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 11px;
  cursor: pointer;
  transition: 180ms ease;
}

.session-btn:hover {
  border-color: rgba(109, 255, 175, 0.88);
  background: rgba(11, 38, 28, 0.92);
  box-shadow: 0 8px 22px rgba(88, 255, 161, 0.2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(7, 28, 18, 0.84);
  color: var(--text-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(121, 255, 195, 0.8);
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(7, 29, 18, 0.85);
  box-shadow: inset 0 0 22px rgba(98, 255, 172, 0.08);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  min-width: 48px;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: 220ms ease;
}

.lang-btn:hover {
  color: var(--text-main);
  text-shadow: 0 0 12px rgba(96, 255, 161, 0.52);
}

.lang-btn.active {
  background: linear-gradient(120deg, rgba(18, 124, 78, 0.96), rgba(76, 242, 145, 0.44));
  color: #effff8;
  box-shadow: 0 0 18px rgba(88, 255, 161, 0.28);
}

.app-shell {
  position: relative;
  z-index: 4;
  width: min(1360px, 100% - 34px);
  margin: 0 auto;
  padding: clamp(30px, 4vw, 54px) 0 48px;
}

.hero {
  position: relative;
  margin-bottom: 26px;
  padding: 8px 2px 2px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40px -20px auto;
  height: 200px;
  pointer-events: none;
  background: radial-gradient(circle at 15% 50%, rgba(31, 187, 121, 0.2), transparent 68%);
  filter: blur(22px);
  z-index: -1;
}

.kicker {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.73rem;
  font-family: "JetBrains Mono", monospace;
  text-shadow: 0 0 12px rgba(80, 255, 148, 0.4);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Russo One", "Manrope", sans-serif;
  letter-spacing: 0.02em;
}

h1 {
  margin-top: 10px;
  font-size: clamp(1.88rem, 4.2vw, 3.15rem);
  line-height: 1.08;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 1.02rem;
}

.hero-console {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(103, 255, 164, 0.32);
  background: rgba(5, 20, 13, 0.84);
  color: #b7e9d3;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
}

.console-prompt {
  color: var(--accent-cyan);
}

.console-cursor {
  width: 8px;
  height: 1.1em;
  background: var(--accent-cyan);
  display: inline-block;
  animation: blink 1s steps(1, end) infinite;
}

.hero-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--text-dim);
  background: rgba(5, 18, 12, 0.8);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.control-bar {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1.4fr minmax(150px, 0.8fr) minmax(170px, 0.85fr);
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 10px;
  background: rgba(6, 23, 15, 0.72);
  box-shadow: var(--shadow-glow);
  backdrop-filter: none;
}

.control-input,
.control-select {
  width: 100%;
  border: 1px solid rgba(102, 255, 172, 0.18);
  border-radius: 10px;
  background: rgba(5, 20, 13, 0.82);
  color: var(--text-main);
  font-family: "Manrope", sans-serif;
  font-size: 0.9rem;
  padding: 10px 12px;
  outline: none;
  transition: 180ms ease;
}

.control-input::placeholder {
  color: rgba(80, 255, 148, 0.35);
}

.control-input:focus,
.control-select:focus {
  border-color: rgba(80, 255, 148, 0.72);
  box-shadow: 0 0 0 3px rgba(80, 255, 148, 0.14), 0 0 12px rgba(80, 255, 148, 0.2), inset 0 0 0 1px rgba(80, 255, 148, 0.1);
  background: rgba(2, 12, 8, 0.88);
  caret-color: var(--accent-cyan);
}

.control-select.is-native-hidden {
  display: none;
}

.ticket-filter-select {
  position: relative;
  z-index: 35;
  min-width: 0;
}

.ticket-filter-select.is-open {
  z-index: 80;
}

.ticket-filter-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(102, 255, 172, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(5, 22, 14, 0.94), rgba(2, 12, 8, 0.9));
  color: var(--text-main);
  font: inherit;
  font-size: 0.9rem;
  padding: 9px 12px;
  cursor: pointer;
  transition: 180ms ease;
}

.ticket-filter-select.is-open .ticket-filter-trigger,
.ticket-filter-trigger:hover {
  border-color: rgba(80, 255, 148, 0.72);
  box-shadow: 0 0 0 3px rgba(80, 255, 148, 0.1), 0 0 14px rgba(80, 255, 148, 0.16);
}

.ticket-filter-chevron {
  color: var(--text-soft);
  font-family: "JetBrains Mono", monospace;
}

.ticket-filter-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid rgba(109, 255, 175, 0.34);
  border-radius: 10px;
  background: rgba(3, 14, 9, 0.99);
  padding: 6px;
  display: grid;
  gap: 3px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(109, 255, 175, 0.06);
}

.ticket-filter-option {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #effff7;
  font: inherit;
  text-align: left;
  padding: 7px 9px;
  cursor: pointer;
}

.ticket-filter-option:hover,
.ticket-filter-option.is-active {
  background: rgba(24, 89, 56, 0.74);
  color: #effff7;
}

/* Searchable variant of the custom select (filter box + scrollable list). */
.searchable-select-label.is-placeholder {
  color: rgba(80, 255, 148, 0.45);
}

.searchable-select-menu {
  display: block;
  padding: 8px;
}

.searchable-select-search {
  width: 100%;
  margin-bottom: 8px;
}

.searchable-select-list {
  display: grid;
  gap: 3px;
  max-height: 320px;
  overflow-y: auto;
}

.searchable-select-empty {
  padding: 10px 9px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Product / Developer scope toggle in the source form. */
.product-updates-scope-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(102, 255, 172, 0.18);
  border-radius: 12px;
  background: rgba(5, 20, 13, 0.6);
  width: fit-content;
}

.pu-scope-btn {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.88rem;
  padding: 7px 18px;
  cursor: pointer;
  transition: 160ms ease;
}

.pu-scope-btn:hover {
  color: var(--text-main);
}

.pu-scope-btn.is-active {
  background: linear-gradient(180deg, var(--accent), rgba(31, 199, 120, 0.62));
  color: #042012;
  font-weight: 600;
}

.control-input:focus {
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 18px,
    rgba(80, 255, 148, 0.025) 18px,
    rgba(80, 255, 148, 0.025) 19px
  );
}

.landing-card {
  border: 1px solid rgba(126, 255, 190, 0.22);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 3.2vw, 36px);
  background: var(--glass-bg);
  box-shadow: var(--shadow-main), 0 0 0 1px rgba(80, 255, 148, 0.06), inset 0 0 80px rgba(80, 255, 148, 0.04), inset 0 1px 0 rgba(192, 255, 220, 0.1);
  backdrop-filter: var(--glass-blur);
}

.landing-card p {
  margin: 12px 0 0;
  color: var(--text-soft);
}

#landingView {
  display: grid;
  align-items: center;
  min-height: min(76vh, 720px);
}

.coming-card {
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  max-width: 980px;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(80, 255, 148, 0.65), rgba(80, 255, 148, 0.65)) top left / 24px 1px no-repeat,
    linear-gradient(rgba(80, 255, 148, 0.65), rgba(80, 255, 148, 0.65)) top left / 1px 24px no-repeat,
    linear-gradient(rgba(80, 255, 148, 0.65), rgba(80, 255, 148, 0.65)) top right / 24px 1px no-repeat,
    linear-gradient(rgba(80, 255, 148, 0.65), rgba(80, 255, 148, 0.65)) top right / 1px 24px no-repeat,
    linear-gradient(rgba(80, 255, 148, 0.65), rgba(80, 255, 148, 0.65)) bottom left / 24px 1px no-repeat,
    linear-gradient(rgba(80, 255, 148, 0.65), rgba(80, 255, 148, 0.65)) bottom left / 1px 24px no-repeat,
    linear-gradient(rgba(80, 255, 148, 0.65), rgba(80, 255, 148, 0.65)) bottom right / 24px 1px no-repeat,
    linear-gradient(rgba(80, 255, 148, 0.65), rgba(80, 255, 148, 0.65)) bottom right / 1px 24px no-repeat,
    linear-gradient(180deg, rgba(7, 28, 19, 0.82), rgba(5, 17, 12, 0.9)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 26px,
      rgba(122, 255, 186, 0.015) 26px,
      rgba(122, 255, 186, 0.015) 27px
    );
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.52),
    0 10px 32px rgba(35, 174, 116, 0.16),
    inset 0 0 0 1px rgba(129, 255, 198, 0.1),
    0 0 80px rgba(80, 255, 148, 0.06);
}

.coming-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--spot-x) var(--spot-y),
    rgba(92, 255, 164, 0.17) 0%,
    rgba(92, 255, 164, 0.07) 22%,
    transparent 70%
  );
  opacity: 0.44;
  transition: opacity 220ms ease;
}

.coming-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 18%, rgba(121, 255, 193, 0.11) 48%, transparent 82%),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 64px,
      rgba(121, 255, 193, 0.025) 64px,
      rgba(121, 255, 193, 0.025) 65px
    );
  opacity: 0.26;
  transform: translateX(-18%);
  animation: comingScan 10s linear infinite;
}

.coming-card.is-hovering::before {
  opacity: 0.58;
}

.coming-kicker {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-family: "JetBrains Mono", monospace;
}

.coming-title {
  position: relative;
  display: inline-block;
  margin-top: 12px;
  font-size: clamp(1.95rem, 4.9vw, 3.65rem);
  line-height: 1.02;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #edfff6;
  text-shadow:
    0 0 16px rgba(120, 255, 191, 0.18),
    0 0 36px rgba(84, 234, 152, 0.08);
  animation: comingGlow 6.8s ease-in-out infinite;
  cursor: default;
}

.coming-title::before,
.coming-title::after {
  content: attr(data-glitch);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.coming-title.is-glitching::before {
  opacity: 0.75;
  color: rgba(131, 255, 201, 0.9);
  text-shadow: 2px 0 0 rgba(36, 209, 133, 0.45);
  animation: headingGlitchA 880ms steps(2, end) 1;
}

.coming-title.is-glitching::after {
  opacity: 0.64;
  color: rgba(79, 255, 173, 0.85);
  text-shadow: -2px 0 0 rgba(121, 255, 195, 0.4);
  animation: headingGlitchB 820ms steps(2, end) 1;
}

@media (hover: hover) {
  .coming-title:hover::before,
  .coming-title:focus-visible::before {
    opacity: 0.7;
    color: rgba(131, 255, 201, 0.9);
    text-shadow: 2px 0 0 rgba(36, 209, 133, 0.45);
    animation: headingGlitchA 760ms steps(2, end) 1;
  }

  .coming-title:hover::after,
  .coming-title:focus-visible::after {
    opacity: 0.58;
    color: rgba(79, 255, 173, 0.85);
    text-shadow: -2px 0 0 rgba(121, 255, 195, 0.4);
    animation: headingGlitchB 680ms steps(2, end) 1;
  }
}

.coming-subtitle {
  margin: 14px 0 0;
  max-width: 760px;
  color: #c8f1df;
  font-size: clamp(0.98rem, 1.9vw, 1.14rem);
  line-height: 1.5;
}

.coming-status-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.coming-status {
  border: 1px solid rgba(121, 255, 193, 0.24);
  border-radius: 12px;
  background: rgba(7, 25, 17, 0.72);
  backdrop-filter: blur(8px);
  padding: 10px 12px;
  min-height: 76px;
  box-shadow: inset 0 0 0 1px rgba(121, 255, 193, 0.06);
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.coming-status:hover {
  border-color: rgba(121, 255, 193, 0.72);
  transform: translateY(-2px);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.36),
    0 0 20px rgba(80, 255, 148, 0.14),
    0 0 0 1px rgba(121, 255, 193, 0.18);
}

.coming-status-label {
  display: block;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}

.coming-status-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(80, 255, 148, 0.8);
  margin-right: 7px;
  vertical-align: middle;
  animation: dotPulse 2s ease-in-out infinite;
}

.coming-status-value {
  display: block;
  margin-top: 7px;
  color: #e7fff3;
  font-size: clamp(0.96rem, 1.8vw, 1.12rem);
  letter-spacing: 0.05em;
  font-family: "JetBrains Mono", monospace;
}

.coming-footnote {
  margin-top: 16px;
  color: #9bcab5;
  font-size: 0.9rem;
  line-height: 1.45;
}

.coming-form {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(121, 255, 193, 0.16);
}

.coming-form-title {
  margin: 0;
  color: #dfffee;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}

.coming-form-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.coming-email-input {
  min-height: 44px;
}

.coming-submit-btn {
  min-width: 168px;
  min-height: 44px;
}

.coming-form-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #88b9a2;
}

.coming-form-message {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(121, 255, 193, 0.26);
  background: rgba(7, 27, 18, 0.72);
  color: #d6ffeb;
  font-size: 0.86rem;
  line-height: 1.35;
}

.coming-form-message.is-success {
  border-color: rgba(112, 255, 180, 0.56);
  background: rgba(8, 36, 22, 0.82);
  color: #e8fff3;
}

.coming-form-message.is-error {
  border-color: rgba(255, 152, 152, 0.44);
  background: rgba(34, 13, 13, 0.82);
  color: #ffd8d8;
}

.admin-auth {
  border: 1px solid rgba(126, 255, 190, 0.22);
  border-radius: var(--radius-xl);
  padding: clamp(18px, 3vw, 28px);
  background: rgba(5, 20, 13, 0.78);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-main), var(--shadow-glow), 0 0 0 1px rgba(80, 255, 148, 0.06), inset 0 1px 0 rgba(192, 255, 220, 0.07);
  max-width: 560px;
  margin: 0 auto;
}

.admin-auth h2 {
  margin: 0;
  font-size: clamp(1.26rem, 2.2vw, 1.74rem);
}

.admin-auth-subtitle {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.admin-login-form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.password-field-wrap {
  position: relative;
  display: block;
}

.password-field-input {
  padding-right: 98px;
}

.password-visibility-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 1px solid rgba(102, 255, 172, 0.25);
  background: rgba(10, 34, 22, 0.9);
  color: var(--text-main);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.password-visibility-btn:hover {
  border-color: rgba(102, 255, 172, 0.45);
  box-shadow: 0 0 0 1px rgba(102, 255, 172, 0.16);
}

.password-match-hint {
  margin: -2px 0 0;
  color: #ffcaca;
  font-size: 0.84rem;
}

.password-checklist {
  margin: 2px 0 2px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.password-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #91bca7;
  font-size: 0.82rem;
  line-height: 1.25;
}

.password-rule-icon {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(118, 255, 186, 0.3);
  background: rgba(4, 19, 12, 0.84);
  position: relative;
}

.password-rule-icon::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: rgba(118, 255, 186, 0.18);
}

.password-rule.is-passed {
  color: #dcffee;
}

.password-rule.is-passed .password-rule-icon {
  border-color: rgba(122, 255, 191, 0.86);
  background: rgba(17, 77, 49, 0.86);
  box-shadow: 0 0 0 1px rgba(121, 255, 192, 0.24);
}

.password-rule.is-passed .password-rule-icon::after {
  inset: auto;
  width: auto;
  height: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -56%);
  content: "✓";
  background: none;
  color: #e8fff3;
  font-size: 0.65rem;
  font-weight: 700;
}

.password-rule.is-failed {
  color: #ffcfcf;
}

.password-rule.is-failed .password-rule-icon {
  border-color: rgba(255, 153, 153, 0.74);
  background: rgba(52, 18, 18, 0.82);
}

.control-input.is-invalid {
  border-color: rgba(255, 150, 150, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 140, 140, 0.14);
}

.control-input.is-valid {
  border-color: rgba(112, 255, 180, 0.5);
}

.admin-login-btn {
  justify-self: start;
  min-width: 132px;
}

.admin-auth-error {
  margin: 10px 0 0;
  color: #ffd2d2;
  font-size: 0.88rem;
}

.admin-bootstrap-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(109, 255, 175, 0.2);
}

.admin-bootstrap-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-bootstrap-panel p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.admin-users-card {
  margin-top: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  padding: 16px;
  background: rgba(6, 23, 15, 0.72);
  box-shadow: var(--shadow-main);
}

.admin-users-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.admin-users-head p {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.admin-invite-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.45fr) minmax(180px, 0.65fr) auto;
  gap: 10px;
}

.admin-invite-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(109, 255, 175, 0.34);
  background: rgba(6, 23, 15, 0.78);
  color: var(--text-main);
  font-size: 0.9rem;
  word-break: break-all;
}

.admin-users-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 12px;
  background: rgba(5, 22, 14, 0.72);
}

.admin-user-main {
  min-width: 0;
}

.admin-user-login {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
}

.admin-user-meta {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.admin-user-actions {
  display: inline-flex;
  gap: 8px;
}

.admin-small-btn {
  border: 1px solid rgba(109, 255, 175, 0.46);
  border-radius: 10px;
  background: rgba(7, 31, 23, 0.86);
  color: #dfffe9;
  font: inherit;
  font-size: 0.76rem;
  padding: 7px 10px;
  cursor: pointer;
  transition: 180ms ease;
}

.admin-small-btn:hover {
  border-color: rgba(109, 255, 175, 0.88);
  background: rgba(11, 38, 28, 0.92);
}

.admin-small-btn.danger {
  border-color: rgba(255, 130, 130, 0.44);
  color: #ffd3d3;
}

.admin-small-btn.danger:hover {
  border-color: rgba(255, 140, 140, 0.82);
  background: rgba(42, 18, 18, 0.9);
}

.admin-route-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid rgba(109, 255, 175, 0.24);
  border-radius: 12px;
  background: rgba(4, 20, 13, 0.78);
}

.admin-route-tab {
  text-decoration: none;
  color: var(--text-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 12px;
  transition: 170ms ease;
}

.admin-route-tab:hover {
  color: #f0fff8;
  border-color: rgba(121, 255, 193, 0.34);
}

.admin-route-tab.active {
  color: #ebfff5;
  border-color: rgba(109, 255, 175, 0.66);
  background: rgba(17, 71, 45, 0.82);
  box-shadow: inset 0 0 0 1px rgba(136, 255, 199, 0.16);
}

.admin-tickets {
  margin-top: 4px;
}

.admin-broadcast {
  margin-top: 18px;
}

.admin-shop {
  margin-top: 18px;
}

.shop-admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(126, 255, 190, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(7, 31, 20, 0.78), rgba(3, 13, 9, 0.86));
  box-shadow: var(--shadow-main), var(--shadow-inset);
}

.shop-admin-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.shop-admin-head h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: var(--phosphor-text);
}

.shop-admin-head p {
  margin: 10px 0 0;
  color: var(--text-soft);
  max-width: 760px;
}

.shop-admin-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shop-admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(126, 255, 190, 0.22);
  border-radius: var(--radius-md);
  background: rgba(5, 22, 14, 0.78);
  color: var(--accent);
  padding: 8px 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shop-admin-status.is-error {
  border-color: rgba(255, 158, 158, 0.42);
  color: var(--danger);
  background: rgba(42, 9, 9, 0.72);
}

.shop-admin-status.is-warn {
  border-color: rgba(220, 248, 126, 0.38);
  color: var(--warn);
}

.shop-admin-clock {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(126, 255, 190, 0.28);
  border-radius: var(--radius-md);
  background: rgba(5, 22, 14, 0.78);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(126, 255, 190, 0.08);
}

.shop-admin-clock::before {
  content: "МСК";
  align-self: center;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
}

.shop-admin-clock-time {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.shop-admin-clock-date {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

.shop-admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.shop-admin-tab {
  min-height: 42px;
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: 8px;
  background: rgba(3, 18, 12, 0.72);
  color: var(--text-soft);
  padding: 9px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-spring);
}

.shop-admin-tab:hover,
.shop-admin-tab.active {
  color: var(--text-main);
  border-color: rgba(109, 255, 175, 0.58);
  background: rgba(17, 71, 45, 0.82);
  box-shadow: var(--glow-btn-rest);
}

.shop-admin-notice {
  margin-top: 14px;
  border: 1px solid rgba(126, 255, 190, 0.18);
  border-radius: 8px;
  background: rgba(33, 9, 9, 0.76);
  color: var(--danger);
  padding: 12px 14px;
  font-weight: 800;
}

.shop-admin-notice.is-success {
  background: rgba(5, 30, 18, 0.74);
  color: var(--accent);
}

.shop-admin-body {
  margin-top: 14px;
}

.admin-product-updates {
  margin-top: 18px;
}

.product-updates-head {
  align-items: stretch;
}

.product-updates-toolbar {
  min-width: min(640px, 100%);
  display: grid;
  gap: 10px;
  align-content: end;
}

.product-updates-state-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.product-updates-state-card {
  min-width: 0;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: rgba(3, 13, 9, 0.62);
  box-shadow: var(--shadow-inset);
  padding: 9px 10px;
}

.product-updates-state-card > span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-updates-state-card .shop-admin-status {
  display: block;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  letter-spacing: 0;
  text-transform: none;
}

.product-updates-state-card .shop-admin-status.is-warn {
  color: var(--warn);
}

.product-updates-state-card .shop-admin-status.is-error {
  color: var(--danger);
}

.product-updates-toolbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.product-updates-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(520px, 1.05fr);
  align-items: start;
  gap: 14px;
  margin-top: 14px;
}

.product-updates-history {
  margin-top: 14px;
}

.product-updates-panel {
  min-width: 0;
  align-self: start;
}

.product-updates-step-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 6px;
  border: 1px solid rgba(126, 255, 190, 0.18);
  border-radius: 999px;
  background: rgba(8, 29, 19, 0.58);
  color: var(--accent);
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-updates-muted {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.product-updates-post-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(640px, 70vh);
  overflow: auto;
  padding-right: 4px;
  margin-top: 12px;
}

.product-updates-source-form {
  margin-top: 12px;
  border: 1px solid rgba(126, 255, 190, 0.16);
  border-radius: 8px;
  background: rgba(5, 22, 14, 0.62);
  box-shadow: var(--shadow-inset);
  padding: 12px;
}

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

.product-updates-field-full {
  grid-column: 1 / -1;
}

.product-updates-selected-source {
  grid-column: 1 / -1;
}

.product-updates-source-form label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-weight: 800;
}

.product-updates-source-form textarea {
  min-height: 72px;
  resize: vertical;
}

.product-updates-source-form textarea[rows="3"] {
  min-height: 88px;
}

.product-updates-advanced {
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: 8px;
  background: rgba(1, 9, 6, 0.3);
  padding: 0;
}

.product-updates-advanced summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 900;
  padding: 9px 10px;
  user-select: none;
}

.product-updates-advanced .product-updates-form-grid {
  padding: 0 10px 10px;
}

.product-updates-check {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: 8px;
  background: rgba(1, 9, 6, 0.34);
  padding: 8px 10px;
}

.product-updates-check input {
  width: auto;
}

.product-updates-chat-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  margin-top: 10px;
}

.product-updates-chat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(126, 255, 190, 0.14);
  border-radius: 8px;
  background: rgba(1, 9, 6, 0.62);
  padding: 10px;
}

.product-updates-source-compact,
.product-update-post,
.product-updates-preview,
.product-updates-empty {
  border: 1px solid rgba(126, 255, 190, 0.16);
  border-radius: 8px;
  background: rgba(5, 22, 14, 0.62);
  box-shadow: var(--shadow-inset);
}

.product-updates-source-compact,
.product-update-post,
.product-updates-preview,
.product-updates-empty {
  padding: 12px;
}

.product-update-post {
  padding: 0;
  overflow: visible;
}

.product-updates-source-compact {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.product-updates-source-compact.muted {
  color: var(--text-soft);
}

.product-updates-source-compact.inactive {
  opacity: 0.58;
  border-color: rgba(150, 196, 172, 0.12);
}

.product-updates-source-compact-main,
.product-update-post-head,
.product-update-post-meta,
.product-updates-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-updates-source-compact-tags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.product-update-source-meta,
.product-update-post-meta {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.product-updates-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--text-main);
  font-size: 0.88rem;
}

.product-update-source-map {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.product-update-source-row {
  display: grid;
  gap: 5px;
  align-items: start;
}

.product-update-source-row > span {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-update-source-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.product-updates-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  border: 1px solid rgba(126, 255, 190, 0.15);
  border-radius: 999px;
  background: rgba(1, 9, 6, 0.44);
  color: var(--text-main);
  padding: 3px 8px;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.73rem;
  overflow-wrap: anywhere;
}

.product-updates-chip.muted {
  color: var(--text-dim);
}

.product-update-source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.product-updates-form {
  display: grid;
  gap: 10px;
}

.product-updates-form label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-weight: 800;
}

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

.product-updates-textarea {
  min-height: 150px;
  resize: vertical;
}

.product-updates-localized-fields {
  align-items: stretch;
}

.product-updates-localized-textarea {
  min-height: 112px;
}

.product-updates-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-updates-preview {
  min-height: 112px;
  color: var(--text-soft);
}

.product-updates-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.product-updates-preview-wide {
  grid-column: 1 / -1;
}

.product-updates-preview-grid h4 {
  margin: 0 0 7px;
  color: var(--text-main);
  font-size: 0.9rem;
}

.product-updates-preview-grid pre {
  margin: 0;
  min-height: 130px;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: 8px;
  background: rgba(1, 9, 6, 0.72);
  color: var(--text-main);
  padding: 10px;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
}

.product-update-post-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.product-update-post-title > span {
  color: var(--accent);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 900;
}

.product-update-post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 10px 12px;
}

.product-update-post-summary {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.product-update-post-summary:hover {
  color: var(--accent);
}

.product-update-post-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.product-update-post-line code {
  flex: 0 0 auto;
  color: var(--accent-soft);
  font-family: "JetBrains Mono", Consolas, monospace;
}

.product-update-post-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(760px, 48vw);
}

.product-update-post-snippet {
  min-width: 0;
  color: var(--text-soft);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-update-post-toggle,
.product-update-post-toggle-btn {
  color: var(--accent);
}

.product-update-post-link {
  text-decoration: none;
}

.product-update-post-body {
  border-top: 1px solid rgba(126, 255, 190, 0.14);
  padding: 12px;
  background: rgba(1, 9, 6, 0.18);
}

.product-update-post-edit-grid,
.product-update-post-read-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-update-post-edit-grid label,
.product-update-post-read-grid > div > span {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-weight: 900;
}

.product-update-post-read-grid > div {
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: 8px;
  background: rgba(1, 9, 6, 0.56);
  padding: 10px;
}

.product-update-post-read-grid p {
  margin: 7px 0 0;
  color: var(--text-main);
  line-height: 1.5;
}

.product-update-post-text {
  margin: 10px 0;
  color: var(--text-main);
  line-height: 1.55;
}

.product-update-post-edit {
  width: 100%;
  min-height: 118px;
  max-height: 220px;
  margin: 0;
  border: 1px solid rgba(126, 255, 190, 0.16);
  border-radius: 8px;
  background: rgba(1, 9, 6, 0.72);
  color: var(--text-main);
  padding: 10px;
  resize: vertical;
  font: 0.82rem/1.5 "JetBrains Mono", Consolas, monospace;
}

.product-update-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.product-update-post-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.product-update-post-meta-line > span {
  min-height: 28px;
  border: 1px solid rgba(126, 255, 190, 0.1);
  border-radius: 999px;
  background: rgba(1, 9, 6, 0.36);
  color: var(--text-soft);
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.product-update-post a {
  color: var(--accent);
}

.product-updates-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(126, 255, 190, 0.22);
  border-radius: 999px;
  background: rgba(8, 29, 19, 0.72);
  color: var(--accent);
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-updates-pill.ok,
.product-updates-pill.status-published {
  border-color: rgba(80, 255, 148, 0.44);
  color: var(--accent);
}

.product-updates-pill.warn,
.product-updates-pill.status-failed {
  border-color: rgba(255, 158, 158, 0.4);
  color: var(--danger);
}

.product-updates-pill.status-draft {
  border-color: rgba(220, 248, 126, 0.35);
  color: var(--warn);
}

.product-updates-pill.muted,
.product-updates-pill.status-skipped {
  border-color: rgba(150, 196, 172, 0.14);
  color: var(--text-soft);
}

.product-updates-alert {
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-weight: 800;
}

.product-updates-alert.error {
  border: 1px solid rgba(255, 158, 158, 0.42);
  background: rgba(42, 9, 9, 0.72);
  color: var(--danger);
}

.product-updates-alert.warn {
  border: 1px solid rgba(220, 248, 126, 0.38);
  background: rgba(38, 36, 9, 0.62);
  color: var(--warn);
}

.product-updates-pill.kind {
  border-color: rgba(126, 200, 255, 0.4);
  color: #8fd0ff;
}

.product-updates-pill.translated {
  border-color: rgba(180, 150, 255, 0.4);
  color: #c3b0ff;
}

/* Autopublish switch */
.product-updates-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  color: var(--text-soft);
  font-weight: 800;
  font-size: 0.82rem;
}

.product-updates-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.product-updates-switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--admin-border);
  background: rgba(3, 13, 9, 0.8);
  transition: background 0.18s ease, border-color 0.18s ease;
  flex: 0 0 auto;
}

.product-updates-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-soft);
  transition: transform 0.18s ease, background 0.18s ease;
}

.product-updates-switch input:checked + .product-updates-switch-track {
  background: rgba(40, 120, 80, 0.55);
  border-color: rgba(80, 255, 148, 0.5);
}

.product-updates-switch input:checked + .product-updates-switch-track .product-updates-switch-thumb {
  transform: translateX(16px);
  background: var(--accent);
}

.product-updates-switch input:focus-visible + .product-updates-switch-track {
  box-shadow: 0 0 0 2px rgba(80, 255, 148, 0.4);
}

/* Tabs */
.product-updates-tabs {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.product-updates-tab {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: rgba(3, 13, 9, 0.55);
  color: var(--text-soft);
  padding: 8px 16px;
  font-weight: 900;
  font-size: 0.84rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.product-updates-tab:hover {
  color: var(--accent);
}

.product-updates-tab.is-active {
  color: var(--accent);
  border-color: rgba(80, 255, 148, 0.45);
  background: rgba(8, 29, 19, 0.78);
}

.product-updates-tab-panel {
  margin-top: 14px;
}

/* Metrics strip */
.product-updates-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.product-updates-metrics:empty {
  display: none;
}

.product-updates-metric {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: rgba(3, 13, 9, 0.62);
  box-shadow: var(--shadow-inset);
  padding: 9px 11px;
  min-width: 0;
}

.product-updates-metric > span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-updates-metric > strong {
  color: var(--text-main);
  font-size: 1.1rem;
}

.product-updates-metric.is-danger {
  border-color: rgba(255, 158, 158, 0.4);
}

.product-updates-metric.is-danger > strong {
  color: var(--danger);
}

/* Queue toolbar: filters + search */
.product-updates-queue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.product-updates-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.product-updates-filter {
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  background: rgba(3, 13, 9, 0.5);
  color: var(--text-soft);
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.product-updates-filter:hover {
  color: var(--accent);
}

.product-updates-filter.is-active {
  color: var(--accent);
  border-color: rgba(80, 255, 148, 0.45);
  background: rgba(8, 29, 19, 0.7);
}

.product-updates-search {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 320px;
}

/* Telegram-style preview bubble */
.product-update-post-preview {
  margin-top: 12px;
}

.product-update-post-preview-label,
.product-updates-raw summary {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pu-tg-bubble {
  max-width: 360px;
  border: 1px solid rgba(126, 255, 190, 0.16);
  border-radius: 12px;
  background: rgba(1, 9, 6, 0.78);
  padding: 12px 14px;
}

.pu-tg-title {
  color: var(--text-main);
  font-weight: 900;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.pu-tg-quote {
  position: relative;
  border-left: 3px solid rgba(80, 255, 148, 0.5);
  border-radius: 0;
  background: rgba(8, 29, 19, 0.5);
  padding: 6px 10px;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 0.86rem;
  line-height: 1.5;
}

.pu-tg-flag {
  display: inline-block;
  margin-bottom: 4px;
  border-radius: 4px;
  background: rgba(80, 255, 148, 0.16);
  color: var(--accent);
  padding: 1px 7px;
  font-size: 0.66rem;
  font-weight: 900;
}

.pu-tg-tags {
  color: var(--accent-soft);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.78rem;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.pu-tg-button {
  text-align: center;
  border-radius: 8px;
  background: rgba(8, 29, 19, 0.9);
  border: 1px solid rgba(80, 255, 148, 0.35);
  color: var(--accent);
  padding: 8px;
  font-weight: 900;
  font-size: 0.82rem;
}

/* Raw markup disclosure */
.product-updates-raw {
  margin-top: 12px;
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: 8px;
  background: rgba(1, 9, 6, 0.3);
  padding: 8px 10px;
}

.product-updates-raw summary {
  cursor: pointer;
  margin-bottom: 0;
}

.product-updates-raw pre {
  margin: 10px 0 0;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: 8px;
  background: rgba(1, 9, 6, 0.72);
  color: var(--text-main);
  padding: 10px;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.5;
}

.product-update-post.is-failed {
  border-color: rgba(255, 158, 158, 0.34);
}

@media (max-width: 980px) {
  .product-updates-grid,
  .product-updates-two,
  .product-updates-preview-grid,
  .product-updates-state-grid,
  .product-updates-form-grid,
  .product-updates-source-compact-tags,
  .product-update-post-row,
  .product-update-post-edit-grid,
  .product-update-post-read-grid {
    grid-template-columns: 1fr;
  }

  .product-update-post-controls {
    justify-content: flex-start;
    max-width: none;
  }

  .product-updates-head {
    align-items: stretch;
  }

  .product-updates-toolbar-actions {
    justify-content: stretch;
  }

  .product-updates-toolbar-actions .copy-btn,
  .product-updates-toolbar-actions .open-btn {
    flex: 1 1 180px;
  }

  .product-update-source-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .product-updates-actions .copy-btn,
  .product-updates-actions .open-btn {
    flex: 1 1 180px;
  }
}

.shop-system-panel {
  margin-bottom: 4px;
}

.shop-system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.shop-system-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(126, 255, 190, 0.16);
  border-radius: var(--radius-md);
  background: rgba(5, 22, 14, 0.6);
  padding: 12px 14px;
}

.shop-system-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 0 4px rgba(126, 255, 190, 0.08);
}

.shop-system-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.shop-system-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.shop-system-value {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

.shop-system-detail {
  font-size: 12px;
  color: var(--text-soft);
}

.shop-system-item.is-ok .shop-system-dot {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(109, 255, 175, 0.7), 0 0 0 4px rgba(109, 255, 175, 0.12);
}

.shop-system-item.is-ok {
  border-color: rgba(109, 255, 175, 0.4);
}

.shop-system-item.is-ok .shop-system-value {
  color: var(--accent);
}

.shop-system-item.is-down .shop-system-dot {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 122, 122, 0.7), 0 0 0 4px rgba(255, 122, 122, 0.12);
}

.shop-system-item.is-down {
  border-color: rgba(255, 158, 158, 0.42);
  background: rgba(42, 9, 9, 0.5);
}

.shop-system-item.is-down .shop-system-value {
  color: var(--danger);
}

.shop-system-item.is-warn .shop-system-dot {
  background: var(--warn);
  box-shadow: 0 0 10px rgba(220, 248, 126, 0.6), 0 0 0 4px rgba(220, 248, 126, 0.12);
}

.shop-system-item.is-warn {
  border-color: rgba(220, 248, 126, 0.38);
}

.shop-system-item.is-warn .shop-system-value {
  color: var(--warn);
}

.shop-system-item.is-muted .shop-system-value {
  color: var(--text-soft);
}

/* ---- UI kit: toasts & modal dialogs ---- */
.ui-toast-host {
  position: fixed;
  z-index: 1000;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}

.ui-toast {
  pointer-events: auto;
  border: 1px solid rgba(126, 255, 190, 0.28);
  border-radius: var(--radius-md);
  background: rgba(6, 24, 16, 0.96);
  color: var(--text-main);
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.ui-toast-success {
  border-color: rgba(109, 255, 175, 0.5);
}

.ui-toast-error {
  border-color: rgba(255, 158, 158, 0.5);
  background: rgba(34, 9, 9, 0.96);
}

.ui-toast-warn {
  border-color: rgba(220, 248, 126, 0.5);
}

.ui-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 6, 4, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ui-modal-overlay.is-visible {
  opacity: 1;
}

.ui-modal {
  width: min(440px, 100%);
  border: 1px solid rgba(126, 255, 190, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(7, 22, 15, 0.98);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  padding: clamp(18px, 3vw, 26px);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.ui-modal-overlay.is-visible .ui-modal {
  transform: translateY(0) scale(1);
}

.ui-modal-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.ui-modal-message {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}

.ui-modal-input {
  width: 100%;
  margin-top: 14px;
}

.ui-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.ui-btn {
  min-height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 9px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-spring);
}

.ui-btn-ghost {
  border-color: rgba(126, 255, 190, 0.24);
  background: rgba(5, 22, 14, 0.6);
  color: var(--text-soft);
}

.ui-btn-ghost:hover {
  color: var(--text-main);
  border-color: rgba(126, 255, 190, 0.5);
}

.ui-btn-primary {
  border-color: rgba(109, 255, 175, 0.6);
  background: rgba(17, 71, 45, 0.92);
  color: var(--text-main);
  box-shadow: var(--glow-btn-rest);
}

.ui-btn-primary:hover {
  background: rgba(24, 92, 58, 0.96);
}

.ui-btn-danger {
  border-color: rgba(255, 158, 158, 0.55);
  background: rgba(58, 12, 12, 0.92);
  color: #ffd9d9;
}

.ui-btn-danger:hover {
  background: rgba(78, 16, 16, 0.96);
}

/* ---- Accessibility: visible keyboard focus ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.game-card:focus-visible,
.product-row:focus-visible,
.open-btn:focus-visible,
.copy-btn:focus-visible,
.back-btn:focus-visible,
.lang-btn:focus-visible,
.toc-link:focus-visible,
.shop-admin-tab:focus-visible,
.shop-admin-status:focus-visible,
.admin-route-tab:focus-visible,
.ui-btn:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Keep mouse interaction clean: only show the ring for keyboard focus. */
:focus:not(:focus-visible) {
  outline: none;
}

/* ---- Accessibility: respect reduced-motion preference ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

.shop-loading {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(126, 255, 190, 0.2);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(3, 16, 11, 0.66);
}

.shop-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(126, 255, 190, 0.14);
  border-radius: 8px;
  background: rgba(3, 18, 12, 0.66);
}

.shop-filter-bar.compact {
  padding: 0;
  border: 0;
  background: transparent;
}

.shop-filter-bar label,
.shop-form label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.shop-pricing-mode {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 320px;
  border: 1px solid rgba(109, 255, 175, 0.22);
  border-radius: 8px;
  background: rgba(2, 12, 8, 0.72);
  padding: 3px;
  gap: 3px;
}

.shop-pricing-mode-option {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  padding: 7px 10px;
  transition: var(--transition-spring);
  white-space: nowrap;
}

.shop-pricing-mode-option:hover,
.shop-pricing-mode-option.active {
  color: #effff7;
  background: linear-gradient(135deg, rgba(12, 91, 55, 0.95), rgba(21, 146, 85, 0.74));
  box-shadow: inset 0 0 0 1px rgba(136, 255, 199, 0.16), 0 0 18px rgba(80, 255, 148, 0.14);
}

.shop-pricing-mode-hint {
  flex: 1 1 100%;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.shop-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.shop-metric-card,
.shop-panel {
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(10, 36, 24, 0.78), rgba(4, 16, 11, 0.9));
  box-shadow: var(--shadow-main), var(--shadow-inset);
}

.shop-metric-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.shop-metric-card span,
.shop-metric-card small,
.shop-list-row span,
.shop-row-button small,
.shop-panel-head span {
  color: var(--text-soft);
}

.shop-metric-card strong {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.shop-grid-two {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 14px;
}

.shop-grid-two.wide-left {
  grid-template-columns: minmax(260px, 0.82fr) minmax(380px, 1.18fr);
}

.shop-panel {
  min-width: 0;
  padding: 16px;
}

.shop-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shop-panel-head h3 {
  margin: 2px 0 0;
  font-size: 1.06rem;
}

.shop-list,
.shop-editor-list,
.shop-key-list,
.shop-messages {
  display: grid;
  gap: 8px;
}

.shop-pricing-summary-list,
.shop-pricing-products {
  display: grid;
  gap: 10px;
}

.shop-pricing-summary {
  display: grid;
  gap: 8px;
}

.shop-pricing-summary.is-expanded > .shop-pricing-summary-toggle {
  border-color: rgba(109, 255, 175, 0.54);
  background: rgba(13, 58, 36, 0.72);
}

.shop-pricing-summary-detail {
  display: none;
  border: 1px solid rgba(109, 255, 175, 0.14);
  border-radius: 8px;
  background: rgba(2, 12, 8, 0.48);
  padding: 10px;
}

.shop-pricing-summary.is-expanded .shop-pricing-summary-detail {
  display: grid;
  gap: 10px;
}

.shop-pricing-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shop-pricing-summary-metrics .shop-metric-card {
  min-height: 94px;
  padding: 12px;
}

.shop-pricing-summary-metrics .shop-metric-card strong {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.shop-pricing-product {
  border: 1px solid rgba(109, 255, 175, 0.14);
  border-radius: 8px;
  background: rgba(3, 17, 12, 0.74);
  padding: 10px;
}

.shop-pricing-product-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.shop-pricing-product-head > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.shop-pricing-product-head span {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.shop-pricing-product-head b {
  white-space: nowrap;
}

.shop-pricing-split,
.shop-pricing-plan-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-pricing-plan-list {
  margin-top: 9px;
}

.shop-pricing-split span,
.shop-pricing-plan-chip {
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 999px;
  background: rgba(2, 14, 9, 0.78);
  color: #dfffe9;
  font-size: 0.72rem;
  padding: 4px 8px;
}

.shop-pricing-plan-chip code {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
}

.shop-list-row,
.shop-editor-row,
.shop-key-row,
.shop-stock-row,
.shop-row-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(109, 255, 175, 0.14);
  border-radius: 8px;
  background: rgba(3, 17, 12, 0.74);
  color: var(--text-main);
  padding: 12px;
}

.shop-row-button,
.shop-stock-row {
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.shop-row-button:hover,
.shop-row-button.active,
.shop-stock-row.active,
.shop-stock-row:hover {
  border-color: rgba(109, 255, 175, 0.5);
  background: rgba(13, 58, 36, 0.72);
}

.shop-stock-row.low {
  border-color: rgba(220, 248, 126, 0.34);
}

.shop-stock-row.out {
  border-color: rgba(255, 158, 158, 0.38);
}

.shop-chart {
  height: 260px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 14px 8px 0;
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: 8px;
  background: rgba(0, 7, 5, 0.5);
}

.shop-chart-bar {
  flex: 1;
  min-width: 4px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--accent), rgba(31, 199, 120, 0.62));
  box-shadow: 0 0 12px rgba(80, 255, 148, 0.28);
}

.shop-form,
.shop-reply-form {
  display: grid;
  gap: 12px;
}

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

.shop-actions,
.shop-checks {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
}

.shop-promo-options {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 2px 0 4px;
}

.shop-filter-note {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
  align-self: center;
}

.shop-giveaway-participant {
  align-items: flex-start;
}

.shop-giveaway-participant > div:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.shop-giveaway-screenshots {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 320px;
}

.shop-giveaway-participants-actions {
  justify-content: flex-end;
  margin-bottom: 10px;
}

.shop-giveaway-screenshot {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(109, 255, 175, 0.22);
  border-radius: 7px;
  background: rgba(5, 24, 16, 0.76);
  color: var(--accent);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.shop-giveaway-screenshot:hover {
  border-color: rgba(109, 255, 175, 0.58);
  background: rgba(17, 71, 45, 0.82);
  color: #effff7;
}

.shop-giveaway-prize-section {
  margin: 16px 0;
}

.shop-giveaway-prize-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.shop-giveaway-prize-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.shop-giveaway-prize-head span,
.shop-giveaway-prize-head b {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.shop-giveaway-prize-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
  gap: 14px;
  align-items: start;
}

.shop-giveaway-prize-side {
  display: grid;
  gap: 14px;
}

.shop-giveaway-prize-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.shop-giveaway-prize-summary span {
  min-width: 0;
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 7px;
  background: rgba(3, 18, 12, 0.7);
  padding: 8px 10px;
}

.shop-giveaway-prize-summary b,
.shop-giveaway-prize-summary small {
  display: block;
}

.shop-giveaway-prize-summary b {
  color: var(--text);
  font-size: 1rem;
}

.shop-giveaway-prize-summary small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.shop-giveaway-prize-ok,
.shop-giveaway-prize-errors span {
  display: block;
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--text-soft);
  background: rgba(5, 24, 16, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
}

.shop-giveaway-prize-errors {
  display: grid;
  gap: 6px;
}

.shop-giveaway-prize-errors span {
  border-color: rgba(255, 116, 116, 0.34);
  color: #ffd2d2;
  background: rgba(54, 15, 15, 0.62);
}

.shop-giveaway-prize-table {
  display: grid;
  gap: 6px;
}

.shop-giveaway-prize-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(92px, 0.7fr) minmax(110px, 0.9fr) minmax(120px, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid rgba(109, 255, 175, 0.13);
  border-radius: 7px;
  background: rgba(4, 18, 12, 0.68);
  padding: 8px 10px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.shop-giveaway-prize-row strong,
.shop-giveaway-prize-row small {
  display: block;
}

.shop-giveaway-prize-row strong {
  color: var(--text);
}

.shop-giveaway-prize-row small {
  color: var(--text-muted);
  word-break: break-word;
}

.shop-giveaway-prize-row code {
  white-space: pre-wrap;
  word-break: break-all;
}

.shop-giveaway-prize-row.status-sent {
  border-color: rgba(109, 255, 175, 0.34);
}

.shop-giveaway-prize-row.status-blocked,
.shop-giveaway-prize-row.status-failed,
.shop-giveaway-prize-row.status-no_key,
.shop-giveaway-prize-row.status-telegram_error {
  border-color: rgba(255, 116, 116, 0.28);
}

.shop-form label.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.shop-form label.toggle-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.shop-log-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(126, 255, 190, 0.1);
}

.shop-log-row span {
  display: grid;
  gap: 3px;
}

.shop-log-row small {
  color: var(--text-muted);
}

.shop-broadcast-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.shop-broadcast-list {
  max-height: calc(100vh - 340px);
  overflow: auto;
  padding-right: 4px;
}

.shop-broadcast-mini-progress {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(126, 255, 190, 0.12);
  overflow: hidden;
  margin-top: 8px;
}

.shop-broadcast-mini-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #dff87e);
}

.shop-broadcast-form {
  gap: 10px;
}

.shop-broadcast-section {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(126, 255, 190, 0.14);
  border-radius: 8px;
  background: rgba(2, 14, 9, 0.55);
  padding: 12px;
}

.shop-broadcast-section.accent {
  border-color: rgba(109, 255, 175, 0.28);
  background: linear-gradient(180deg, rgba(12, 52, 32, 0.62), rgba(2, 14, 9, 0.72));
}

.shop-broadcast-section h4,
.shop-broadcast-section-head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.shop-broadcast-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.shop-broadcast-section-head span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.shop-muted {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.45;
}

.shop-broadcast-grid {
  display: grid;
  gap: 10px;
}

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

.shop-broadcast-grid.three {
  grid-template-columns: minmax(0, 1fr) 160px 210px;
}

.shop-broadcast-toolbar,
.shop-broadcast-emoji,
.shop-broadcast-media-picker,
.shop-broadcast-button-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.copy-btn.compact {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

.shop-broadcast-emoji {
  border-top: 1px solid rgba(126, 255, 190, 0.12);
  padding-top: 8px;
}

.shop-broadcast-emoji button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 8px;
  background: rgba(3, 18, 12, 0.78);
  cursor: pointer;
}

.shop-broadcast-custom-emoji {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  align-items: end;
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 8px;
  background: rgba(3, 17, 12, 0.72);
  padding: 8px;
}

.shop-broadcast-custom-emoji[hidden] {
  display: none;
}

.shop-broadcast-custom-emoji label {
  display: grid;
  gap: 4px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.shop-broadcast-custom-emoji .copy-btn {
  align-self: end;
}

.shop-broadcast-custom-emoji small {
  grid-column: 1 / -1;
  min-height: 15px;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.shop-broadcast-custom-emoji small.is-error {
  color: var(--danger);
}

.shop-broadcast-custom-emoji small.is-success {
  color: var(--accent);
}

.shop-broadcast-media-picker input {
  flex: 1 1 260px;
}

.shop-broadcast-media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.shop-broadcast-media-card,
.shop-broadcast-button-row {
  border: 1px solid rgba(109, 255, 175, 0.14);
  border-radius: 8px;
  background: rgba(3, 17, 12, 0.72);
  overflow: hidden;
}

.shop-broadcast-media-thumb {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: rgba(0, 6, 4, 0.62);
  color: var(--text-soft);
}

.shop-broadcast-media-thumb img,
.shop-broadcast-media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-broadcast-media-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
}

.shop-broadcast-media-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
}

.shop-broadcast-buttons-list {
  display: grid;
  gap: 8px;
}

.shop-broadcast-button-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(190px, 1.1fr) 120px;
  gap: 8px;
  padding: 8px;
  align-items: end;
}

.shop-check-line {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.shop-broadcast-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(3, 13, 9, 0), rgba(3, 13, 9, 0.96) 35%);
}

.shop-broadcast-preview {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 10px;
}

.shop-broadcast-preview-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.shop-telegram-preview {
  min-height: 260px;
  border: 1px solid rgba(126, 255, 190, 0.16);
  border-radius: 8px;
  background: radial-gradient(circle at 18% 0%, rgba(109, 255, 175, 0.08), transparent 32%), rgba(0, 8, 5, 0.68);
  padding: 14px;
}

.shop-telegram-media {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.shop-telegram-media.media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-telegram-media img,
.shop-telegram-media video,
.shop-telegram-file {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(109, 255, 175, 0.16);
  background: rgba(3, 17, 12, 0.78);
}

.shop-telegram-file {
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.shop-telegram-bubble {
  max-width: 94%;
  border-radius: 8px 8px 3px 8px;
  background: rgba(22, 72, 43, 0.96);
  color: var(--text-main);
  padding: 10px 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.shop-telegram-bubble a {
  color: #8eeeff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shop-telegram-bubble code,
.shop-telegram-bubble pre {
  border: 1px solid rgba(126, 255, 190, 0.18);
  border-radius: 6px;
  background: rgba(0, 9, 6, 0.62);
  color: #e3fff1;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.shop-telegram-bubble code {
  padding: 1px 4px;
}

.shop-telegram-bubble pre {
  display: block;
  margin: 6px 0 0;
  padding: 8px;
  white-space: pre-wrap;
}

.shop-custom-emoji {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  border-radius: 6px;
  outline: 1px solid rgba(126, 255, 190, 0.24);
  outline-offset: 1px;
}

.shop-custom-emoji-badge {
  border-radius: 999px;
  background: rgba(126, 255, 190, 0.16);
  color: var(--accent);
  padding: 0 4px;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.45;
  text-transform: uppercase;
}

.shop-telegram-buttons {
  display: grid;
  gap: 6px;
  max-width: 94%;
  margin-top: 8px;
}

.shop-telegram-button-row {
  display: grid;
  gap: 6px;
}

.shop-telegram-button-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(109, 255, 175, 0.34);
  border-radius: 8px;
  background: rgba(3, 23, 14, 0.9);
  color: var(--accent);
  text-align: center;
  padding: 8px;
  font-weight: 800;
}

.shop-broadcast-validation {
  display: grid;
  gap: 6px;
}

.shop-broadcast-validation div,
.shop-broadcast-progress {
  border: 1px solid rgba(220, 248, 126, 0.28);
  color: var(--warn);
  background: rgba(35, 28, 3, 0.68);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.shop-broadcast-validation div.is-error {
  border-color: rgba(255, 158, 158, 0.38);
  color: var(--danger);
  background: rgba(42, 9, 9, 0.66);
}

.shop-broadcast-progress {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  background: rgba(3, 17, 12, 0.74);
}

.shop-broadcast-progress div {
  display: flex;
  justify-content: space-between;
}

.shop-broadcast-progress em {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(126, 255, 190, 0.12);
}

.shop-broadcast-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #dff87e);
}

.shop-key-row code {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--accent);
}

.shop-dialog-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(420px, 1.4fr);
  gap: 14px;
}

.shop-dialog-list,
.shop-dialog-thread {
  min-height: 640px;
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 8px;
  background: rgba(3, 14, 10, 0.72);
  box-shadow: var(--shadow-main), var(--shadow-inset);
  padding: 12px;
}

.shop-dialog-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 76vh;
  overflow: auto;
}

.shop-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(126, 255, 190, 0.14);
}

.shop-dialog-head h3 {
  margin: 0;
}

.shop-dialog-head p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.shop-profile-grid {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: 8px;
  background: rgba(4, 18, 12, 0.58);
}

.shop-messages {
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.shop-message {
  max-width: 82%;
  border: 1px solid rgba(109, 255, 175, 0.15);
  border-radius: 8px;
  background: rgba(6, 25, 16, 0.86);
  padding: 10px;
}

.shop-message.out {
  margin-left: auto;
  border-color: rgba(138, 255, 200, 0.34);
}

.shop-message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.shop-message p {
  margin: 8px 0;
  white-space: pre-wrap;
}

.shop-message-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.shop-reply-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(126, 255, 190, 0.14);
}

.shop-metrics-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shop-date-field > div {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 42px;
  gap: 8px;
}

.shop-date-button {
  border: 1px solid rgba(109, 255, 175, 0.24);
  border-radius: 8px;
  background: rgba(5, 22, 14, 0.82);
  color: var(--accent);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.shop-date-button:hover {
  border-color: rgba(109, 255, 175, 0.62);
  background: rgba(14, 62, 39, 0.82);
}

.shop-delta {
  width: fit-content;
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.8rem;
  font-weight: 900;
}

.shop-delta.up {
  color: #78ffac;
  background: rgba(14, 74, 42, 0.5);
}

.shop-delta.down {
  color: #ffd3d3;
  background: rgba(94, 21, 22, 0.62);
  border-color: rgba(255, 119, 119, 0.42);
}

.shop-delta.flat {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
}

.shop-list-counter {
  align-self: center;
  color: var(--text-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 800;
}

.shop-chart-wrap {
  position: relative;
  min-height: 300px;
  border: 1px solid rgba(126, 255, 190, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(6, 34, 22, 0.52), rgba(1, 9, 6, 0.72)),
    rgba(0, 7, 5, 0.62);
  overflow: hidden;
}

.shop-chart-wrap .shop-chart {
  width: 100%;
  height: 320px;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.shop-chart-grid {
  stroke: rgba(126, 255, 190, 0.12);
  stroke-width: 1;
}

.shop-chart-axis {
  fill: rgba(183, 224, 202, 0.72);
  font: 700 12px "JetBrains Mono", monospace;
}

.shop-chart-bar {
  fill: rgba(39, 180, 110, 0.24);
}

.shop-chart-area {
  fill: url("#shopRevenueFill");
}

.shop-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  filter: drop-shadow(0 0 10px rgba(80, 255, 148, 0.32));
}

.shop-chart-dot {
  fill: #dffff0;
  stroke: rgba(4, 18, 12, 0.95);
  stroke-width: 2;
  pointer-events: none;
  transition: 140ms ease;
}

.shop-chart-hit {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
}

.shop-chart-dot.is-hovered {
  r: 7px;
  fill: #ffffff;
  stroke: var(--accent);
}

.shop-chart-hit.is-hovered {
  fill: rgba(126, 255, 190, 0.12);
  stroke: rgba(126, 255, 190, 0.58);
}

.shop-chart-tooltip {
  position: fixed;
  z-index: 9999;
  min-width: 190px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  border: 1px solid rgba(109, 255, 175, 0.36);
  border-radius: 8px;
  background: rgba(1, 12, 8, 0.96);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), 0 0 18px rgba(80, 255, 148, 0.16);
  color: var(--text-main);
  padding: 10px 12px;
  transition: opacity 120ms ease, transform 120ms ease;
}

.shop-chart-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.shop-chart-tooltip strong,
.shop-chart-tooltip span,
.shop-chart-tooltip small {
  display: block;
}

.shop-chart-tooltip span {
  color: var(--accent);
  font-size: 1.12rem;
  font-weight: 1000;
}

.shop-chart-tooltip small {
  color: var(--text-soft);
}

.shop-chart-empty {
  position: absolute;
  inset: auto 14px 14px;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.shop-inventory-stock,
.shop-inventory-keys-list,
.shop-vars-list,
.shop-profile-events {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-inventory-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.shop-inventory-left {
  display: grid;
  gap: 14px;
  height: min(760px, calc(100vh - 260px));
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.shop-inventory-right .shop-panel {
  height: min(760px, calc(100vh - 260px));
  min-height: 520px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.shop-inventory-right .shop-filter-bar {
  margin-bottom: 10px;
}

.shop-inventory-right .shop-inventory-stock {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.shop-inventory-keys-slot:empty {
  display: none;
}

.shop-ancient-panel-slot:empty {
  display: none;
}

.shop-ancient-summary {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.shop-ancient-error {
  color: #ffb1b1;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.shop-ancient-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.shop-ancient-row {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 8px;
  background: rgba(3, 17, 12, 0.72);
  padding: 12px;
}

.shop-ancient-row.status-ok {
  border-color: rgba(129, 255, 177, 0.52);
}

.shop-ancient-row.status-local {
  border-color: rgba(255, 211, 93, 0.42);
}

.shop-ancient-row.status-blocked {
  border-color: rgba(255, 116, 116, 0.56);
}

.shop-ancient-row header,
.shop-ancient-row footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.shop-ancient-row header div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.shop-ancient-row header span,
.shop-ancient-row code {
  color: var(--text-soft);
}

.shop-ancient-row em {
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(109, 255, 175, 0.1);
  color: var(--accent);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.shop-ancient-row label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-weight: 800;
}

.shop-inventory-dev-group {
  flex: 0 0 auto;
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 8px;
  background: rgba(2, 13, 9, 0.76);
  overflow: visible;
}

.shop-inventory-dev-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(109, 255, 175, 0.12);
  background: rgba(8, 37, 24, 0.66);
}

.shop-inventory-dev-group h4,
.shop-inventory-dev-group p {
  margin: 0;
  line-height: 1.12;
}

.shop-inventory-dev-group header span {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.shop-inventory-dev-group header b {
  color: var(--accent);
  white-space: nowrap;
}

.shop-inventory-stock-rows {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.shop-stock-row {
  align-items: stretch;
}

.shop-stock-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.shop-stock-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-stock-state {
  border-radius: 999px;
  padding: 3px 7px;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.shop-stock-state.normal {
  color: #072012;
  background: #81ffb1;
}

.shop-stock-state.low {
  color: #251900;
  background: #ffd35d;
}

.shop-stock-state.out {
  color: #fff5f5;
  background: #d94f4f;
}

.shop-stock-row.level-normal {
  background: rgba(4, 24, 15, 0.76);
}

.shop-stock-row.level-low {
  border-color: rgba(255, 211, 93, 0.7);
  background:
    linear-gradient(90deg, rgba(118, 78, 0, 0.76), rgba(38, 28, 10, 0.9)),
    rgba(55, 37, 5, 0.86);
  box-shadow: 0 0 18px rgba(255, 188, 67, 0.18);
}

.shop-stock-row.level-out {
  border-color: rgba(255, 116, 116, 0.76);
  background:
    linear-gradient(90deg, rgba(111, 22, 22, 0.84), rgba(35, 10, 11, 0.94)),
    rgba(58, 12, 14, 0.9);
  box-shadow: 0 0 20px rgba(255, 91, 91, 0.2);
}

.shop-stock-row.level-low:hover,
.shop-stock-row.level-out:hover {
  filter: brightness(1.08);
}

.shop-stock-row.active {
  border-color: rgba(109, 255, 175, 0.76);
  box-shadow:
    0 0 0 1px rgba(109, 255, 175, 0.22),
    0 0 20px rgba(109, 255, 175, 0.18);
}

.shop-inventory-keys-meta {
  margin-bottom: 10px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-weight: 900;
}

.shop-inventory-keys-plan {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 8px;
  background: rgba(3, 17, 12, 0.72);
  padding: 12px;
}

.shop-inventory-keys-plan > header,
.shop-var-row > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.shop-inventory-keys-plan header span,
.shop-inventory-keys-plan small,
.shop-var-row header span {
  color: var(--text-soft);
}

.shop-inventory-keys-editor {
  width: 100%;
  min-height: 180px;
  max-height: 34vh;
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: 8px;
  background: rgba(0, 8, 5, 0.9);
  color: #dffff0;
  font: 0.86rem/1.45 "JetBrains Mono", monospace;
  padding: 12px;
  resize: vertical;
  outline: none;
}

.shop-inventory-keys-editor:focus {
  border-color: rgba(109, 255, 175, 0.62);
  box-shadow: 0 0 0 3px rgba(80, 255, 148, 0.12);
}

.shop-dialog-layout {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  position: relative;
  min-width: 0;
}

.shop-dialog-workspace {
  height: calc(100dvh - 196px);
  min-height: 680px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.shop-dialog-workspace > .shop-filter-bar {
  margin-bottom: 10px;
}

.shop-dialog-workspace > .shop-filter-bar .control-input {
  flex: 1 1 320px;
}

.shop-dialog-workspace .shop-dialog-layout {
  min-height: 0;
  overflow: hidden;
}

.shop-profile-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  width: min(430px, 48%);
  min-width: 320px;
  min-height: 0;
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 8px;
  background: rgba(3, 14, 10, 0.72);
  box-shadow: var(--shadow-main), var(--shadow-inset);
  padding: 12px;
  transform: translateX(calc(100% + 14px));
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.shop-profile-panel.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  background: rgba(3, 14, 10, 0.96);
  backdrop-filter: blur(10px);
}

.shop-dialog-thread,
.shop-profile-panel {
  height: 100%;
  max-height: none;
  overflow: hidden;
}

.shop-profile-panel {
  overflow: auto;
}

.shop-dialog-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  min-height: 0;
}

.shop-message-scroll-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.shop-dialog-workspace .shop-messages {
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  height: 100%;
}

.shop-dialog-workspace .shop-reply-form {
  margin-top: 0;
  border-top: 1px solid rgba(109, 255, 175, 0.14);
}

.shop-dialog-list {
  min-height: 0;
  min-width: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
}

.shop-dialog-thread {
  min-width: 0;
}

.shop-dialog-live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: 999px;
  background: rgba(13, 58, 36, 0.34);
  color: rgba(222, 255, 239, 0.86);
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.shop-dialog-live-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(109, 255, 175, 0.8);
}

.shop-dialog-live-status.is-error {
  border-color: rgba(255, 130, 130, 0.36);
  background: rgba(72, 24, 24, 0.32);
  color: #ffd9d9;
}

.shop-dialog-live-status.is-error::before {
  background: #ff8282;
  box-shadow: 0 0 12px rgba(255, 130, 130, 0.68);
}

.shop-dialog-item {
  width: 100%;
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 8px;
  background: rgba(3, 17, 12, 0.74);
  color: var(--text-main);
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: var(--transition-spring);
}

.shop-dialog-item:hover,
.shop-dialog-item.active {
  border-color: rgba(109, 255, 175, 0.58);
  background: rgba(12, 54, 34, 0.84);
  box-shadow: var(--glow-btn-rest);
}

.shop-dialog-item .line {
  display: block;
  min-width: 0;
}

.shop-dialog-item .name {
  color: var(--text-main);
  font-weight: 1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-dialog-item .preview {
  margin-top: 4px;
  color: rgba(222, 255, 239, 0.86);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-dialog-item .meta {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-profile-head {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
}

.shop-profile-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(109, 255, 175, 0.22);
  border-radius: 8px;
  background: rgba(3, 18, 12, 0.82);
  color: var(--text-main);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.shop-profile-close:hover {
  border-color: rgba(109, 255, 175, 0.55);
  color: var(--accent);
}

.shop-profile-head h3 {
  margin: 0;
}

.shop-profile-head p {
  margin: 5px 0 0;
  color: var(--text-soft);
}

.shop-avatar {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(109, 255, 175, 0.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(10, 52, 32, 0.8);
  color: var(--accent);
  font-weight: 1000;
}

.shop-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-avatar.has-image span {
  display: none;
}

.shop-profile-actions,
.shop-profile-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.shop-profile-tabs {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(109, 255, 175, 0.12);
}

.shop-profile-tabs button {
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 8px;
  background: rgba(3, 18, 12, 0.72);
  color: var(--text-soft);
  padding: 8px 10px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.shop-profile-tabs button.active,
.shop-profile-tabs button:hover {
  color: var(--text-main);
  border-color: rgba(109, 255, 175, 0.5);
  background: rgba(13, 58, 36, 0.72);
}

.shop-profile-pane {
  display: none;
  margin-top: 12px;
}

.shop-profile-pane.active {
  display: grid;
  gap: 12px;
  min-height: 0;
}

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

.shop-profile-grid div {
  border: 1px solid rgba(109, 255, 175, 0.12);
  border-radius: 8px;
  background: rgba(0, 9, 6, 0.46);
  padding: 10px;
}

.shop-profile-grid span {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.shop-profile-event,
.shop-var-row {
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 8px;
  background: rgba(3, 17, 12, 0.72);
  padding: 10px;
}

.shop-profile-event.command,
.shop-message.command {
  border-color: rgba(226, 247, 126, 0.28);
  background: rgba(36, 43, 12, 0.7);
}

.shop-profile-event.sys,
.shop-message.sys {
  border-color: rgba(187, 139, 255, 0.28);
  background: rgba(24, 16, 35, 0.72);
}

.shop-profile-event.admin,
.shop-message.admin {
  border-color: rgba(109, 255, 175, 0.3);
  background: rgba(8, 38, 24, 0.78);
}

.shop-profile-event p,
.shop-message p,
.shop-message-details pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.shop-message p a,
.shop-profile-event p a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-message-media {
  display: block;
  width: min(100%, 360px);
  max-height: 260px;
  object-fit: contain;
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 8px;
  background: rgba(0, 8, 5, 0.72);
  margin: 8px 0;
}

.shop-message-file {
  display: inline-flex;
  max-width: 100%;
  margin: 8px 0;
  border: 1px solid rgba(109, 255, 175, 0.22);
  border-radius: 8px;
  background: rgba(0, 8, 5, 0.52);
  color: var(--accent);
  padding: 8px 10px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.shop-message-media.is-unavailable,
.shop-message-file.is-unavailable {
  opacity: 0.55;
}

.shop-inline-kb {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.shop-inline-kb-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.shop-inline-kb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid rgba(109, 255, 175, 0.22);
  border-radius: 8px;
  background: rgba(3, 18, 12, 0.82);
  color: var(--accent);
  padding: 5px 9px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.shop-inline-kb-btn.disabled {
  color: var(--text-soft);
  cursor: default;
}

.shop-message-details {
  margin-top: 8px;
  color: var(--text-soft);
}

.shop-message-details summary {
  cursor: pointer;
  font-weight: 900;
}

.shop-message-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.shop-message-detail-grid div {
  border: 1px solid rgba(109, 255, 175, 0.1);
  border-radius: 8px;
  padding: 6px;
  background: rgba(0, 8, 5, 0.42);
}

.shop-message-detail-grid span {
  display: block;
  color: var(--text-soft);
  font-size: 0.74rem;
}

.shop-message-details pre {
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(109, 255, 175, 0.1);
  border-radius: 8px;
  padding: 8px;
  background: rgba(0, 8, 5, 0.68);
}

.shop-message-scroll-wrap .shop-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(109, 255, 175, 0.05), transparent 32%),
    rgba(0, 8, 5, 0.28);
}

.shop-message {
  width: fit-content;
  flex: 0 0 auto;
  max-width: min(76%, 720px);
  border: 1px solid rgba(109, 255, 175, 0.14);
  border-radius: 8px;
  background: rgba(6, 25, 16, 0.9);
  color: var(--text-main);
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}

.shop-message.in {
  align-self: flex-start;
  border-color: rgba(109, 255, 175, 0.16);
  background: rgba(7, 24, 17, 0.94);
}

.shop-message.out {
  align-self: flex-end;
  margin-left: 0;
  border-color: rgba(109, 255, 175, 0.28);
  background: rgba(14, 58, 36, 0.92);
}

.shop-message.command {
  border-color: rgba(226, 247, 126, 0.28);
  background: rgba(36, 43, 12, 0.82);
}

.shop-message.sys {
  border-color: rgba(187, 139, 255, 0.28);
  background: rgba(24, 16, 35, 0.84);
}

.shop-message.admin {
  border-color: rgba(109, 255, 175, 0.34);
  background: rgba(8, 38, 24, 0.92);
}

.shop-message-head {
  align-items: center;
  padding: 7px 10px 0;
}

.shop-message-head strong {
  color: rgba(179, 225, 203, 0.9);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.shop-message-head span {
  color: rgba(179, 225, 203, 0.7);
  font-size: 0.72rem;
  white-space: nowrap;
}

.shop-message-content {
  display: grid;
  gap: 8px;
  padding: 8px 10px 9px;
}

.shop-message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: rgba(242, 255, 248, 0.96);
  font-size: 0.94rem;
  line-height: 1.48;
}

.shop-message-empty {
  display: grid;
  gap: 3px;
  border: 1px dashed rgba(109, 255, 175, 0.2);
  border-radius: 8px;
  background: rgba(0, 8, 5, 0.34);
  color: rgba(222, 255, 239, 0.9);
  padding: 9px 10px;
}

.shop-message-empty b {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.shop-message-empty small {
  color: var(--text-soft);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.shop-message-media-group {
  max-width: min(76%, 760px);
}

.shop-media-group-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(109, 255, 175, 0.14);
  border-radius: 8px;
  background: rgba(0, 8, 5, 0.34);
  padding: 8px 10px;
}

.shop-media-group-summary b {
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.shop-media-group-summary small {
  color: var(--text-soft);
  font-size: 0.74rem;
}

.shop-media-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  max-width: 480px;
}

.shop-media-group-thumb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 66px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 8px;
  background: rgba(0, 8, 5, 0.52);
  color: rgba(222, 255, 239, 0.88);
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.shop-media-group-thumb:disabled {
  cursor: default;
  opacity: 0.58;
}

.shop-media-group-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-media-group-placeholder {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: 999px;
  background: rgba(6, 25, 16, 0.78);
  font-weight: 900;
}

.shop-media-group-thumb.is-loaded .shop-media-group-placeholder {
  display: none;
}

.shop-media-group-thumb.is-unavailable .shop-media-group-placeholder {
  width: auto;
  min-width: 54px;
  border-radius: 8px;
  padding: 0 8px;
}

.shop-message-text p {
  margin: 0 0 8px;
}

.shop-message-text p:last-child {
  margin-bottom: 0;
}

.shop-message-text a,
.shop-profile-event p a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-message-text code,
.shop-message-text pre {
  border: 1px solid rgba(109, 255, 175, 0.14);
  border-radius: 6px;
  background: rgba(0, 8, 5, 0.58);
  color: #dffff0;
  font-family: "JetBrains Mono", monospace;
}

.shop-message-text code {
  padding: 1px 5px;
}

.shop-message-text pre {
  max-width: 100%;
  margin: 4px 0;
  padding: 8px;
  overflow: auto;
}

.shop-message-text blockquote {
  margin: 4px 0;
  border-left: 3px solid rgba(109, 255, 175, 0.45);
  padding: 4px 0 4px 10px;
  color: rgba(222, 255, 239, 0.86);
}

.shop-message-text blockquote.shop-expandable-blockquote {
  max-height: 132px;
  overflow: auto;
  border-color: rgba(109, 255, 175, 0.58);
  border-radius: 0 8px 8px 0;
  background: rgba(0, 8, 5, 0.3);
  padding: 8px 10px;
}

.shop-message-text blockquote.shop-expandable-blockquote::before {
  content: "раскрываемый блок";
  display: block;
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.shop-message-spoiler {
  border-radius: 4px;
  background: rgba(222, 255, 239, 0.18);
  color: transparent;
  text-shadow: 0 0 8px rgba(222, 255, 239, 0.8);
}

.shop-message-spoiler:hover {
  color: inherit;
  text-shadow: none;
}

.shop-custom-emoji,
tg-emoji {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  vertical-align: baseline;
}

.shop-message-media-frame {
  position: relative;
  display: grid;
  place-items: center;
  max-width: min(100%, 420px);
  min-width: min(260px, 100%);
  min-height: 126px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 8, 5, 0.48);
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.shop-message-media-frame:disabled {
  cursor: default;
}

.shop-message-media {
  width: 100%;
  max-height: 340px;
  margin: 0;
  object-fit: contain;
}

.shop-message-media-placeholder {
  display: grid;
  gap: 4px;
  place-items: center;
  min-width: 180px;
  min-height: 112px;
  border: 1px dashed rgba(109, 255, 175, 0.24);
  border-radius: 8px;
  color: rgba(222, 255, 239, 0.82);
  padding: 16px;
  text-align: center;
}

.shop-message-media-placeholder b {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.shop-message-media-placeholder small {
  color: var(--text-soft);
  font-size: 0.76rem;
}

.shop-message-media-frame.is-loaded {
  min-width: 0;
  min-height: 0;
  background: transparent;
}

.shop-message-media-frame.is-loaded .shop-message-media-placeholder {
  display: none;
}

.shop-message-media-frame.is-unavailable {
  cursor: default;
}

.shop-message-file {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(109, 255, 175, 0.22);
  border-radius: 8px;
  background: rgba(0, 8, 5, 0.52);
  color: var(--text-main);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  margin: 0;
  padding: 10px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.shop-message-file:disabled {
  cursor: default;
  opacity: 0.62;
}

.shop-message-file span {
  grid-row: span 2;
  color: var(--accent);
  font-size: 1.1rem;
}

.shop-message-file b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shop-message-file small {
  color: var(--text-soft);
  font-size: 0.75rem;
}

.shop-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 10px 9px;
}

.shop-dialog-new-messages {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 3;
  border: 1px solid rgba(109, 255, 175, 0.34);
  border-radius: 999px;
  background: rgba(13, 58, 36, 0.92);
  color: var(--text-main);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.shop-reply-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(3, 14, 10, 0.88);
}

.shop-reply-form textarea {
  min-height: 82px;
  max-height: 170px;
  resize: vertical;
}

.shop-reply-footer {
  display: grid;
  grid-template-columns: auto minmax(120px, 160px) auto;
  gap: 8px;
  align-items: center;
}

.shop-file-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(109, 255, 175, 0.22);
  border-radius: 8px;
  background: rgba(3, 18, 12, 0.78);
  color: var(--text-main);
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.shop-file-picker input {
  display: none;
}

.shop-reply-files-meta {
  min-height: 18px;
  color: var(--text-soft);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.shop-var-create,
.shop-var-row {
  display: grid;
  gap: 10px;
}

.shop-var-row .shop-actions {
  align-items: stretch;
}

.shop-var-mode,
#shopDialogVarMode {
  max-width: 140px;
}

.admin-broadcast-head h2 {
  margin: 0;
  font-size: 1.28rem;
}

.admin-broadcast-head p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.broadcast-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1fr);
  gap: 14px;
}

.broadcast-panel {
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 42, 28, 0.82), rgba(4, 18, 12, 0.86)),
    rgba(5, 18, 12, 0.8);
  box-shadow: var(--shadow-main);
  padding: 18px;
}

.broadcast-action-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.broadcast-text-field {
  display: grid;
  gap: 8px;
}

.broadcast-text-field span {
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

.broadcast-textarea {
  min-height: 168px;
  resize: vertical;
  line-height: 1.45;
}

.broadcast-history-panel {
  grid-column: 1 / -1;
}

.broadcast-metric {
  display: grid;
  gap: 4px;
}

.broadcast-metric span,
.broadcast-muted {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.broadcast-metric strong {
  color: #f1fff8;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  line-height: 1;
}

.broadcast-panel-head,
.broadcast-job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.broadcast-panel-head h3 {
  margin: 0;
  font-size: 1rem;
}

.broadcast-status-pill {
  border: 1px solid rgba(109, 255, 175, 0.34);
  border-radius: 999px;
  color: #dfffee;
  background: rgba(19, 86, 52, 0.62);
  padding: 5px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.broadcast-status-pill.status-running,
.broadcast-status-pill.status-queued,
.broadcast-job-item.status-running .broadcast-status-pill,
.broadcast-job-item.status-queued .broadcast-status-pill {
  border-color: rgba(255, 184, 95, 0.6);
  color: #ffe1b6;
  background: rgba(90, 54, 15, 0.62);
}

.broadcast-status-pill.status-failed,
.broadcast-job-item.status-failed .broadcast-status-pill {
  border-color: rgba(255, 110, 110, 0.62);
  color: #ffd1d1;
  background: rgba(93, 24, 24, 0.62);
}

.broadcast-progress {
  margin-top: 16px;
  height: 12px;
  border-radius: 999px;
  background: rgba(1, 10, 6, 0.92);
  border: 1px solid rgba(109, 255, 175, 0.18);
  overflow: hidden;
}

.broadcast-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #45e891, #d3ff7a);
  transition: width 220ms ease;
}

.broadcast-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: var(--text-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.broadcast-stats b {
  color: #f0fff8;
}

.broadcast-status-text {
  min-height: 1.2em;
  margin: 0;
  color: #bdfed6;
  font-size: 0.9rem;
}

.broadcast-jobs-list {
  margin-top: 12px;
  display: grid;
  gap: 9px;
}

.broadcast-job-item {
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: 8px;
  background: rgba(2, 13, 8, 0.58);
  padding: 12px;
}

.admin-metrics {
  margin-top: 18px;
}

.admin-metrics-head,
.metrics-section-head,
.metrics-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-metrics-head h2,
.metrics-section-head h3,
.metrics-panel-head h4 {
  margin: 0;
}

.admin-metrics-head h2 {
  font-size: 1.28rem;
}

.admin-metrics-head p,
.metrics-updated,
.metrics-status-text {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.admin-metrics-head p {
  margin: 8px 0 0;
}

.metrics-status-text {
  min-height: 1.2em;
  margin: 12px 0 0;
}

.metrics-section-block {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.metrics-section-head {
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 8px;
  background: rgba(2, 18, 11, 0.66);
  padding: 13px 15px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.metric-card,
.metrics-panel {
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 42, 28, 0.82), rgba(4, 18, 12, 0.86)),
    rgba(5, 18, 12, 0.8);
  box-shadow: var(--shadow-main);
}

.metric-card {
  min-height: 112px;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 15px;
}

.metric-card-label,
.metric-card-hint {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.metric-card-value {
  color: #f3fff8;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1;
}

.metrics-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metrics-panel {
  padding: 15px;
}

.metrics-panel-head h4 {
  font-size: 0.95rem;
}

.metrics-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.metrics-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(109, 255, 175, 0.12);
  border-radius: 8px;
  background: rgba(1, 12, 7, 0.54);
  padding: 9px 10px;
}

.metrics-list-label {
  min-width: 0;
  color: #c8f5db;
  display: grid;
  gap: 3px;
}

.metrics-list-label b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  font-weight: 800;
}

.metrics-list-label small {
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.28;
}

.metrics-list-row strong {
  color: #f5fff9;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  text-align: right;
}

.support-agent-row {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(109, 255, 175, 0.14);
  border-radius: 8px;
  background: rgba(1, 12, 7, 0.54);
  padding: 11px;
}

.support-agent-row.has-stale {
  border-color: rgba(255, 211, 93, 0.42);
  background:
    linear-gradient(90deg, rgba(90, 60, 8, 0.24), rgba(1, 12, 7, 0.56)),
    rgba(1, 12, 7, 0.54);
}

.support-agent-row-head,
.support-agent-kpis {
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-agent-row-head {
  justify-content: space-between;
  min-width: 0;
}

.support-agent-name {
  min-width: 0;
  color: #f3fff8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-agent-alert {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 211, 93, 0.38);
  border-radius: 999px;
  color: #ffe28a;
  background: rgba(73, 48, 7, 0.46);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.support-agent-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.support-agent-kpi {
  min-width: 0;
  border: 1px solid rgba(109, 255, 175, 0.1);
  border-radius: 7px;
  background: rgba(3, 22, 13, 0.62);
  padding: 8px;
}

.support-agent-kpi b,
.support-agent-kpi small {
  display: block;
}

.support-agent-kpi b {
  color: #f5fff9;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.05rem;
  line-height: 1;
}

.support-agent-kpi small {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 0.68rem;
  line-height: 1.15;
}

.support-agent-kpi.is-accent b {
  color: var(--accent);
}

.support-agent-kpi.is-danger {
  border-color: rgba(255, 211, 93, 0.28);
}

.support-agent-kpi.is-danger b {
  color: #ffe28a;
}

.admin-reseller {
  margin-top: 18px;
}

.reseller-stats-toolbar {
  margin-top: 14px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid rgba(126, 255, 190, 0.16);
  border-radius: 8px;
  background: rgba(3, 18, 12, 0.66);
}

.reseller-stats-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reseller-stats-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.6fr);
  gap: 14px;
  align-items: start;
}

.reseller-identity-panel {
  position: sticky;
  top: 92px;
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 42, 28, 0.82), rgba(4, 18, 12, 0.88)),
    rgba(5, 18, 12, 0.8);
  box-shadow: var(--shadow-main), var(--shadow-inset);
  padding: 16px;
}

.reseller-identity-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.reseller-identity-name {
  margin: 0;
  color: #f3fff8;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.reseller-identity-meta {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.reseller-status-row {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reseller-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(126, 255, 190, 0.2);
  border-radius: 999px;
  background: rgba(1, 12, 7, 0.54);
  color: #dfffee;
  padding: 7px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.reseller-chip.is-muted {
  color: var(--text-soft);
}

.reseller-stats-grid {
  margin-bottom: 12px;
}

.reseller-stats-grid .metric-card-value {
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  overflow-wrap: anywhere;
}

.reseller-details-panel {
  min-height: 180px;
}

.reseller-details-panel .metrics-list-row strong {
  overflow-wrap: anywhere;
  white-space: normal;
}

body.mode-admin-tickets {
  overflow: hidden;
}

.mode-admin-tickets .app-shell {
  height: calc(100vh - 64px);
  width: min(1560px, 100% - 28px);
  padding: 8px 0 10px;
}

.mode-admin-tickets #adminView:not(.hidden),
.mode-admin-tickets #adminContent:not(.hidden) {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mode-admin-tickets #adminContent > .hero {
  display: none;
}

.mode-admin-tickets .admin-route-tabs {
  flex-shrink: 0;
  margin-bottom: 6px;
  padding: 4px;
}

.mode-admin-tickets .admin-route-tab {
  padding: 7px 10px;
}

.mode-admin-tickets .admin-tickets {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.mode-admin-tickets .admin-tickets-head {
  display: none;
}

.admin-tickets-head h2 {
  margin: 0;
  font-size: 1.28rem;
}

.admin-tickets-head p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.mode-admin-tickets .admin-tickets-head h2 {
  font-size: 1.08rem;
}

.mode-admin-tickets .admin-tickets-head p {
  margin-top: 3px;
  font-size: 0.82rem;
}

.admin-tickets-toolbar {
  position: relative;
  z-index: 25;
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(0, 260px) auto;
  gap: 10px;
  align-items: center;
}

.mode-admin-tickets .admin-tickets-toolbar {
  flex-shrink: 0;
  margin-top: 4px;
  gap: 8px;
}

.ticket-quick-stats {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: 10px;
  background: rgba(3, 16, 10, 0.74);
  padding: 0 12px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(109, 255, 175, 0.06);
}

.ticket-quick-stat.is-claimed {
  color: #ffb45d;
}

.ticket-quick-stat.is-open {
  color: #ff8f8f;
}

.ticket-quick-separator {
  color: rgba(190, 255, 221, 0.42);
}

.admin-tickets-layout {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.mode-admin-tickets .admin-tickets-layout {
  flex: 1;
  height: auto;
  margin-top: 8px;
  gap: 10px;
}

.tickets-list,
.ticket-chat-panel {
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: var(--radius-xl);
  background: rgba(6, 23, 15, 0.72);
  box-shadow: var(--shadow-main);
}

.tickets-list {
  max-height: min(72vh, 860px);
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  overscroll-behavior: contain;
}

.mode-admin-tickets .tickets-list {
  min-height: 0;
  max-height: none;
}

.ticket-list-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 11px;
  background: rgba(4, 19, 12, 0.74);
  color: var(--text-main);
  padding: 10px 11px;
  cursor: pointer;
  transition: 170ms ease;
}

.ticket-list-item.status-closed {
  border-color: rgba(109, 255, 175, 0.42);
  background: linear-gradient(135deg, rgba(9, 54, 31, 0.9), rgba(4, 27, 17, 0.82));
  box-shadow: inset 0 0 0 1px rgba(108, 255, 177, 0.12);
}

.ticket-list-item.status-claimed {
  border-color: rgba(255, 178, 91, 0.52);
  background: linear-gradient(135deg, rgba(75, 43, 8, 0.92), rgba(30, 21, 9, 0.84));
  box-shadow: inset 0 0 0 1px rgba(255, 193, 116, 0.12);
}

.ticket-list-item.status-open,
.ticket-list-item.status-new {
  border-color: rgba(255, 140, 140, 0.46);
  background: linear-gradient(135deg, rgba(65, 21, 21, 0.9), rgba(29, 14, 15, 0.84));
  box-shadow: inset 0 0 0 1px rgba(255, 157, 157, 0.1);
}

.ticket-list-item.status-resolved,
.ticket-list-item.status-waiting_customer {
  border-color: rgba(110, 194, 255, 0.4);
  background: linear-gradient(135deg, rgba(7, 39, 56, 0.9), rgba(6, 24, 33, 0.84));
  box-shadow: inset 0 0 0 1px rgba(122, 208, 255, 0.1);
}

.ticket-list-item:hover {
  border-color: rgba(109, 255, 175, 0.54);
  background: rgba(7, 30, 20, 0.84);
}

.ticket-list-item.status-closed:hover {
  border-color: rgba(109, 255, 175, 0.72);
  background: linear-gradient(135deg, rgba(13, 70, 41, 0.95), rgba(6, 34, 21, 0.88));
}

.ticket-list-item.status-claimed:hover {
  border-color: rgba(255, 190, 111, 0.78);
  background: linear-gradient(135deg, rgba(91, 52, 9, 0.96), rgba(38, 25, 8, 0.9));
}

.ticket-list-item.status-open:hover,
.ticket-list-item.status-new:hover {
  border-color: rgba(255, 155, 155, 0.74);
  background: linear-gradient(135deg, rgba(76, 26, 25, 0.95), rgba(35, 16, 17, 0.9));
}

.ticket-list-item.status-resolved:hover,
.ticket-list-item.status-waiting_customer:hover {
  border-color: rgba(127, 207, 255, 0.68);
  background: linear-gradient(135deg, rgba(10, 50, 70, 0.95), rgba(7, 29, 40, 0.9));
}

.ticket-list-item.is-active {
  border-color: rgba(109, 255, 175, 0.84);
  background: rgba(11, 44, 29, 0.86);
  box-shadow: inset 0 0 0 1px rgba(136, 255, 198, 0.16);
}

.ticket-list-item.is-active.status-closed {
  border-color: rgba(109, 255, 175, 0.9);
  background: linear-gradient(135deg, rgba(13, 77, 45, 0.98), rgba(7, 39, 24, 0.92));
  box-shadow: inset 0 0 0 1px rgba(136, 255, 198, 0.26), 0 0 0 1px rgba(109, 255, 175, 0.12);
}

.ticket-list-item.is-active.status-claimed {
  border-color: rgba(255, 188, 103, 0.9);
  background: linear-gradient(135deg, rgba(94, 54, 10, 0.98), rgba(45, 29, 8, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 207, 140, 0.24), 0 0 0 1px rgba(255, 178, 91, 0.12);
}

.ticket-list-item.is-active.status-open,
.ticket-list-item.is-active.status-new {
  border-color: rgba(255, 151, 151, 0.86);
  background: linear-gradient(135deg, rgba(83, 29, 28, 0.98), rgba(42, 18, 18, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 174, 174, 0.22), 0 0 0 1px rgba(255, 140, 140, 0.1);
}

.ticket-list-item.is-active.status-resolved,
.ticket-list-item.is-active.status-waiting_customer {
  border-color: rgba(126, 207, 255, 0.78);
  background: linear-gradient(135deg, rgba(10, 56, 80, 0.98), rgba(7, 33, 46, 0.92));
  box-shadow: inset 0 0 0 1px rgba(139, 213, 255, 0.2), 0 0 0 1px rgba(110, 194, 255, 0.1);
}

.ticket-list-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.ticket-list-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.ticket-wait-timer {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 166, 92, 0.42);
  border-radius: 999px;
  background: rgba(55, 30, 8, 0.7);
  color: #ffd1a1;
  padding: 3px 8px;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.ticket-status-pill {
  border: 1px solid rgba(109, 255, 175, 0.4);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #defee9;
  background: rgba(9, 35, 23, 0.86);
}

.ticket-status-pill.status-closed {
  border-color: rgba(109, 255, 175, 0.58);
  background: rgba(7, 42, 25, 0.82);
  color: #d9ffe8;
}

.ticket-status-pill.status-claimed {
  border-color: rgba(255, 178, 91, 0.72);
  background: rgba(70, 39, 9, 0.82);
  color: #ffd8aa;
}

.ticket-status-pill.status-open,
.ticket-status-pill.status-new {
  border-color: rgba(255, 140, 140, 0.62);
  background: rgba(54, 18, 18, 0.82);
  color: #ffd7d7;
}

.ticket-status-pill.status-resolved,
.ticket-status-pill.status-waiting_customer {
  border-color: rgba(109, 255, 175, 0.38);
}

.ticket-list-title {
  margin: 8px 0 0;
  font-size: 0.93rem;
  line-height: 1.3;
}

.ticket-list-meta {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.ticket-chat-panel {
  min-height: 540px;
  padding: 10px;
  overflow: hidden;
  position: relative;
}

.mode-admin-tickets .ticket-chat-panel {
  min-height: 0;
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 510px;
  position: relative;
}

.mode-admin-tickets .ticket-thread {
  min-height: 0;
  height: 100%;
}

.ticket-thread-head {
  border: 1px solid rgba(109, 255, 175, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(4, 18, 12, 0.78);
}

.mode-admin-tickets .ticket-thread-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
  flex-shrink: 0;
  padding: 8px 10px;
}

.ticket-thread-title {
  margin: 0;
  font-size: 0.98rem;
}

.mode-admin-tickets .ticket-thread-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-thread-meta {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.mode-admin-tickets .ticket-thread-meta {
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-thread-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mode-admin-tickets .ticket-thread-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin-top: 0;
}

.ticket-customer-toggle {
  padding: 7px 10px;
  font-size: 0.76rem;
}

.ticket-mobile-list-btn {
  display: none;
}

.copy-btn.ticket-claim-btn {
  padding: 7px 10px;
  font-size: 0.76rem;
  border-color: rgba(255, 178, 91, 0.64);
  color: #ffe3bd;
  background: linear-gradient(135deg, rgba(95, 49, 12, 0.92), rgba(189, 101, 24, 0.48));
  box-shadow: inset 0 0 0 1px rgba(255, 198, 126, 0.12), 0 0 12px rgba(255, 142, 42, 0.12);
}

.copy-btn.ticket-claim-btn:not(:disabled):hover {
  border-color: rgba(255, 191, 112, 0.92);
  background: linear-gradient(135deg, rgba(123, 64, 17, 0.96), rgba(216, 118, 30, 0.58));
  box-shadow: 0 8px 22px rgba(255, 139, 38, 0.18);
}

.ticket-customer-panel {
  position: absolute;
  top: 58px;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  width: min(430px, calc(100% - 20px));
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(109, 255, 175, 0.18);
  border-radius: 10px;
  background: rgba(1, 9, 6, 0.9);
  padding: 10px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(109, 255, 175, 0.06);
  backdrop-filter: blur(12px) saturate(150%);
}

.ticket-customer-head,
.ticket-customer-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-customer-name {
  margin: 0;
  color: #effff7;
  font-weight: 700;
}

.ticket-customer-meta,
.ticket-customer-stock,
.ticket-customer-notice,
.ticket-customer-loading {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.ticket-customer-warning {
  border: 1px solid rgba(255, 197, 112, 0.28);
  border-radius: 8px;
  background: rgba(45, 28, 8, 0.42);
  padding: 8px 9px;
  color: #ffe4bd;
}

.ticket-customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ticket-customer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  text-decoration: none;
}

.ticket-customer-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.ticket-customer-metric {
  border: 1px solid rgba(109, 255, 175, 0.14);
  border-radius: 8px;
  background: rgba(3, 15, 10, 0.68);
  padding: 8px;
}

.ticket-customer-metric span {
  display: block;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.ticket-customer-metric strong {
  display: block;
  margin-top: 4px;
  color: #f1fff8;
  font-size: 0.86rem;
}

.ticket-customer-product {
  border-top: 1px solid rgba(109, 255, 175, 0.12);
  padding-top: 9px;
}

.ticket-customer-product p {
  margin: 0;
  font-size: 0.86rem;
}

.ticket-customer-product-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.ticket-product-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(109, 255, 175, 0.35);
  border-radius: 999px;
  padding: 5px 9px;
  color: #e8fff4;
  background: rgba(8, 37, 23, 0.74);
  font-size: 0.72rem;
  font-family: "JetBrains Mono", monospace;
}

.ticket-product-status.status-risk {
  border-color: rgba(255, 214, 123, 0.58);
  background: rgba(52, 36, 8, 0.7);
}

.ticket-product-status.status-undetected {
  border-color: rgba(109, 255, 175, 0.58);
  background: rgba(8, 42, 26, 0.76);
}

.ticket-product-status.status-on_update {
  border-color: rgba(255, 140, 140, 0.58);
  background: rgba(45, 18, 18, 0.7);
}

.ticket-product-status.status-unknown {
  border-color: rgba(169, 217, 193, 0.3);
  background: rgba(18, 26, 22, 0.72);
}

.ticket-customer-orders {
  display: grid;
  gap: 5px;
}

.ticket-customer-orders p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.35;
}

.ticket-messages {
  flex: 1;
  min-height: 320px;
  max-height: min(56vh, 680px);
  overflow: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}

.mode-admin-tickets .ticket-messages {
  min-height: 0;
  max-height: none;
}

.ticket-message {
  border: 1px solid rgba(109, 255, 175, 0.2);
  border-radius: 11px;
  background: rgba(5, 20, 13, 0.78);
  padding: 9px 10px;
  max-width: min(78%, 760px);
  width: fit-content;
  min-width: min(180px, 100%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ticket-message.is-pending {
  opacity: 0.72;
}

.ticket-message.is-failed {
  opacity: 1;
  border-color: rgba(255, 113, 113, 0.68);
  background: rgba(46, 10, 13, 0.78);
}

.ticket-message.is-customer {
  align-self: flex-end;
  border-color: rgba(100, 188, 255, 0.42);
  background: rgba(6, 18, 31, 0.74);
}

.ticket-message.is-staff,
.ticket-message.is-api {
  align-self: flex-start;
  border-color: rgba(109, 255, 175, 0.42);
  background: rgba(6, 28, 18, 0.78);
}

.ticket-message.is-system {
  align-self: center;
  max-width: min(620px, 92%);
  min-width: 0;
  border-color: rgba(183, 220, 147, 0.4);
  background: rgba(28, 30, 14, 0.56);
  font-size: 0.82rem;
}

.ticket-message.is-system.event-closed {
  border-color: rgba(109, 255, 175, 0.52);
  background: rgba(9, 42, 26, 0.62);
}

.ticket-message.is-system.event-claimed {
  border-color: rgba(255, 178, 91, 0.62);
  background: rgba(48, 30, 10, 0.66);
}

.ticket-message.is-system.event-opened,
.ticket-message.is-system.event-reopened {
  border-color: rgba(255, 130, 130, 0.58);
  background: rgba(48, 18, 18, 0.66);
}

.ticket-message.is-system.event-resolved,
.ticket-message.is-system.event-status {
  border-color: rgba(148, 210, 255, 0.42);
  background: rgba(9, 24, 38, 0.58);
}

.ticket-message.is-highlighted {
  border-color: rgba(255, 241, 144, 0.82);
  box-shadow: 0 0 0 2px rgba(255, 241, 144, 0.18), 0 16px 36px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.ticket-message-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.74rem;
  font-family: "JetBrains Mono", monospace;
}

.ticket-message-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.ticket-message-reply-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: #b8ffd6;
  font: inherit;
  cursor: pointer;
}

.ticket-message-reply-btn:hover {
  color: #f0fff6;
  text-decoration: underline;
}

.ticket-message-reply-ref,
.ticket-reply-target-preview {
  width: 100%;
  margin: 8px 0 0;
  border: 0;
  border-left: 2px solid rgba(109, 255, 175, 0.58);
  border-radius: 6px;
  background: rgba(1, 10, 7, 0.46);
  color: rgba(226, 255, 239, 0.82);
  padding: 7px 9px;
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.35;
  cursor: pointer;
}

.ticket-message-text {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.4;
  font-size: 0.9rem;
}

.ticket-message-delivery {
  margin: 8px 0 0;
  color: #ffd7a8;
  font-size: 0.76rem;
  font-family: "JetBrains Mono", monospace;
}

.ticket-message-attachments {
  margin-top: 9px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
}

.ticket-attachment {
  border: 1px solid rgba(109, 255, 175, 0.24);
  border-radius: 10px;
  padding: 8px;
  background: rgba(4, 18, 12, 0.66);
}

.ticket-attachment img,
.ticket-attachment video {
  display: block;
  width: 100%;
  max-width: 360px;
  max-height: 280px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(1, 8, 5, 0.8);
}

.ticket-attachment img {
  cursor: zoom-in;
}

.ticket-attachment audio {
  width: 100%;
}

.ticket-attachment-link {
  color: #b8ffd6;
  text-decoration: underline;
  word-break: break-word;
}

.ticket-reply-form {
  border-top: 1px solid rgba(109, 255, 175, 0.16);
  padding-top: 10px;
  display: grid;
  gap: 9px;
  flex-shrink: 0;
}

.ticket-template-box {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: block;
  max-height: 38px;
  overflow: hidden;
}

.ticket-template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.ticket-template-refresh {
  font-size: 0.72rem;
  padding: 5px 9px;
}

.ticket-template-list {
  display: flex;
  gap: 6px;
  max-height: 38px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 2px 0;
  overscroll-behavior: contain;
}

.ticket-template-empty {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.ticket-template-item {
  flex: 0 0 min(760px, 96%);
  height: 36px;
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  appearance: none;
  cursor: pointer;
  border: 1px solid rgba(255, 241, 144, 0.34);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(35, 34, 12, 0.72), rgba(5, 22, 14, 0.8));
  color: var(--text-main);
  padding: 0 11px;
  text-align: left;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.ticket-template-item:hover,
.ticket-template-item:focus-visible {
  border-color: rgba(109, 255, 175, 0.6);
  box-shadow: 0 0 16px rgba(45, 255, 136, 0.12);
  transform: translateY(-1px);
}

.ticket-template-title {
  margin: 0;
  font-size: 0.83rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  flex: 0 0 auto;
  max-width: min(48%, 420px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-template-body {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
  font-size: 0.84rem;
  color: #dfffea;
}

.ticket-template-footer {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin-top: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.ticket-template-score {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-family: "JetBrains Mono", monospace;
}

.ticket-template-use {
  font-size: 0.72rem;
  padding: 5px 9px;
}

.ticket-reply-input {
  min-height: 108px;
  resize: none;
}

.mode-admin-tickets .ticket-reply-input {
  height: 86px;
  min-height: 86px;
  max-height: 86px;
}

.ticket-reply-upload {
  display: grid;
  gap: 6px;
}

.ticket-reply-file-input {
  min-height: 42px;
  padding: 7px 10px;
  color: #dfffe9;
  background: rgba(3, 17, 11, 0.72);
  border-color: rgba(109, 255, 175, 0.2);
}

.ticket-reply-file-input::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 1px solid rgba(109, 255, 175, 0.46);
  border-radius: 8px;
  background: rgba(7, 31, 23, 0.92);
  color: #e8fff4;
  font: inherit;
  font-size: 0.78rem;
  padding: 5px 10px;
  cursor: pointer;
  transition: 170ms ease;
}

.ticket-reply-file-input::file-selector-button:hover {
  border-color: rgba(109, 255, 175, 0.84);
  background: rgba(13, 54, 36, 0.96);
}

.ticket-reply-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ticket-reply-file-chip {
  max-width: min(260px, 100%);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(109, 255, 175, 0.22);
  border-radius: 999px;
  background: rgba(4, 20, 13, 0.72);
  color: #dfffe9;
  padding: 4px 5px 4px 10px;
  font-size: 0.78rem;
}

.ticket-reply-file-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-reply-file-chip button {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 142, 142, 0.4);
  border-radius: 50%;
  background: rgba(55, 18, 18, 0.82);
  color: #ffd7d7;
  cursor: pointer;
  line-height: 1;
}

.ticket-reply-files-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.ticket-reply-files-hint.is-error {
  color: var(--danger);
  font-weight: 800;
}

.ticket-reply-files-hint.is-success {
  color: var(--accent);
  font-weight: 800;
}

.ticket-reply-target {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.ticket-reply-target-preview {
  margin: 0;
  flex: 1;
}

.ticket-reply-target-clear {
  border: 1px solid rgba(255, 162, 162, 0.42);
  border-radius: 8px;
  background: rgba(45, 17, 17, 0.72);
  color: #ffd9d9;
  padding: 0 10px;
  cursor: pointer;
}

.ticket-reply-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ticket-reply-actions .open-btn,
.ticket-reply-actions .copy-btn {
  min-width: 146px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ticket-reply-actions .open-btn:not(:disabled),
.ticket-reply-actions .copy-btn:not(:disabled) {
  color: #ffffff;
  font-weight: 700;
  border-color: rgba(122, 255, 185, 0.78);
  background: linear-gradient(135deg, rgba(9, 112, 68, 0.98), rgba(24, 194, 124, 0.72));
  box-shadow:
    0 0 14px rgba(80, 255, 148, 0.28),
    0 0 30px rgba(80, 255, 148, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.ticket-reply-actions .copy-btn.ticket-claim-btn:not(:disabled) {
  color: #fff6e8;
  border-color: rgba(255, 195, 104, 0.88);
  background: linear-gradient(135deg, rgba(125, 66, 12, 0.98), rgba(214, 124, 28, 0.72));
  box-shadow:
    0 0 14px rgba(255, 152, 44, 0.28),
    0 0 30px rgba(255, 152, 44, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.ticket-reply-actions .copy-btn.danger:not(:disabled) {
  color: #fff2f2;
  border-color: rgba(255, 132, 132, 0.88);
  background: linear-gradient(135deg, rgba(95, 20, 23, 0.98), rgba(139, 37, 42, 0.74));
  box-shadow:
    0 0 14px rgba(255, 104, 104, 0.24),
    0 0 30px rgba(255, 104, 104, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ticket-reply-actions .open-btn:disabled,
.ticket-reply-actions .copy-btn:disabled,
.ticket-reply-actions .copy-btn.danger:disabled,
.ticket-reply-actions .copy-btn.ticket-claim-btn:disabled {
  opacity: 1;
  color: rgba(208, 255, 226, 0.34);
  border-color: rgba(109, 255, 175, 0.16);
  background: rgba(4, 25, 17, 0.38);
  box-shadow: none;
  text-shadow: none;
  filter: saturate(0.34) brightness(0.68);
}

.copy-btn.danger {
  border-color: rgba(255, 130, 130, 0.52);
  color: #ffd7d7;
  background: rgba(47, 18, 18, 0.86);
}

.copy-btn.danger:hover {
  border-color: rgba(255, 146, 146, 0.9);
  background: rgba(64, 24, 24, 0.92);
  box-shadow: 0 8px 22px rgba(255, 138, 138, 0.18);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 22px;
}

.game-card {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  padding: 19px;
  background: linear-gradient(180deg, rgba(6, 27, 18, 0.75), rgba(5, 19, 13, 0.78));
  box-shadow: var(--shadow-main), var(--shadow-glow), var(--glow-inset-card), inset 0 0 0 1px rgba(117, 255, 186, 0.04);
  backdrop-filter: var(--glass-blur);
  overflow: hidden;
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-xl) - 1px);
  border: 1px solid rgba(142, 255, 198, 0.08);
  pointer-events: none;
}

.game-card::after {
  display: none;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(121, 255, 195, 0.45);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.52), 0 12px 34px rgba(88, 255, 161, 0.16);
}

.game-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 14px;
}

.game-title {
  font-size: 1.26rem;
  text-shadow: 0 0 12px rgba(112, 255, 182, 0.2);
}

.product-count {
  color: var(--text-dim);
  font-size: 0.76rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(112, 255, 180, 0.12);
  background: rgba(4, 20, 13, 0.72);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.product-row:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 255, 161, 0.62);
  background: rgba(7, 31, 21, 0.84);
  box-shadow: 0 10px 26px rgba(26, 122, 79, 0.28);
}

.product-data {
  min-width: 0;
}

.product-name {
  margin: 0;
  color: #ebfff4;
  font-size: 0.98rem;
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-dev {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.product-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.open-btn,
.copy-btn,
.block-action {
  text-decoration: none;
  font: inherit;
  font-size: 0.8rem;
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-spring);
}

.open-btn,
.block-action {
  color: #e8fff5;
  border: 1px solid rgba(107, 255, 181, 0.42);
  background: linear-gradient(135deg, rgba(9, 98, 62, 0.95), rgba(19, 164, 106, 0.42));
  box-shadow: var(--glow-btn-rest), inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 0 0 1px rgba(145, 255, 201, 0.12);
}

.open-btn::before,
.block-action::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    90deg,
    rgba(80, 255, 148, 0) 0%,
    rgba(80, 255, 148, 0.9) 35%,
    rgba(138, 255, 208, 1) 50%,
    rgba(80, 255, 148, 0.9) 65%,
    rgba(80, 255, 148, 0) 100%
  );
  background-size: 200% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderSweep 3s linear infinite;
  pointer-events: none;
  opacity: 0.55;
}

.copy-btn {
  color: #dfffe9;
  border: 1px solid rgba(109, 255, 175, 0.5);
  background: rgba(7, 31, 23, 0.86);
  box-shadow: inset 0 0 0 1px rgba(109, 255, 175, 0.12), 0 0 4px rgba(80, 255, 148, 0.15);
}

.open-btn:hover,
.copy-btn:hover,
.block-action:hover {
  transform: translateY(-2px);
}

.open-btn:active,
.copy-btn:active,
.block-action:active {
  transform: translateY(1px);
  transition: transform 80ms ease, box-shadow 80ms ease;
}

.open-btn:disabled,
.copy-btn:disabled,
.block-action:disabled {
  opacity: 0.54;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  animation: none;
}

.open-btn:disabled::before,
.block-action:disabled::before {
  opacity: 0;
  animation: none;
}

.ticket-reply-actions .open-btn:not(:disabled),
.ticket-reply-actions .copy-btn:not(:disabled),
.ticket-thread-actions .copy-btn:not(:disabled) {
  animation: btnReadyPulse 2.4s ease-in-out infinite;
}

.open-btn:hover,
.block-action:hover {
  border-color: rgba(138, 255, 200, 0.92);
  color: #f4fff9;
  text-shadow: var(--phosphor-text);
  box-shadow: var(--glow-primary-intense);
}

.open-btn:active,
.block-action:active {
  box-shadow: 0 0 6px rgba(80, 255, 148, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.copy-btn:hover {
  border-color: rgba(109, 255, 175, 0.88);
  background: rgba(11, 38, 28, 0.92);
  text-shadow: 0 0 10px rgba(80, 255, 148, 0.28);
  box-shadow: 0 0 8px rgba(80, 255, 148, 0.35), 0 0 20px rgba(80, 255, 148, 0.16), 0 12px 28px rgba(0, 0, 0, 0.32);
}

.copy-btn:active {
  box-shadow: 0 0 5px rgba(80, 255, 148, 0.22);
}

.btn-ripple {
  position: absolute;
  transform: translate(-50%, -50%) scale(0);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(80, 255, 148, 0.22);
  pointer-events: none;
  animation: rippleExpand 480ms ease-out forwards;
}

.card-scan-line {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(80, 255, 148, 0.6), transparent);
  pointer-events: none;
  z-index: 10;
  animation: cardScanDown 600ms ease-out forwards;
}

body.has-lightbox {
  overflow: hidden;
}

.topbar {
  background:
    linear-gradient(180deg, rgba(3, 13, 9, 0.88), rgba(2, 8, 6, 0.72)),
    linear-gradient(90deg, rgba(126, 255, 190, 0.06), transparent 34%, rgba(126, 255, 190, 0.035));
  border-bottom-color: rgba(126, 255, 190, 0.14);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.34), 0 1px 0 rgba(80, 255, 148, 0.08);
}

.brand {
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(126, 255, 190, 0.22);
  background:
    linear-gradient(180deg, rgba(10, 38, 25, 0.82), rgba(3, 14, 9, 0.92)),
    radial-gradient(circle at 50% 30%, rgba(126, 255, 190, 0.24), transparent 62%);
  box-shadow: var(--shadow-inset), 0 0 26px rgba(65, 255, 150, 0.12);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(126, 255, 190, 0.26), transparent 32%, rgba(126, 255, 190, 0.08));
  opacity: 0.62;
  pointer-events: none;
}

.brand-logo {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
}

.brand-text {
  letter-spacing: 0.075em;
  text-shadow: 0 0 18px rgba(126, 255, 190, 0.16);
  transition: letter-spacing 320ms ease, text-shadow 320ms ease;
}

.brand:hover .brand-text {
  letter-spacing: 0.12em;
  text-shadow: var(--phosphor-text);
}

.app-shell {
  width: min(1280px, 100% - 42px);
}

.hero {
  margin-bottom: 28px;
  padding-top: 14px;
}

.hero::before {
  height: 260px;
  background:
    radial-gradient(circle at 12% 46%, rgba(63, 231, 139, 0.16), transparent 58%),
    radial-gradient(circle at 70% 10%, rgba(126, 255, 190, 0.08), transparent 52%);
}

h1 {
  color: #f2fff8;
  text-shadow: 0 0 20px rgba(80, 255, 148, 0.24), 0 0 48px rgba(80, 255, 148, 0.10);
  animation: phosphorFlicker 8s ease-in-out infinite;
  animation-delay: -3s;
}

.subtitle {
  max-width: 720px;
}

.hero-console,
.meta-pill,
.control-bar,
.game-card,
.product-row,
.guide-sidebar,
.guide-panel,
.guide-block,
.item-card,
.admin-auth,
.admin-users-card {
  box-shadow: var(--shadow-main), var(--shadow-inset);
}

.hero-console {
  border-color: rgba(126, 255, 190, 0.38);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(4, 18, 12, 0.92), rgba(1, 8, 5, 0.88));
  box-shadow: 0 0 0 1px rgba(80, 255, 148, 0.08), 0 0 20px rgba(80, 255, 148, 0.12), inset 0 0 30px rgba(80, 255, 148, 0.04), var(--shadow-main);
  animation: consolePulse 4s ease-in-out infinite;
}

.meta-pill {
  border-radius: 8px;
  background: rgba(4, 16, 11, 0.78);
  transition: border-color 240ms ease, box-shadow 240ms ease;
}

.meta-pill:hover {
  border-color: rgba(80, 255, 148, 0.52);
  box-shadow: 0 0 12px rgba(80, 255, 148, 0.18);
}

.control-bar {
  position: relative;
  overflow: hidden;
  border-color: rgba(126, 255, 190, 0.18);
  background:
    linear-gradient(180deg, rgba(6, 24, 16, 0.86), rgba(2, 10, 7, 0.78)),
    radial-gradient(80% 160% at 0% 0%, rgba(126, 255, 190, 0.06), transparent 62%);
}

.control-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(126, 255, 190, 0.08), transparent);
  transform: translateX(-42%);
  opacity: 0.5;
}

.control-input,
.control-select {
  border-radius: var(--radius-md);
  background: rgba(1, 9, 6, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.games-grid {
  gap: 18px;
}

.game-card {
  border-color: rgba(126, 255, 190, 0.18);
  border-radius: var(--radius-xl);
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(6, 25, 16, 0.82), rgba(2, 10, 7, 0.84)),
    radial-gradient(120% 120% at 0% 0%, rgba(126, 255, 190, 0.07), transparent 58%);
  box-shadow: var(--shadow-main), var(--glow-inset-card), 0 0 0 1px rgba(80, 255, 148, 0.06);
}

.game-card::before {
  inset: 0;
  border: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(126, 255, 190, 0) 0%, rgba(80, 255, 148, 0.9) 35%, rgba(126, 255, 190, 0) 70%) top left / 200% 1px no-repeat,
    linear-gradient(180deg, rgba(126, 255, 190, 0.16), transparent 34%) top left / 1px 100% no-repeat;
  animation: cardTopBorderSweep 5s ease-in-out infinite;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(126, 255, 190, 0.42);
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.6),
    0 18px 46px rgba(37, 205, 120, 0.14),
    inset 0 0 60px rgba(80, 255, 148, 0.06),
    0 0 0 1px rgba(126, 255, 190, 0.12);
}

.game-card-head {
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(126, 255, 190, 0.1);
}

.game-title {
  font-size: 1.12rem;
  color: #f1fff8;
}

.product-count {
  padding: 5px 8px;
  border: 1px solid rgba(126, 255, 190, 0.14);
  border-radius: 7px;
  background: rgba(1, 9, 6, 0.62);
}

.products-list {
  gap: 9px;
  padding-left: 20px;
}

.product-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-radius: var(--radius-lg);
  border-color: rgba(126, 255, 190, 0.1);
  background:
    linear-gradient(180deg, rgba(3, 16, 10, 0.88), rgba(2, 10, 7, 0.82)),
    radial-gradient(80% 120% at 100% 0%, rgba(126, 255, 190, 0.04), transparent 60%);
}

.product-row::before {
  content: ">";
  position: absolute;
  left: -17px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(80, 255, 148, 0);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  transition: color 220ms ease, left 220ms ease;
  pointer-events: none;
}

.product-row:hover::before {
  color: rgba(80, 255, 148, 0.7);
  left: -14px;
}

.product-row:hover {
  border-color: rgba(126, 255, 190, 0.34);
  background:
    linear-gradient(180deg, rgba(6, 27, 17, 0.94), rgba(3, 13, 9, 0.9)),
    radial-gradient(80% 120% at 100% 0%, rgba(126, 255, 190, 0.07), transparent 60%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 20px rgba(80, 255, 148, 0.1), 0 0 0 1px rgba(126, 255, 190, 0.1);
}

.product-name {
  color: #f2fff8;
}

.open-btn,
.copy-btn,
.block-action,
.guide-download-link,
.back-btn,
.admin-small-btn {
  border-radius: var(--radius-md);
}

.open-btn,
.block-action,
.guide-download-link[data-style="primary"] {
  background:
    linear-gradient(135deg, rgba(20, 150, 88, 0.95), rgba(37, 215, 126, 0.62)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}

.open-btn,
.copy-btn,
.block-action,
.guide-download-link {
  position: relative;
  overflow: hidden;
}

.inline-link.inline-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0 4px;
  padding: 7px 13px;
  border: 1px solid rgba(126, 255, 190, 0.36);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(20, 150, 88, 0.95), rgba(37, 215, 126, 0.62)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  color: #ecfff5;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(145, 255, 201, 0.1), 0 8px 22px rgba(35, 197, 116, 0.14);
}

.inline-link.inline-download-link:hover {
  color: #f4fff9;
  border-color: rgba(138, 255, 200, 0.86);
  text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(145, 255, 201, 0.16), 0 12px 28px rgba(35, 197, 116, 0.2);
}

.open-btn::after,
.copy-btn::after,
.block-action::after,
.guide-download-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.16), transparent 72%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
  pointer-events: none;
}

.open-btn:hover::after,
.copy-btn:hover::after,
.block-action:hover::after,
.guide-download-link:hover::after {
  transform: translateX(120%);
}

.guide-head {
  margin-bottom: 22px;
}

.mode-guide .guide-head {
  padding: 6px 0 2px;
}

.guide-game {
  color: rgba(138, 255, 200, 0.88);
}

.guide-head h2 {
  color: #f4fff9;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  text-shadow: 0 0 28px rgba(126, 255, 190, 0.12);
}

.guide-layout {
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 20px;
}

.guide-sidebar {
  border-color: rgba(126, 255, 190, 0.18);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(5, 21, 14, 0.9), rgba(1, 8, 5, 0.86)),
    radial-gradient(120% 90% at 0% 0%, rgba(126, 255, 190, 0.06), transparent 60%);
}

.sidebar-title {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(126, 255, 190, 0.1);
}

.toc-link {
  border-radius: var(--radius-md);
  background: rgba(1, 9, 6, 0.58);
}

.toc-link.active {
  background:
    linear-gradient(90deg, rgba(32, 177, 103, 0.28), rgba(1, 9, 6, 0.74)),
    rgba(1, 9, 6, 0.74);
  box-shadow: inset 3px 0 0 rgba(138, 255, 200, 0.86), 0 0 0 1px rgba(126, 255, 190, 0.14);
}

.guide-panel {
  border-color: rgba(126, 255, 190, 0.16);
  border-radius: var(--radius-xl);
  padding: clamp(18px, 3vw, 34px);
  background:
    linear-gradient(180deg, rgba(5, 22, 14, 0.88), rgba(1, 8, 5, 0.88)),
    radial-gradient(95% 54% at 100% 0%, rgba(126, 255, 190, 0.065), transparent 64%),
    repeating-linear-gradient(to bottom, transparent 0, transparent 28px, rgba(126, 255, 190, 0.012) 28px, rgba(126, 255, 190, 0.012) 29px);
}

.guide-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(1, 9, 6, 0.58);
}

.guide-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(126, 255, 190, 0.34);
  color: #ecfff5;
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease, background 190ms ease;
}

.guide-download-link[data-style="secondary"],
.guide-download-link:not([data-style="primary"]) {
  background: rgba(7, 31, 22, 0.84);
}

.guide-download-link:hover {
  transform: translateY(-1px);
  border-color: rgba(138, 255, 200, 0.84);
  box-shadow: 0 12px 28px rgba(35, 197, 116, 0.18);
}

.guide-intro {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(126, 255, 190, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(1, 9, 6, 0.46);
}

.guide-blocks {
  gap: 18px;
}

.guide-block {
  border-left-width: 1px;
  border-radius: var(--radius-xl);
  border-color: rgba(126, 255, 190, 0.14);
  padding: 18px 18px 18px 22px;
  background:
    linear-gradient(180deg, rgba(5, 22, 14, 0.88), rgba(1, 8, 5, 0.88)),
    radial-gradient(100% 120% at 100% 0%, rgba(126, 255, 190, 0.052), transparent 68%);
}

.guide-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(138, 255, 200, 0.88), rgba(31, 199, 120, 0.2));
  box-shadow: 0 0 18px rgba(80, 255, 148, 0.24);
}

.guide-block[data-type="warning"]::before {
  background: linear-gradient(180deg, rgba(226, 255, 134, 0.94), rgba(155, 181, 72, 0.26));
  box-shadow: 0 0 18px rgba(226, 255, 134, 0.22);
}

.guide-block:hover {
  transform: translateY(-3px);
  border-color: rgba(126, 255, 190, 0.34);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(126, 255, 190, 0.1);
}

.block-head {
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.block-title {
  color: #f2fff8;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  letter-spacing: 0.035em;
}

.block-body,
.item-text,
.issue-text {
  color: #e7fff0;
}

.item-card {
  border-radius: var(--radius-lg);
  border-color: rgba(126, 255, 190, 0.12);
  background:
    linear-gradient(180deg, rgba(4, 18, 12, 0.82), rgba(1, 8, 5, 0.78)),
    radial-gradient(90% 90% at 100% 0%, rgba(126, 255, 190, 0.035), transparent 62%);
}

.item-card:hover {
  border-color: rgba(126, 255, 190, 0.34);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(126, 255, 190, 0.08);
}

.item-card.is-reboot-alert {
  border-color: rgba(226, 255, 134, 0.7);
  background:
    linear-gradient(180deg, rgba(46, 43, 16, 0.94), rgba(23, 21, 9, 0.9)),
    radial-gradient(120% 140% at 100% 0%, rgba(226, 255, 134, 0.16), transparent 64%);
}

.inline-copy {
  border-radius: 6px;
  background: rgba(2, 12, 8, 0.9);
}

.code-panel {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(0, 10, 6, 0.94), rgba(0, 5, 3, 0.94));
}

.guide-figure {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(126, 255, 190, 0.16);
  background: rgba(1, 8, 5, 0.74);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  cursor: zoom-in;
}

.guide-figure::before {
  display: none;
}

.guide-figure img {
  transition: transform 260ms ease, filter 260ms ease;
}

.guide-figure:hover img {
  transform: scale(1.01);
  filter: saturate(1.05) contrast(1.03);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 42px);
  background:
    radial-gradient(80% 70% at 50% 35%, rgba(17, 101, 59, 0.22), transparent 62%),
    rgba(0, 4, 2, 0.86);
  backdrop-filter: blur(10px);
}

.image-lightbox-img {
  display: block;
  max-width: min(1180px, 100%);
  max-height: min(78vh, 920px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(126, 255, 190, 0.26);
  background: #010403;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.66), 0 0 0 1px rgba(126, 255, 190, 0.08);
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(126, 255, 190, 0.34);
  border-radius: 12px;
  background: rgba(2, 12, 8, 0.88);
  color: #f2fff8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-caption {
  max-width: min(900px, 100%);
  margin: 12px auto 0;
  color: rgba(226, 255, 239, 0.82);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  text-align: center;
}

.hidden {
  display: none !important;
}

.guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.mode-guide .guide-head {
  position: relative;
  justify-content: center;
}

.guide-meta {
  text-align: right;
}

.mode-guide .guide-meta {
  text-align: center;
  width: 100%;
}

.guide-game {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
}

.guide-dev {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.guide-dev.buyer-brand {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.back-btn {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(5, 22, 14, 0.76);
  color: var(--text-main);
  font: inherit;
  padding: 10px 14px;
  cursor: pointer;
  transition: 180ms ease;
}

.mode-admin.mode-guide .back-btn {
  position: absolute;
  top: 0;
  left: 0;
}

.back-btn:hover {
  border-color: var(--accent-cyan-soft);
  background: rgba(8, 30, 20, 0.9);
  box-shadow: 0 10px 26px rgba(88, 255, 161, 0.24);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 18px;
}

.guide-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  border: 1px solid rgba(109, 255, 175, 0.28);
  border-radius: var(--radius-lg);
  padding: 12px;
  background: rgba(4, 18, 12, 0.82);
  backdrop-filter: none;
}

.sidebar-title {
  margin-bottom: 10px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.guide-toc {
  display: grid;
  gap: 6px;
}

.toc-link {
  border: 1px solid rgba(110, 255, 178, 0.12);
  border-radius: 10px;
  padding: 9px 10px;
  color: #b6e8d2;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.3;
  background: rgba(5, 22, 14, 0.7);
  transition: 180ms ease;
}

.toc-link:hover {
  border-color: rgba(109, 255, 175, 0.62);
  color: #e6ffef;
}

.toc-link.active {
  border-color: rgba(109, 255, 175, 0.9);
  color: #f1fff8;
  box-shadow: 0 0 0 1px rgba(109, 255, 175, 0.24);
}

.guide-panel {
  border: 1px solid rgba(126, 255, 190, 0.18);
  border-radius: var(--radius-xl);
  padding: clamp(16px, 3vw, 30px);
  background:
    linear-gradient(180deg, rgba(5, 22, 14, 0.82), rgba(1, 8, 5, 0.84)),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 22px,
      rgba(114, 255, 181, 0.015) 22px,
      rgba(114, 255, 181, 0.015) 23px
    );
  box-shadow: var(--shadow-main), var(--glow-inset-card);
  backdrop-filter: var(--glass-blur);
}

.guide-intro {
  margin: 0 0 16px;
  color: #d2ffe5;
  line-height: 1.62;
  font-size: 1.04rem;
  font-weight: 560;
}

.guide-blocks {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.guide-block {
  position: relative;
  scroll-margin-top: 104px;
  padding: 18px 18px 17px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(112, 255, 180, 0.2);
  background:
    linear-gradient(180deg, rgba(5, 26, 16, 0.85), rgba(4, 17, 11, 0.86)),
    radial-gradient(120% 140% at 100% 0%, rgba(75, 255, 160, 0.055), transparent 64%);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(121, 255, 193, 0.08);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.guide-block:hover {
  transform: translateY(-2px);
  border-color: rgba(114, 255, 181, 0.74);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(114, 255, 181, 0.22);
}

.guide-block[data-type="prep"] {
  border-left: 4px solid rgba(102, 245, 170, 0.88);
}

.guide-block[data-type="launch"] {
  border-left: 4px solid rgba(109, 255, 175, 0.94);
}

.guide-block[data-type="warning"] {
  border-left: 4px solid rgba(206, 255, 104, 0.9);
}

.guide-block[data-type="download"] {
  border-left: 4px solid rgba(92, 255, 161, 0.9);
}

.checker-block {
  border-color: rgba(138, 255, 200, 0.34);
  background:
    linear-gradient(180deg, rgba(7, 33, 20, 0.92), rgba(2, 13, 8, 0.9)),
    radial-gradient(100% 120% at 100% 0%, rgba(126, 255, 190, 0.09), transparent 66%);
}

.checker-note {
  margin-top: 10px;
  color: #b8ecd4;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
}

.checker-download-link {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.guide-block[data-type="code"] {
  border-left: 4px solid rgba(130, 255, 208, 0.88);
}

.block-head {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(113, 255, 180, 0.14);
  padding-bottom: 8px;
}

.block-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  margin-right: 10px;
  flex-shrink: 0;
  border: 1px solid rgba(80, 255, 148, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(4, 18, 12, 0.9);
  color: var(--accent-cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.block-type::before {
  content: "//";
  margin-right: 4px;
  opacity: 0.5;
}

.block-title {
  font-size: clamp(1.04rem, 1.6vw, 1.32rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.block-body {
  color: #deffea;
  line-height: 1.62;
  font-size: 1.03rem;
  font-weight: 560;
  white-space: pre-wrap;
}

.block-body p {
  margin: 0;
}

.block-body p + p {
  margin-top: 8px;
}

.block-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.block-list.is-steps {
  counter-reset: step;
}

.item-card {
  border: 1px solid rgba(110, 255, 176, 0.16);
  border-radius: 12px;
  background: rgba(5, 22, 14, 0.78);
  padding: 13px 14px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.block-list.is-steps .item-card {
  position: relative;
  padding-left: 50px;
}

.block-list.is-steps .item-card::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 13px;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(110, 255, 176, 0.48);
  background: rgba(10, 45, 28, 0.86);
  color: #d8ffe9;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(113, 255, 180, 0.82);
  background: rgba(8, 30, 20, 0.9);
  box-shadow: 0 12px 24px rgba(88, 255, 161, 0.23);
}

.item-card.is-reboot-alert {
  border-color: rgba(255, 226, 110, 0.92);
  background:
    linear-gradient(180deg, rgba(62, 49, 11, 0.92), rgba(40, 31, 9, 0.92)),
    radial-gradient(120% 140% at 100% 0%, rgba(255, 230, 128, 0.2), transparent 66%);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 226, 110, 0.34),
    0 0 18px rgba(255, 222, 97, 0.22);
  animation: rebootPulse 1.8s ease-in-out infinite;
}

.item-text {
  line-height: 1.5;
  font-size: 1.03rem;
  font-weight: 560;
}

.item-sublist,
.issue-sublist {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.item-sublist.depth-1,
.issue-sublist.depth-1 {
  margin-top: 8px;
  padding-left: 18px;
}

.item-sublist.depth-2,
.issue-sublist.depth-2 {
  margin-top: 6px;
  padding-left: 16px;
}

.item-sublist.is-steps,
.issue-sublist.is-steps {
  list-style: decimal;
}

.item-sublist.is-checklist,
.issue-sublist.is-checklist {
  list-style: disc;
}

.item-sublist li,
.issue-sublist li {
  line-height: 1.44;
  font-size: 0.98rem;
  font-weight: 540;
}

.item-sublist li::marker,
.issue-sublist li::marker {
  color: rgba(137, 239, 192, 0.94);
}

.item-figure {
  margin-top: 10px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 420px;
}

.inline-link {
  color: #8fffc8;
  text-decoration: none;
  border-bottom: 1px dashed rgba(130, 255, 197, 0.48);
  transition: color 170ms ease, border-color 170ms ease, text-shadow 170ms ease;
}

.inline-link:hover {
  color: #dcfff0;
  border-color: rgba(130, 255, 197, 0.9);
  text-shadow: 0 0 14px rgba(104, 255, 168, 0.34);
}

.inline-copy {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0 2px;
  border: 1px solid rgba(120, 255, 188, 0.44);
  border-radius: 7px;
  padding: 1px 8px;
  background: rgba(8, 31, 21, 0.9);
  color: #d9ffe8;
  font: inherit;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
  line-height: 1.35;
  white-space: normal;
  word-break: break-all;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.inline-copy:hover {
  border-color: rgba(145, 255, 204, 0.88);
  box-shadow: 0 0 0 1px rgba(145, 255, 204, 0.22);
}

.inline-copy.is-copied {
  border-color: rgba(132, 255, 196, 0.95);
  box-shadow: 0 0 0 1px rgba(132, 255, 196, 0.35);
}

.inline-copy.is-error {
  border-color: rgba(255, 150, 150, 0.85);
  color: #ffe5e5;
}

.inline-copy[data-copy-state]::after {
  content: attr(data-copy-state);
  margin-left: 7px;
  color: rgba(179, 255, 220, 0.9);
  font-size: 0.78em;
  font-family: "Manrope", sans-serif;
}

.item-issue {
  display: grid;
  gap: 7px;
}

.issue-line {
  display: grid;
  gap: 4px;
}

.issue-label {
  color: #89e8bf;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.issue-line.solution .issue-label {
  color: #a8ffd8;
}

.issue-line.question .issue-label {
  color: #d8ffe9;
}

.issue-line.answer .issue-label {
  color: #91f7c7;
}

.item-card.is-faq-item .item-issue {
  gap: 12px;
}

.item-card.is-faq-item .issue-line {
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
  row-gap: 8px;
}

.item-card.is-faq-item .issue-label {
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.item-card.is-faq-item .issue-line.question .issue-label {
  color: #f3fff8;
}

.item-card.is-faq-item .issue-line.answer .issue-label {
  color: #9dffd0;
}

.issue-text {
  line-height: 1.5;
  font-size: 1.02rem;
  font-weight: 560;
}

.block-body strong,
.item-text strong,
.issue-text strong,
.item-sublist strong,
.issue-sublist strong {
  color: #f3fff8;
  font-weight: 800;
}

.code-wrap {
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 1px solid rgba(113, 255, 180, 0.42);
  border-radius: 8px;
  padding: 5px 9px;
  background: rgba(7, 31, 19, 0.9);
  color: #dfffee;
  font-size: 0.74rem;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.code-copy-btn:hover {
  border-color: rgba(140, 255, 204, 0.9);
  background: rgba(10, 41, 25, 0.95);
}

.code-panel {
  margin: 0;
  padding: 36px 12px 12px;
  border-radius: 10px;
  background: rgba(0, 8, 5, 0.86);
  border: 1px solid rgba(97, 255, 169, 0.2);
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
}

.guide-figure {
  --img-width: 100%;
  --img-max-width: 100%;
  margin: 12px 0 0;
  border-radius: 12px;
  overflow: clip;
  background: rgba(4, 19, 12, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(108, 255, 173, 0.14),
    0 8px 24px rgba(0, 0, 0, 0.24);
  width: min(100%, var(--img-width));
  max-width: var(--img-max-width);
}

.guide-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
  border-radius: inherit;
  will-change: auto;
  transform: translateZ(0);
}

.guide-figure[data-align="center"] {
  margin-left: auto;
  margin-right: auto;
}

.guide-figure[data-align="right"] {
  margin-left: auto;
  margin-right: 0;
}

.block-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

.empty-state {
  border: 1px dashed rgba(126, 255, 188, 0.3);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  color: var(--text-soft);
  background: rgba(5, 22, 14, 0.5);
}

.reveal {
  opacity: 0;
  transform: translateY(12px) scaleY(0.97);
  transform-origin: top center;
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes comingScan {
  0% {
    transform: translateX(-24%);
    opacity: 0.12;
  }
  35% {
    opacity: 0.22;
  }
  50% {
    transform: translateX(8%);
    opacity: 0.2;
  }
  100% {
    transform: translateX(36%);
    opacity: 0.1;
  }
}

@keyframes comingGlow {
  0%,
  100% {
    text-shadow:
      0 0 16px rgba(120, 255, 191, 0.16),
      0 0 36px rgba(84, 234, 152, 0.08);
  }
  50% {
    text-shadow:
      0 0 22px rgba(120, 255, 191, 0.26),
      0 0 48px rgba(84, 234, 152, 0.14);
  }
}

@keyframes headingGlitchA {
  0% {
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0);
  }
  18% {
    clip-path: inset(9% 0 72% 0);
    transform: translate(-2px, -1px);
  }
  36% {
    clip-path: inset(56% 0 30% 0);
    transform: translate(2px, 0);
  }
  54% {
    clip-path: inset(74% 0 8% 0);
    transform: translate(-1px, 1px);
  }
  72% {
    clip-path: inset(35% 0 46% 0);
    transform: translate(1px, 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0);
  }
}

@keyframes headingGlitchB {
  0% {
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0);
  }
  16% {
    clip-path: inset(26% 0 52% 0);
    transform: translate(1px, 0);
  }
  40% {
    clip-path: inset(64% 0 18% 0);
    transform: translate(-2px, 0);
  }
  64% {
    clip-path: inset(10% 0 74% 0);
    transform: translate(2px, -1px);
  }
  100% {
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0);
  }
}

@keyframes rebootPulse {
  0%,
  100% {
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.34),
      0 0 0 1px rgba(255, 226, 110, 0.34),
      0 0 12px rgba(255, 222, 97, 0.16);
  }
  50% {
    box-shadow:
      0 16px 30px rgba(0, 0, 0, 0.38),
      0 0 0 1px rgba(255, 232, 130, 0.62),
      0 0 22px rgba(255, 230, 120, 0.34);
  }
}

/* ─── PREMIUM MATRIX KEYFRAMES ─── */

@keyframes topbarBorderSweep {
  0% { background-position: -100% 0; }
  60% { background-position: 200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes borderSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes cardTopBorderSweep {
  0%, 100% { background-position: -100% 0, 0 0; }
  50% { background-position: 200% 0, 0 0; }
}

@keyframes consolePulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(80, 255, 148, 0.08),
      0 0 16px rgba(80, 255, 148, 0.08),
      inset 0 0 20px rgba(80, 255, 148, 0.03);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(80, 255, 148, 0.16),
      0 0 28px rgba(80, 255, 148, 0.18),
      inset 0 0 30px rgba(80, 255, 148, 0.06);
  }
}

@keyframes dotPulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 6px rgba(80, 255, 148, 0.7);
  }
  50% {
    opacity: 0.4;
    box-shadow: 0 0 3px rgba(80, 255, 148, 0.3);
  }
}

@keyframes btnScanPulse {
  0%, 100% {
    opacity: 0.78;
    box-shadow: var(--glow-btn-rest);
  }
  50% {
    opacity: 0.58;
    box-shadow: none;
  }
}

@keyframes btnReadyPulse {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(109, 255, 175, 0.12), 0 0 6px rgba(80, 255, 148, 0.14);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(109, 255, 175, 0.2), 0 0 16px rgba(80, 255, 148, 0.26);
  }
}

@keyframes phosphorFlicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.88; }
  98% { opacity: 0.96; }
  99% { opacity: 0.92; }
}

@keyframes rippleExpand {
  to {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
  }
}

@keyframes cardScanDown {
  from { top: 0; opacity: 1; }
  to   { top: 100%; opacity: 0; }
}

/* ─── END PREMIUM MATRIX KEYFRAMES ─── */

@media (max-width: 1050px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: relative;
    top: 0;
  }
}

@media (max-width: 940px) {
  #landingView {
    min-height: auto;
  }

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

  .control-bar {
    grid-template-columns: 1fr;
  }

  .admin-tickets-toolbar {
    grid-template-columns: 1fr;
  }

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

  .broadcast-grid {
    grid-template-columns: 1fr;
  }

  .metrics-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .reseller-identity-panel {
    position: static;
  }

  .shop-admin-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-admin-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .shop-metrics-grid,
  .shop-pricing-summary-metrics,
  .shop-grid-two,
  .shop-grid-two.wide-left,
  .shop-giveaway-prize-layout,
  .shop-broadcast-workspace,
  .shop-dialog-layout,
  .shop-inventory-layout {
    grid-template-columns: 1fr;
  }

  .shop-pricing-mode {
    width: 100%;
    min-width: 0;
  }

  .shop-pricing-product-head,
  .shop-pricing-summary-toggle {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-pricing-product-head b,
  .shop-pricing-summary-toggle b {
    white-space: normal;
  }

  .shop-broadcast-preview,
  .shop-broadcast-actions {
    position: static;
  }

  .shop-broadcast-list {
    max-height: 320px;
  }

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

  .shop-broadcast-button-row {
    grid-template-columns: 1fr;
  }

  .shop-inventory-left,
  .shop-inventory-right .shop-panel,
  .shop-dialog-workspace {
    position: static;
    height: auto;
    max-height: none;
    min-height: auto;
    overflow: visible;
  }

  .shop-inventory-right .shop-inventory-stock {
    max-height: 60vh;
  }

  .shop-dialog-list,
  .shop-dialog-thread,
  .shop-profile-panel {
    position: static;
    width: auto;
    min-width: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    min-height: auto;
    max-height: none;
  }

  .shop-message {
    max-width: 100%;
  }

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

  .shop-profile-grid,
  .shop-message-detail-grid {
    grid-template-columns: 1fr;
  }

  .broadcast-stats {
    grid-template-columns: 1fr;
  }

  .tickets-list {
    max-height: 280px;
  }

  body.mode-admin-tickets {
    overflow: hidden;
  }

  .mode-admin-tickets .app-shell,
  .mode-admin-tickets #adminView:not(.hidden),
  .mode-admin-tickets #adminContent:not(.hidden) {
    height: 100%;
  }

  .mode-admin-tickets .topbar {
    min-height: 54px;
    flex-direction: row;
    align-items: center;
    padding: 8px 10px;
    gap: 8px;
  }

  .mode-admin-tickets .brand-mark {
    width: 34px;
    height: 34px;
  }

  .mode-admin-tickets .brand-text {
    font-size: 0.82rem;
  }

  .mode-admin-tickets .topbar-right {
    justify-content: flex-end;
    gap: 6px;
  }

  .mode-admin-tickets .lang-btn {
    min-width: 40px;
    padding: 6px 9px;
  }

  .mode-admin-tickets .session-btn {
    padding: 7px 9px;
  }

  .mode-admin-tickets .app-shell {
    width: 100%;
    height: calc(100dvh - 54px);
    padding: 6px 8px max(8px, env(safe-area-inset-bottom));
  }

  .mode-admin-tickets .admin-route-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 6px;
  }

  .mode-admin-tickets .admin-route-tab {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    font-size: 0.74rem;
    text-align: center;
  }

  .mode-admin-tickets .admin-tickets-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    margin-top: 0;
  }

  .mode-admin-tickets #ticketSearchInput {
    grid-column: 1 / -1;
    min-height: 40px;
  }

  .mode-admin-tickets .ticket-quick-stats {
    min-width: 66px;
    min-height: 38px;
    padding: 0 10px;
  }

  .mode-admin-tickets .ticket-filter-select {
    min-width: 0;
  }

  .mode-admin-tickets .ticket-filter-trigger {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.88rem;
  }

  .mode-admin-tickets .ticket-filter-menu {
    max-height: min(48dvh, 290px);
    overflow: auto;
  }

  .mode-admin-tickets #ticketsRefreshBtn {
    width: 42px;
    min-width: 42px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
  }

  .mode-admin-tickets #ticketsRefreshBtn::before {
    content: "\21bb";
    font-size: 1.05rem;
    line-height: 1;
  }

  .mode-admin-tickets .admin-tickets-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 7px;
  }

  .mode-admin-tickets .tickets-list {
    min-height: 108px;
    max-height: 108px;
    display: flex;
    grid-auto-flow: unset;
    grid-auto-columns: unset;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
    scroll-snap-type: x proximity;
    align-content: stretch;
  }

  .mode-admin-tickets .ticket-list-item {
    flex: 0 0 min(82vw, 320px);
    min-height: 90px;
    padding: 9px 10px;
    scroll-snap-align: start;
  }

  .mode-admin-tickets .ticket-list-title {
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.86rem;
  }

  .mode-admin-tickets .ticket-list-meta {
    margin-top: 5px;
    font-size: 0.72rem;
  }

  .mode-admin-tickets .ticket-chat-panel {
    flex: 1;
    min-height: 0;
    height: auto;
    padding: 7px;
  }

  .mode-admin-tickets .ticket-thread {
    gap: 7px;
  }

  .mode-admin-tickets .ticket-thread-head {
    padding: 8px;
    border-radius: 10px;
  }

  .mode-admin-tickets .ticket-thread-title {
    font-size: 0.88rem;
  }

  .mode-admin-tickets .ticket-thread-meta {
    font-size: 0.72rem;
  }

  .mode-admin-tickets .ticket-messages {
    padding: 7px 3px;
    gap: 8px;
  }

  .mode-admin-tickets .ticket-message {
    max-width: 94%;
    padding: 8px 9px;
    border-radius: 10px;
  }

  .mode-admin-tickets .ticket-customer-panel {
    top: 52px;
    left: 7px;
    right: 7px;
    bottom: 7px;
    width: auto;
    padding: 9px;
    border-radius: 10px;
  }

  .mode-admin-tickets .ticket-reply-form {
    gap: 6px;
    padding-top: 7px;
  }

  .mode-admin-tickets .ticket-reply-input {
    height: 72px;
    min-height: 72px;
    max-height: 72px;
    font-size: 16px;
  }

  .mode-admin-tickets .ticket-reply-upload {
    gap: 5px;
  }

  .mode-admin-tickets .ticket-reply-file-input {
    min-height: 38px;
    font-size: 0.86rem;
  }

  .mode-admin-tickets .ticket-reply-files-list {
    max-height: 68px;
    overflow: auto;
  }

  .mode-admin-tickets .ticket-reply-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .mode-admin-tickets .ticket-reply-actions .open-btn,
  .mode-admin-tickets .ticket-reply-actions .copy-btn {
    width: auto;
    min-width: 0;
    min-height: 40px;
    padding: 8px 8px;
    text-align: center;
    white-space: normal;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .guide-head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-invite-form {
    grid-template-columns: 1fr;
  }

  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .guide-meta,
  .mode-guide .guide-meta {
    text-align: left;
    width: auto;
  }

  .mode-admin.mode-guide .back-btn {
    position: static;
  }

  .product-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .product-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  .control-input,
  .control-select,
  .ticket-filter-trigger {
    font-size: 16px;
  }

  .support-agent-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-list-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .metrics-list-row strong {
    text-align: left;
  }

  .coming-form-row {
    grid-template-columns: 1fr;
  }

  .coming-submit-btn {
    width: 100%;
  }

  .coming-status-grid {
    grid-template-columns: 1fr;
  }

  .coming-status {
    min-height: 0;
  }

  .topbar {
    padding-inline: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-right {
    justify-content: space-between;
  }

  .admin-route-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .admin-route-tab {
    text-align: center;
  }

  .app-shell {
    width: min(1360px, 100% - 18px);
  }

  .shop-giveaway-participant {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-giveaway-screenshots {
    justify-content: flex-start;
    max-width: none;
  }

  .shop-giveaway-prize-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-giveaway-prize-row {
    grid-template-columns: 1fr;
  }

  .guide-panel {
    padding: 14px;
  }

  .guide-downloads {
    padding: 10px;
  }

  .guide-download-link {
    width: 100%;
  }

  .guide-block {
    padding: 15px 14px 15px 18px;
  }

  .ticket-chat-panel {
    padding: 8px;
  }

  .mode-admin-tickets .ticket-thread-head {
    grid-template-columns: 1fr;
  }

  .mode-admin-tickets .ticket-thread-actions {
    grid-column: 1;
    grid-row: auto;
    justify-content: stretch;
  }

  .mode-admin-tickets .ticket-thread-actions .copy-btn {
    flex: 1;
  }

  .mode-admin-tickets .brand-text {
    display: none;
  }

  .ticket-customer-panel {
    top: 104px;
    left: 8px;
    right: 8px;
    width: auto;
  }

  .ticket-message {
    max-width: 94%;
  }

  .ticket-reply-target {
    flex-direction: column;
  }

  .ticket-reply-target-clear {
    min-height: 38px;
  }

  .ticket-reply-actions {
    flex-direction: column;
  }

  .ticket-reply-actions .open-btn,
  .ticket-reply-actions .copy-btn {
    width: 100%;
    text-align: center;
  }

  .ticket-customer-head,
  .ticket-customer-product {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  body.mode-admin-tickets {
    overflow: hidden;
  }

  .mode-admin-tickets .topbar {
    min-height: 48px;
    padding: 6px 10px;
  }

  .mode-admin-tickets .brand-mark,
  .mode-admin-tickets .brand-logo {
    width: 30px;
    height: 30px;
  }

  .mode-admin-tickets .lang-switch {
    padding: 2px;
  }

  .mode-admin-tickets .lang-btn {
    min-width: 38px;
    padding: 6px 9px;
    font-size: 0.74rem;
  }

  .mode-admin-tickets .session-btn {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 0.7rem;
  }

  .mode-admin-tickets .app-shell {
    height: calc(100dvh - 48px);
    width: 100%;
    padding: 5px 7px max(7px, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .mode-admin-tickets .admin-route-tabs {
    min-height: 42px;
    margin-bottom: 6px;
    border-radius: 11px;
  }

  .mode-admin-tickets.support-ticket-selected .admin-route-tabs,
  .mode-admin-tickets.support-ticket-selected .admin-tickets-toolbar,
  .mode-admin-tickets.support-ticket-selected .tickets-list {
    display: none;
  }

  .mode-admin-tickets .admin-tickets-toolbar {
    grid-template-columns: minmax(58px, auto) minmax(0, 1fr) 44px;
    gap: 7px;
    z-index: 70;
  }

  .mode-admin-tickets #ticketSearchInput {
    grid-column: 1 / -1;
  }

  .mode-admin-tickets .ticket-filter-select {
    z-index: 85;
  }

  .mode-admin-tickets .ticket-filter-menu {
    position: absolute;
    z-index: 220;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    margin-top: 0;
    max-height: min(52dvh, 320px);
    overflow: auto;
    border-color: rgba(109, 255, 175, 0.5);
    background: rgba(2, 12, 8, 0.99);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.74), 0 0 0 1px rgba(109, 255, 175, 0.08);
  }

  .mode-admin-tickets .ticket-filter-option {
    min-height: 42px;
    color: #f4fff9;
    font-size: 0.96rem;
  }

  .mode-admin-tickets:not(.support-ticket-selected) .admin-tickets-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    margin-top: 7px;
  }

  .mode-admin-tickets:not(.support-ticket-selected) .tickets-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    display: grid;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 9px;
    gap: 8px;
    scroll-snap-type: none;
  }

  .mode-admin-tickets:not(.support-ticket-selected) .ticket-list-item {
    flex: none;
    min-height: 0;
    width: 100%;
    padding: 12px;
  }

  .mode-admin-tickets:not(.support-ticket-selected) .ticket-list-title {
    -webkit-line-clamp: 3;
    font-size: 0.94rem;
  }

  .mode-admin-tickets:not(.support-ticket-selected) .ticket-chat-panel {
    display: none;
  }

  .mode-admin-tickets.support-ticket-selected .admin-tickets-layout {
    flex: 1;
    min-height: 0;
    margin-top: 0;
    display: flex;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-chat-panel {
    flex: 1;
    min-height: 0;
    display: block;
    padding: 7px;
    border-radius: 12px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-thread {
    height: 100%;
    min-height: 0;
    gap: 6px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-thread-head {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-thread-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.86rem;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-thread-meta {
    display: none;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-thread-actions {
    grid-column: 1;
    grid-row: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .mode-admin-tickets .ticket-mobile-list-btn {
    display: inline-flex;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-messages {
    flex: 1;
    min-height: 0;
    max-height: none;
    padding: 7px 2px;
    gap: 7px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-message {
    max-width: 96%;
    padding: 8px;
    font-size: 0.88rem;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-message-head {
    gap: 7px;
    font-size: 0.68rem;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-reply-form {
    gap: 6px;
    padding-top: 7px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-template-box {
    max-height: 34px;
    overflow: hidden;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-template-list {
    max-height: 34px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-template-item {
    flex-basis: min(92vw, 520px);
    height: 32px;
    padding: 0 9px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-template-title {
    font-size: 0.72rem;
    max-width: 55%;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-template-body {
    font-size: 0.74rem;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-reply-input {
    height: 62px;
    min-height: 62px;
    max-height: 62px;
    padding: 9px 10px;
    font-size: 16px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-reply-upload {
    gap: 4px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-reply-file-input {
    min-height: 38px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-reply-files-hint {
    display: none;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-reply-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .mode-admin-tickets.support-ticket-selected .ticket-reply-actions .open-btn,
  .mode-admin-tickets.support-ticket-selected .ticket-reply-actions .copy-btn {
    min-width: 0;
    min-height: 42px;
    width: auto;
    padding: 8px 6px;
    font-size: 0.78rem;
  }
}

@media (max-width: 420px) {
  .mode-admin-tickets .brand-text {
    display: none;
  }

  .mode-admin-tickets .topbar {
    min-height: 50px;
  }

  .mode-admin-tickets .app-shell {
    height: calc(100dvh - 50px);
    padding-inline: 6px;
  }

  .mode-admin-tickets .session-btn {
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mode-admin-tickets .ticket-list-item {
    flex-basis: min(88vw, 300px);
  }

  .mode-admin-tickets .ticket-list-head {
    gap: 6px;
  }

  .mode-admin-tickets .ticket-list-state {
    gap: 5px;
  }

  .mode-admin-tickets .ticket-wait-timer,
  .mode-admin-tickets .ticket-status-pill {
    padding-inline: 6px;
    font-size: 0.64rem;
  }

  .mode-admin-tickets .ticket-thread-title {
    font-size: 0.84rem;
  }

  .mode-admin-tickets .ticket-thread-meta {
    font-size: 0.68rem;
  }

  .mode-admin-tickets .ticket-message {
    max-width: 98%;
  }
}

@media (max-width: 520px) {
  .product-actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .open-btn,
  .copy-btn {
    width: 100%;
    text-align: center;
  }
}

@media (hover: none), (pointer: coarse) {
  .open-btn,
  .copy-btn,
  .block-action,
  .session-btn,
  .lang-btn,
  .admin-small-btn,
  .password-visibility-btn,
  .back-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .open-btn:hover,
  .copy-btn:hover,
  .block-action:hover,
  .session-btn:hover,
  .lang-btn:hover,
  .admin-small-btn:hover,
  .admin-small-btn.danger:hover,
  .password-visibility-btn:hover,
  .back-btn:hover,
  .game-card:hover,
  .product-row:hover,
  .coming-status:hover,
  .toc-link:hover,
  .item-card:hover {
    transform: none;
    box-shadow: none;
    text-shadow: none;
    filter: none;
  }

  .guide-figure:hover img {
    transform: none;
    filter: none;
  }

  .open-btn:active,
  .copy-btn:active,
  .block-action:active,
  .session-btn:active,
  .lang-btn:active,
  .admin-small-btn:active,
  .password-visibility-btn:active,
  .back-btn:active {
    filter: brightness(1.08);
  }
}

/* ===========================================================================
   ADMIN REDESIGN — Phase 1 prototype.
   Scoped to body.admin-shell (only the authenticated dashboard, never the
   login screen), so the bright "matrix" identity stays on the entry screen.
   =========================================================================== */

/* 1. Quiet the animated background on work surfaces. */
body.admin-shell #matrixCanvas,
body.admin-shell .scanlines,
body.admin-shell .noise,
body.admin-shell .matrix-dimmer {
  display: none !important;
}

body.admin-shell {
  --radius-xl: 10px;
  --radius-lg: 8px;
  --radius-md: 7px;
  --radius-sm: 5px;
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(31, 199, 120, 0.06), transparent 60%),
    var(--admin-bg);
  font-family: "Inter", "Manrope", "Segoe UI", sans-serif;
}

body.admin-shell .topbar::after {
  opacity: 0.25;
  animation: none;
}

/* 2. App shell layout: left sidebar + main column. */
/* Use more of the screen on the dashboard than the marketing layout allows. */
body.admin-shell .app-shell {
  width: min(1900px, 100% - 48px);
  padding: var(--space-lg) 0 var(--space-2xl);
}

body.admin-shell #adminContent {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* 3. Sidebar. */
body.admin-shell .admin-sidebar {
  position: sticky;
  top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 420px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  background: var(--admin-panel);
  padding: var(--space-sm);
}

body.admin-shell .admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.admin-shell .admin-sidebar .admin-route-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

body.admin-shell .admin-sidebar .admin-route-tab span[data-i18n] {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.admin-shell .admin-nav-badge {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border: 1px solid var(--admin-border-strong);
  border-radius: 999px;
  background: rgba(150, 196, 172, 0.09);
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

body.admin-shell .admin-nav-badge.is-warn {
  border-color: rgba(220, 248, 126, 0.34);
  background: rgba(220, 248, 126, 0.1);
  color: #f2ffc5;
}

body.admin-shell .admin-nav-badge.is-error {
  border-color: rgba(255, 130, 130, 0.42);
  background: rgba(255, 130, 130, 0.1);
  color: #ffdcdc;
}

body.admin-shell .admin-sidebar .admin-route-tab:hover {
  background: var(--admin-hover);
  color: var(--text-main);
  border-color: var(--admin-border);
  transform: none;
}

body.admin-shell .admin-sidebar .admin-route-tab.active {
  background: var(--admin-active);
  color: var(--accent);
  border-color: var(--admin-border-strong);
}

body.admin-shell .admin-nav-ico {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  opacity: 0.85;
}

body.admin-shell .admin-sidebar .admin-route-tab.active .admin-nav-ico {
  opacity: 1;
}

body.admin-shell .admin-sidebar-foot {
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--admin-border);
}

body.admin-shell .admin-whoami {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
}

body.admin-shell .admin-whoami-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--admin-active);
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
}

body.admin-shell .admin-whoami-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

body.admin-shell .admin-whoami-login {
  font-size: var(--fs-sm);
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.admin-shell .admin-whoami-role {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* 4. Main column + page header. */
body.admin-shell .admin-main {
  min-width: 0;
}

body.admin-shell .admin-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

body.admin-shell .admin-page-head h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.6vw, 2.1rem);
  font-weight: 800;
  color: var(--text-main);
  text-shadow: none;
}

body.admin-shell .admin-page-head p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: var(--fs-base);
}

body.admin-shell .admin-view-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  background: var(--admin-panel);
}

body.admin-shell .admin-view-toggle-btn {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  padding: 7px 12px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 800;
  cursor: pointer;
}

body.admin-shell .admin-view-toggle-btn:hover {
  background: var(--admin-hover);
  color: var(--text-main);
}

body.admin-shell .admin-view-toggle-btn.active {
  border-color: var(--admin-border-strong);
  background: var(--admin-active);
  color: var(--accent);
}

/* 5. Catalog toolbar. */
body.admin-shell #adminCatalogSection .control-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px 240px;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-shell #adminCatalogSection .control-bar::before {
  display: none;
}

body.admin-shell .control-input,
body.admin-shell .control-select {
  min-height: 46px;
  font-size: var(--fs-base);
}

body.admin-shell .admin-catalog-summary {
  margin: calc(-1 * var(--space-sm)) 0 var(--space-md);
  color: var(--text-dim);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 6. Catalog as comfortable panels with table-like rows. */
body.admin-shell .games-grid {
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: var(--space-lg);
}

body.admin-shell .game-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  background: var(--admin-panel);
  box-shadow: none;
  transition: border-color 150ms ease;
}

body.admin-shell .game-card::before,
body.admin-shell .game-card::after {
  display: none;
}

body.admin-shell .game-card:hover {
  transform: none;
  border-color: var(--admin-border-strong);
  box-shadow: none;
}

body.admin-shell .game-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin: 0;
  padding: 15px 20px;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-panel-raised);
}

body.admin-shell .game-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  text-shadow: none;
}

body.admin-shell .product-count {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-soft);
  background: var(--admin-active);
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  padding: 4px 12px;
}

body.admin-shell .products-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
}

body.admin-shell .product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin: 0;
  padding: 13px 14px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  transition: background 150ms ease;
}

body.admin-shell .product-row::before {
  display: none;
}

body.admin-shell .product-row:hover {
  transform: none;
  background: var(--admin-hover);
}

body.admin-shell .product-data {
  min-width: 0;
}

body.admin-shell .product-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

body.admin-shell .product-dev {
  margin: 3px 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

body.admin-shell .product-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

body.admin-shell .product-actions .open-btn,
body.admin-shell .product-actions .copy-btn {
  min-height: 38px;
  padding: 8px 17px;
  font-size: 0.86rem;
  border-radius: var(--radius-sm);
}

body.admin-shell .catalog-table-wrap {
  width: 100%;
  overflow-x: auto;
}

body.admin-shell .catalog-table {
  min-width: 780px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--admin-panel);
}

body.admin-shell .catalog-table-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(230px, 1.35fr) minmax(150px, 0.8fr) minmax(220px, auto);
  align-items: center;
  gap: var(--space-md);
  padding: 12px 14px;
  border-bottom: 1px solid var(--admin-border);
  color: var(--text-soft);
}

body.admin-shell .catalog-table-row:last-child {
  border-bottom: 0;
}

body.admin-shell .catalog-table-row:not(.catalog-table-head):hover {
  background: var(--admin-hover);
}

body.admin-shell .catalog-table-head {
  background: var(--admin-panel-raised);
  color: var(--text-dim);
  font-size: var(--fs-xs);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.admin-shell .catalog-table-cell {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.admin-shell .catalog-table-cell.strong {
  color: var(--text-main);
  font-weight: 800;
}

body.admin-shell .catalog-table-cell.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.admin-shell .catalog-table-cell.actions .open-btn,
body.admin-shell .catalog-table-cell.actions .copy-btn {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}

/* 7. Admins card aligned to the dashboard surface. */
body.admin-shell .admin-users-card {
  margin-top: 0;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell .admin-team {
  min-width: 0;
}

/* 8. Responsive: sidebar collapses to a horizontal nav. */
@media (max-width: 880px) {
  body.admin-shell #adminContent {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  body.admin-shell .admin-sidebar {
    position: static;
    min-height: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
  }
  body.admin-shell .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1 1 auto;
  }
  body.admin-shell .admin-sidebar-foot {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    border-left: 1px solid var(--admin-border);
    padding-left: var(--space-sm);
  }
  body.admin-shell #adminCatalogSection .control-bar {
    grid-template-columns: 1fr;
  }
  body.admin-shell .admin-page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  body.admin-shell .admin-view-toggle {
    width: 100%;
  }
  body.admin-shell .admin-view-toggle-btn {
    flex: 1 1 0;
  }
  body.admin-shell .games-grid {
    grid-template-columns: 1fr;
  }
  body.admin-shell .catalog-table {
    min-width: 0;
    display: grid;
    gap: var(--space-sm);
    border: 0;
    background: transparent;
    overflow: visible;
  }
  body.admin-shell .catalog-table-head {
    display: none;
  }
  body.admin-shell .catalog-table-row {
    grid-template-columns: 1fr;
    gap: 8px;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-lg);
    background: var(--admin-panel);
  }
  body.admin-shell .catalog-table-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--text-dim);
    font-size: var(--fs-xs);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  body.admin-shell .catalog-table-cell.actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* 9. Calmer buttons — drop the neon glow/sweep/pulse for a premium muted look. */
body.admin-shell .open-btn,
body.admin-shell .copy-btn {
  box-shadow: none;
  text-shadow: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

body.admin-shell .open-btn::before {
  display: none;
}

body.admin-shell .open-btn {
  border: 1px solid rgba(31, 199, 120, 0.4);
  background: rgba(31, 199, 120, 0.13);
  color: var(--accent);
}

body.admin-shell .open-btn:hover {
  transform: none;
  background: rgba(31, 199, 120, 0.2);
  border-color: rgba(31, 199, 120, 0.62);
  color: var(--accent);
  text-shadow: none;
  box-shadow: none;
}

body.admin-shell .copy-btn {
  border: 1px solid var(--admin-border);
  background: var(--admin-hover);
  color: var(--text-soft);
}

body.admin-shell .copy-btn:hover {
  transform: none;
  border-color: var(--admin-border-strong);
  background: rgba(150, 196, 172, 0.1);
  color: var(--text-main);
}

body.admin-shell .open-btn:active,
body.admin-shell .copy-btn:active {
  transform: translateY(1px);
}

body.admin-shell .ticket-reply-actions .open-btn:not(:disabled),
body.admin-shell .ticket-reply-actions .copy-btn:not(:disabled),
body.admin-shell .ticket-thread-actions .copy-btn:not(:disabled) {
  animation: none;
}

/* 10. Shop section on the calm surface. */
body.admin-shell .shop-metric-card,
body.admin-shell .shop-panel {
  border: 1px solid var(--admin-border);
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell .shop-metric-card {
  min-height: 0;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
}

body.admin-shell .shop-metric-card span {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}

body.admin-shell .shop-metric-card strong {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
}

body.admin-shell .shop-panel {
  border-radius: var(--radius-lg);
}

body.admin-shell .shop-metrics-grid {
  gap: var(--space-sm);
}

body.admin-shell .shop-admin-head h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  text-shadow: none;
}

body.admin-shell .shop-admin-kicker {
  color: var(--text-dim);
}

/* Shop sub-tabs as a segmented control. */
body.admin-shell .shop-admin-tabs {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: var(--space-sm);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.admin-shell .shop-tab-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  background: var(--admin-panel);
}

body.admin-shell .shop-tab-group-label {
  flex: 0 0 auto;
  padding: 0 3px;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  pointer-events: none;
  text-transform: uppercase;
}

body.admin-shell .shop-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

body.admin-shell .shop-admin-tab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
  font-size: var(--fs-sm);
}

body.admin-shell .shop-admin-tab:hover,
body.admin-shell .shop-admin-tab.active {
  box-shadow: none;
}

body.admin-shell .shop-admin-tab:hover {
  background: var(--admin-hover);
  border-color: transparent;
  color: var(--text-main);
}

body.admin-shell .shop-admin-tab.active {
  background: var(--admin-active);
  border-color: var(--admin-border-strong);
  color: var(--accent);
}

/* ===========================================================================
   ADMIN REDESIGN — Phase 1.2: global element polish + section unification.
   Calms the elements that broke the theme (neon scrollbar, bright RU/EN and
   logout, native-select glow) and unifies every section's surfaces/chrome.
   =========================================================================== */

/* 11. Neutral scrollbars (no acid-green). */
body.admin-shell {
  scrollbar-color: rgba(150, 196, 172, 0.32) transparent;
}

body.admin-shell *::-webkit-scrollbar-track {
  background: transparent;
  border-left: 0;
}

body.admin-shell *::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  background: rgba(150, 196, 172, 0.26);
  background-clip: padding-box;
  box-shadow: none;
}

body.admin-shell *::-webkit-scrollbar-thumb:hover {
  background: rgba(150, 196, 172, 0.44);
  background-clip: padding-box;
}

/* 12. Topbar controls — calm RU/EN switch and logout. */
body.admin-shell .session-btn {
  border: 1px solid var(--admin-border-strong);
  background: var(--admin-panel);
  color: var(--text-soft);
  box-shadow: none;
}

body.admin-shell .session-btn:hover {
  border-color: rgba(31, 199, 120, 0.55);
  background: var(--admin-panel-raised);
  color: var(--text-main);
  box-shadow: none;
}

body.admin-shell .lang-switch {
  border-color: var(--admin-border);
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell .lang-btn {
  color: var(--text-soft);
}

body.admin-shell .lang-btn:hover {
  color: var(--text-main);
  text-shadow: none;
}

body.admin-shell .lang-btn.active {
  background: var(--admin-active);
  color: var(--accent);
  box-shadow: none;
}

/* 13. Inputs & selects on the calm surface, with a soft (non-neon) focus. */
body.admin-shell .control-input,
body.admin-shell .control-select,
body.admin-shell textarea,
body.admin-shell input[type="text"],
body.admin-shell input[type="search"],
body.admin-shell input[type="number"],
body.admin-shell input[type="password"],
body.admin-shell input[type="email"] {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
}

body.admin-shell .control-select {
  color-scheme: dark;
  accent-color: var(--accent-strong);
}

body.admin-shell .control-input:focus,
body.admin-shell .control-select:focus,
body.admin-shell textarea:focus,
body.admin-shell input:focus {
  border-color: rgba(31, 199, 120, 0.55);
  box-shadow: 0 0 0 3px rgba(31, 199, 120, 0.13);
  background: var(--admin-panel-raised);
  caret-color: var(--accent);
}

body.admin-shell .control-input::placeholder,
body.admin-shell textarea::placeholder,
body.admin-shell input::placeholder {
  color: rgba(150, 196, 172, 0.4);
}

/* 14. Strip the phosphor glow from headings across the dashboard. */
body.admin-shell h1,
body.admin-shell h2,
body.admin-shell h3,
body.admin-shell h4 {
  font-family: "Inter", "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-shadow: none;
}

/* 15. Unify panel surfaces across every section. */
body.admin-shell .metrics-panel,
body.admin-shell .broadcast-panel,
body.admin-shell .reseller-identity-panel,
body.admin-shell .reseller-details-panel,
body.admin-shell .tickets-list,
body.admin-shell .ticket-chat-panel,
body.admin-shell .ticket-thread,
body.admin-shell .ticket-template-box {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  box-shadow: none;
}

body.admin-shell .metrics-panel-head,
body.admin-shell .broadcast-panel-head,
body.admin-shell .metrics-section-head,
body.admin-shell .ticket-thread-head {
  border-color: var(--admin-border);
}

/* 16. Status pills and inline badges — muted, not glowing. */
body.admin-shell .status-pill,
body.admin-shell .broadcast-status-pill,
body.admin-shell .shop-admin-status,
body.admin-shell .shop-admin-clock {
  background: var(--admin-panel);
  border-color: var(--admin-border);
  box-shadow: none;
  text-shadow: none;
}

body.admin-shell .status-dot {
  box-shadow: none;
}

/* ===========================================================================
   ADMIN REDESIGN - Phase 2: apply the dashboard language everywhere.
   Keep this scoped to body.admin-shell so login, landing, and public guide
   screens retain the bright product identity.
   =========================================================================== */

body.admin-shell .admin-shop,
body.admin-shell .admin-team,
body.admin-shell .admin-tickets,
body.admin-shell .admin-reseller,
body.admin-shell .admin-metrics,
body.admin-shell .admin-broadcast {
  margin-top: 0;
  min-width: 0;
}

body.admin-shell.mode-admin-tickets {
  overflow: hidden;
}

body.admin-shell.mode-admin-tickets .app-shell {
  height: calc(100vh - 64px);
  width: min(1900px, 100% - 32px);
  padding: 10px 0 12px;
}

body.admin-shell.mode-admin-tickets #adminView:not(.hidden) {
  min-height: 0;
  height: 100%;
}

body.admin-shell.mode-admin-tickets #adminContent:not(.hidden) {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-height: 0;
  height: 100%;
}

body.admin-shell.mode-admin-tickets .admin-sidebar {
  top: 0;
  min-height: 0;
  height: 100%;
}

body.admin-shell .admin-main,
body.admin-shell.mode-admin-tickets .admin-main {
  min-width: 0;
  min-height: 0;
}

body.admin-shell.mode-admin-tickets .admin-main,
body.admin-shell.mode-admin-tickets .admin-tickets {
  display: flex;
  flex-direction: column;
}

body.admin-shell.mode-admin-tickets .admin-main,
body.admin-shell.mode-admin-tickets .admin-tickets,
body.admin-shell.mode-admin-tickets .admin-tickets-layout {
  flex: 1 1 auto;
}

body.admin-shell .shop-admin-head,
body.admin-shell .admin-tickets-head,
body.admin-shell .admin-metrics-head,
body.admin-shell .admin-broadcast-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin: 0 0 var(--space-lg);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-shell.mode-admin-tickets .admin-tickets-head {
  display: flex;
}

body.admin-shell .shop-admin-head h2,
body.admin-shell .admin-tickets-head h2,
body.admin-shell .admin-metrics-head h2,
body.admin-shell .admin-broadcast-head h2 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(1.65rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
}

body.admin-shell .shop-admin-head p,
body.admin-shell .admin-tickets-head p,
body.admin-shell .admin-metrics-head p,
body.admin-shell .admin-broadcast-head p {
  margin: 6px 0 0;
  max-width: 760px;
  color: var(--text-soft);
  font-size: var(--fs-base);
  line-height: 1.5;
}

body.admin-shell .shop-admin-kicker {
  margin-bottom: 7px;
  color: var(--text-dim);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
}

body.admin-shell .shop-admin-head-actions {
  flex: 0 0 auto;
}

body.admin-shell .admin-tickets-toolbar,
body.admin-shell .reseller-stats-toolbar,
body.admin-shell .shop-filter-bar:not(.compact) {
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell .admin-tickets-toolbar {
  margin: 0 0 var(--space-md);
  padding: 12px;
}

body.admin-shell.mode-admin-tickets .admin-tickets-toolbar {
  margin-top: 0;
}

body.admin-shell .reseller-stats-toolbar {
  margin-top: 0;
}

body.admin-shell .shop-filter-bar:not(.compact) {
  padding: 12px;
}

body.admin-shell .shop-filter-bar.compact,
body.admin-shell .shop-inventory-right .shop-filter-bar {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

body.admin-shell .shop-panel,
body.admin-shell .shop-metric-card,
body.admin-shell .metric-card,
body.admin-shell .metrics-panel,
body.admin-shell .broadcast-panel,
body.admin-shell .reseller-identity-panel,
body.admin-shell .reseller-details-panel,
body.admin-shell .tickets-list,
body.admin-shell .ticket-chat-panel,
body.admin-shell .shop-dialog-list,
body.admin-shell .shop-dialog-thread,
body.admin-shell .shop-profile-panel,
body.admin-shell .shop-system-item,
body.admin-shell .shop-pricing-summary-detail,
body.admin-shell .shop-pricing-product,
body.admin-shell .shop-list-row,
body.admin-shell .shop-editor-row,
body.admin-shell .shop-key-row,
body.admin-shell .shop-row-button,
body.admin-shell .shop-inventory-dev-group,
body.admin-shell .shop-inventory-keys-plan,
body.admin-shell .shop-ancient-row,
body.admin-shell .shop-broadcast-section,
body.admin-shell .shop-broadcast-custom-emoji,
body.admin-shell .shop-broadcast-media-card,
body.admin-shell .shop-broadcast-button-row,
body.admin-shell .shop-telegram-preview,
body.admin-shell .shop-telegram-file,
body.admin-shell .shop-profile-grid,
body.admin-shell .shop-profile-grid div,
body.admin-shell .shop-profile-event,
body.admin-shell .shop-var-row,
body.admin-shell .shop-message-details pre,
body.admin-shell .ticket-thread-head,
body.admin-shell .ticket-customer-panel,
body.admin-shell .ticket-customer-metric,
body.admin-shell .ticket-attachment {
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell .shop-panel,
body.admin-shell .metrics-panel,
body.admin-shell .broadcast-panel,
body.admin-shell .reseller-identity-panel,
body.admin-shell .reseller-details-panel {
  padding: 16px;
}

body.admin-shell .ticket-thread {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-shell .ticket-chat-panel,
body.admin-shell .tickets-list {
  border-radius: var(--radius-lg);
}

body.admin-shell .ticket-thread-head,
body.admin-shell .game-card-head,
body.admin-shell .shop-inventory-dev-group > header {
  background: var(--admin-panel-raised);
  border-color: var(--admin-border);
}

body.admin-shell .shop-panel-head,
body.admin-shell .broadcast-panel-head,
body.admin-shell .metrics-panel-head,
body.admin-shell .shop-dialog-head,
body.admin-shell .ticket-thread-head {
  border-color: var(--admin-border);
}

body.admin-shell .metrics-section-head {
  border-color: var(--admin-border);
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell .metric-card {
  min-height: 104px;
  background: var(--admin-panel);
}

body.admin-shell .metric-card-value,
body.admin-shell .metrics-list-row strong,
body.admin-shell .broadcast-metric strong,
body.admin-shell .support-agent-name,
body.admin-shell .support-agent-kpi b,
body.admin-shell .reseller-identity-name,
body.admin-shell .ticket-customer-metric strong {
  color: var(--text-main);
  text-shadow: none;
}

body.admin-shell .metric-card-value,
body.admin-shell .shop-metric-card strong,
body.admin-shell .broadcast-metric strong {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
}

body.admin-shell .metrics-detail-grid {
  gap: var(--space-sm);
}

body.admin-shell .metrics-list-row,
body.admin-shell .support-agent-row,
body.admin-shell .support-agent-kpi,
body.admin-shell .broadcast-job-item,
body.admin-shell .shop-giveaway-prize-summary span,
body.admin-shell .shop-giveaway-prize-ok,
body.admin-shell .shop-giveaway-prize-errors span,
body.admin-shell .shop-giveaway-prize-row,
body.admin-shell .shop-log-row,
body.admin-shell .shop-telegram-button-row span,
body.admin-shell .shop-broadcast-validation div,
body.admin-shell .shop-broadcast-progress,
body.admin-shell .ticket-message-reply-ref,
body.admin-shell .ticket-reply-target-preview,
body.admin-shell .ticket-customer-warning {
  border-color: var(--admin-border);
  background: var(--admin-hover);
  box-shadow: none;
}

body.admin-shell .shop-row-button,
body.admin-shell .shop-stock-row,
body.admin-shell .shop-dialog-item {
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

body.admin-shell .shop-row-button:hover,
body.admin-shell .shop-row-button.active,
body.admin-shell .shop-stock-row:hover,
body.admin-shell .shop-stock-row.active,
body.admin-shell .shop-dialog-item:hover,
body.admin-shell .shop-dialog-item.active {
  border-color: var(--admin-border-strong);
  background: var(--admin-active);
  box-shadow: none;
}

body.admin-shell .ticket-list-item {
  border-color: var(--admin-border);
  background: transparent;
  box-shadow: none;
  transition: background 150ms ease, border-color 150ms ease;
}

body.admin-shell .ticket-list-item:hover,
body.admin-shell .ticket-list-item.is-active {
  border-color: var(--admin-border-strong);
  background: var(--admin-active);
  box-shadow: none;
}

body.admin-shell .ticket-list-item.status-open,
body.admin-shell .ticket-list-item.status-new,
body.admin-shell .ticket-list-item.status-claimed,
body.admin-shell .ticket-list-item.status-closed,
body.admin-shell .ticket-list-item.status-resolved,
body.admin-shell .ticket-list-item.status-waiting_customer,
body.admin-shell .ticket-list-item.is-active.status-open,
body.admin-shell .ticket-list-item.is-active.status-new,
body.admin-shell .ticket-list-item.is-active.status-claimed,
body.admin-shell .ticket-list-item.is-active.status-closed,
body.admin-shell .ticket-list-item.is-active.status-resolved,
body.admin-shell .ticket-list-item.is-active.status-waiting_customer {
  background: transparent;
  box-shadow: none;
}

body.admin-shell .ticket-list-item.status-open,
body.admin-shell .ticket-list-item.status-new {
  border-left: 3px solid rgba(255, 130, 130, 0.72);
}

body.admin-shell .ticket-list-item.status-claimed {
  border-left: 3px solid rgba(255, 184, 95, 0.72);
}

body.admin-shell .ticket-list-item.status-closed {
  border-left: 3px solid rgba(31, 199, 120, 0.66);
}

body.admin-shell .ticket-list-item.status-resolved,
body.admin-shell .ticket-list-item.status-waiting_customer {
  border-left: 3px solid rgba(110, 194, 255, 0.62);
}

body.admin-shell .ticket-message {
  border-color: var(--admin-border);
  background: var(--admin-panel-raised);
  box-shadow: none;
}

body.admin-shell .ticket-message.is-customer {
  border-color: rgba(110, 194, 255, 0.36);
  background: rgba(11, 22, 31, 0.78);
}

body.admin-shell .ticket-message.is-staff,
body.admin-shell .ticket-message.is-api {
  border-color: var(--admin-border-strong);
  background: rgba(13, 32, 22, 0.78);
}

body.admin-shell .ticket-message.is-system,
body.admin-shell .ticket-message.is-system.event-closed,
body.admin-shell .ticket-message.is-system.event-claimed,
body.admin-shell .ticket-message.is-system.event-opened,
body.admin-shell .ticket-message.is-system.event-reopened,
body.admin-shell .ticket-message.is-system.event-resolved,
body.admin-shell .ticket-message.is-system.event-status {
  border-color: var(--admin-border);
  background: var(--admin-hover);
}

body.admin-shell .ticket-message.is-highlighted {
  border-color: rgba(255, 241, 144, 0.72);
  box-shadow: 0 0 0 2px rgba(255, 241, 144, 0.12);
  transform: none;
}

body.admin-shell .ticket-quick-stats,
body.admin-shell .ticket-status-pill,
body.admin-shell .ticket-wait-timer,
body.admin-shell .ticket-product-status,
body.admin-shell .reseller-chip,
body.admin-shell .shop-pricing-plan-chip,
body.admin-shell .shop-pricing-split span,
body.admin-shell .shop-stock-state,
body.admin-shell .shop-delta,
body.admin-shell .shop-custom-emoji-badge,
body.admin-shell .shop-inline-kb-btn {
  border-color: var(--admin-border);
  background: var(--admin-hover);
  box-shadow: none;
  text-shadow: none;
}

body.admin-shell .ticket-status-pill.status-open,
body.admin-shell .ticket-status-pill.status-new,
body.admin-shell .copy-btn.danger,
body.admin-shell .ticket-product-status.status-on_update {
  border-color: rgba(255, 130, 130, 0.42);
  background: rgba(72, 24, 24, 0.38);
  color: #ffd9d9;
}

body.admin-shell .ticket-status-pill.status-claimed,
body.admin-shell .ticket-wait-timer,
body.admin-shell .copy-btn.ticket-claim-btn,
body.admin-shell .shop-stock-state.low,
body.admin-shell .shop-delta.flat {
  border-color: rgba(255, 184, 95, 0.4);
  background: rgba(76, 50, 14, 0.34);
  color: #ffe0b2;
}

body.admin-shell .ticket-status-pill.status-closed,
body.admin-shell .ticket-product-status.status-undetected,
body.admin-shell .shop-stock-state.normal,
body.admin-shell .shop-delta.up {
  border-color: rgba(31, 199, 120, 0.42);
  background: rgba(31, 199, 120, 0.12);
  color: var(--accent);
}

body.admin-shell .shop-stock-state.out,
body.admin-shell .shop-delta.down {
  border-color: rgba(255, 130, 130, 0.42);
  background: rgba(72, 24, 24, 0.42);
  color: #ffd9d9;
}

body.admin-shell .shop-stock-row.level-normal,
body.admin-shell .shop-stock-row.level-low,
body.admin-shell .shop-stock-row.level-out,
body.admin-shell .shop-profile-event.command,
body.admin-shell .shop-message.command,
body.admin-shell .shop-profile-event.sys,
body.admin-shell .shop-message.sys,
body.admin-shell .shop-profile-event.admin,
body.admin-shell .shop-message.admin {
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell .shop-message-scroll-wrap .shop-messages {
  background: rgba(0, 8, 5, 0.22);
}

body.admin-shell .shop-message {
  border-radius: var(--radius-md);
  box-shadow: none;
}

body.admin-shell .shop-message.in {
  border-color: var(--admin-border);
  background: rgba(8, 24, 18, 0.92);
}

body.admin-shell .shop-message.out,
body.admin-shell .shop-message.admin {
  border-color: var(--admin-border-strong);
  background: rgba(13, 58, 36, 0.82);
}

body.admin-shell .shop-message.command {
  border-left: 3px solid rgba(226, 247, 126, 0.58);
}

body.admin-shell .shop-message.sys {
  border-left: 3px solid rgba(187, 139, 255, 0.58);
}

body.admin-shell .shop-reply-form {
  background: var(--admin-panel);
}

body.admin-shell .shop-stock-row.level-low {
  border-left: 3px solid rgba(255, 184, 95, 0.72);
}

body.admin-shell .shop-stock-row.level-out {
  border-left: 3px solid rgba(255, 130, 130, 0.72);
}

body.admin-shell .shop-stock-row.level-low:hover,
body.admin-shell .shop-stock-row.level-out:hover {
  filter: none;
}

body.admin-shell .ticket-reply-actions .open-btn:not(:disabled),
body.admin-shell .ticket-reply-actions .copy-btn:not(:disabled),
body.admin-shell .ticket-thread-actions .copy-btn:not(:disabled) {
  color: var(--text-main);
  border-color: var(--admin-border-strong);
  background: var(--admin-hover);
  box-shadow: none;
}

body.admin-shell .ticket-reply-actions .open-btn:not(:disabled),
body.admin-shell .ticket-reply-actions .copy-btn:not(:disabled):hover,
body.admin-shell .ticket-thread-actions .copy-btn:not(:disabled):hover {
  background: var(--admin-active);
}

body.admin-shell .ticket-reply-actions .copy-btn.danger:not(:disabled),
body.admin-shell .copy-btn.danger:hover {
  border-color: rgba(255, 130, 130, 0.52);
  background: rgba(72, 24, 24, 0.48);
  color: #ffe0e0;
  box-shadow: none;
}

body.admin-shell .ticket-reply-actions .copy-btn.ticket-claim-btn:not(:disabled),
body.admin-shell .copy-btn.ticket-claim-btn:not(:disabled):hover {
  border-color: rgba(255, 184, 95, 0.52);
  background: rgba(76, 50, 14, 0.44);
  color: #ffe0b2;
  box-shadow: none;
}

body.admin-shell .copy-btn::after,
body.admin-shell .open-btn::after,
body.admin-shell .block-action::after {
  display: none;
}

body.admin-shell .shop-system-dot,
body.admin-shell .shop-system-item.is-ok .shop-system-dot,
body.admin-shell .shop-system-item.is-down .shop-system-dot,
body.admin-shell .shop-system-item.is-warn .shop-system-dot,
body.admin-shell .shop-chart-line,
body.admin-shell .shop-chart-dot,
body.admin-shell .shop-chart-tooltip,
body.admin-shell .ticket-reply-file-input::file-selector-button {
  box-shadow: none;
  filter: none;
}

body.admin-shell .shop-system-item.is-ok,
body.admin-shell .shop-system-item.is-warn,
body.admin-shell .shop-system-item.is-down {
  background: var(--admin-panel);
}

body.admin-shell .shop-pricing-mode,
body.admin-shell .shop-profile-tabs {
  border-color: var(--admin-border);
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell .shop-pricing-mode-option,
body.admin-shell .shop-profile-tabs button,
body.admin-shell .shop-date-button,
body.admin-shell .shop-broadcast-emoji button,
body.admin-shell .shop-profile-close,
body.admin-shell .ticket-reply-target-clear {
  border: 1px solid var(--admin-border);
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
}

body.admin-shell .shop-pricing-mode-option:hover,
body.admin-shell .shop-pricing-mode-option.active,
body.admin-shell .shop-profile-tabs button:hover,
body.admin-shell .shop-profile-tabs button.active,
body.admin-shell .shop-date-button:hover,
body.admin-shell .shop-broadcast-emoji button:hover,
body.admin-shell .shop-profile-close:hover {
  border-color: var(--admin-border-strong);
  background: var(--admin-active);
  color: var(--text-main);
  box-shadow: none;
}

body.admin-shell .shop-chart,
body.admin-shell .shop-chart-wrap {
  border-color: var(--admin-border);
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell .shop-chart-bar {
  box-shadow: none;
}

body.admin-shell .shop-chart-grid {
  stroke: rgba(150, 196, 172, 0.12);
}

body.admin-shell .shop-chart-tooltip {
  border-color: var(--admin-border-strong);
  background: var(--admin-panel-raised);
}

body.admin-shell .broadcast-progress,
body.admin-shell .shop-broadcast-mini-progress,
body.admin-shell .shop-broadcast-progress em {
  border-color: var(--admin-border);
  background: rgba(150, 196, 172, 0.1);
}

body.admin-shell .broadcast-progress span,
body.admin-shell .shop-broadcast-mini-progress i,
body.admin-shell .shop-broadcast-progress i {
  background: linear-gradient(90deg, rgba(31, 199, 120, 0.82), rgba(150, 196, 172, 0.7));
}

body.admin-shell .shop-broadcast-actions {
  background: linear-gradient(180deg, rgba(9, 13, 11, 0), var(--admin-bg) 40%);
}

body.admin-shell .shop-telegram-preview {
  background: var(--admin-panel-raised);
}

body.admin-shell .shop-telegram-bubble {
  background: rgba(20, 56, 36, 0.92);
  box-shadow: none;
}

body.admin-shell .shop-inventory-keys-editor,
body.admin-shell .ticket-reply-file-input {
  border-color: var(--admin-border);
  background: var(--admin-panel-raised);
  color: var(--text-main);
  box-shadow: none;
}

body.admin-shell .shop-inventory-keys-editor:focus {
  border-color: rgba(31, 199, 120, 0.55);
  box-shadow: 0 0 0 3px rgba(31, 199, 120, 0.13);
}

body.admin-shell .empty-state,
body.admin-shell .shop-loading,
body.admin-shell .shop-chart-empty {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 18px;
  border: 1px dashed var(--admin-border-strong);
  border-radius: var(--radius-lg);
  background: var(--admin-hover);
  color: var(--text-soft);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  box-shadow: none;
}

body.admin-shell .shop-admin-notice {
  border-color: rgba(255, 130, 130, 0.4);
  background: rgba(72, 24, 24, 0.36);
  box-shadow: none;
}

body.admin-shell .shop-admin-notice.is-success {
  border-color: rgba(31, 199, 120, 0.42);
  background: rgba(31, 199, 120, 0.1);
}

body.admin-shell .admin-users-card,
body.admin-shell .admin-users-list,
body.admin-shell .admin-invite-result {
  border-color: var(--admin-border);
  background: var(--admin-panel);
  box-shadow: none;
}

body.admin-shell a,
body.admin-shell button,
body.admin-shell input,
body.admin-shell select,
body.admin-shell textarea {
  min-width: 0;
}

body.admin-shell .shop-list-row *,
body.admin-shell .shop-row-button *,
body.admin-shell .shop-dialog-item *,
body.admin-shell .ticket-list-item *,
body.admin-shell .metrics-list-row *,
body.admin-shell .broadcast-job-item *,
body.admin-shell .reseller-identity-panel *,
body.admin-shell .ticket-customer-panel * {
  min-width: 0;
}

body.admin-shell .shop-list-row,
body.admin-shell .shop-editor-row,
body.admin-shell .shop-key-row,
body.admin-shell .shop-stock-row,
body.admin-shell .shop-row-button,
body.admin-shell .ticket-list-title,
body.admin-shell .ticket-list-meta,
body.admin-shell .shop-dialog-item .preview,
body.admin-shell .shop-dialog-item .meta {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  body.admin-shell #adminContent,
  body.admin-shell.mode-admin-tickets #adminContent:not(.hidden) {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--space-md);
  }

  body.admin-shell .shop-broadcast-workspace {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }

  body.admin-shell .shop-broadcast-preview {
    position: static;
    grid-column: 1 / -1;
  }

  body.admin-shell .metrics-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  body.admin-shell #adminContent,
  body.admin-shell.mode-admin-tickets #adminContent:not(.hidden) {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
  }

  body.admin-shell.mode-admin-tickets .app-shell {
    height: calc(100dvh - 64px);
    width: min(100% - 18px, 100%);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  }

  body.admin-shell.mode-admin-tickets #adminContent:not(.hidden) {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
  }

  body.admin-shell.mode-admin-tickets .admin-sidebar {
    height: auto;
  }

  body.admin-shell .admin-sidebar {
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  body.admin-shell .admin-nav {
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 1px;
  }

  body.admin-shell .admin-sidebar .admin-route-tab {
    flex: 0 0 auto;
    padding: 10px 12px;
    white-space: nowrap;
  }

  body.admin-shell .admin-sidebar-foot {
    flex: 0 0 auto;
  }

  body.admin-shell .shop-admin-head,
  body.admin-shell .admin-tickets-head,
  body.admin-shell .admin-metrics-head,
  body.admin-shell .admin-broadcast-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.admin-shell .shop-admin-head-actions {
    justify-content: flex-start;
  }

  body.admin-shell .shop-admin-tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  body.admin-shell .shop-tab-group {
    flex: 0 0 auto;
  }

  body.admin-shell .shop-admin-tab {
    flex: 0 0 auto;
  }

  body.admin-shell .admin-tickets-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.admin-shell #ticketsQuickStats {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  body.admin-shell .admin-tickets-layout,
  body.admin-shell .reseller-stats-layout,
  body.admin-shell .shop-grid-two,
  body.admin-shell .shop-grid-two.wide-left,
  body.admin-shell .shop-inventory-layout,
  body.admin-shell .shop-dialog-layout,
  body.admin-shell .shop-giveaway-prize-layout,
  body.admin-shell .shop-broadcast-workspace {
    grid-template-columns: 1fr;
  }

  body.admin-shell .tickets-list {
    max-height: 360px;
  }

  body.admin-shell .shop-inventory-left,
  body.admin-shell .shop-inventory-right .shop-panel,
  body.admin-shell .shop-dialog-workspace {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  body.admin-shell .shop-dialog-list,
  body.admin-shell .shop-dialog-thread {
    min-height: 360px;
  }

  body.admin-shell .shop-profile-panel {
    position: static;
    width: 100%;
    min-width: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    display: none;
  }

  body.admin-shell .shop-profile-panel.is-open {
    display: block;
  }
}

@media (max-width: 640px) {
  body.admin-shell .app-shell {
    width: min(100% - 18px, 100%);
  }

  body.admin-shell .admin-sidebar {
    padding: 8px;
  }

  body.admin-shell .admin-sidebar-foot {
    display: none;
  }

  body.admin-shell .admin-nav {
    flex-wrap: nowrap;
    width: 100%;
  }

  body.admin-shell .admin-sidebar .admin-route-tab {
    min-height: 40px;
    gap: 8px;
    padding: 9px 10px;
    font-size: 0.86rem;
  }

  body.admin-shell .admin-nav-ico {
    width: 18px;
    height: 18px;
  }

  body.admin-shell .admin-page-head h1,
  body.admin-shell .shop-admin-head h2,
  body.admin-shell .admin-tickets-head h2,
  body.admin-shell .admin-metrics-head h2,
  body.admin-shell .admin-broadcast-head h2 {
    font-size: 1.5rem;
  }

  body.admin-shell .shop-metrics-grid,
  body.admin-shell .shop-metrics-grid.compact,
  body.admin-shell .metrics-grid,
  body.admin-shell .shop-pricing-summary-metrics,
  body.admin-shell .ticket-customer-metrics,
  body.admin-shell .support-agent-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-shell .metrics-detail-grid,
  body.admin-shell .shop-form.mini,
  body.admin-shell .shop-profile-grid,
  body.admin-shell .shop-message-detail-grid,
  body.admin-shell .shop-broadcast-grid.two,
  body.admin-shell .shop-broadcast-grid.three,
  body.admin-shell .shop-broadcast-button-row {
    grid-template-columns: 1fr;
  }

  body.admin-shell .shop-pricing-mode {
    width: 100%;
    min-width: 0;
  }

  body.admin-shell .product-row,
  body.admin-shell .shop-list-row,
  body.admin-shell .shop-editor-row,
  body.admin-shell .shop-key-row,
  body.admin-shell .shop-stock-row,
  body.admin-shell .shop-row-button {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-shell .product-actions,
  body.admin-shell .shop-actions {
    width: 100%;
    justify-content: stretch;
  }

  body.admin-shell .product-actions .open-btn,
  body.admin-shell .product-actions .copy-btn,
  body.admin-shell .shop-actions .open-btn,
  body.admin-shell .shop-actions .copy-btn {
    flex: 1 1 auto;
  }

  body.admin-shell .ticket-message,
  body.admin-shell .shop-message {
    max-width: 96%;
  }

  body.admin-shell .shop-reply-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  body.admin-shell .shop-metrics-grid,
  body.admin-shell .shop-metrics-grid.compact,
  body.admin-shell .metrics-grid,
  body.admin-shell .shop-pricing-summary-metrics,
  body.admin-shell .ticket-customer-metrics,
  body.admin-shell .support-agent-kpis {
    grid-template-columns: 1fr;
  }

  body.admin-shell.mode-admin-tickets .admin-tickets-toolbar {
    grid-template-columns: 1fr;
  }

  body.admin-shell.mode-admin-tickets .ticket-reply-actions,
  body.admin-shell.mode-admin-tickets.support-ticket-selected .ticket-reply-actions,
  body.admin-shell.mode-admin-tickets.support-ticket-selected .ticket-thread-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Admin UI polish — shared components (Stage 1 foundation)
   Additive layer: new reusable states & utilities. Scoped to admin where it
   could otherwise leak into the public site.
   ========================================================================== */

/* --- Loading skeletons -------------------------------------------------- */
@keyframes uiSkeletonShimmer {
  0% { background-position: -160% 0; }
  100% { background-position: 260% 0; }
}
.skeleton-block {
  --skeleton-h: 16px;
  display: block;
  height: var(--skeleton-h);
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    rgba(126, 255, 190, 0.05) 0%,
    rgba(126, 255, 190, 0.13) 50%,
    rgba(126, 255, 190, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: uiSkeletonShimmer 1.25s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-block { animation: none; opacity: 0.7; }
}
.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
}
.skeleton-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  background: rgba(7, 22, 15, 0.4);
}
.skeleton-row .skeleton-block:first-child { width: 62%; }
.skeleton-row .skeleton-block:last-child { width: 38%; --skeleton-h: 11px; }
.skeleton-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}
.skeleton-card {
  height: 96px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--admin-border);
  background: linear-gradient(
    90deg,
    rgba(126, 255, 190, 0.04) 0%,
    rgba(126, 255, 190, 0.1) 50%,
    rgba(126, 255, 190, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: uiSkeletonShimmer 1.25s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-card { animation: none; opacity: 0.7; }
}

/* --- Inline state blocks (loading / error / empty) ---------------------- */
.ui-state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border: 1px dashed var(--admin-border-strong);
  border-radius: var(--radius-lg);
  background: rgba(7, 22, 15, 0.35);
  color: var(--text-soft);
}
.ui-state-icon {
  width: 30px;
  height: 30px;
  opacity: 0.7;
  flex: none;
}
.ui-state-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ui-state-title {
  font-weight: var(--fw-bold);
  color: var(--text-main);
  font-size: var(--fs-md);
}
.ui-state-text {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  max-width: 42ch;
  line-height: 1.5;
}
.ui-state-block.is-error {
  border-style: solid;
  border-color: rgba(255, 122, 122, 0.4);
  background: var(--status-danger-soft);
}
.ui-state-block.is-error .ui-state-icon { color: var(--danger); opacity: 0.9; }
.ui-state-block .ui-state-action {
  margin-top: var(--space-2xs);
}

/* --- Status badges (icon + color, not color alone) ---------------------- */
.ui-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.4;
}
.ui-status-badge .ui-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: currentColor;
}
.ui-status-badge.is-ok {
  color: var(--status-ok);
  background: var(--status-ok-soft);
  border-color: rgba(109, 255, 175, 0.34);
}
.ui-status-badge.is-warn {
  color: var(--warn);
  background: var(--status-warn-soft);
  border-color: rgba(220, 248, 126, 0.34);
}
.ui-status-badge.is-danger {
  color: var(--danger);
  background: var(--status-danger-soft);
  border-color: rgba(255, 122, 122, 0.36);
}
.ui-status-badge.is-info {
  color: var(--status-info);
  background: var(--status-info-soft);
  border-color: rgba(124, 198, 255, 0.34);
}
.ui-status-badge.is-muted {
  color: var(--text-dim);
  background: rgba(150, 196, 172, 0.08);
  border-color: var(--admin-border-strong);
}

/* --- Button size utilities (opt-in, complement existing variants) ------- */
.ui-btn.is-sm,
.admin-small-btn.is-sm { padding: 6px 12px; font-size: var(--fs-xs); min-height: 32px; }
.ui-btn.is-lg { padding: 12px 22px; font-size: var(--fs-md); min-height: 48px; }

/* Reseller stats quick date presets (Stage 4). */
.reseller-stats-presets {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  align-items: flex-end;
}

/* --- Shop catalog management (order / visibility / prices) -------------- */
.shop-catalog {
  display: grid;
  gap: 14px;
}

.shop-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--admin-border, rgba(150, 196, 172, 0.12));
  border-radius: var(--radius-lg, 12px);
  background: rgba(6, 23, 15, 0.72);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(6px);
}

.shop-catalog-search {
  flex: 1 1 220px;
  min-width: 180px;
}

.shop-catalog-search input {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md, 9px);
  border: 1px solid rgba(109, 255, 175, 0.24);
  background: rgba(3, 18, 12, 0.78);
  color: var(--text-main, #e9fff4);
  font-size: 0.86rem;
}

.shop-catalog-toolbar-meta {
  color: var(--text-dim, #70a68b);
  font-size: 0.78rem;
}

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

.shop-catalog-dirty {
  color: #ffd27a;
  font-size: 0.78rem;
}

.shop-catalog-clean {
  color: var(--text-dim, #70a68b);
  font-size: 0.78rem;
}

.shop-catalog-hint {
  color: var(--text-dim, #70a68b);
  font-size: 0.78rem;
  padding: 0 4px;
}

.shop-catalog-games {
  display: grid;
  gap: 10px;
}

.shop-catalog-game {
  border: 1px solid rgba(109, 255, 175, 0.16);
  border-radius: var(--radius-lg, 12px);
  background: rgba(6, 23, 15, 0.66);
  overflow: hidden;
  transition: border-color 0.18s ease, opacity 0.18s ease;
}

.shop-catalog-game.is-disabled {
  opacity: 0.55;
}

.shop-catalog-game-head,
.shop-catalog-product-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.shop-catalog-game-head {
  background: rgba(8, 30, 20, 0.6);
}

.shop-catalog-game-title,
.shop-catalog-product-title {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.shop-catalog-game-title strong,
.shop-catalog-product-title strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-catalog-game-meta,
.shop-catalog-product-dev {
  color: var(--text-dim, #70a68b);
  font-size: 0.74rem;
}

.shop-catalog-handle {
  cursor: grab;
  color: var(--text-dim, #70a68b);
  font-size: 0.9rem;
  letter-spacing: -2px;
  user-select: none;
  padding: 0 2px;
}

.shop-catalog-handle:active {
  cursor: grabbing;
}

.shop-catalog-move {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
}

.shop-catalog-move-btn {
  border: 1px solid rgba(109, 255, 175, 0.2);
  background: rgba(3, 18, 12, 0.7);
  color: var(--text-soft, #a9d9c1);
  border-radius: 5px;
  width: 22px;
  height: 15px;
  line-height: 1;
  font-size: 0.6rem;
  cursor: pointer;
  padding: 0;
}

.shop-catalog-move-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.shop-catalog-toggle-collapse {
  border: none;
  background: transparent;
  color: var(--accent, #8affc8);
  cursor: pointer;
  font-size: 0.85rem;
  width: 18px;
}

.shop-catalog-products {
  display: grid;
  gap: 8px;
  padding: 8px 12px 12px;
}

.shop-catalog-product {
  border: 1px solid rgba(109, 255, 175, 0.12);
  border-radius: var(--radius-md, 9px);
  background: rgba(3, 17, 12, 0.7);
  transition: opacity 0.18s ease;
}

.shop-catalog-product.is-disabled {
  opacity: 0.5;
}

.shop-catalog-product-head {
  padding: 8px 10px;
}

.shop-catalog-plans {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.shop-catalog-plan {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(8, 30, 20, 0.5);
  transition: background 0.4s ease;
}

.shop-catalog-plan.price-saved {
  background: rgba(40, 120, 80, 0.45);
}

.shop-catalog-plan-label {
  flex: 0 0 auto;
  color: var(--text-soft, #a9d9c1);
  font-size: 0.78rem;
  min-width: 70px;
}

.shop-catalog-plan-price {
  flex: 1 1 auto;
  font-size: 0.8rem;
  color: var(--text-main, #e9fff4);
}

.shop-catalog-plan-edit {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.shop-catalog-price-input {
  width: 92px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(109, 255, 175, 0.22);
  background: rgba(3, 18, 12, 0.85);
  color: var(--text-main, #e9fff4);
  font-size: 0.8rem;
}

.shop-catalog-price-save {
  border: 1px solid rgba(109, 255, 175, 0.34);
  background: rgba(17, 71, 45, 0.7);
  color: var(--text-main, #e9fff4);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.76rem;
  cursor: pointer;
}

.shop-catalog-price-save:hover {
  border-color: rgba(109, 255, 175, 0.6);
}

.shop-catalog-switch {
  flex: 0 0 auto;
}

.shop-catalog-empty,
.shop-catalog-game [draggable="true"].drag-over {
  color: var(--text-dim, #70a68b);
  font-size: 0.78rem;
  padding: 6px 2px;
}

[data-game-card].drag-over,
[data-product-row].drag-over {
  outline: 2px dashed rgba(138, 255, 200, 0.7);
  outline-offset: -2px;
  background: rgba(40, 120, 80, 0.16);
}

.shop-catalog-game.dragging,
.shop-catalog-product.dragging {
  opacity: 0.5;
  transform: scale(0.99);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

/* Per-product status selector (🟢 / 🔴 / 🟠). */
.shop-catalog-status {
  display: inline-flex;
  gap: 3px;
  flex: 0 0 auto;
  padding: 2px;
  border-radius: 8px;
  background: rgba(3, 18, 12, 0.6);
}

.shop-catalog-status-btn {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  width: 26px;
  height: 24px;
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.4;
  filter: grayscale(0.5);
  transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.shop-catalog-status-btn:hover {
  opacity: 0.85;
}

.shop-catalog-status-btn.active {
  opacity: 1;
  filter: none;
  border-color: rgba(109, 255, 175, 0.45);
  background: rgba(17, 71, 45, 0.6);
  transform: scale(1.05);
}

/* Per-game storefront 🔥 marker toggle. Off = dim grayscale flame; on = full
   colour with a warm border + glow, so the state reads at a glance. No native
   button chrome (appearance:none) — the earlier white box was the UA default. */
.shop-catalog-fire {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 32px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.3;
  filter: grayscale(1) brightness(0.9);
  transition: opacity 0.15s ease, filter 0.15s ease, border-color 0.15s ease,
    background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.shop-catalog-fire:hover {
  opacity: 0.6;
  filter: grayscale(0.4);
}

.shop-catalog-fire.active {
  opacity: 1;
  filter: none;
  border-color: rgba(255, 150, 60, 0.6);
  background: rgba(255, 110, 30, 0.16);
  box-shadow: 0 0 12px rgba(255, 120, 40, 0.35);
  transform: scale(1.06);
}

.shop-catalog-fire.active:hover {
  background: rgba(255, 120, 40, 0.24);
}

/* --- Duplicate (cross-list a product into other categories) --- */
.shop-catalog-dup-btn {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 30px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #9fd8bd;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease,
    transform 0.15s ease;
}

.shop-catalog-dup-btn:hover {
  opacity: 0.9;
  background: rgba(17, 71, 45, 0.45);
}

.shop-catalog-dup-btn.active {
  opacity: 1;
  color: #d8fbe8;
  border-color: rgba(109, 255, 175, 0.5);
  background: rgba(17, 71, 45, 0.6);
  transform: scale(1.05);
}

/* A cross-listed product row (a "дубль" shown inside another category). */
.shop-catalog-product.is-cross {
  border-style: dashed;
  border-color: rgba(109, 255, 175, 0.28);
  background: rgba(6, 26, 18, 0.4);
  opacity: 0.92;
}

.shop-catalog-cross-badge {
  flex: 0 0 auto;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6fbf98;
  border: 1px solid rgba(109, 255, 175, 0.3);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.shop-catalog-cross-remove {
  -webkit-appearance: none;
  appearance: none;
  margin-left: auto;
  flex: 0 0 auto;
  width: 26px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #d98a8a;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.shop-catalog-cross-remove:hover {
  opacity: 1;
  border-color: rgba(255, 120, 120, 0.5);
  background: rgba(80, 20, 20, 0.4);
}

/* Duplicate picker panel (checklist of target categories). */
.shop-catalog-dup {
  margin: 8px 4px 2px;
  padding: 10px 12px;
  border: 1px solid rgba(109, 255, 175, 0.28);
  border-radius: 10px;
  background: rgba(4, 22, 15, 0.65);
}

.shop-catalog-dup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #bfe6d3;
}

.shop-catalog-dup-actions {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

.shop-catalog-dup-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 12px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.shop-catalog-dup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #cfeede;
  cursor: pointer;
}

.shop-catalog-dup-item:hover {
  background: rgba(17, 71, 45, 0.4);
}

.shop-catalog-dup-item input {
  flex: 0 0 auto;
  cursor: pointer;
}

/* ===========================================================================
   ADMIN REDESIGN — appended last so it wins the cascade over earlier
   admin-shell waves. Everything here is scoped under body.admin-shell, which
   is only present on the authenticated dashboard (never the login/setup gate
   or public/guide pages). Phase 1: shell — brand block + grouped sidebar nav.
   =========================================================================== */

/* --- Sidebar brand block --- */
body.admin-shell .admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 14px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--admin-border);
}

body.admin-shell .admin-brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(140deg, rgba(31, 199, 120, 0.95), rgba(12, 111, 68, 0.95));
  box-shadow: 0 0 0 1px var(--admin-border-strong), 0 8px 18px rgba(31, 199, 120, 0.22);
}

body.admin-shell .admin-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.admin-shell .admin-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.16;
}

body.admin-shell .admin-brand-text b {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

body.admin-shell .admin-brand-text span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- Grouped nav --- */
body.admin-shell .admin-nav {
  gap: 0;
}

body.admin-shell .admin-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.admin-shell .admin-nav-group + .admin-nav-group {
  margin-top: 12px;
}

body.admin-shell .admin-nav-group-label {
  padding: 6px 12px 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Hide a group entirely when role-gating leaves it with no visible tabs. */
body.admin-shell .admin-nav-group.is-empty {
  display: none !important;
}

/* --- Active tab: soft gradient fill + left accent rail --- */
body.admin-shell .admin-sidebar .admin-route-tab {
  position: relative;
}

body.admin-shell .admin-sidebar .admin-route-tab.active {
  background: linear-gradient(90deg, rgba(31, 199, 120, 0.16), rgba(31, 199, 120, 0.04));
  color: var(--accent);
  border-color: var(--admin-border-strong);
}

body.admin-shell .admin-sidebar .admin-route-tab.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(116, 247, 179, 0.6);
}

/* --- Responsive: flatten groups into the horizontal nav (<= 880px) --- */
@media (max-width: 880px) {
  body.admin-shell .admin-brand {
    display: none;
  }
  body.admin-shell .admin-nav-group {
    display: contents;
  }
  body.admin-shell .admin-nav-group-label {
    display: none;
  }
  /* In horizontal mode the active rail reads better as an underline. */
  body.admin-shell .admin-sidebar .admin-route-tab.active::before {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: -1px;
    width: auto;
    height: 2px;
    transform: none;
    border-radius: 2px 2px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.admin-shell .admin-sidebar .admin-route-tab {
    transition: none;
  }
}
