:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5f6b7a;
  --surface: #ffffff;
  --surface-soft: #f3f6f8;
  --line: #d8e0e8;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --coral: #b54708;
  --space: #07111f;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 12px max(18px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid rgba(216, 224, 232, 0.78);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.brand,
.site-header nav,
.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.site-header nav {
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
}

.site-header nav a:hover { color: var(--ink); }

.header-action,
.primary-action,
.secondary-action,
.checkout-form button,
.tariff-card button,
.auth-form button,
.profile-toolbar button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.header-action,
.primary-action,
.checkout-form button,
.auth-form button {
  background: var(--teal);
  color: #fff;
  padding: 10px 14px;
}

.header-action:hover,
.primary-action:hover,
.checkout-form button:hover,
.auth-form button:hover {
  background: var(--teal-dark);
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.64);
  color: #fff;
  padding: 10px 14px;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--space);
}

.hero-motion,
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-motion {
  width: 100%;
  height: 100%;
  opacity: 0.88;
}

.hero-shade {
  background: rgba(7, 17, 31, 0.34);
}

.hero-content {
  position: relative;
  width: min(1160px, calc(100% - 36px));
  display: grid;
  gap: 18px;
  margin: 0 auto;
  padding: 88px 0 54px;
  color: #fff;
}

.eyebrow {
  margin: 0;
  color: var(--coral);
  font-size: 13px;
  font-weight: 820;
  text-transform: uppercase;
}

.hero .eyebrow { color: #fdbd74; }
h1, h2, p, dl, dd { margin: 0; }

h1 {
  max-width: 720px;
  font-size: 56px;
  line-height: 1.02;
}

h2 {
  font-size: 34px;
  line-height: 1.12;
}

.hero-copy {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

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

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 170px));
  gap: 10px;
  margin-top: 8px;
}

.hero-facts div,
.tariff-card,
.checkout-form,
.telegram-link-panel,
.auth-panel,
.profile-overview,
.purchase-card,
.profile-toolbar,
.message,
.payment-status,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.hero-facts div {
  min-height: 74px;
  display: grid;
  gap: 3px;
  align-content: center;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  padding: 12px;
}

.hero-facts dt {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.hero-facts dd {
  color: #fff;
  font-size: 18px;
  font-weight: 820;
}

.section {
  padding: 56px max(18px, calc((100vw - 1160px) / 2));
}

.muted-section,
.faq-section {
  background: var(--surface-soft);
}

.section-heading {
  max-width: 760px;
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.section-heading p:not(.eyebrow),
.tariff-card p,
.faq-list p,
.site-footer,
.catalog-stamp {
  color: var(--muted);
}

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

.tariff-card {
  min-height: 248px;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  box-shadow: var(--shadow);
}

.tariff-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 20px;
}

.card-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--platinum-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28);
}

.tariff-price {
  font-size: 28px;
  font-weight: 840;
}

.tariff-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.tariff-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tariff-meta .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--teal-dark);
}

.tariff-card button {
  margin-top: auto;
  background: var(--ink);
  color: #fff;
  padding: 9px 12px;
}

.checkout-form {
  display: grid;
  gap: 10px;
  align-items: end;
  padding: 16px;
  box-shadow: var(--shadow);
}

.checkout-form > button[type="submit"] {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
}

input:focus,
select:focus {
  outline: 0;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.message,
.payment-status {
  min-height: 48px;
  display: grid;
  gap: 8px;
  align-content: center;
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--surface-soft);
  color: var(--muted);
}

.payment-status {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.payment-status .notice-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.payment-status.dismiss-out {
  opacity: 0;
  transform: translateY(-6px);
}

.notice-close {
  width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.notice-close:hover {
  color: var(--ink);
  background: #fff;
}

.toast-viewport {
  position: fixed;
  z-index: 80;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  width: min(420px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 12px 12px 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.dismiss-out {
  opacity: 0;
  transform: translateY(-10px);
}

.toast.ok {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.toast.err {
  border-color: #fecdca;
  background: #fff1f0;
  color: #b42318;
}

.toast-close {
  width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.message:empty,
.payment-status:empty {
  display: none;
}

.telegram-link-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.telegram-link-panel h3 {
  margin: 0;
  font-size: 18px;
}

.telegram-link-panel p {
  color: var(--muted);
}

.telegram-link-widget {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.telegram-link-widget:empty {
  min-height: 0;
  display: none;
}

.telegram-link-action,
.inline-action,
.danger-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 9px 12px;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.inline-action {
  width: fit-content;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.inline-action:disabled,
.telegram-link-action:disabled,
.danger-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.danger-action {
  width: fit-content;
  background: #b42318;
  color: #fff;
}

.telegram-merge-box,
.telegram-merge-confirm {
  display: grid;
  gap: 10px;
}

.telegram-merge-box p {
  margin: 0;
}

.profile-mode .home-page,
.profile-mode #checkoutPage,
.checkout-mode .home-page,
.checkout-mode #profilePage {
  display: none;
}

.checkout-mode #checkoutPage,
.profile-mode #profilePage {
  display: block;
}

.checkout-page {
  min-height: calc(100vh - 146px);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(17, 24, 39, 0.05)),
    var(--surface-soft);
}

.checkout-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.checkout-steps li {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.checkout-steps li.active {
  border-color: rgba(15, 118, 110, 0.34);
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal-dark);
}

.profile-page {
  min-height: calc(100vh - 146px);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(181, 71, 8, 0.06)),
    var(--surface-soft);
}

.auth-panel {
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.auth-copy {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 12px;
}

.auth-copy h3 {
  margin: 0;
  font-size: 24px;
}

.auth-copy p {
  color: var(--muted);
}

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

.auth-form .message {
  width: 100%;
  max-width: none;
  margin: 0;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-form .telegram-auth-button {
  border: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
}

.auth-form .telegram-auth-button:hover {
  background: #263244;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 4px;
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-tabs button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.profile-dashboard {
  width: min(100%, 1120px);
  display: grid;
  gap: 12px;
}

.profile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.profile-toolbar div {
  display: grid;
  gap: 2px;
}

.profile-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-toolbar strong {
  font-size: 20px;
}

.profile-toolbar button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 12px;
}

.profile-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.profile-overview .metric-tile {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 108px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 251, 0.96)),
    var(--surface);
  padding: 15px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.profile-overview .profile-identity-tile {
  grid-column: span 2;
}

.profile-overview .metric-tile span,
.purchase-meta,
.connect-guide {
  color: var(--muted);
}

.profile-overview .metric-tile strong {
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-overview .metric-tile small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 5px;
}

.profile-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 820;
  cursor: pointer;
}

.profile-tabs button.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

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

.dashboard-tools,
.dashboard-card {
  display: grid;
  gap: 12px;
}

.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.dashboard-card h3,
.dashboard-card h4 {
  margin: 0;
}

.dashboard-card p,
.empty-state,
.history-meta {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.metric-tile {
  min-height: 86px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.metric-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.metric-tile strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.metric-tile small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.balance-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auto-topup-offer {
  display: grid;
  gap: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px;
  color: var(--ink);
}

.auto-topup-offer.accepted {
  border-color: #abefc6;
  background: #ecfdf3;
}

.offer-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.offer-heading strong {
  font-size: 16px;
}

.offer-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.auto-topup-offer ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.action-row,
.amount-grid,
.history-row,
.device-row,
.referral-row,
.subscription-form,
.password-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.action-row button,
.amount-grid button,
.copy-action,
.dashboard-card > button,
.history-heading button,
.history-pagination button,
.subscription-form button,
.password-form button,
.device-row button,
.referral-row button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
}

.amount-grid button {
  min-height: 58px;
  display: grid;
  gap: 2px;
  align-content: center;
}

.amount-grid button span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 720;
}

.action-row button.secondary,
.history-heading button.secondary,
.history-pagination button.secondary,
.subscription-form button.secondary,
.password-form button.secondary,
.device-row button.secondary,
.referral-row button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.action-row button.danger,
.device-row button.danger {
  background: #b42318;
  color: #fff;
  border-color: transparent;
}

.action-row button.danger-soft {
  border-color: #fecdca;
  background: #fff1f0;
  color: #b42318;
}

.action-row button.danger-soft:hover {
  background: #fee4e2;
}

.action-row button.auto-renew-button {
  min-width: 190px;
  display: inline-flex;
  justify-content: center;
  text-align: center;
}

.action-row button.auto-renew-button.is-on {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #115e59;
}

.action-row button:disabled,
.amount-grid button:disabled,
.copy-action:disabled,
.dashboard-card > button:disabled,
.history-heading button:disabled,
.history-pagination button:disabled,
.subscription-form button:disabled,
.password-form button:disabled,
.device-row button:disabled,
.referral-row button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.subscription-form,
.password-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.subscription-form {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.fallback-login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(160px, 0.8fr);
  gap: 12px;
  border-left: 3px solid var(--teal);
  background: rgba(20, 184, 166, 0.08);
  padding: 10px 0 10px 12px;
}

.fallback-login-panel.is-ready {
  border-left-color: #12b76a;
  background: rgba(18, 183, 106, 0.08);
}

.fallback-login-panel div {
  display: grid;
  gap: 4px;
}

.fallback-login-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.fallback-login-panel strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.fallback-login-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.fallback-login-panel ul {
  display: grid;
  gap: 5px;
  align-content: center;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.fallback-password-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) minmax(176px, auto);
}

.password-form label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 640;
  line-height: 1.35;
}

.inline-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.inline-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-dark);
}

.inline-toggle input:disabled {
  cursor: wait;
  opacity: 0.66;
}

.history-list,
.device-list,
.referral-list {
  display: grid;
  gap: 8px;
}

.history-heading,
.history-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-pagination {
  justify-content: flex-end;
}

.history-pagination span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.referral-history {
  display: grid;
  gap: 8px;
}

.history-row,
.device-row,
.referral-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.history-row > div:first-child,
.device-row > div:first-child,
.referral-row > div:first-child,
.referral-row > strong {
  min-width: 0;
}

.history-row strong,
.device-row strong,
.referral-row strong {
  overflow-wrap: anywhere;
}

.copy-payment-id {
  display: block;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 3px 0 0;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.copy-payment-id:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}

.status-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal-dark);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 820;
}

.status-pill.warn {
  background: #fff7ed;
  color: var(--coral);
}

.status-pill.err {
  background: #fff1f0;
  color: #b42318;
}

.dashboard-note {
  border-left: 3px solid var(--teal);
  color: var(--muted);
  padding-left: 10px;
}

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

.purchase-card {
  background: var(--surface);
  box-shadow: var(--shadow);
}

.purchase-card summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 820;
}

.purchase-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}

.purchase-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 14px;
}

.meta-warn {
  color: #b45309;
  font-weight: 760;
}

.inline-warning {
  margin: 0;
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-radius: 8px;
  background: rgba(255, 251, 235, 0.88);
  color: #854d0e;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
}

.key-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

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

.purchase-tools {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.delete-confirm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  color: #7a271a;
  padding: 12px;
}

.delete-confirm > div:first-child {
  display: grid;
  gap: 3px;
}

.delete-confirm span {
  color: #b42318;
  font-size: 13px;
}

[data-theme="dark"] .delete-confirm {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.28);
  color: #fee2e2;
}

[data-theme="dark"] .delete-confirm span {
  color: #fca5a5;
}

.connect-guide {
  margin: 0;
  padding-left: 20px;
}

.connect-guide li + li {
  margin-top: 6px;
}

.connect-guide a {
  color: var(--teal-dark);
  font-weight: 760;
  text-decoration: none;
}

.connect-guide a:hover {
  text-decoration: underline;
}

.message.ok,
.payment-status.ok {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.message.err,
.payment-status.err {
  border-color: #fecdca;
  background: #fff1f0;
  color: #b42318;
}

.country-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.country-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 11px;
  font-weight: 700;
}

.country-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  font-size: 20px;
  line-height: 1;
}

.country-name {
  min-width: 0;
}

.country-code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0;
}

.country-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.country-inline .country-flag {
  width: 20px;
  min-width: 20px;
  height: 20px;
  font-size: 18px;
}

.catalog-stamp {
  margin-top: 12px;
  font-size: 13px;
}

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

.faq-list details {
  padding: 15px 16px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-list p { padding-top: 8px; }

.loading {
  min-height: 96px;
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 720;
}

.hidden { display: none !important; }

.vpn-link {
  overflow-wrap: anywhere;
  color: var(--teal-dark);
  font-weight: 760;
}

.site-footer {
  min-height: 74px;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
}

.site-footer span {
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .tariff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkout-form { grid-template-columns: 1fr 1fr; }
  .auth-panel { grid-template-columns: 1fr; }
  .profile-overview { grid-template-columns: 1fr; }
  .profile-overview .profile-identity-tile { grid-column: auto; }
  .profile-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  h1 { font-size: 44px; }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 64px;
    gap: 10px;
  }

  .brand span:last-child { display: none; }

  .header-action {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .hero { min-height: 76vh; }

  .hero-content {
    width: min(100% - 28px, 1160px);
    padding: 70px 0 34px;
  }

  h1 { font-size: 38px; }
  h2 { font-size: 27px; }
  .hero-copy { font-size: 17px; }

  .hero-facts,
  .tariff-grid,
  .checkout-form,
  .auth-panel,
  .profile-tabs,
  .subscription-form,
  .password-form,
  .fallback-login-panel,
  .delete-confirm,
  .history-row,
  .device-row,
  .referral-row {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 42px;
    padding-bottom: 42px;
  }
}

/* Kimicu glass redesign layer */
:root,
[data-theme="light"] {
  color-scheme: light;
  --ink: #101827;
  --muted: #667085;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-soft: rgba(245, 248, 251, 0.76);
  --surface-raised: rgba(255, 255, 255, 0.9);
  --line: rgba(124, 141, 165, 0.28);
  --line-strong: rgba(82, 100, 123, 0.34);
  --teal: #0f766e;
  --teal-dark: #115e59;
  --coral: #b54708;
  --accent-blue: #2563eb;
  --space: #07111f;
  --page-bg: #edf4f8;
  --page-wash: linear-gradient(135deg, rgba(15, 118, 110, 0.13), rgba(37, 99, 235, 0.08) 42%, rgba(181, 71, 8, 0.09));
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-dark: rgba(10, 18, 32, 0.58);
  --platinum-glass: rgba(255, 255, 255, 0.18);
  --platinum-glass-strong: rgba(255, 255, 255, 0.28);
  --platinum-border: rgba(255, 255, 255, 0.35);
  --platinum-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.38);
  --shadow: 0 18px 52px rgba(31, 44, 64, 0.14);
  --shadow-soft: 0 10px 30px rgba(31, 44, 64, 0.1);
  --focus: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf6ff;
  --muted: #a7b4c5;
  --surface: rgba(13, 21, 34, 0.72);
  --surface-solid: #0c1320;
  --surface-soft: rgba(23, 34, 51, 0.72);
  --surface-raised: rgba(18, 28, 43, 0.88);
  --line: rgba(159, 177, 199, 0.2);
  --line-strong: rgba(190, 205, 223, 0.28);
  --teal: #2dd4bf;
  --teal-dark: #5eead4;
  --coral: #f59e0b;
  --accent-blue: #93c5fd;
  --space: #060b13;
  --page-bg: #080d16;
  --page-wash: linear-gradient(135deg, rgba(45, 212, 191, 0.12), rgba(147, 197, 253, 0.09) 44%, rgba(245, 158, 11, 0.08));
  --glass: rgba(16, 25, 40, 0.58);
  --glass-strong: rgba(17, 27, 43, 0.78);
  --glass-dark: rgba(4, 9, 17, 0.62);
  --platinum-glass: rgba(255, 255, 255, 0.12);
  --platinum-glass-strong: rgba(255, 255, 255, 0.18);
  --platinum-border: rgba(255, 255, 255, 0.26);
  --platinum-shadow: 0 8px 32px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.24);
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.26);
  --focus: 0 0 0 3px rgba(45, 212, 191, 0.22);
}

html {
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  background:
    var(--page-wash),
    linear-gradient(180deg, var(--page-bg), var(--page-bg));
  color: var(--ink);
  transition: background-color 0.24s ease, color 0.24s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 72%);
  pointer-events: none;
}

[data-theme="dark"] body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

.site-header {
  top: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: min(1188px, calc(100% - 28px));
  min-height: 66px;
  margin: 10px auto 0;
  border: 1px solid var(--platinum-border);
  border-radius: 8px;
  background: var(--platinum-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--platinum-shadow);
}

.brand-mark {
  background: linear-gradient(135deg, var(--teal), var(--accent-blue));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 22px rgba(15, 118, 110, 0.22);
}

.site-header nav {
  border: 1px solid var(--platinum-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

[data-theme="dark"] .site-header nav {
  background: rgba(255, 255, 255, 0.055);
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
  padding: 6px 8px;
  transition: background 0.18s ease, color 0.18s ease;
}

.site-header nav a:hover {
  background: var(--surface-soft);
}

.header-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: currentColor;
}

.ui-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-switcher {
  min-height: 42px;
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  border: 1px solid var(--platinum-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
  padding: 3px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.theme-switcher button {
  min-width: 45px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.theme-switcher button:hover {
  color: var(--ink);
}

.theme-switcher button.active,
[data-theme-preference="system"] [data-theme-choice="system"],
[data-theme-preference="dark"] [data-theme-choice="dark"],
[data-theme-preference="light"] [data-theme-choice="light"] {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.header-action,
.primary-action,
.checkout-form button,
.auth-form button,
.telegram-link-action,
.inline-action,
.copy-action,
.dashboard-card > button,
.history-heading button,
.history-pagination button,
.subscription-form button,
.password-form button,
.device-row button,
.referral-row button,
.amount-grid button {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.header-action,
.primary-action,
.secondary-action,
.checkout-form button,
.auth-form button,
.profile-toolbar button,
.telegram-link-action,
.inline-action,
.copy-action,
.dashboard-card > button,
.history-heading button,
.history-pagination button,
.subscription-form button,
.password-form button,
.device-row button,
.referral-row button,
.amount-grid button,
.tariff-card button {
  gap: 7px;
}

.header-action,
.primary-action,
.checkout-form button,
.auth-form button {
  background: linear-gradient(135deg, var(--teal), #2563eb);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.22);
}

.header-action:hover,
.primary-action:hover,
.checkout-form button:hover,
.auth-form button:hover,
.tariff-card button:hover,
.amount-grid button:hover {
  background: linear-gradient(135deg, var(--teal), #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(15, 118, 110, 0.26);
}

.secondary-action {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(14px);
}

.hero {
  min-height: min(840px, 100svh);
  align-items: center;
  background:
    linear-gradient(135deg, #07111f, #0f172a 46%, #10251f);
}

.hero-motion {
  opacity: 0.94;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(5, 10, 19, 0.76), rgba(5, 10, 19, 0.32) 48%, rgba(5, 10, 19, 0.54)),
    linear-gradient(180deg, rgba(5, 10, 19, 0.08), rgba(5, 10, 19, 0.64));
}

.hero-content {
  gap: 20px;
  padding: 70px 0 54px;
  animation: heroRise 0.7s ease both;
}

.hero-copy {
  color: rgba(255, 255, 255, 0.82);
}

.hero-facts {
  grid-template-columns: repeat(3, minmax(0, 190px));
}

.hero-facts div {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.38);
}

.hero-facts .ui-icon {
  grid-row: span 2;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.84);
}

.section {
  position: relative;
}

.muted-section,
.faq-section,
.checkout-page,
.profile-page {
  background: transparent;
}

.section-heading {
  gap: 8px;
}

.eyebrow {
  color: var(--coral);
  letter-spacing: 0;
}

.tariff-card,
.checkout-form,
.telegram-link-panel,
.auth-panel,
.purchase-card,
.profile-toolbar,
.message,
.payment-status,
.faq-list details,
.dashboard-card,
.metric-tile,
.history-row,
.device-row,
.referral-row,
.key-box,
.loading,
.country-pill,
.checkout-steps li,
.auto-topup-offer {
  border-color: var(--platinum-border);
  background: var(--platinum-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--platinum-shadow);
}

.tariff-card,
.dashboard-card,
.purchase-card,
.faq-list details {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tariff-card:hover,
.dashboard-card:hover,
.purchase-card:hover,
.faq-list details:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.tariff-card {
  min-height: 258px;
}

.tariff-card button,
.action-row button,
.amount-grid button,
.copy-action,
.dashboard-card > button,
.history-heading button,
.history-pagination button,
.subscription-form button,
.password-form button,
.device-row button,
.referral-row button {
  background: var(--surface-solid);
  color: var(--ink);
  border: 1px solid var(--line);
}

[data-theme="dark"] .tariff-card button,
[data-theme="dark"] .action-row button,
[data-theme="dark"] .amount-grid button,
[data-theme="dark"] .copy-action,
[data-theme="dark"] .dashboard-card > button,
[data-theme="dark"] .history-heading button,
[data-theme="dark"] .history-pagination button,
[data-theme="dark"] .subscription-form button,
[data-theme="dark"] .password-form button,
[data-theme="dark"] .device-row button,
[data-theme="dark"] .referral-row button {
  background: rgba(255, 255, 255, 0.08);
}

.tariff-card button,
.amount-grid button,
.action-row button:not(.secondary):not(.danger):not(.danger-soft),
.dashboard-card > button:not(.secondary) {
  background: linear-gradient(135deg, var(--ink), #2563eb);
  color: #fff;
  border-color: transparent;
}

[data-theme="dark"] .tariff-card button,
[data-theme="dark"] .amount-grid button,
[data-theme="dark"] .action-row button:not(.secondary):not(.danger):not(.danger-soft),
[data-theme="dark"] .dashboard-card > button:not(.secondary) {
  background: linear-gradient(135deg, #2dd4bf, #60a5fa);
  color: #06111f;
}

input,
select,
textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: rgba(255, 255, 255, 0.075);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: var(--focus);
}

.profile-dashboard {
  margin-inline: auto;
}

.profile-overview {
  border: 0;
  background: transparent;
}

.profile-overview .metric-tile {
  background: var(--glass);
}

.profile-tabs,
.auth-tabs {
  background: var(--glass);
  backdrop-filter: blur(18px);
}

.profile-tabs button.active,
.auth-tabs button.active {
  background: var(--surface-raised);
  color: var(--ink);
}

[data-theme="dark"] .profile-tabs button.active {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.28), rgba(147, 197, 253, 0.2));
  color: #fff;
}

.message.ok,
.payment-status.ok,
.toast.ok,
.auto-topup-offer.accepted {
  border-color: rgba(22, 163, 74, 0.32);
  background: rgba(220, 252, 231, 0.72);
  color: #067647;
}

[data-theme="dark"] .message.ok,
[data-theme="dark"] .payment-status.ok,
[data-theme="dark"] .toast.ok,
[data-theme="dark"] .auto-topup-offer.accepted {
  background: rgba(20, 83, 45, 0.36);
  color: #86efac;
}

.message.err,
.payment-status.err,
.toast.err {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(254, 226, 226, 0.74);
  color: #b42318;
}

[data-theme="dark"] .message.err,
[data-theme="dark"] .payment-status.err,
[data-theme="dark"] .toast.err {
  background: rgba(127, 29, 29, 0.34);
  color: #fca5a5;
}

.status-pill,
.pill,
.country-pill {
  background: var(--surface-raised);
}

.toast {
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(1.18);
}

.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  animation: shimmer 1.35s ease-in-out infinite;
}

.reveal-on-scroll,
.tariff-card,
.dashboard-card,
.purchase-card,
.faq-list details {
  opacity: 0;
  transform: translateY(10px);
}

.reveal-on-scroll.is-visible,
.tariff-card.is-visible,
.dashboard-card.is-visible,
.purchase-card.is-visible,
.faq-list details.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tariff-card.is-visible:hover,
.dashboard-card.is-visible:hover,
.purchase-card.is-visible:hover,
.faq-list details.is-visible:hover {
  transform: translateY(-2px);
}

.reveal-on-scroll,
.tariff-card,
.dashboard-card,
.purchase-card,
.faq-list details {
  transition-property: opacity, transform, box-shadow, border-color;
  transition-duration: 0.42s, 0.42s, 0.2s, 0.2s;
  transition-timing-function: ease;
}

.site-footer {
  background: var(--glass-strong);
  border-color: var(--line);
  backdrop-filter: blur(20px);
}

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

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

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

  .reveal-on-scroll,
  .tariff-card,
  .dashboard-card,
  .purchase-card,
  .faq-list details {
    opacity: 1;
    transform: none;
  }
}

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

  .header-tools {
    justify-self: end;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-inline: 12px;
  }

  .theme-switcher button {
    min-width: 36px;
    padding-inline: 6px;
  }
}

@media (max-width: 620px) {
  .site-header {
    grid-template-columns: auto 1fr;
    width: min(100% - 20px, 1188px);
  }

  .header-tools {
    gap: 6px;
  }

  .hero {
    min-height: 76svh;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }
}

/* Kimicu bento neon redesign layer */
:root,
[data-theme="light"] {
  --ink: #111827;
  --muted: #687385;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-solid: #ffffff;
  --surface-soft: rgba(244, 247, 251, 0.72);
  --surface-raised: rgba(255, 255, 255, 0.84);
  --line: rgba(17, 24, 39, 0.1);
  --line-strong: rgba(8, 145, 178, 0.28);
  --teal: #0891b2;
  --teal-dark: #0e7490;
  --coral: #b45309;
  --accent-blue: #7c3aed;
  --accent: #0891b2;
  --accent-purple: #7c3aed;
  --page-bg: #f3f7fb;
  --space: #0d1424;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --bento-bg: rgba(255, 255, 255, 0.64);
  --bento-bg-strong: rgba(255, 255, 255, 0.82);
  --bento-border: rgba(17, 24, 39, 0.1);
  --hero-card-bg: rgba(16, 24, 40, 0.5);
  --hero-border: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 60px rgba(17, 24, 39, 0.14);
  --shadow-soft: 0 12px 30px rgba(17, 24, 39, 0.09);
  --glow-cyan: 0 0 28px rgba(8, 145, 178, 0.22);
  --glow-purple: 0 0 28px rgba(124, 58, 237, 0.18);
  --focus: 0 0 0 3px rgba(8, 145, 178, 0.22);
}

[data-theme="dark"] {
  --ink: #f5f6f8;
  --muted: #8f95a3;
  --surface: rgba(18, 22, 31, 0.5);
  --surface-solid: #11151f;
  --surface-soft: rgba(255, 255, 255, 0.035);
  --surface-raised: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(0, 240, 255, 0.28);
  --teal: #00f0ff;
  --teal-dark: #67e8f9;
  --coral: #fdbd74;
  --accent-blue: #8a2be2;
  --accent: #00f0ff;
  --accent-purple: #8a2be2;
  --page-bg: #060709;
  --space: #060709;
  --glass: rgba(18, 22, 31, 0.5);
  --glass-strong: rgba(22, 27, 38, 0.72);
  --bento-bg: rgba(18, 22, 31, 0.5);
  --bento-bg-strong: rgba(22, 27, 38, 0.68);
  --bento-border: rgba(255, 255, 255, 0.06);
  --hero-card-bg: rgba(18, 22, 31, 0.52);
  --hero-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.22);
  --glow-cyan: 0 0 30px rgba(0, 240, 255, 0.16);
  --glow-purple: 0 0 30px rgba(138, 43, 226, 0.18);
  --focus: 0 0 0 3px rgba(0, 240, 255, 0.22);
}

html {
  background: var(--page-bg);
}

body {
  background:
    linear-gradient(135deg, rgba(138, 43, 226, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(0, 240, 255, 0.06), transparent 42%),
    var(--page-bg);
  color: var(--ink);
}

[data-theme="light"] body {
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.11), transparent 34%),
    linear-gradient(315deg, rgba(124, 58, 237, 0.08), transparent 42%),
    var(--page-bg);
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 74%);
}

[data-theme="light"] body::before {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 24, 39, 0.03) 1px, transparent 1px);
}

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 14px max(18px, calc((100vw - 1160px) / 2));
  border: 0;
  border-bottom: 1px solid var(--bento-border);
  border-radius: 0;
  background: rgba(6, 7, 9, 0.72);
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.78);
}

.brand {
  gap: 10px;
  font-size: 20px;
  font-weight: 840;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  color: #05070a;
  box-shadow: var(--glow-cyan);
}

[data-theme="light"] .brand-mark {
  color: #fff;
}

.site-header nav {
  justify-self: center;
  gap: 8px;
  border: 1px solid var(--bento-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  padding: 6px 10px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .site-header nav {
  background: rgba(255, 255, 255, 0.42);
}

.site-header nav a {
  min-height: 34px;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-weight: 720;
}

.site-header nav a:hover {
  background: rgba(0, 240, 255, 0.08);
  color: var(--accent);
}

[data-theme="light"] .site-header nav a:hover {
  background: rgba(8, 145, 178, 0.08);
}

.header-tools {
  gap: 10px;
}

.theme-switcher {
  min-height: 42px;
  border-color: var(--bento-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  padding: 4px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .theme-switcher {
  background: rgba(255, 255, 255, 0.48);
}

.theme-switcher button {
  border-radius: 999px;
}

.theme-switcher button.active,
[data-theme-preference="system"] [data-theme-choice="system"],
[data-theme-preference="dark"] [data-theme-choice="dark"],
[data-theme-preference="light"] [data-theme-choice="light"] {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.16), rgba(138, 43, 226, 0.16));
  color: var(--ink);
  box-shadow: none;
}

.ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
}

.ui-icon use {
  pointer-events: none;
}

.header-action,
.primary-action,
.secondary-action,
.checkout-form button,
.auth-form button,
.profile-toolbar button,
.tariff-card button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 760;
}

.header-action,
.primary-action,
.checkout-form button,
.auth-form button {
  background: #fff;
  color: #05070a;
  box-shadow: var(--glow-cyan);
}

[data-theme="light"] .header-action,
[data-theme="light"] .primary-action,
[data-theme="light"] .checkout-form button,
[data-theme="light"] .auth-form button {
  background: var(--ink);
  color: #fff;
}

.header-action:hover,
.primary-action:hover,
.checkout-form button:hover,
.auth-form button:hover {
  background: var(--accent);
  color: #05070a;
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.32);
}

.secondary-action {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.secondary-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

main {
  overflow: hidden;
}

.hero {
  min-height: 78svh;
  display: grid;
  align-items: center;
  background: var(--space);
}

.hero-motion {
  opacity: 0.74;
  mix-blend-mode: screen;
}

[data-theme="light"] .hero-motion {
  opacity: 0.34;
  mix-blend-mode: multiply;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(6, 7, 9, 0.88), rgba(6, 7, 9, 0.42) 54%, rgba(6, 7, 9, 0.78)),
    linear-gradient(180deg, rgba(6, 7, 9, 0.08), rgba(6, 7, 9, 0.72));
}

[data-theme="light"] .hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.74), rgba(7, 17, 31, 0.42) 54%, rgba(7, 17, 31, 0.68)),
    linear-gradient(180deg, rgba(7, 17, 31, 0.12), rgba(7, 17, 31, 0.58));
}

.hero-content {
  width: min(1160px, calc(100% - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.95fr);
  gap: 20px;
  align-items: stretch;
  padding: 44px 0;
}

.bento-card {
  position: relative;
  border: 1px solid var(--bento-border);
  border-radius: 8px;
  background: var(--bento-bg);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow);
}

.hero-main,
.hero-side {
  background: var(--hero-card-bg);
  border-color: var(--hero-border);
  color: #fff;
}

.hero-main {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 52px);
}

.hero-side {
  display: grid;
  gap: 14px;
  align-content: stretch;
  padding: 18px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #fdbd74;
}

h1 {
  max-width: 760px;
  margin-top: 12px;
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 880;
  line-height: 1.02;
  letter-spacing: 0;
  background: linear-gradient(180deg, #fff 0%, #a3a8b4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 20px);
}

.hero-actions {
  margin-top: 28px;
}

.hero-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

.hero-facts div {
  min-height: 88px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 12px;
  align-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
  box-shadow: none;
}

.hero-facts .ui-icon {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.hero-facts dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.hero-facts dd {
  color: #fff;
  font-size: 20px;
  font-weight: 820;
}

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

.hero-mini-grid span {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 760;
}

.section {
  padding: 64px max(18px, calc((100vw - 1160px) / 2));
  scroll-margin-top: 96px;
}

.muted-section,
.faq-section,
.checkout-page,
.profile-page {
  background: transparent;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.feature-section {
  margin-top: -24px;
  padding-top: 0;
}

.feature-grid {
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto;
}

.feature-card {
  min-height: 172px;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 20px;
}

.feature-card h3 {
  margin: 0;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tariff-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.tariff-card,
.checkout-form,
.telegram-link-panel,
.auth-panel,
.purchase-card,
.profile-toolbar,
.message,
.payment-status,
.faq-list details,
.dashboard-card,
.metric-tile,
.history-row,
.device-row,
.referral-row,
.key-box,
.loading,
.country-pill,
.checkout-steps li,
.auto-topup-offer {
  border: 1px solid var(--bento-border);
  border-radius: 8px;
  background: var(--bento-bg);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow-soft);
}

.tariff-card {
  min-height: 294px;
  overflow: hidden;
  padding: 20px;
}

.tariff-card.featured {
  border-color: rgba(138, 43, 226, 0.38);
  border-color: color-mix(in srgb, var(--accent-purple) 55%, transparent);
  background:
    linear-gradient(180deg, rgba(138, 43, 226, 0.14), transparent 70%),
    var(--bento-bg-strong);
  box-shadow: var(--shadow), var(--glow-purple);
}

.tariff-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-purple), rgba(0, 240, 255, 0.42));
  color: #fff;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
}

.tariff-card h3 {
  padding-right: 86px;
}

.card-icon,
.faq-icon,
.country-flag {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--bento-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .card-icon,
[data-theme="light"] .faq-icon,
[data-theme="light"] .country-flag {
  background: rgba(8, 145, 178, 0.07);
}

.tariff-price {
  font-size: 32px;
}

.tariff-meta {
  gap: 9px;
}

.tariff-meta span {
  color: var(--muted);
}

.tariff-card button {
  width: 100%;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  border: 1px solid var(--bento-border);
}

[data-theme="dark"] .tariff-card button {
  color: #fff;
}

.tariff-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow), var(--glow-cyan);
}

.tariff-card:hover button,
.tariff-card.featured button {
  background: #fff;
  color: #05070a;
  border-color: transparent;
}

[data-theme="light"] .tariff-card:hover button,
[data-theme="light"] .tariff-card.featured button {
  background: var(--ink);
  color: #fff;
}

.action-row button.danger,
.device-row button.danger,
[data-theme="light"] .action-row button.danger,
[data-theme="light"] .device-row button.danger,
[data-theme="dark"] .action-row button.danger,
[data-theme="dark"] .device-row button.danger {
  background: #b42318;
  color: #fff;
  border-color: transparent;
}

input,
select,
textarea {
  border-color: var(--bento-border);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.76);
}

.checkout-steps {
  max-width: 760px;
  margin-inline: auto;
}

.checkout-form,
.auth-panel,
.profile-toolbar,
.profile-tabs,
.dashboard-tools {
  max-width: 960px;
  margin-inline: auto;
}

.country-list {
  justify-content: center;
}

.country-pill {
  min-height: 44px;
  padding: 8px 12px;
}

.country-flag {
  width: 28px;
  min-width: 28px;
  height: 28px;
  font-size: 0;
}

.country-flag .ui-icon {
  width: 15px;
  height: 15px;
}

.faq-list {
  width: min(980px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto;
}

.faq-list details {
  min-height: 86px;
  padding: 0;
  overflow: hidden;
}

.faq-list details[open] {
  border-color: var(--line-strong);
  background: var(--bento-bg-strong);
  box-shadow: var(--shadow), var(--glow-cyan);
}

.faq-list summary {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  list-style: none;
  cursor: pointer;
}

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

.faq-list summary::after {
  content: none;
}

.faq-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.faq-title > span:last-child {
  min-width: 0;
}

.faq-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease;
}

.faq-list details[open] .faq-chevron {
  color: var(--accent);
  transform: rotate(180deg);
}

.faq-list p {
  padding: 0 16px 16px 62px;
  color: var(--muted);
}

.site-footer {
  min-height: 80px;
  flex-wrap: wrap;
  gap: 14px 20px;
  border-top: 1px solid var(--bento-border);
  background: rgba(6, 7, 9, 0.7);
  color: var(--muted);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

[data-theme="light"] .site-footer {
  background: rgba(255, 255, 255, 0.72);
}

.site-footer span,
.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.site-footer span {
  color: var(--ink);
}

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

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

  .site-header nav {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .hero-main {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 66px;
  }

  .theme-switcher span,
  .header-action span {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    width: min(100% - 28px, 1160px);
    padding: 24px 0 40px;
  }

  .feature-grid,
  .faq-list {
    grid-template-columns: 1fr;
  }

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

  .faq-list p {
    padding-left: 16px;
  }
}

/* Stability and profile usability fixes */
.catalog-stamp {
  display: none !important;
}

.reveal-on-scroll,
.tariff-card,
.dashboard-card,
.purchase-card,
.faq-list details {
  opacity: 1 !important;
  transform: none !important;
}

.tariff-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: stretch;
}

.tariff-card {
  min-height: 274px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tariff-card h3 {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 0;
  line-height: 1.15;
}

.tariff-card.featured h3 {
  padding-right: 0;
}

.tariff-badge {
  position: static;
  align-self: flex-start;
  order: -1;
  margin-bottom: 2px;
}

.tariff-card .card-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.tariff-meta {
  margin-bottom: 10px;
}

.tariff-card button {
  margin-top: auto;
}

.feature-card,
.tariff-card,
.faq-list details,
.country-pill {
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
}

.dashboard-card,
.metric-tile,
.history-row,
.device-row,
.referral-row,
.purchase-card,
.key-box,
.profile-toolbar,
.profile-tabs,
.message,
.payment-status,
.auto-topup-offer {
  background: var(--bento-bg-strong);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-motion {
  opacity: 0.52;
}

[data-theme="light"] .hero-motion {
  opacity: 0.24;
}

.profile-page {
  text-align: left;
}

.profile-page .section-heading {
  width: min(1160px, 100%);
  max-width: none;
  margin-inline: 0;
  text-align: left;
}

.profile-dashboard {
  width: min(1160px, 100%);
  max-width: none;
  margin-inline: auto;
  align-items: stretch;
}

.profile-page .profile-toolbar,
.profile-page .profile-tabs,
.profile-page .dashboard-tools,
.profile-page .purchase-list,
.profile-page .profile-tab-panel {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.profile-tabs {
  grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
  align-items: stretch;
}

.profile-tabs .ui-icon {
  display: none;
}

.profile-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 8px 10px;
  line-height: 1.15;
  text-align: center;
}

.profile-tabs button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-overview {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.profile-overview .profile-identity-tile {
  grid-column: span 2;
}

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

.dashboard-card,
.purchase-card,
.history-row,
.device-row,
.referral-row {
  text-align: left;
}

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

  .profile-overview .profile-identity-tile {
    grid-column: auto;
  }
}

.auth-panel .auth-tabs button {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.auth-panel .auth-tabs button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.auth-panel .auth-tabs button.active {
  background: var(--surface-raised);
  color: var(--ink);
}

.auth-panel .auth-form > button {
  background: #fff;
  color: #05070a;
  box-shadow: var(--glow-cyan);
}

.auth-panel .auth-form > button:hover {
  background: var(--accent);
  color: #05070a;
}

.auth-panel .auth-form > button:disabled {
  opacity: 0.72;
  color: #111827;
  cursor: wait;
}

.auth-panel .auth-form > .telegram-auth-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  box-shadow: none;
}

.auth-panel .auth-form > .telegram-auth-button:hover {
  border-color: rgba(0, 240, 255, 0.38);
  background: rgba(0, 240, 255, 0.12);
  color: var(--ink);
}

.auth-panel #authMessage {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 11px 13px;
}

[data-theme="light"] .auth-panel .auth-form > button {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

[data-theme="light"] .auth-panel .auth-form > button:hover {
  background: var(--teal-dark);
  color: #fff;
}

[data-theme="light"] .auth-panel .auth-form > button:disabled {
  color: #fff;
}

[data-theme="light"] .auth-panel .auth-form > .telegram-auth-button {
  background: #fff;
  color: var(--ink);
}

[data-theme="light"] .auth-panel .auth-form > .telegram-auth-button:hover {
  background: #f8fafc;
  color: var(--ink);
}

select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  padding: 10px 42px 10px 12px;
  border: 1px solid var(--bento-border);
  border-radius: 8px;
  background-color: rgba(8, 13, 24, 0.74);
  background-image:
    linear-gradient(45deg, transparent 50%, #00f0ff 50%),
    linear-gradient(135deg, #00f0ff 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.25;
}

select:hover {
  border-color: rgba(0, 240, 255, 0.36);
  background-color: rgba(10, 18, 33, 0.88);
}

select:focus {
  border-color: var(--teal);
  box-shadow: var(--focus);
}

select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

select option {
  background: #101827;
  color: #f8fafc;
}

[data-theme="light"] select {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, #0f172a 50%),
    linear-gradient(135deg, #0f172a 50%, transparent 50%);
  color: var(--ink);
}

[data-theme="light"] select:hover {
  background-color: #f8fafc;
  border-color: rgba(15, 118, 110, 0.34);
}

[data-theme="light"] select option {
  background: #fff;
  color: #0f172a;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select .native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.custom-select-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px 11px 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 25, 0.92));
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.custom-select-button .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--teal);
  transition: transform 0.18s ease;
}

.custom-select.open .custom-select-button .ui-icon {
  transform: rotate(180deg);
}

.custom-select-button:hover {
  border-color: rgba(0, 240, 255, 0.4);
  background:
    linear-gradient(180deg, rgba(20, 31, 52, 0.96), rgba(10, 18, 32, 0.96));
}

.custom-select-button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.custom-select-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.custom-select-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(8, 13, 24, 0.98);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

.custom-select.open .custom-select-menu {
  display: grid;
  gap: 4px;
}

.custom-select-menu button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.custom-select-menu button:hover,
.custom-select-menu button[aria-selected="true"] {
  background: rgba(0, 240, 255, 0.12);
}

.custom-select-menu button[aria-selected="true"] {
  color: var(--teal);
}

.custom-select-menu .ui-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

[data-theme="light"] .custom-select-button {
  background: #fff;
  color: var(--ink);
  border-color: rgba(15, 23, 42, 0.14);
}

[data-theme="light"] .custom-select-button:hover {
  background: #f8fafc;
  border-color: rgba(15, 118, 110, 0.34);
}

[data-theme="light"] .custom-select-menu {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}
