:root {
  --bg: #eef8ef;
  --card: #ffffff;
  --text: #1c2a21;
  --muted: #8f9495;
  --line: #ecf0ed;
  --green-1: #a8e7ba;
  --green-2: #66cd88;
  --green-3: #44b46d;
  --shadow: 0 10px 24px rgba(39, 88, 52, 0.08);

  --app-bg: radial-gradient(circle at 50% -40%, #f9fdf9 0%, var(--bg) 70%);
  --top-bg-url: url("icon/backstage%20for%20logo.jpg?v=2");
  /* Light theme: keep leaf background crisp (no wash overlay). */
  --top-overlay: none;
  --top-soft: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

[hidden] {
  display: none !important;
}

body {
  background: var(--app-bg);
  color: var(--text);
  min-height: 100vh;
}

body,
.card,
.menu-item,
.mini-item,
.theme-toggle,
.subtitle {
  transition:
    background-color 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    color 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 420ms ease,
    background 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo {
  transition: opacity 420ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.theme-animating .logo-stack {
  opacity: 1;
  transform: none;
}

.logo-center {
  width: 100%;
  display: flex;
  justify-content: center;
}

.logo-area {
  position: relative;
  display: inline-block;
  margin: 0 auto;
}

.logo-stack {
  position: relative;
  display: grid;
  place-items: center;
  animation: logoFloat 6.8s ease-in-out infinite;
  will-change: transform;
  margin-bottom: -12px;
}

.logo {
  grid-area: 1 / 1;
  transition: opacity 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity;
}

.logo--light {
  opacity: 1 !important;
  z-index: 2;
}

.logo--dark {
  opacity: 0 !important;
  z-index: 1;
}

body[data-theme="dark"] .logo--dark {
  opacity: 1 !important;
}

body[data-theme="dark"] .logo--light {
  opacity: 0 !important;
}

body:not([data-theme="dark"]) .logo--light {
  opacity: 1 !important;
  z-index: 2;
}

@keyframes logoFloat {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-14px); }
  100% { transform: translateY(0); }
}

.theme-toggle {
  position: absolute;
  top: -3px;
  left: -6px;
  z-index: 5;
  width: 56px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 320ms ease,
    background 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-toggle:hover {
  filter: brightness(0.92);
  transform: scale(0.98);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle__icon {
  position: relative;
  z-index: 2;
  font-size: 14px;
  line-height: 1;
  color: var(--text);
  transform: translateX(-10px);
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), color 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-toggle::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  left: 4px;
  top: 3px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  transition:
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px 16px 12px;
  position: relative;
}

.app-shell {
  overflow: visible;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
  animation: screenIn 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Keep profile intro overlay perfectly stable on first frame. */
#profileScreen.is-active {
  animation: none;
}

.card {
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid #f2f5f3;
}

.panel {
  padding: 14px 14px 10px;
}

.panel-section {
  position: relative;
}

.panel-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 6px 10px;
  user-select: none;
}

.top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px 8px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  background-image:
    var(--top-soft),
    var(--top-bg-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.top::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--top-overlay);
  pointer-events: none;
}

.top > * {
  position: relative;
  z-index: 1;
}

#mainScreen.is-active .top,
#mainScreen.is-active .plan,
#mainScreen.is-active .menu,
#mainScreen.is-active .duo {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 520ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

#mainScreen.is-active .top { animation-delay: 40ms; }
#mainScreen.is-active .plan { animation-delay: 110ms; }
#mainScreen.is-active .menu { animation-delay: 170ms; }
#mainScreen.is-active .duo  { animation-delay: 230ms; }

#mainScreen.is-active .menu-item,
#mainScreen.is-active .mini-item {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 520ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

#mainScreen.is-active .menu-item:nth-child(1) { animation-delay: 210ms; }
#mainScreen.is-active .menu-item:nth-child(2) { animation-delay: 260ms; }
#mainScreen.is-active .mini-item:nth-child(1) { animation-delay: 310ms; }
#mainScreen.is-active .mini-item:nth-child(2) { animation-delay: 360ms; }

.logo {
  width: min(320px, 100%);
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Re-run logo entrance animation reliably when returning to main. */
#mainScreen.is-active .logo-stack {
  opacity: 0;
  transform: translateY(-24px);
  animation:
    logoDropIn 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 90ms both,
    logoFloat 6.8s ease-in-out 900ms infinite;
}

.subtitle {
  margin-top: -18px;
  color: rgba(17, 35, 23, 0.62);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-variation-settings: "wght" 650;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(236, 240, 237, 0.9);
  backdrop-filter: blur(6px);
  text-align: center;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.plan {
  padding: 8px 6px 2px;
}

.plan-bubbles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  column-gap: 14px;
}

.plan-bubble {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px 10px 8px;
  border-radius: 16px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(6px);
}

.plan-bubble > * {
  justify-self: center;
  text-align: center;
}

.plan-header,
.plan-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  column-gap: 22px;
}

.plan-header {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.browser-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--app-bg);
}

.browser-card {
  width: min(520px, 100%);
  border-radius: 20px;
  border: 1px solid rgba(130, 102, 216, 0.24);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(39, 88, 52, 0.12);
  padding: 18px;
  display: grid;
  gap: 10px;
}

.browser-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin: 0 auto;
}

.browser-title {
  text-align: center;
  font-size: 22px;
}

.browser-subtitle,
.browser-hint {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

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

.browser-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
}

.browser-input {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.24);
  padding: 0 12px;
  font-size: 14px;
}

.browser-btn {
  min-height: 42px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(100deg, var(--green-3) 0%, #2f9f61 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.browser-btn--secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.browser-forgot-btn {
  border: 0;
  background: transparent;
  color: #4f60df;
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.browser-forgot-btn:active {
  transform: scale(0.97);
  opacity: 0.82;
}

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

.browser-legal-btn {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(165, 130, 255, 0.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
}

.browser-legal-btn:hover {
  border-color: rgba(130, 102, 216, 0.38);
  filter: brightness(0.99);
}

.browser-legal-btn:active {
  transform: scale(0.985);
}

@media (max-width: 420px) {
  .browser-legal {
    grid-template-columns: minmax(0, 1fr);
  }
}

.profile-email-btn--ghost {
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(130, 102, 216, 0.32);
  color: var(--text);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.profile-email-btn--ghost:active,
.profile-email-btn--ghost.is-pressed {
  transform: translateY(1px) scale(0.985);
  opacity: 0.85;
  box-shadow: inset 0 2px 8px rgba(95, 86, 170, 0.22);
}

.auth-code-modal {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: none;
}

.auth-code-modal.is-open {
  display: block;
}

.auth-code-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 30, 0.58);
}

.auth-code-modal__card {
  position: relative;
  margin: 18vh auto 0;
  width: min(420px, calc(100% - 30px));
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(130, 102, 216, 0.2);
  padding: 16px;
}

.auth-code-modal__title { margin: 0; font-size: 18px; }
.auth-code-modal__subtitle { margin: 8px 0 12px; color: var(--muted); font-size: 13px; }
.auth-code-modal__input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.24);
  padding: 0 12px;
  letter-spacing: 3px;
  text-align: center;
  font-size: 18px;
}
.auth-code-modal__actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-code-modal__btn { min-height: 40px; border-radius: 12px; border: 0; cursor: pointer; }
.auth-code-modal__btn--primary { background: linear-gradient(100deg, var(--green-3) 0%, #2f9f61 100%); color: #fff; }
.auth-code-modal__btn--secondary { background: #eef0ff; color: #38407a; }
.auth-code-modal__close { position: absolute; right: 10px; top: 8px; border: 0; background: transparent; font-size: 24px; cursor: pointer; color: #7a7fa2; }

.plan-header-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(130, 102, 216, 0.26);
  background: rgba(255, 255, 255, 0.78);
  justify-self: center;
}

.right {
  text-align: right;
}

.plan .right {
  text-align: center;
  justify-self: center;
}

.plan-content .state {
  justify-self: center;
}

.state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 36px;
  font-weight: 700;
  width: 100%;
}

.state-text {
  display: inline-block;
  text-align: center;
}

.state-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: #f0faf2;
}

.date {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  width: 100%;
  justify-self: center;
  text-align: center;
}

.menu {
  display: grid;
  gap: 12px;
  padding: 2px 0;
  margin-bottom: 0;
}

.menu-item,
.mini-item {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  min-height: 72px;
  width: 100%;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  padding: 0 10px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 170ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease, filter 220ms ease;
  will-change: transform;
}

.menu-item--accent {
  background: linear-gradient(100deg, var(--green-3) 0%, #2f9f61 100%);
  border: none;
}

.menu-item--admin {
  background: linear-gradient(100deg, rgba(165, 130, 255, 0.16) 0%, rgba(214, 199, 255, 0.18) 100%);
  border-color: rgba(165, 130, 255, 0.42);
  box-shadow: 0 14px 28px rgba(132, 94, 247, 0.12);
}

.menu-item--admin .title {
  color: #1c2a21;
}

.menu-item--admin .hint {
  color: rgba(28, 42, 33, 0.72);
}

.menu-item--admin .icon {
  background: transparent;
}

body[data-theme="dark"] .menu-item.menu-item--admin {
  background: linear-gradient(100deg, rgba(112, 78, 200, 0.44) 0%, rgba(78, 55, 140, 0.30) 100%);
  border-color: rgba(165, 130, 255, 0.46);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36);
}

body[data-theme="dark"] .menu-item.menu-item--admin .title {
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .menu-item.menu-item--admin .hint {
  color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .menu-item.menu-item--admin .icon {
  background: transparent;
}

.icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: transparent;
}

.icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.menu-item--accent .icon {
  background: transparent;
}

.meta {
  display: grid;
  gap: 4px;
}

.title {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: 0.15px;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.hint {
  font-size: 21px;
  color: #8f9892;
  font-weight: 520;
  letter-spacing: 0.1px;
}

.menu-item--accent .title,
.menu-item--accent .hint {
  color: #fff;
}

.menu-item:hover,
.mini-item:hover {
  transform: translateY(-2px);
  filter: brightness(0.93);
  box-shadow: 0 14px 30px rgba(39, 88, 52, 0.14);
}

.menu-item:active,
.mini-item:active,
.menu-item.is-pressed,
.mini-item.is-pressed {
  transform: translateY(0) scale(0.975);
  filter: brightness(0.9);
  box-shadow: 0 8px 18px rgba(39, 88, 52, 0.1);
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: -2px;
  margin-bottom: 0;
  padding-bottom: 0;
}

.mini-item {
  min-height: 72px;
  grid-template-columns: 46px 1fr;
  padding: 0 10px;
}

.mini-item .title {
  font-size: inherit;
}

.mini-item .hint {
  font-size: inherit;
}

.menu-item:focus-visible,
.mini-item:focus-visible {
  outline: 3px solid rgba(102, 205, 136, 0.35);
  outline-offset: 2px;
}

.tariff-panel {
  padding: 2px 0 0;
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}

.tariff-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tariff-title {
  font-size: 24px;
  font-weight: 800;
}

.tariff-back {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  place-items: center;
  padding: 0;
  transition: filter 200ms ease, transform 160ms ease;
}

.tariff-back:hover {
  filter: brightness(0.95);
}

.tariff-back:active {
  transform: scale(0.96);
}

.tariff-back-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.tariff-subtitle {
  color: var(--muted);
  font-size: 16px;
}

.tariff-bubble {
  border-radius: 18px;
}

.tariff-list {
  display: grid;
  gap: 10px;
}

.tariff-list-empty {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  padding: 14px 6px 4px;
}

.tariff-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px 46px 14px 14px;
  display: grid;
  gap: 6px;
  text-align: left;
  position: relative;
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 260ms ease,
    box-shadow 320ms ease,
    border-color 320ms ease,
    background 360ms ease;
}

.tariff-item--active {
  background: linear-gradient(100deg, rgba(68, 180, 109, 0.12) 0%, rgba(47, 159, 97, 0.08) 100%);
  border: 1px solid rgba(53, 163, 95, 0.85);
  box-shadow: 0 12px 26px rgba(41, 125, 76, 0.14);
  color: var(--text);
}


.tariff-item__top {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tariff-item__title {
  font-size: 24px;
  font-weight: 750;
}

.tariff-item__badge {
  font-size: 12px;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(53, 163, 95, 0.14);
  color: #2e9d63;
  border: 1px solid rgba(53, 163, 95, 0.2);
}

.tariff-item__hint {
  color: #2e9d63;
  font-size: 15px;
  font-weight: 650;
}

.tariff-item__bottom {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.tariff-item__price {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.tariff-item__devices {
  font-size: 14px;
  color: #2e9d63;
  font-weight: 650;
}

.tariff-item__selector {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #35a35f;
}

.tariff-item--active .tariff-item__badge {
  background: rgba(53, 163, 95, 0.16);
  color: #2e9d63;
  border-color: rgba(53, 163, 95, 0.26);
}

.tariff-item--active .tariff-item__hint,
.tariff-item--active .tariff-item__devices {
  color: #2e9d63;
}

.tariff-item--active .tariff-item__selector {
  border-color: #35a35f;
  box-shadow: inset 0 0 0 5px rgba(53, 163, 95, 0.95);
}

.tariff-item:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
}

.tariff-item:active {
  transform: scale(0.985);
}

.tariff-item:focus-visible {
  outline: 3px solid rgba(102, 205, 136, 0.35);
  outline-offset: 2px;
}

.card-lite {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  padding: 12px;
}

.devices {
  display: grid;
  gap: 10px;
}

.devices-head {
  display: grid;
  gap: 4px;
}

.devices-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.devices-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.devices-price {
  color: var(--muted);
  font-size: 14px;
}

.devices-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 30px;
  border-radius: 999px;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
}

.devices-slider-wrap {
  position: relative;
  height: 30px;
  padding-right: 7px;
}

.devices-slider::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(53, 163, 95, 0.24) 0%, rgba(53, 163, 95, 0.1) 100%);
  border: 1px solid rgba(53, 163, 95, 0.22);
}

.devices-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -7px;
  border: none;
  border-radius: 0;
  background-color: transparent;
  cursor: pointer;
  opacity: 0;
}

.devices-slider::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(53, 163, 95, 0.24) 0%, rgba(53, 163, 95, 0.1) 100%);
  border: 1px solid rgba(53, 163, 95, 0.22);
}

.devices-slider::-moz-range-thumb {
  -moz-appearance: none;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 0;
  background-color: transparent;
  cursor: pointer;
  opacity: 0;
}

.slider-leaf {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(41, 125, 76, 0.25));
}

.devices-foot {
  font-size: 15px;
}

.tariff-inc-title {
  font-size: 20px;
  margin-bottom: 14px;
}

.includes {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 16px;
}

.include-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  line-height: 1.35;
}

.include-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  margin-top: 2px;
}

.tariff-sticky-wrap {
  position: sticky;
  bottom: 4px;
  z-index: 8;
  padding: 0 8px calc(6px + env(safe-area-inset-bottom));
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pay-btn {
  pointer-events: auto;
  width: 100%;
  border: none;
  border-radius: 20px;
  background: linear-gradient(100deg, #37b86d 0%, #2f9f61 45%, #298954 100%);
  color: #fff;
  display: grid;
  gap: 4px;
  padding: 15px 16px;
  box-shadow: 0 16px 34px rgba(41, 125, 76, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 180ms ease, filter 220ms ease, box-shadow 280ms ease;
}

.pay-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.pay-btn:active {
  transform: scale(0.985);
  filter: brightness(0.92);
}

.pay-btn-title {
  font-size: 19px;
  font-weight: 800;
}

.pay-btn-sub {
  font-size: 14px;
  opacity: 0.96;
  letter-spacing: 0.15px;
}

.support-chat-btn {
  pointer-events: auto;
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(53, 163, 95, 0.24);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(39, 88, 52, 0.12);
  transition: transform 160ms ease, filter 220ms ease, background 240ms ease;
}

.support-chat-btn--static {
  margin: 4px 8px 0;
  width: calc(100% - 16px);
}

.support-chat-btn:hover {
  filter: brightness(0.96);
}

.support-chat-btn:active {
  transform: scale(0.985);
}

.support-chat-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.support-panel {
  display: grid;
  gap: 12px;
}

.support-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-chat-card {
  display: grid;
  gap: 8px;
  text-align: center;
  padding: 16px 14px;
}

.support-chat-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(53, 163, 95, 0.24);
  background: rgba(53, 163, 95, 0.08);
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.support-chat-main-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.support-chat-title {
  font-size: 22px;
  font-weight: 760;
}

.support-chat-text {
  color: var(--muted);
  font-size: 15px;
}

.support-chat-main-btn {
  margin-top: 2px;
  min-height: 48px;
  border-radius: 14px;
  background: linear-gradient(100deg, #37b86d 0%, #2f9f61 45%, #298954 100%);
  color: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-weight: 760;
}

.setup-panel {
  display: grid;
  gap: 12px;
}

.setup-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setup-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.setup-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(53, 163, 95, 0.3);
  background: rgba(53, 163, 95, 0.16);
  color: #2f9f61;
  font-size: 13px;
  font-weight: 760;
  display: grid;
  place-items: center;
}

.setup-step--active {
  background: linear-gradient(120deg, #37b86d 0%, #2f9f61 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 16px rgba(41, 125, 76, 0.24);
}

.setup-step-line {
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: rgba(53, 163, 95, 0.28);
}

.setup-title {
  text-align: center;
  font-size: 28px;
  font-weight: 780;
}

.setup-subtitle {
  text-align: center;
  color: #2f9f61;
  font-size: 17px;
  font-weight: 650;
  margin-top: -6px;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.setup-option {
  min-height: 110px;
  border-radius: 16px;
  border: 1px solid rgba(53, 163, 95, 0.35);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(39, 88, 52, 0.1);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  padding: 12px 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 170ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 220ms ease, box-shadow 220ms ease, background 260ms ease, border-color 220ms ease;
}

.setup-option-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.setup-option:hover {
  transform: translateY(-2px);
  filter: brightness(0.96);
}

.setup-option:active,
.setup-option.is-pressed {
  transform: scale(0.975);
}

.setup-option--active {
  background: linear-gradient(120deg, rgba(68, 180, 109, 0.2) 0%, rgba(47, 159, 97, 0.1) 100%);
  border-color: rgba(53, 163, 95, 0.8);
  box-shadow: 0 12px 24px rgba(41, 125, 76, 0.16);
}

.setup-devices-wrap {
  overflow: hidden;
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 240ms ease,
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.setup-devices-wrap:not(.is-open) {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.setup-devices-title {
  text-align: center;
  color: #2f9f61;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.setup-devices-list {
  display: grid;
  gap: 8px;
}

.setup-device-item {
  border: 1px solid rgba(53, 163, 95, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  min-height: 56px;
  padding: 0 42px 0 14px;
  text-align: left;
  position: relative;
  color: var(--text);
  font-size: 20px;
  font-weight: 760;
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 240ms ease,
    box-shadow 320ms ease,
    border-color 320ms ease,
    background 360ms ease;
}

.setup-device-item:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
}

.setup-device-item:active,
.setup-device-item.is-pressed {
  transform: scale(0.985);
}

.setup-device-item__selector {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #35a35f;
}

.setup-device-item--active {
  background: linear-gradient(100deg, rgba(68, 180, 109, 0.12) 0%, rgba(47, 159, 97, 0.08) 100%);
  border: 1px solid rgba(53, 163, 95, 0.85);
  box-shadow: 0 12px 24px rgba(41, 125, 76, 0.14);
}

.setup-device-item--active .setup-device-item__selector {
  box-shadow: inset 0 0 0 5px rgba(53, 163, 95, 0.95);
}

.setup-next-btn {
  margin-top: 8px;
  min-height: 52px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(100deg, #37b86d 0%, #2f9f61 45%, #298954 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 760;
  box-shadow: 0 16px 30px rgba(41, 125, 76, 0.26);
  transition: transform 170ms ease, filter 220ms ease;
}

.setup-next-btn:hover {
  filter: brightness(0.96);
}

.setup-next-btn:active {
  transform: scale(0.985);
}

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

.admin-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-subtitle {
  color: var(--muted);
  font-size: 15px;
}

.admin-menu {
  display: grid;
  gap: 10px;
}

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

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

.admin-catalog-card,
.admin-subscriptions-add {
  border: 1px solid rgba(130, 102, 216, 0.28);
  border-radius: 16px;
  background: linear-gradient(115deg, rgba(169, 139, 255, 0.14) 0%, rgba(207, 187, 255, 0.16) 100%);
  min-height: 82px;
  width: 100%;
  text-align: left;
  padding: 14px;
  display: grid;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(93, 63, 182, 0.12);
  transition: transform 170ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 220ms ease, box-shadow 220ms ease;
}

/* Add button in "Подписки" menu */
.admin-subscriptions-add {
  place-items: center;
  text-align: center;
  font-size: 18px;
  font-weight: 750;
  min-height: 64px;
  transform: scale(0.96);
  color: #4e2c97;
  background: linear-gradient(120deg, rgba(178, 152, 255, 0.28) 0%, rgba(215, 198, 255, 0.3) 100%);
}

.admin-catalog-card__title {
  font-size: 19px;
  font-weight: 760;
  color: #2a1f53;
}

.admin-catalog-card__hint {
  font-size: 13px;
  color: rgba(42, 31, 83, 0.7);
}

.admin-catalog-card:hover,
.admin-subscriptions-add:hover {
  transform: translateY(-2px);
  filter: brightness(0.98);
}

.admin-stock-placeholder {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.admin-stock-placeholder__title {
  font-size: 20px;
  font-weight: 760;
}

.admin-stock-placeholder__text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.benefit-card {
  margin-top: 10px;
  padding: 12px 12px 12px;
}

.benefit-card__title {
  font-size: 16px;
  font-weight: 820;
  color: #2a1f53;
}

.benefit-card__title--small {
  font-size: 14px;
}

.benefit-card__sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  color: rgba(42, 31, 83, 0.86);
}

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

.benefit-grid--dates {
  margin-top: 10px;
}

.benefit-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.benefit-field--top-gap {
  margin-top: 10px;
}

.benefit-field--accordion {
  align-content: start;
}

.benefit-field__label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(42, 31, 83, 0.82);
}

.benefit-input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.34);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  padding: 0 12px;
  font-size: 15px;
  outline: none;
}

.benefit-input:focus {
  border-color: rgba(130, 102, 216, 0.55);
  box-shadow: 0 0 0 2px rgba(130, 102, 216, 0.12);
}

.benefit-input::placeholder {
  color: rgba(42, 31, 83, 0.55);
}

.benefit-number {
  display: grid;
  gap: 8px;
}

/* Hide native number spinners (use quick chips instead). */
.benefit-input--number::-webkit-outer-spin-button,
.benefit-input--number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.benefit-input--number {
  -moz-appearance: textfield;
  appearance: textfield;
}

.benefit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.benefit-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(130, 102, 216, 0.28);
  background: rgba(165, 130, 255, 0.1);
  color: #2a1f53;
  font-weight: 760;
  cursor: pointer;
}

.benefit-chip:hover {
  filter: brightness(0.98);
  border-color: rgba(130, 102, 216, 0.45);
}

.benefit-chip:active {
  transform: scale(0.985);
}

.benefit-time {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(165, 130, 255, 0.06);
  padding: 10px 10px 10px;
}

.benefit-time__head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
}

.benefit-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(42, 31, 83, 0.9);
  user-select: none;
}

.benefit-switch--range {
  margin-top: 10px;
}

.benefit-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.benefit-switch__ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(130, 102, 216, 0.34);
  background: rgba(255, 255, 255, 0.9);
  position: relative;
  flex-shrink: 0;
}

.benefit-switch__ui::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(120, 79, 224, 0.55);
  transition: left 180ms ease, background 180ms ease;
}

.benefit-switch input:checked + .benefit-switch__ui::after {
  left: 21px;
  background: rgba(55, 184, 109, 0.7);
}

.benefit-switch__label {
  line-height: 1.25;
}

.benefit-submit {
  margin-top: 12px;
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(130, 102, 216, 0.35);
  background: linear-gradient(135deg, rgba(120, 79, 224, 0.9) 0%, rgba(165, 130, 255, 0.9) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 820;
  cursor: pointer;
}

.benefit-submit:active,
.benefit-submit.is-pressed {
  transform: scale(0.99);
}

.benefit-mini-note {
  margin: 8px 0 0;
  font-size: 11px;
  color: rgba(42, 31, 83, 0.58);
  line-height: 1.35;
  text-align: center;
}

.benefit-plan-pick {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.benefit-plan-btn {
  width: 100%;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(130, 102, 216, 0.34);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 240, 255, 0.96) 100%);
  padding: 12px 13px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(93, 63, 182, 0.08);
  transition: transform 0.12s ease, border-color 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}

.benefit-plan-btn:hover {
  border-color: rgba(130, 102, 216, 0.54);
  filter: brightness(0.995);
  box-shadow: 0 10px 24px rgba(93, 63, 182, 0.12);
}

.benefit-plan-btn:active,
.benefit-plan-btn.is-active {
  border-color: #11c34a;
  background: linear-gradient(135deg, rgba(17, 195, 74, 0.16) 0%, rgba(177, 150, 255, 0.18) 100%);
  box-shadow: 0 0 0 2px rgba(17, 195, 74, 0.28);
}

.benefit-plan-btn__title {
  font-size: 14px;
  font-weight: 820;
  color: #2a1f53;
  line-height: 1.25;
}

.benefit-plan-btn__meta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(42, 31, 83, 0.82);
  line-height: 1.3;
}

.benefit-list-head {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.benefit-list-head__title {
  font-size: 14px;
  font-weight: 820;
  color: #2a1f53;
}

.benefit-refresh {
  width: 40px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.28);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 16px;
}

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

.benefit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(255, 255, 255, 0.92);
}

.benefit-row__text {
  min-width: 0;
  flex: 1;
}

.benefit-row__code {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #2a1f53;
}

.benefit-row__meta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(42, 31, 83, 0.82);
  line-height: 1.3;
  white-space: pre-line;
}

.benefit-row__del {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(183, 68, 68, 0.45);
  background: rgba(255, 236, 236, 0.95);
  cursor: pointer;
  font-size: 18px;
}

body[data-theme="dark"] .benefit-card__title,
body[data-theme="dark"] .benefit-list-head__title,
body[data-theme="dark"] .benefit-row__code,
body[data-theme="dark"] .benefit-plan-btn__title {
  color: #f0e9ff;
}

body[data-theme="dark"] .benefit-card__sub,
body[data-theme="dark"] .benefit-mini-note,
body[data-theme="dark"] .benefit-plan-btn__meta,
body[data-theme="dark"] .benefit-row__meta,
body[data-theme="dark"] .benefit-switch {
  color: rgba(240, 233, 255, 0.86);
}

body[data-theme="dark"] .benefit-input,
body[data-theme="dark"] .benefit-plan-btn,
body[data-theme="dark"] .benefit-refresh,
body[data-theme="dark"] .benefit-row,
body[data-theme="dark"] .benefit-chip {
  background: rgba(28, 31, 36, 0.92);
  border-color: rgba(165, 130, 255, 0.34);
  color: #f0e9ff;
}

body[data-theme="dark"] .benefit-plan-btn.is-active {
  border-color: #28ff74;
  box-shadow: 0 0 0 2px rgba(40, 255, 116, 0.42), 0 0 22px rgba(40, 255, 116, 0.22);
  background: linear-gradient(135deg, rgba(40, 255, 116, 0.17) 0%, rgba(82, 65, 132, 0.34) 100%);
}

body[data-theme="dark"] .benefit-time {
  background: rgba(165, 130, 255, 0.1);
  border-color: rgba(165, 130, 255, 0.32);
}

body[data-theme="dark"] .benefit-switch__ui {
  background: rgba(28, 31, 36, 0.92);
  border-color: rgba(165, 130, 255, 0.34);
}

.benefit-grid--dates-stack {
  grid-template-columns: minmax(0, 1fr);
}

.benefit-collapse {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 260ms ease, opacity 180ms ease, transform 200ms ease;
}

.benefit-collapse.is-open {
  max-height: 260px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 10px;
}

body[data-theme="dark"] .benefit-field__label {
  color: rgba(240, 233, 255, 0.86);
}

body[data-theme="dark"] .benefit-input::placeholder {
  color: rgba(240, 233, 255, 0.55);
}

.admin-subscriptions-list {
  display: grid;
  gap: 10px;
}

.admin-plan-card {
  border-radius: 16px;
  border: 1px solid rgba(130, 102, 216, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 240, 255, 0.92) 100%);
  box-shadow: 0 10px 22px rgba(93, 63, 182, 0.14);
  padding: 12px 12px 12px 10px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
}

.admin-plan-card__main {
  display: grid;
  gap: 7px;
}

.admin-plan-card__title-row {
  display: flex;
  gap: 8px;
  align-items: start;
}

.admin-plan-card__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-plan-card__title,
.admin-plan-card__price {
  font-weight: 760;
  color: #2a1f53;
}

.admin-plan-card__duration-chip {
  font-size: 11px;
  font-weight: 760;
  color: #5c3cb3;
  border: 1px solid rgba(120, 79, 224, 0.35);
  border-radius: 8px;
  padding: 2px 6px;
  background: rgba(150, 114, 240, 0.13);
}

.admin-plan-card__duration,
.admin-plan-card__devices {
  color: rgba(42, 31, 83, 0.72);
  font-size: 13px;
}

.admin-plan-card__actions {
  display: flex;
  gap: 8px;
}

.admin-plan-card__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.25);
  background: rgba(165, 130, 255, 0.12);
  cursor: pointer;
}

.admin-plan-card__icon-btn--danger {
  background: rgba(255, 108, 108, 0.12);
  border-color: rgba(255, 108, 108, 0.28);
}

.admin-plan-card__drag {
  width: 24px;
  height: 36px;
  border: 1px solid rgba(130, 102, 216, 0.18);
  border-radius: 8px;
  background: rgba(165, 130, 255, 0.08);
  cursor: grab;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 0;
  touch-action: none;
  user-select: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.admin-plan-card__drag:active {
  cursor: grabbing;
}

.admin-plan-card__drag span {
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: rgba(93, 63, 182, 0.68);
}

.admin-plan-card.is-dragging {
  opacity: 0.65;
}

.admin-plan-card.is-drag-over {
  border-color: rgba(120, 79, 224, 0.75);
  box-shadow: 0 0 0 2px rgba(120, 79, 224, 0.2);
}

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

#adminPlanSubmitBtn {
  justify-self: center;
  width: min(360px, 88%);
  font-size: 17px;
  font-weight: 720;
  min-height: 46px;
  transform: scale(0.96);
}

#adminPlanSubmitBtn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.1);
}

.admin-plan-field {
  display: grid;
  gap: 6px;
}

.admin-plan-field__label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(42, 31, 83, 0.72);
}

.admin-plan-input,
.admin-plan-month-picker {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.24);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  padding: 0 12px;
  font-size: 15px;
}

.admin-broadcast-text {
  min-height: 120px;
  padding: 10px 12px;
  resize: none;
  overflow: hidden;
}

.admin-broadcast-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(255, 255, 255, 0.86);
}

.admin-broadcast-tool {
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(165, 130, 255, 0.12);
  color: rgba(42, 31, 83, 0.9);
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, filter 180ms ease, background 200ms ease;
}

.admin-broadcast-tool:active {
  transform: scale(0.98);
}

body[data-theme="dark"] .admin-broadcast-toolbar {
  background: rgba(42, 45, 49, 0.94);
  border-color: rgba(165, 130, 255, 0.28);
}

body[data-theme="dark"] .admin-broadcast-tool {
  background: rgba(180, 153, 255, 0.14);
  border-color: rgba(180, 153, 255, 0.28);
  color: #f0e9ff;
}

.admin-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-file-picker__btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(165, 130, 255, 0.14);
  color: rgba(42, 31, 83, 0.92);
  font-weight: 820;
  cursor: pointer;
  transition: transform 120ms ease, filter 180ms ease, background 220ms ease;
}

.admin-file-picker__btn:active {
  transform: scale(0.985);
}

.admin-file-picker__name {
  font-size: 12px;
  color: rgba(42, 31, 83, 0.66);
}

body[data-theme="dark"] .admin-file-picker__btn {
  background: rgba(180, 153, 255, 0.14);
  border-color: rgba(180, 153, 255, 0.28);
  color: rgba(240, 233, 255, 0.92);
}

body[data-theme="dark"] .admin-file-picker__name {
  color: rgba(240, 233, 255, 0.72);
}

body[data-theme="dark"] .admin-user-modal__card--notice .admin-user-modal__subtitle {
  color: rgba(240, 233, 255, 0.8);
}

.admin-maint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(255, 255, 255, 0.86);
}

.admin-maint-title {
  font-size: 14px;
  font-weight: 760;
  color: #2a1f53;
}

.admin-maint-hint {
  font-size: 12px;
  color: rgba(42, 31, 83, 0.65);
  margin-top: 2px;
}

.admin-switch {
  position: relative;
  width: 52px;
  height: 32px;
  flex-shrink: 0;
}

.admin-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-switch__ui {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(130, 102, 216, 0.26);
  background: rgba(165, 130, 255, 0.14);
  transition: background 220ms ease, border-color 220ms ease;
}

.admin-switch__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.admin-switch input:checked + .admin-switch__ui {
  background: rgba(120, 79, 224, 0.9);
  border-color: rgba(120, 79, 224, 0.9);
}

.admin-switch input:checked + .admin-switch__ui::after {
  transform: translateX(20px);
}

.admin-maint-templates-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.admin-maint-templates {
  display: grid;
  gap: 8px;
}

.admin-maint-template {
  border: 1px solid rgba(130, 102, 216, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 10px;
}

.admin-maint-template__text {
  font-size: 13px;
  color: rgba(42, 31, 83, 0.9);
  white-space: pre-wrap;
}

.admin-maint-template__actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-broadcast-photo-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.admin-broadcast-photo-item {
  border: 1px solid rgba(130, 102, 216, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.86);
}


.maintenance-toast {
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(34, 37, 42, 0.95);
  color: rgba(245, 240, 255, 0.96);
  border: 1px solid rgba(180, 153, 255, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.maintenance-toast.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 6, 8, 0.62);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.maintenance-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.maintenance-overlay__card {
  width: min(460px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(180, 153, 255, 0.34);
  background: rgba(28, 31, 36, 0.98);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  padding: 20px 18px 18px;
  display: grid;
  gap: 12px;
  text-align: center;
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
}

.maintenance-overlay.is-open .maintenance-overlay__card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.maintenance-overlay__logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}

.maintenance-overlay__text {
  font-size: 20px;
  font-weight: 760;
  line-height: 1.42;
  color: rgba(240, 233, 255, 0.9);
  white-space: pre-line;
  margin: 0 auto;
  max-width: 20ch;
  text-wrap: balance;
}

body[data-theme="dark"] .admin-maint-row {
  background: rgba(42, 45, 49, 0.94);
  border-color: rgba(165, 130, 255, 0.28);
}

body[data-theme="dark"] .admin-maint-title {
  color: #f0e9ff;
}

body[data-theme="dark"] .admin-maint-hint {
  color: rgba(240, 233, 255, 0.72);
}

body[data-theme="dark"] .admin-maint-template {
  background: rgba(42, 45, 49, 0.94);
  border-color: rgba(165, 130, 255, 0.28);
}

body[data-theme="dark"] .admin-maint-template__text {
  color: rgba(240, 233, 255, 0.92);
}

body[data-theme="dark"] .admin-broadcast-photo-item {
  background: rgba(42, 45, 49, 0.94);
  border-color: rgba(165, 130, 255, 0.28);
  color: rgba(240, 233, 255, 0.92);
}

.admin-plan-month-picker {
  text-align: left;
  cursor: pointer;
}

.admin-month-modal__card {
  max-height: min(70vh, 520px);
  overflow: auto;
  display: grid;
  gap: 12px;
}

.admin-month-list {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
  max-height: min(52vh, 420px);
  -webkit-overflow-scrolling: touch;
}

.admin-month-list__item {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.2);
  background: rgba(255, 255, 255, 0.94);
  text-align: left;
  padding: 0 12px;
}

.admin-month-list__item.is-active {
  background: rgba(120, 79, 224, 0.12);
  border-color: rgba(120, 79, 224, 0.42);
}

.admin-item {
  border: 1px solid rgba(130, 102, 216, 0.28);
  border-radius: 16px;
  background: linear-gradient(115deg, rgba(169, 139, 255, 0.14) 0%, rgba(207, 187, 255, 0.16) 100%);
  min-height: 82px;
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  display: grid;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(93, 63, 182, 0.12);
  transition: transform 170ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 220ms ease, box-shadow 220ms ease;
}

.admin-item:hover {
  transform: translateY(-2px);
  filter: brightness(0.98);
}

.admin-item:active,
.admin-item.is-pressed {
  transform: scale(0.985);
}

.admin-item__title {
  font-size: 19px;
  font-weight: 760;
  color: #2a1f53;
}

.admin-item__hint {
  font-size: 13px;
  color: rgba(42, 31, 83, 0.7);
}

.admin-users-screen-panel {
  padding: 2px 0 0;
}

/* Отдельный полноэкранный слой: не зависит от скролла/высоты админки и не «прилипает» снизу под меню. */
#adminUsersScreen.is-active {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--app-bg);
  padding: 24px 16px 12px;
}

#adminUsersScreen.is-active .admin-users-screen-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

@keyframes adminUserCardEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.admin-user-card--enter {
  animation: adminUserCardEnter 0.55s cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.admin-user-card--leave {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .admin-user-card--enter {
    animation: none;
  }
  .admin-user-card--leave {
    transition: none;
  }
}

.admin-search-table {
  border-radius: 14px;
  border: 1px solid rgba(130, 102, 216, 0.35);
  background: rgba(255, 255, 255, 0.96);
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.admin-search-table-label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(42, 31, 83, 0.65);
  margin-bottom: 8px;
}

.admin-search-wrap {
  display: block;
}

.admin-search-input {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(130, 102, 216, 0.28);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  padding: 0 12px;
  font-size: 15px;
  outline: none;
}

.admin-search-input:focus {
  border-color: rgba(130, 102, 216, 0.55);
  box-shadow: 0 0 0 2px rgba(130, 102, 216, 0.12);
}

.admin-users-live-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(42, 31, 83, 0.58);
  text-align: center;
}

.admin-users-updated {
  margin: 4px 0 0;
  font-size: 11px;
  color: rgba(42, 31, 83, 0.5);
  text-align: center;
}

.admin-users-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 10px;
  align-items: stretch;
}

.admin-user-card {
  border-radius: 14px;
  border: 1px solid rgba(130, 102, 216, 0.28);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(93, 63, 182, 0.1);
  padding: 10px 12px 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 88px;
  min-width: 0;
  box-sizing: border-box;
}

.admin-user-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.admin-user-card__identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.admin-user-card__lines {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.admin-user-card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(165, 130, 255, 0.16);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.admin-user-avatar img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.admin-user-ref-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  min-width: 0;
}

.admin-user-ref-chip {
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(165, 130, 255, 0.08);
  padding: 6px 8px;
  display: grid;
  gap: 2px;
  text-align: center;
}

.admin-user-ref-chip-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(42, 31, 83, 0.52);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-ref-chip-value {
  font-size: 13px;
  font-weight: 780;
  color: #2a1f53;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.admin-user-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(130, 102, 216, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.admin-user-footer-note {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(42, 31, 83, 0.55);
  white-space: nowrap;
}

.admin-user-footer-value {
  font-size: 13px;
  font-weight: 780;
  color: #2a1f53;
  text-align: right;
  word-break: break-word;
}

.admin-user-edit {
  min-width: 40px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(92, 62, 168, 0.45);
  background: #f4efff;
  color: #3d2b6e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  margin: 0;
  flex-shrink: 0;
}

.admin-user-edit--ops {
  border-color: rgba(22, 136, 77, 0.45);
  background: rgba(102, 205, 136, 0.22);
  color: rgba(12, 86, 47, 0.95);
}

.admin-user-edit--ops:hover {
  background: rgba(102, 205, 136, 0.28);
  border-color: rgba(22, 136, 77, 0.65);
}

.admin-user-edit:hover {
  background: #ebe4ff;
  border-color: rgba(92, 62, 168, 0.65);
}

.admin-user-edit:active,
.admin-user-edit.is-pressed {
  transform: scale(0.94);
}

.admin-user-edit__label {
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.04em;
  line-height: 1;
}

.admin-user-tariff-line {
  display: none;
}

.admin-user-name {
  font-size: 14px;
  font-weight: 760;
  color: #2a1f53;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-id,
.admin-user-email,
.admin-user-password {
  font-size: 12px;
  color: rgba(42, 31, 83, 0.74);
  line-height: 1.35;
}

.admin-user-password {
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.admin-user-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  margin-top: 0;
  width: fit-content;
  flex-shrink: 0;
  max-width: min(118px, 32vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-status--active {
  color: #19764a;
  background: rgba(55, 184, 109, 0.14);
  border-color: rgba(55, 184, 109, 0.35);
}

.admin-user-status--inactive {
  color: #a73434;
  background: rgba(231, 88, 88, 0.12);
  border-color: rgba(231, 88, 88, 0.35);
}

.admin-user-tariff-label {
  display: none;
}

.admin-user-tariff-value {
  font-size: 12px;
  font-weight: 750;
  color: #2a1f53;
  white-space: pre-line;
  line-height: 1.35;
}

.admin-user-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.admin-user-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.admin-user-modal--stack {
  z-index: 130;
}

.admin-user-modal--revoke {
  z-index: 140;
}

.admin-user-modal--subdelete {
  z-index: 150;
}

.admin-user-modal__card--revoke {
  width: min(400px, 100%);
}

.admin-user-revoke-hint {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  color: rgba(42, 31, 83, 0.72);
}

.admin-user-revoke-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(48vh, 320px);
  overflow-y: auto;
  margin-top: 4px;
  padding: 2px 2px 4px 0;
}

.admin-user-revoke-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(165, 130, 255, 0.06);
}

.admin-user-revoke-row__text {
  flex: 1;
  min-width: 0;
}

.admin-user-revoke-row__title {
  font-size: 14px;
  font-weight: 780;
  color: #2a1f53;
  line-height: 1.25;
}

.admin-user-revoke-row__meta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(42, 31, 83, 0.65);
  line-height: 1.3;
}

.admin-user-revoke-del {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(183, 68, 68, 0.45);
  background: rgba(255, 236, 236, 0.95);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, filter 0.12s ease;
}

.admin-user-revoke-del:hover {
  border-color: rgba(183, 68, 68, 0.85);
  filter: brightness(1.02);
}

.admin-user-revoke-del:active {
  transform: scale(0.96);
}

.admin-user-sub-delete__text {
  white-space: pre-line;
}

.admin-user-plan-pick {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 380px);
  overflow-y: auto;
  margin-top: 10px;
  padding: 2px 2px 4px 0;
}

.admin-user-plan-pick-btn {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.28);
  background: rgba(165, 130, 255, 0.1);
  color: #2a1f53;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.admin-user-plan-pick-btn:hover {
  background: rgba(165, 130, 255, 0.16);
  border-color: rgba(130, 102, 216, 0.42);
}

.admin-user-plan-pick-btn:active {
  transform: scale(0.99);
}

.admin-user-plan-pick-btn__title {
  font-size: 15px;
  font-weight: 780;
  line-height: 1.25;
}

.admin-user-plan-pick-btn__meta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(42, 31, 83, 0.62);
  line-height: 1.3;
}

.admin-user-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 20, 0.55);
  backdrop-filter: blur(4px);
}

.admin-user-modal__card {
  position: relative;
  width: min(520px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  padding: 14px 14px 12px;
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
}

.admin-user-modal__card--notice {
  width: min(380px, 100%);
  padding: 16px 14px 14px;
}

.admin-user-modal__card--notice .admin-user-modal__title {
  margin-right: 40px;
}

.admin-user-modal__card--notice .admin-user-modal__subtitle {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(42, 31, 83, 0.78);
}

.admin-user-modal__card--notice .admin-user-modal__actions {
  grid-template-columns: 1fr;
}

.admin-user-modal.is-open .admin-user-modal__card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.admin-user-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(165, 130, 255, 0.1);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: rgba(42, 31, 83, 0.85);
  transition: transform 0.12s ease;
}

.admin-user-modal__close:active {
  transform: scale(0.95);
}

.admin-user-modal__title {
  margin: 2px 42px 6px 2px;
  font-size: 16px;
  font-weight: 750;
  color: var(--text);
}

.admin-user-modal__subtitle {
  margin: 0 0 12px 2px;
  font-size: 12px;
  color: rgba(42, 31, 83, 0.65);
}

.admin-user-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.admin-user-modal__action {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.22);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.admin-user-modal__action:active,
.admin-user-modal__action.is-pressed {
  transform: scale(0.98);
}

.admin-user-modal__action--primary {
  background: rgba(120, 79, 224, 0.95);
  color: #fff;
}

.admin-user-modal__action--secondary {
  background: rgba(255, 255, 255, 0.96);
  color: rgba(42, 31, 83, 0.9);
}

.admin-user-modal__hint {
  margin: 12px 2px 0;
  font-size: 11px;
  color: rgba(42, 31, 83, 0.55);
}


.admin-empty {
  grid-column: 1 / -1;
  border-radius: 12px;
  border: 1px dashed rgba(130, 102, 216, 0.4);
  padding: 12px;
  text-align: center;
  color: rgba(42, 31, 83, 0.74);
  font-size: 13px;
}

@media (max-width: 400px) {
  .admin-user-card {
    padding: 8px 10px 8px;
  }

  .admin-user-card__identity {
    gap: 8px;
  }

  .admin-user-ref-chip {
    padding: 5px 6px;
  }

  .admin-user-ref-chip-label {
    font-size: 8px;
  }

  .admin-user-ref-chip-value {
    font-size: 12px;
  }
}

.support-faq-title {
  font-size: 24px;
  font-weight: 780;
}

.support-faq-list {
  display: grid;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.faq-item.is-open {
  border-color: rgba(53, 163, 95, 0.35);
  box-shadow: 0 8px 18px rgba(39, 88, 52, 0.1);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  position: relative;
  padding-right: 36px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 18px;
  height: 18px;
  background: url("icon/checkbox.png") center / contain no-repeat;
  transition: transform 220ms ease, filter 220ms ease;
}

.faq-item.is-open summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.faq-item p {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.profile-panel {
  display: grid;
  gap: 12px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-loading {
  position: fixed;
  inset: 0;
  z-index: 40;
  padding: 18px;
  background: rgba(9, 19, 13, 0.22);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.profile-loading.is-open {
  opacity: 1;
  pointer-events: auto;
}

.profile-loading-card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  border-radius: 18px;
  border: 1px solid rgba(53, 163, 95, 0.35);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(26, 67, 38, 0.22);
  padding: 16px 14px;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.profile-loading-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1px solid rgba(53, 163, 95, 0.2);
  background: rgba(53, 163, 95, 0.08);
  display: grid;
  place-items: center;
}

.profile-loading-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.profile-loading-title {
  font-size: 20px;
  font-weight: 800;
}

.profile-loading-sub {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.profile-content {
  display: grid;
  gap: 12px;
}

.profile-main-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.profile-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-user-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(53, 163, 95, 0.12);
}

.profile-user-icon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.profile-username {
  font-size: 24px;
  font-weight: 780;
}

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

.profile-id {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.profile-block {
  padding: 10px;
  display: grid;
  gap: 6px;
}

.profile-block-title {
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}

.profile-block-value {
  font-size: 17px;
  color: #2f9f61;
  font-weight: 700;
}

.profile-block-subtitle {
  font-size: 22px;
  font-weight: 750;
}

.profile-block-text,
.profile-note,
.profile-mini-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.profile-email-input {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font-size: 16px;
}

.profile-email-btn {
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(100deg, #37b86d 0%, #2f9f61 45%, #298954 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 760;
}

.profile-link {
  color: #2f6dff;
  text-decoration: none;
  font-weight: 700;
}

.profile-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.profile-card h3 {
  font-size: 24px;
}

.profile-card p {
  color: var(--muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-stat {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 8px 6px;
  text-align: center;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-stat b,
.profile-stat-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  max-width: 100%;
  font-size: clamp(13px, 3.5vw, 18px);
  color: #2f9f61;
  line-height: 1.2;
  min-width: 0;
}

.profile-stat-num {
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.profile-stat-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.profile-stat span {
  color: var(--muted);
  font-size: 12px;
}

.profile-ref-link {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 42px 10px 10px;
  font-size: 13px;
  word-break: break-all;
}

.profile-ref-link-wrap {
  position: relative;
}

.profile-copy-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 160ms ease, filter 220ms ease, background-color 220ms ease;
}

.profile-copy-btn:hover {
  filter: brightness(0.95);
  background: rgba(53, 163, 95, 0.08);
}

.profile-copy-btn:active {
  transform: translateY(-50%) scale(0.94);
}

.profile-copy-btn-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.profile-copy-btn.is-copied .profile-copy-icon-default {
  display: none;
}

.profile-copy-btn:not(.is-copied) .profile-copy-icon-copied {
  display: none;
}

.faq-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 220ms ease;
}

.faq-content p {
  overflow: hidden;
}

.faq-item.is-open .faq-content {
  max-height: var(--faq-open-height, 280px);
  opacity: 1;
}

.purchase-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.purchase-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.purchase-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 19, 13, 0.36);
  backdrop-filter: blur(3px);
}

.purchase-modal__card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 28px));
  border-radius: 16px;
  border: 1px solid rgba(53, 163, 95, 0.45);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 32px rgba(26, 67, 38, 0.23);
  padding: 14px 12px 12px;
  display: grid;
  gap: 10px;
  transform: translateY(12px) scale(0.98);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.purchase-modal.is-open .purchase-modal__card {
  transform: translateY(0) scale(1);
}

.purchase-modal__close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
}

.purchase-modal__title {
  font-size: 24px;
  font-weight: 780;
  line-height: 1.1;
  padding-right: 28px;
}

.purchase-modal__subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 2px;
}

.purchase-modal__amount {
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(55, 184, 109, 0.1);
  color: rgba(19, 71, 37, 0.95);
  font-weight: 760;
  font-size: 14px;
}

.purchase-methods {
  display: grid;
  gap: 8px;
}

.purchase-method {
  display: block;
  width: 100%;
  border: 1px solid rgba(130, 102, 216, 0.2);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  min-height: 58px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 220ms ease, transform 120ms ease, background 220ms ease;
}

.purchase-method:hover {
  border-color: rgba(53, 163, 95, 0.6);
}

.purchase-method:active {
  transform: scale(0.994);
}

.purchase-method.is-active {
  border-color: #20ba64;
  background: linear-gradient(100deg, rgba(39, 191, 108, 0.15) 0%, rgba(44, 178, 102, 0.08) 100%);
  box-shadow: 0 0 0 2px rgba(44, 178, 102, 0.22), 0 6px 14px rgba(38, 151, 89, 0.16);
  animation: purchaseMethodSelect 220ms ease-out;
}

.purchase-method__title {
  display: block;
  font-weight: 820;
  color: rgba(33, 28, 58, 0.96);
}

.purchase-method__meta {
  display: block;
  margin-top: 2px;
  color: rgba(56, 53, 78, 0.64);
  font-size: 12px;
}

.purchase-modal__action {
  border: none;
  border-radius: 14px;
  min-height: 52px;
  font-size: 18px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 160ms ease, filter 220ms ease;
}

.purchase-modal__action:hover {
  filter: brightness(0.95);
}

.purchase-modal__action:active {
  transform: scale(0.985);
}

.purchase-modal__action--primary {
  background: linear-gradient(100deg, #37b86d 0%, #2f9f61 45%, #298954 100%);
  color: #fff;
}

.purchase-modal__action--secondary {
  background: #173147;
  color: #e8f0f8;
}

@media (max-width: 1100px) {
  .plan-header { font-size: 10px; }
  .state { font-size: 18px; }
  .state-icon { width: 34px; height: 34px; font-size: 18px; }
  .date { font-size: 34px; }
  .title { font-size: 16px; }
  .hint { font-size: 13px; }
  .mini-item .title { font-size: 15px; }
  .mini-item .hint { font-size: 12px; }
}

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

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

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

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

@keyframes profilePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(53, 163, 95, 0.45);
  }
  70% {
    transform: scale(1.04);
    box-shadow: 0 0 0 10px rgba(53, 163, 95, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(53, 163, 95, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top,
  .plan,
  .menu,
  .duo,
  .menu-item,
  .mini-item,
  .logo,
  .screen {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .theme-toggle {
    transition: none !important;
  }

  body,
  .card,
  .menu-item,
  .mini-item,
  .subtitle,
  .screen {
    transition: none !important;
  }

  .screen.is-active {
    animation: none !important;
  }
}

body[data-theme="dark"] {
  --bg: #1f2124;
  --card: #2a2d31;
  --text: #e9eef2;
  --muted: #a7aeb7;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.28);

  --app-bg: radial-gradient(circle at 50% -40%, #2c2f34 0%, #1b1d20 70%);
  --top-bg-url: url("icon/Dark%20Theme/backstage%20for%20logo%20dark.png");
  --top-soft: radial-gradient(circle at 40% 20%, rgba(24, 26, 28, 0.2) 0%, rgba(24, 26, 28, 0.35) 48%, rgba(24, 26, 28, 0.55) 100%);
  --top-overlay: linear-gradient(180deg, rgba(16, 18, 20, 0.2) 0%, rgba(16, 18, 20, 0.55) 100%);
}

body[data-theme="dark"] .menu-item:not(.menu-item--accent),
body[data-theme="dark"] .mini-item {
  background: rgba(42, 45, 49, 0.92);
  border-color: var(--line);
}

body[data-theme="dark"] .tariff-item:not(.tariff-item--active),
body[data-theme="dark"] .card-lite {
  background: rgba(42, 45, 49, 0.92);
  border-color: var(--line);
  color: var(--text);
}

body[data-theme="dark"] .devices-slider,
body[data-theme="dark"] .devices-slider::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, rgba(95, 209, 154, 0.24) 0%, rgba(95, 209, 154, 0.08) 100%);
  border: 1px solid rgba(95, 209, 154, 0.24);
}

body[data-theme="dark"] .devices-slider::-webkit-slider-thumb {
}

body[data-theme="dark"] .devices-slider::-moz-range-track {
  background: linear-gradient(90deg, rgba(95, 209, 154, 0.24) 0%, rgba(95, 209, 154, 0.08) 100%);
  border-color: rgba(95, 209, 154, 0.24);
}

body[data-theme="dark"] .devices-slider::-moz-range-thumb {
}

body[data-theme="dark"] .slider-leaf {
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.35));
}

body[data-theme="dark"] .tariff-item__badge {
  background: rgba(53, 163, 95, 0.2);
  border-color: rgba(53, 163, 95, 0.3);
  color: #5fd19a;
}

body[data-theme="dark"] .tariff-item__hint,
body[data-theme="dark"] .tariff-item__devices {
  color: #5fd19a;
}

body[data-theme="dark"] .tariff-item__selector {
  border-color: #5fd19a;
}

body[data-theme="dark"] .tariff-item--active {
  background: linear-gradient(100deg, rgba(34, 111, 72, 0.35) 0%, rgba(21, 90, 56, 0.26) 100%);
  border-color: rgba(95, 209, 154, 0.75);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
}

body[data-theme="dark"] .tariff-item--active .tariff-item__badge {
  background: rgba(95, 209, 154, 0.2);
  border-color: rgba(95, 209, 154, 0.34);
  color: #7be0b0;
}

body[data-theme="dark"] .tariff-item--active .tariff-item__hint,
body[data-theme="dark"] .tariff-item--active .tariff-item__devices {
  color: #7be0b0;
}

body[data-theme="dark"] .tariff-back {
  background: rgba(42, 45, 49, 0.92);
  border-color: var(--line);
}

body[data-theme="dark"] .pay-btn {
  background: linear-gradient(100deg, #226f48 0%, #1b5f3d 45%, #144a30 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .support-chat-btn {
  background: rgba(42, 45, 49, 0.92);
  border-color: var(--line);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .support-chat-card,
body[data-theme="dark"] .faq-item {
  background: rgba(42, 45, 49, 0.92);
  border-color: var(--line);
}

body[data-theme="dark"] .support-chat-icon-wrap {
  background: rgba(95, 209, 154, 0.16);
  border-color: rgba(95, 209, 154, 0.26);
}

body[data-theme="dark"] .support-chat-main-btn {
  background: linear-gradient(100deg, #1f6f46 0%, #1b5f3d 45%, #144a30 100%);
}

body[data-theme="dark"] .setup-option {
  background: rgba(42, 45, 49, 0.92);
  border-color: rgba(95, 209, 154, 0.35);
  color: #ffffff;
}

body[data-theme="dark"] .setup-option--active {
  background: linear-gradient(120deg, rgba(34, 111, 72, 0.45) 0%, rgba(21, 90, 56, 0.26) 100%);
  border-color: rgba(95, 209, 154, 0.8);
}

body[data-theme="dark"] .setup-step {
  background: rgba(95, 209, 154, 0.16);
  border-color: rgba(95, 209, 154, 0.4);
  color: #7be0b0;
}

body[data-theme="dark"] .setup-step--active {
  background: linear-gradient(100deg, #1f6f46 0%, #1b5f3d 45%, #144a30 100%);
  color: #fff;
}

body[data-theme="dark"] .setup-step-line {
  background: rgba(95, 209, 154, 0.35);
}

body[data-theme="dark"] .setup-subtitle {
  color: #7be0b0;
}

body[data-theme="dark"] .setup-next-btn {
  background: linear-gradient(100deg, #1f6f46 0%, #1b5f3d 45%, #144a30 100%);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .admin-item {
  border-color: rgba(165, 130, 255, 0.42);
  background: linear-gradient(115deg, rgba(112, 78, 200, 0.44) 0%, rgba(78, 55, 140, 0.30) 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .admin-catalog-card,
body[data-theme="dark"] .admin-subscriptions-add {
  border-color: rgba(165, 130, 255, 0.42);
  background: linear-gradient(115deg, rgba(112, 78, 200, 0.44) 0%, rgba(78, 55, 140, 0.3) 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .admin-subscriptions-add {
  color: #d8c7ff;
}

body[data-theme="dark"] .admin-catalog-card__title,
body[data-theme="dark"] .admin-stock-placeholder__title,
body[data-theme="dark"] .admin-plan-card__title,
body[data-theme="dark"] .admin-plan-card__price {
  color: #f0e9ff;
}

body[data-theme="dark"] .admin-catalog-card__hint,
body[data-theme="dark"] .admin-stock-placeholder__text,
body[data-theme="dark"] .admin-plan-card__duration,
body[data-theme="dark"] .admin-plan-card__devices,
body[data-theme="dark"] .admin-plan-field__label,
body[data-theme="dark"] .tariff-list-empty {
  color: rgba(240, 233, 255, 0.76);
}

body[data-theme="dark"] .admin-plan-card,
body[data-theme="dark"] .admin-stock-placeholder,
body[data-theme="dark"] .admin-month-list__item,
body[data-theme="dark"] .admin-plan-input,
body[data-theme="dark"] .admin-plan-month-picker {
  background: rgba(42, 45, 49, 0.95);
  border-color: rgba(165, 130, 255, 0.28);
  color: #f0e9ff;
}

body[data-theme="dark"] .admin-plan-card__duration-chip {
  color: #e6dcff;
  border-color: rgba(180, 153, 255, 0.5);
  background: rgba(180, 153, 255, 0.2);
}

body[data-theme="dark"] .admin-plan-card__drag {
  border-color: rgba(180, 153, 255, 0.28);
  background: rgba(180, 153, 255, 0.12);
}

body[data-theme="dark"] .admin-plan-card__drag span {
  background: rgba(230, 220, 255, 0.8);
}

body[data-theme="dark"] .admin-item__title {
  color: #f0e9ff;
}

body[data-theme="dark"] .admin-item__hint {
  color: rgba(240, 233, 255, 0.78);
}

body[data-theme="dark"] .admin-search-input {
  border-color: rgba(165, 130, 255, 0.42);
  background: rgba(42, 45, 49, 0.92);
  color: #f0e9ff;
}

body[data-theme="dark"] .admin-search-input:focus {
  border-color: rgba(165, 130, 255, 0.62);
  box-shadow: 0 0 0 2px rgba(165, 130, 255, 0.18);
}

body[data-theme="dark"] .admin-search-table {
  border-color: rgba(165, 130, 255, 0.42);
  background: rgba(42, 45, 49, 0.94);
}

body[data-theme="dark"] .admin-search-table-label {
  color: rgba(240, 233, 255, 0.62);
}

body[data-theme="dark"] .admin-users-live-hint {
  color: rgba(240, 233, 255, 0.55);
}

body[data-theme="dark"] .admin-users-updated {
  color: rgba(240, 233, 255, 0.48);
}

body[data-theme="dark"] .admin-user-tariff {
  border-left-color: rgba(165, 130, 255, 0.28);
}

body[data-theme="dark"] .admin-user-card {
  border-color: rgba(165, 130, 255, 0.42);
  background: rgba(42, 45, 49, 0.92);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .admin-user-ref-chip {
  border-color: rgba(165, 130, 255, 0.32);
  background: rgba(165, 130, 255, 0.1);
}

body[data-theme="dark"] .admin-user-ref-chip-label {
  color: rgba(240, 233, 255, 0.55);
}

body[data-theme="dark"] .admin-user-ref-chip-value {
  color: #f0e9ff;
}

body[data-theme="dark"] .admin-user-avatar {
  background: rgba(165, 130, 255, 0.18);
}

body[data-theme="dark"] .admin-user-name,
body[data-theme="dark"] .admin-user-tariff-value {
  color: #f0e9ff;
}

body[data-theme="dark"] .admin-user-footer-note {
  color: rgba(240, 233, 255, 0.62);
}

body[data-theme="dark"] .admin-user-id,
body[data-theme="dark"] .admin-user-email,
body[data-theme="dark"] .admin-user-password,
body[data-theme="dark"] .admin-user-tariff-label,
body[data-theme="dark"] .admin-empty {
  color: rgba(240, 233, 255, 0.76);
}

body[data-theme="dark"] .admin-user-plan-pick-btn {
  border-color: rgba(165, 130, 255, 0.35);
  background: rgba(165, 130, 255, 0.12);
  color: #f0e9ff;
}

body[data-theme="dark"] .admin-user-plan-pick-btn:hover {
  background: rgba(165, 130, 255, 0.2);
  border-color: rgba(165, 130, 255, 0.48);
}

body[data-theme="dark"] .admin-user-plan-pick-btn__meta {
  color: rgba(240, 233, 255, 0.65);
}

body[data-theme="dark"] .admin-user-edit {
  border-color: rgba(200, 175, 255, 0.55);
  background: rgba(55, 48, 78, 0.95);
  color: #f0e9ff;
  box-shadow: none;
}

body[data-theme="dark"] .admin-user-edit:hover {
  background: rgba(70, 60, 98, 0.98);
  border-color: rgba(220, 200, 255, 0.65);
}

body[data-theme="dark"] .admin-user-revoke-hint {
  color: rgba(240, 233, 255, 0.7);
}

body[data-theme="dark"] .admin-user-revoke-row {
  border-color: rgba(165, 130, 255, 0.32);
  background: rgba(165, 130, 255, 0.1);
}

body[data-theme="dark"] .admin-user-revoke-row__title {
  color: #f0e9ff;
}

body[data-theme="dark"] .admin-user-revoke-row__meta {
  color: rgba(240, 233, 255, 0.68);
}

body[data-theme="dark"] .admin-user-revoke-del {
  border-color: rgba(255, 140, 140, 0.42);
  background: rgba(70, 36, 36, 0.9);
}

body[data-theme="dark"] .admin-user-modal__card {
  background: rgba(28, 31, 36, 0.98);
  border-color: rgba(165, 130, 255, 0.34);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] .admin-user-modal__title,
body[data-theme="dark"] .admin-user-modal__action--secondary {
  color: #f4f7fa;
}

body[data-theme="dark"] .admin-user-modal__subtitle,
body[data-theme="dark"] .admin-user-modal__hint {
  color: rgba(240, 233, 255, 0.72);
}

body[data-theme="dark"] .admin-user-modal__close {
  color: #f4f7fa;
  background: rgba(165, 130, 255, 0.14);
  border-color: rgba(165, 130, 255, 0.28);
}

body[data-theme="dark"] .admin-user-modal__action--primary {
  background: rgba(120, 79, 224, 0.92);
  color: #fff;
}

body[data-theme="dark"] .admin-user-modal__action--secondary {
  background: rgba(42, 45, 49, 0.96);
  border-color: rgba(165, 130, 255, 0.28);
}

body[data-theme="dark"] .setup-devices-title {
  color: #7be0b0;
}

body[data-theme="dark"] .setup-device-item {
  background: rgba(42, 45, 49, 0.92);
  border-color: rgba(95, 209, 154, 0.35);
  color: #ffffff;
}

body[data-theme="dark"] .setup-device-item__selector {
  border-color: #5fd19a;
}

body[data-theme="dark"] .setup-device-item--active {
  background: linear-gradient(100deg, rgba(34, 111, 72, 0.35) 0%, rgba(21, 90, 56, 0.26) 100%);
  border-color: rgba(95, 209, 154, 0.75);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.26);
}

body[data-theme="dark"] .setup-device-item--active .setup-device-item__selector {
  box-shadow: inset 0 0 0 5px rgba(95, 209, 154, 0.95);
}

body[data-theme="dark"] .faq-item summary::after {
  background-image: url("icon/Dark%20Theme/checkbox%20dark.png");
}

body[data-theme="dark"] .profile-card,
body[data-theme="dark"] .profile-main-card,
body[data-theme="dark"] .profile-block,
body[data-theme="dark"] .profile-loading,
body[data-theme="dark"] .profile-stat,
body[data-theme="dark"] .profile-ref-link,
body[data-theme="dark"] .profile-email-input {
  background: rgba(42, 45, 49, 0.92);
  border-color: var(--line);
  color: var(--text);
}

body[data-theme="dark"] .profile-loading {
  background: rgba(5, 6, 8, 0.48);
}

body[data-theme="dark"] .profile-loading-card {
  background: rgba(28, 31, 36, 0.96);
  border-color: rgba(95, 209, 154, 0.35);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] .profile-loading-title {
  color: #f4f7fa;
}

body[data-theme="dark"] .profile-email-btn {
  background: linear-gradient(100deg, #1f6f46 0%, #1b5f3d 45%, #144a30 100%);
}

body[data-theme="dark"] .profile-user-icon {
  background: rgba(95, 209, 154, 0.14);
}

body[data-theme="dark"] .profile-link {
  color: #7be0b0;
}

body[data-theme="dark"] .profile-stat b {
  color: #5fd19a;
}

body[data-theme="dark"] .profile-copy-btn:hover {
  background: rgba(95, 209, 154, 0.14);
}

body[data-theme="dark"] .purchase-modal__backdrop {
  background: rgba(5, 6, 8, 0.56);
}

body[data-theme="dark"] .purchase-modal__card {
  background: rgba(28, 31, 36, 0.98);
  border-color: rgba(95, 209, 154, 0.45);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5);
}

body[data-theme="dark"] .purchase-modal__title {
  color: #f4f7fa;
}

body[data-theme="dark"] .purchase-modal__subtitle {
  color: #b5bfca;
}

body[data-theme="dark"] .purchase-modal__amount {
  background: rgba(34, 135, 83, 0.24);
  color: #d8f7e6;
}

body[data-theme="dark"] .purchase-modal__close {
  color: #f4f7fa;
}

body[data-theme="dark"] .purchase-modal__action--primary {
  background: linear-gradient(100deg, #1f6f46 0%, #1b5f3d 45%, #144a30 100%);
}

body[data-theme="dark"] .purchase-modal__action--secondary {
  background: #18293b;
  color: #dce6f0;
}

body[data-theme="dark"] .purchase-method {
  background: rgba(14, 17, 21, 0.92);
  border-color: rgba(122, 128, 178, 0.32);
}

body[data-theme="dark"] .purchase-method:hover {
  border-color: rgba(95, 209, 154, 0.66);
}

body[data-theme="dark"] .purchase-method.is-active {
  border-color: #40cd7f;
  background: linear-gradient(100deg, rgba(28, 117, 72, 0.32) 0%, rgba(26, 98, 62, 0.24) 100%);
  box-shadow: 0 0 0 2px rgba(64, 205, 127, 0.28), 0 8px 16px rgba(14, 45, 29, 0.42);
}

body[data-theme="dark"] .purchase-method__title {
  color: #eef2ff;
}

body[data-theme="dark"] .purchase-method__meta {
  color: #bcc6e3;
}

@keyframes purchaseMethodSelect {
  0% {
    transform: scale(0.985);
    filter: brightness(1.08);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

body[data-theme="dark"] .menu-item.menu-item--accent {
  background: linear-gradient(100deg, #1f6f46 0%, #155a38 100%);
  border: none;
}

body[data-theme="dark"] .menu-item .title,
body[data-theme="dark"] .mini-item .title {
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .menu-item .hint,
body[data-theme="dark"] .mini-item .hint {
  color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .menu-item .icon,
body[data-theme="dark"] .mini-item .icon {
  background: transparent;
}

body[data-theme="dark"] .menu-item--accent .icon {
  background: transparent;
}

body[data-theme="dark"] .subtitle {
  color: rgba(233, 238, 242, 0.72);
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .plan-header-pill {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(180, 153, 255, 0.35);
  color: rgba(233, 238, 242, 0.78);
}

body[data-theme="dark"] .browser-card {
  background: rgba(42, 45, 49, 0.94);
  border-color: rgba(180, 153, 255, 0.3);
}

body[data-theme="dark"] .browser-label {
  color: rgba(240, 233, 255, 0.92);
}

body[data-theme="dark"] .browser-input {
  background: rgba(20, 22, 30, 0.92);
  color: rgba(240, 233, 255, 0.96);
  border-color: rgba(180, 153, 255, 0.3);
}

body[data-theme="dark"] .browser-forgot-btn {
  color: #cbd1ff;
}

body[data-theme="dark"] .auth-code-modal__card {
  background: #181c2d;
  border-color: rgba(122, 128, 178, 0.35);
}

body[data-theme="dark"] .auth-code-modal__title {
  color: #f2f4ff;
}

body[data-theme="dark"] .auth-code-modal__subtitle {
  color: #b3b9e8;
}

body[data-theme="dark"] .auth-code-modal__input {
  background: #0f1323;
  border-color: rgba(122, 128, 178, 0.35);
  color: #f2f4ff;
}

body[data-theme="dark"] .plan-bubble {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(180, 153, 255, 0.28);
}

body[data-theme="dark"] .state-icon {
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .theme-toggle {
  background: rgba(0, 0, 0, 0.25);
}

body[data-theme="dark"] .theme-toggle::before {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  transform: translateX(22px);
}

body[data-theme="dark"] .theme-toggle__icon {
  transform: translateX(10px);
  color: rgba(233, 238, 242, 0.9);
}

/* Ensure admin button theme isn't overridden in dark mode */
body[data-theme="dark"] .menu-item.menu-item--admin {
  background: linear-gradient(100deg, rgba(112, 78, 200, 0.44) 0%, rgba(78, 55, 140, 0.30) 100%) !important;
  border-color: rgba(165, 130, 255, 0.46) !important;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36) !important;
}

body[data-theme="dark"] .menu-item.menu-item--admin .icon {
  background: transparent !important;
}

.admin-income-panel {
  padding-bottom: 22px;
}

.admin-income-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 520px) {
  .admin-income-grid {
    grid-template-columns: 1fr;
  }
}

.admin-income-card {
  padding: 14px;
}

.admin-income-card__label {
  font-size: 12px;
  color: rgba(42, 31, 83, 0.62);
  font-weight: 700;
}

.admin-income-card__value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.admin-income-card__hint {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(42, 31, 83, 0.52);
}

.admin-income-list {
  margin-top: 12px;
  padding: 14px;
}

.admin-income-list__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-income-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.admin-icon-btn {
  width: 42px;
  padding: 8px 0;
  text-align: center;
}

.admin-income-list__title {
  font-weight: 900;
}

.admin-refresh-btn {
  border: 1px solid rgba(130, 102, 216, 0.22);
  background: rgba(255, 255, 255, 0.96);
  color: rgba(42, 31, 83, 0.9);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
}

.admin-income-list__items {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.admin-income-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(130, 102, 216, 0.18);
  background: rgba(255, 255, 255, 0.7);
}

.admin-income-row__meta {
  font-size: 11px;
  color: rgba(42, 31, 83, 0.56);
}

.admin-income-row__user {
  margin-top: 3px;
  font-size: 11px;
  color: rgba(42, 31, 83, 0.7);
  font-weight: 750;
}

.admin-income-row__ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  color: rgba(42, 31, 83, 0.52);
}

.admin-income-row__amount {
  font-weight: 900;
  white-space: nowrap;
}

.admin-income-row__pending-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(235, 173, 31, 0.2);
  color: rgba(110, 70, 6, 0.92);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body[data-theme="dark"] .admin-income-card__label,
body[data-theme="dark"] .admin-income-card__hint,
body[data-theme="dark"] .admin-income-row__meta,
body[data-theme="dark"] .admin-income-row__ref {
  color: rgba(226, 232, 255, 0.7);
}

body[data-theme="dark"] .admin-income-row__pending-pill {
  background: rgba(255, 200, 71, 0.2);
  color: rgba(255, 222, 145, 0.96);
}

body[data-theme="dark"] .admin-income-row {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(180, 153, 255, 0.22);
}

body[data-theme="dark"] .admin-refresh-btn {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(180, 153, 255, 0.28);
  color: rgba(240, 243, 255, 0.9);
}
