:root {
  --bg: #f6f8ff;
  --bg-soft: #ffffff;
  --surface: rgba(255,255,255,0.92);
  --surface-strong: #ffffff;
  --text: #16304c;
  --text-soft: #58708e;
  --line: rgba(17, 41, 73, 0.12);
  --accent: #ff9f2e;
  --accent-2: #22c7ff;
  --accent-3: #7b61ff;
  --success: #18a36c;
  --danger: #d54861;
  --warning: #ef9b23;
  --shadow: 0 18px 60px rgba(34, 62, 110, 0.12);
  --shadow-soft: 0 12px 28px rgba(34, 62, 110, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,159,46,0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(34,199,255,0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7f9ff 48%, #f4f7ff 100%);
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
h1 {
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
h3 { font-size: 1.35rem; }
p { line-height: 1.8; }

.app-shell {
  width: min(calc(100% - 40px), calc(var(--container) + 40px));
  margin: 18px auto 42px;
  padding-right: 92px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 30;
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 24px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 12px 28px rgba(34, 62, 110, 0.10);
  backdrop-filter: blur(14px);
  transition: transform .32s ease, opacity .24s ease, box-shadow .24s ease;
}

.site-header.header-hidden {
  transform: translateY(calc(-100% - 20px));
  opacity: .02;
  pointer-events: none;
}

.social-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  display: grid;
  gap: 10px;
}

.social-rail-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 148px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(17,41,73,0.10);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 14px 28px rgba(31, 55, 95, 0.10);
  color: var(--text);
  font-weight: 800;
}

.social-rail-link:hover {
  transform: translateX(-6px);
  box-shadow: 0 18px 34px rgba(31, 55, 95, 0.14);
}

.social-rail-link.whatsapp { color: #138f61; }
.social-rail-link.telegram { color: #1788c9; }
.social-rail-link.facebook { color: #2462d3; }
.social-rail-link.instagram { color: #c14584; }

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255,159,46,0.16), rgba(34,199,255,0.14));
  color: currentColor;
  flex: 0 0 auto;
}

.social-icon svg { width: 20px; height: 20px; }

.social-rail-link,
.main-nav a,
.auth-tab,
.inline-link {
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, color .22s ease, border-color .22s ease;
}

.social-rail-link,
.main-nav a,
.auth-tab {
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, color .22s ease, border-color .22s ease;
}
.main-nav a:hover,
.main-nav a:hover,
.auth-tab:hover,
.inline-link:hover,
.btn:hover,
.dash-action-card:hover,
.marketing-card:hover,
.showcase-card:hover,
.proxy-card:hover,
.stat-card:hover,
.faq-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(35, 61, 105, 0.12);
}

.top-social-copy {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-soft);
  text-align: center;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
  padding: 14px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.brand-logo,
.auth-brand-logo,
.hero-brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(123,97,255,0.18));
}

.brand-title {
  display: block;
  font-size: clamp(1.25rem, 1.8vw, 1.7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #16304c, #4368a8, #7b61ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy,
.muted,
.showcase-sub,
.proxy-details,
.history-row p,
.faq-answer,
.auth-card p,
.card-panel p {
  color: var(--text-soft);
}

.brand-copy { font-weight: 700; font-size: .94rem; max-width: 580px; }
.brand-copy-wrap { display: grid; gap: 4px; }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.main-nav a,
.auth-tab {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
}
.main-nav a.active,
.auth-tab.active {
  background: linear-gradient(135deg, var(--accent), #ffbf68);
  border-color: transparent;
  color: #1f2c3c;
}

.banner-strip {
  margin: 18px 0 8px;
}

.banner-anchor {
  display: block;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(255,255,255,0.96), rgba(247,249,255,0.96));
  border: 1px solid rgba(17,41,73,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), var(--shadow-soft);
}

.banner-marquee {
  display: flex;
  width: max-content;
  gap: 18px;
  align-items: center;
  padding: 10px 0;
  animation: banner-scroll 24s linear infinite;
}

.banner-item {
  width: 480px;
  min-width: 480px;
  height: 60px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(90deg, #fff8ef, #eef9ff);
  box-shadow: 0 10px 24px rgba(23, 48, 80, 0.08);
}

.banner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes banner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.main-content {
  position: relative;
  margin-top: 16px;
}

.page-loader {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(255,255,255,0.9);
  z-index: 50;
  backdrop-filter: blur(6px);
}
.page-loader.active { display: grid; }
.page-loader img {
  width: min(320px, 60vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(123,97,255,0.16));
}

#app-flashes { margin-bottom: 16px; }
.flash {
  padding: 16px 18px;
  border-radius: 18px;
  margin-bottom: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}
.flash-success { background: rgba(24, 163, 108, 0.11); color: #0c7651; border-color: rgba(24, 163, 108, 0.18); }
.flash-error { background: rgba(213, 72, 97, 0.1); color: #ac2441; border-color: rgba(213, 72, 97, 0.18); }
.flash-warning { background: rgba(239, 155, 35, 0.11); color: #a66200; border-color: rgba(239, 155, 35, 0.18); }
.flash-info { background: rgba(34, 199, 255, 0.12); color: #136987; border-color: rgba(34, 199, 255, 0.18); }

.card-panel,
.auth-card,
.proxy-card,
.marketing-card,
.showcase-card,
.stat-card,
.dash-action-card,
.empty-card,
.faq-item,
.table-wrap {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card-panel,
.auth-card,
.empty-card,
.table-wrap { padding: 28px; }

.reveal,
.card-panel,
.marketing-card,
.showcase-card,
.proxy-card,
.stat-card,
.dash-action-card,
.faq-item,
.auth-card,
.table-wrap {
  animation: rise .6s ease both;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,159,46,0.15), rgba(34,199,255,0.14));
  border: 1px solid rgba(17,41,73,0.08);
  color: #355275;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 30px 0 18px;
}
.centered-head {
  text-align: center;
  justify-content: center;
}
.centered-head > div {
  max-width: 820px;
  display: grid;
  gap: 10px;
}
.with-link { align-items: center; }

.landing-hero {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 28px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(34,199,255,0.16), transparent 70%);
  pointer-events: none;
}
.centered-copy,
.centered-visual,
.centered-about,
.auth-card-main,
.auth-side-brand,
.showcase-card,
.service-card,
.dashboard-hero,
.dash-action-card,
.stat-card {
  text-align: center;
}
.hero-lead {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: #36506f;
  max-width: 760px;
}
.large { font-size: 1.05rem; }
.landing-copy,
.auth-side-brand,
.auth-card-main,
.showcase-copy,
.dashboard-hero,
.topup-card-brand,
.topup-layout,
.proxy-card,
.dash-action-card {
  display: grid;
  gap: 18px;
}
.hero-actions,
.centered-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.centered-actions { justify-content: center; }
.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-bullets span,
.flag-pill,
.pricing-badge,
.status-pill,
.balance-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 800;
}
.hero-bullets-centered { justify-content: center; }
.hero-bullets span,
.flag-pill {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(17,41,73,0.08);
  color: #355275;
}
.flag-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.compact-strip .flag-pill { padding: 8px 12px; font-size: .85rem; }
.hero-visual { justify-items: center; }
.hero-logo-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(246,250,255,0.92));
  border: 1px solid rgba(17,41,73,0.08);
  box-shadow: var(--shadow-soft);
}
.hero-brand-gif,
.auth-brand-visual {
  width: min(290px, 70vw);
  margin: 0 auto;
  filter: drop-shadow(0 18px 40px rgba(255,159,46,0.16));
}
.auth-brand-logo { margin: 0 auto; }

.marketing-grid,
.stats-grid,
.dashboard-action-grid,
.proxy-cards,
.feature-showcase-grid,
.history-columns,
.admin-stats,
.card-grid {
  display: grid;
  gap: 18px;
}
.pricing-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.service-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature-showcase-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 22px; }
.stats-grid,
.admin-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 18px 0; }
.dashboard-action-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 22px 0 14px; }
.proxy-cards { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.history-columns { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.single { grid-template-columns: minmax(0, 1fr); }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.topup-layout { grid-template-columns: 1fr 1.15fr; }
.topup-brand-head { display: grid; gap: 12px; }

.marketing-card,
.showcase-card,
.proxy-card,
.dash-action-card,
.stat-card,
.service-card {
  padding: 24px;
}
.pricing-top,
.proxy-card-head,
.proxy-card-foot,
.history-row,
.topup-brand-head,
.brand,
.top-social-bar,
.section-head,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pricing-top,
.proxy-card-head,
.history-row,
.topup-brand-head,
.inline-actions { justify-content: space-between; }
.pricing-top { align-items: center; }
.pricing-image,
.service-hero-image,
.showcase-image,
.dash-action-card img,
.topup-card-brand img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin: 0 auto;
}
.pricing-title,
.product-price,
.balance-chip,
.stat-card strong,
.proxy-card strong,
.dash-action-card h3,
.service-card h3,
.showcase-card h4 {
  color: var(--text);
  font-weight: 900;
}
.pricing-title { font-size: 1.35rem; }
.pricing-price { font-size: 1.2rem; font-weight: 800; color: var(--accent-3); }
.pricing-badge {
  justify-self: start;
  background: linear-gradient(90deg, rgba(255,159,46,0.15), rgba(123,97,255,0.12));
  color: #664c16;
  border: 1px solid rgba(17,41,73,0.07);
  margin: 8px 0 10px;
}
.feature-list,
.list-rows,
.proxy-details {
  display: grid;
  gap: 10px;
}
.feature-list li,
.proxy-details span,
.proxy-details p,
.history-row p,
.service-card p,
.showcase-copy span,
.showcase-sub,
.faq-answer {
  font-size: .98rem;
}
.feature-list.compact li::before,
.proxy-details span::before {
  content: "•";
  color: var(--accent);
  font-weight: 900;
  margin-right: 8px;
}
.service-card { justify-items: center; }
.service-card h3 { font-size: 1.45rem; }
.service-card p { max-width: 300px; }
.showcase-card { justify-items: center; }
.showcase-copy { width: 100%; }
.showcase-sub { font-weight: 800; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffbf68);
  color: #1f2c3c;
}
.btn-secondary {
  background: linear-gradient(135deg, rgba(34,199,255,0.12), rgba(123,97,255,0.12));
  border: 1px solid rgba(17,41,73,0.08);
  color: var(--text);
}
.btn-small { min-height: 44px; padding: 0 18px; }
.inline-link {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(34,199,255,0.08);
  border: 1px solid rgba(17,41,73,0.07);
  font-weight: 800;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 1fr);
  gap: 20px;
}
.auth-card-main h1 { font-size: clamp(2.1rem, 3vw, 3.3rem); }
.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.form-stack {
  display: grid;
  gap: 16px;
}
.form-stack label,
.search-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: #28425f;
}
input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(17,41,73,0.11);
  background: rgba(255,255,255,0.96);
  color: var(--text);
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(123,97,255,0.35);
  box-shadow: 0 0 0 4px rgba(123,97,255,0.12);
}
textarea { min-height: 120px; }

.dashboard-hero {
  align-items: center;
}
.balance-chip {
  background: linear-gradient(135deg, rgba(255,159,46,0.15), rgba(255,255,255,0.9));
  color: #6d5116;
  border: 1px solid rgba(255,159,46,0.18);
  justify-self: center;
}
.balance-chip.accent {
  background: linear-gradient(135deg, rgba(34,199,255,0.12), rgba(123,97,255,0.12));
  color: #355275;
}
.stat-card {
  text-align: center;
  display: grid;
  gap: 8px;
}
.stat-card span { color: var(--text-soft); font-weight: 800; }
.stat-card strong { font-size: 2rem; }

.dash-action-card {
  justify-items: center;
  gap: 12px;
}
.dash-action-card span,
.dash-action-card p { color: var(--text-soft); }

.history-row {
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(17,41,73,0.07);
}
.history-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-rows { margin-top: 8px; }
.empty-card {
  text-align: center;
  color: var(--text-soft);
}

.proxy-card-head,
.proxy-card-foot,
.inline-actions { flex-wrap: wrap; }
.status-pill {
  background: rgba(24,163,108,0.12);
  color: #0c7651;
  border: 1px solid rgba(24,163,108,0.18);
}
.countdown { color: var(--accent-3); font-weight: 900; }

.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th, td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(17,41,73,0.07);
}
th {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #53708d;
}

details summary {
  list-style: none;
  cursor: pointer;
  font-size: 1.12rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
details summary::-webkit-details-marker { display: none; }
.faq-list { display: grid; gap: 14px; }
.faq-item { padding: 20px 22px; }
.faq-answer { padding-top: 12px; }

.about-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 22px;
}
.centered-about > div { display: grid; gap: 12px; justify-items: center; }
.centered-about p { max-width: 460px; }

.floating-logout {
  position: fixed;
  right: 20px;
  bottom: 20px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #ff7c86, #d54861);
  box-shadow: 0 18px 36px rgba(213,72,97,0.25);
  cursor: pointer;
}
.hidden-form { display: none; }

@media (max-width: 980px) {
  .landing-hero,
  .auth-grid,
  .topup-layout,
  .card-grid,
  .form-grid { grid-template-columns: 1fr; }
  .pricing-top,
  .proxy-card-head,
  .proxy-card-foot,
  .history-row,
  .inline-actions,
  .section-head { flex-direction: column; align-items: stretch; }
  .app-shell { padding-right: 16px; }
  .brand-row { padding-left: 16px; padding-right: 16px; align-items: flex-start; }
  .banner-strip { margin-top: 14px; }
  .social-rail { right: 10px; }
}

@media (max-width: 700px) {
  body { font-size: 15px; }
  .app-shell { width: min(calc(100% - 14px), calc(var(--container) + 14px)); margin-top: 8px; padding-right: 12px; }
  .site-header { border-radius: 20px; top: 6px; }
  .social-rail { right: 12px; left: auto; top: auto; bottom: 84px; position: fixed; transform: none; grid-template-columns: 1fr; margin: 0; }
  .social-rail-link { min-width: 132px; width: auto; justify-content: flex-start; }
  .brand-row { flex-direction: column; align-items: center; padding: 14px 14px 12px; }
  .brand { flex-direction: column; text-align: center; gap: 10px; }
  .brand-copy { max-width: none; }
  .brand-logo, .auth-brand-logo, .hero-brand-logo { width: 52px; height: 52px; }
  .card-panel, .auth-card, .proxy-card, .marketing-card, .showcase-card, .stat-card, .dash-action-card, .table-wrap { padding: 20px; border-radius: 22px; }
  .banner-item { width: 360px; min-width: 360px; height: 60px; }
  .main-nav { gap: 8px; }
  .main-nav a, .auth-tab { padding: 10px 14px; font-size: .94rem; }
  .pricing-image, .service-hero-image, .showcase-image, .dash-action-card img { width: 76px; height: 76px; }
  .floating-logout { right: 12px; bottom: 12px; }
}


@media (max-width: 1180px) {
  .app-shell { padding-right: 24px; }
  .social-rail { right: 10px; left: auto; top: auto; bottom: 72px; position: fixed; transform: none; grid-template-columns: 1fr; margin: 0; }
  .social-rail-link { min-width: 118px; justify-content: flex-start; }
  .brand-row { flex-direction: column; }
  .main-nav { justify-content: center; }
}

/* verification + enhanced proxy builder */
.verify-side-brand {
  justify-items: center;
  text-align: center;
}
.verify-code-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 12px;
}
.verify-point-card {
  display: grid;
  gap: 8px;
  padding: 16px 12px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(245,249,255,.92));
  border: 1px solid rgba(17,41,73,0.08);
  box-shadow: 0 12px 26px rgba(34,62,110,.08);
}
.verify-point-card strong {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255,159,46,.16), rgba(123,97,255,.16));
  font-size: 1.15rem;
}
.verify-point-card span {
  font-weight: 800;
  color: var(--text-soft);
  font-size: .95rem;
}
.verification-stack,
.verification-actions {
  max-width: 560px;
  margin-inline: auto;
}
.verification-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.otp-input {
  text-align: center;
  letter-spacing: .42em;
  font-size: 1.55rem;
  font-weight: 900;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
}
select:disabled {
  cursor: not-allowed;
  background: linear-gradient(180deg, rgba(240,244,251,.96), rgba(248,250,255,.92));
  color: #7a91ab;
}
.field-group {
  gap: 9px !important;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,255,.94));
  border: 1px solid rgba(17,41,73,.07);
  box-shadow: 0 14px 26px rgba(34,62,110,.06);
}
.field-group.full-span {
  grid-column: 1 / -1;
}
.field-kicker {
  font-size: 1rem;
  font-weight: 900;
  color: #1d3957;
}
.field-note {
  font-size: .92rem;
  font-weight: 700;
  color: #69809b;
}
.select-shell {
  position: relative;
  display: block;
}
.select-shell::after {
  content: '⌄';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 1.6rem;
  font-weight: 900;
  color: #617a96;
  pointer-events: none;
}
.select-shell.is-filled::after {
  color: var(--accent-3);
}
.select-shell select {
  padding-right: 48px;
  font-weight: 800;
}
.proxy-builder-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: center;
}
.proxy-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.proxy-steps span {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,159,46,.14), rgba(34,199,255,.14));
  border: 1px solid rgba(17,41,73,.08);
  color: #355275;
  font-weight: 900;
  font-size: .92rem;
}
.proxy-builder-form {
  gap: 20px;
}
.proxy-selection-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.selection-card {
  display: grid;
  gap: 8px;
  padding: 16px 14px;
  min-height: 104px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.94));
  border: 1px solid rgba(17,41,73,.08);
  box-shadow: 0 14px 28px rgba(34,62,110,.06);
}
.selection-card span {
  color: #69809b;
  font-size: .86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.selection-card strong {
  font-size: 1.06rem;
  line-height: 1.45;
  color: #1b3754;
}
.selection-card.is-active {
  background: linear-gradient(135deg, rgba(255,159,46,.14), rgba(34,199,255,.12), rgba(255,255,255,.96));
  border-color: rgba(123,97,255,.18);
  box-shadow: 0 18px 34px rgba(34,62,110,.10);
}
.enhanced-grid {
  align-items: start;
}
.inline-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .proxy-builder-head,
  .proxy-selection-board {
    grid-template-columns: 1fr;
  }
  .proxy-steps {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .verify-code-points {
    grid-template-columns: 1fr;
  }
  .field-group.full-span {
    grid-column: auto;
  }
  .otp-input {
    letter-spacing: .26em;
    font-size: 1.3rem;
  }
}


/* Enhanced vertical proxy steps */
.proxy-builder-form .enhanced-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.proxy-builder-form .field-group {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid rgba(17,41,73,.09);
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,250,255,.96));
}
.proxy-builder-form .field-group::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 16px;
  bottom: 16px;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,159,46,.35), rgba(34,199,255,.28));
}
.proxy-builder-form .field-group.is-disabled {
  opacity: .82;
}
.proxy-builder-form .field-group.is-complete {
  background: linear-gradient(180deg, rgba(236,255,246,.98), rgba(246,255,250,.98));
  border-color: rgba(24,163,108,.24);
  box-shadow: 0 18px 34px rgba(24,163,108,.12);
}
.proxy-builder-form .field-group.is-complete::before {
  background: linear-gradient(180deg, rgba(24,163,108,.98), rgba(78,203,141,.88));
}
.proxy-builder-form .field-group .field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.proxy-builder-form .field-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(22,48,76,.05);
  color: #4d647d;
  font-size: .88rem;
  font-weight: 900;
}
.proxy-builder-form .field-status::before {
  content: '○';
  font-size: 1rem;
  line-height: 1;
}
.proxy-builder-form .field-group.is-complete .field-status {
  background: rgba(24,163,108,.12);
  color: #118656;
}
.proxy-builder-form .field-group.is-complete .field-status::before {
  content: '✓';
}
.proxy-builder-form .field-note {
  max-width: 760px;
}
.proxy-selection-board {
  grid-template-columns: 1fr;
  gap: 12px;
}
.selection-card {
  position: relative;
  min-height: 0;
  padding-inline-end: 62px;
}
.selection-card::after {
  content: '○';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 900;
  color: #7890aa;
  background: rgba(22,48,76,.06);
}
.selection-card.is-active {
  background: linear-gradient(180deg, rgba(237,255,245,.98), rgba(247,255,250,.98));
  border-color: rgba(24,163,108,.22);
  box-shadow: 0 18px 36px rgba(24,163,108,.12);
}
.selection-card.is-active::after {
  content: '✓';
  color: #ffffff;
  background: linear-gradient(135deg, #16a36c, #38c884);
}
.select-shell select {
  min-height: 58px;
  border-width: 2px;
  font-size: 1rem;
  background: #ffffff;
}
.select-shell.is-filled select {
  border-color: rgba(24,163,108,.32);
  box-shadow: 0 0 0 4px rgba(24,163,108,.08);
}
.select-shell::after {
  right: 18px;
}
.proxy-builder-head {
  grid-template-columns: 1fr;
}
.proxy-steps {
  justify-content: flex-start;
}
@media (max-width: 720px) {
  .proxy-builder-form .field-meta {
    align-items: flex-start;
    flex-direction: column;
  }
  .selection-card {
    padding-inline-end: 56px;
  }
}


/* Header tools + language */
.header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(17,41,73,.10);
  box-shadow: 0 12px 24px rgba(18,47,85,.08);
}
.lang-pill {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 14px;
  min-width: 50px;
  font-weight: 900;
  color: #32506f;
  background: transparent;
  transition: .22s ease;
}
.lang-pill.active {
  color: #fff;
  background: linear-gradient(135deg, #3d83f6, #56c0ff);
  box-shadow: 0 12px 22px rgba(61,131,246,.24);
}

/* Social rail cleanup */
.social-rail {
  z-index: 55;
  gap: 10px;
}
.social-rail-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  min-width: 154px;
  padding-inline: 12px 16px;
}
.social-rail-link > span:last-child {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.social-icon {
  flex: 0 0 auto;
}

/* Loader fixed at bottom */
.main-content {
  position: relative;
}
.page-loader {
  position: fixed;
  left: 50%;
  bottom: 20px;
  top: auto;
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(14px);
  width: auto;
  height: auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(17,41,73,.08);
  box-shadow: 0 20px 42px rgba(17,41,73,.12);
  backdrop-filter: blur(12px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 70;
}
.page-loader.active {
  display: inline-flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.page-loader img {
  width: 48px;
  height: 48px;
}

/* Auth form first and spacing */
.auth-grid {
  align-items: start;
  gap: 24px;
}
.auth-card-main {
  order: 1;
}
.auth-side-brand,
.verify-side-brand {
  order: 2;
}

/* Buy page spacing */
.section-head + .proxy-builder-head {
  margin-top: 8px;
}
.proxy-builder-head {
  margin-bottom: 18px;
}
.proxy-builder-form {
  gap: 26px;
}
.proxy-builder-form .field-group {
  margin-bottom: 4px;
}
.proxy-selection-board {
  gap: 14px;
  margin-bottom: 8px;
}
.selection-card.is-active {
  border-color: rgba(24,163,108,.26);
  box-shadow: 0 18px 34px rgba(24,163,108,.13);
}
.selection-card.is-active::after {
  content: '✓';
  color: #fff;
  background: linear-gradient(180deg, #18a36c, #4ecb8d);
}

/* Arabic support */
body.lang-ar {
  direction: rtl;
}
body.lang-ar .brand,
body.lang-ar .brand-copy-wrap,
body.lang-ar .main-nav,
body.lang-ar .header-tools,
body.lang-ar .field-meta,
body.lang-ar .selection-card,
body.lang-ar .proxy-card-head,
body.lang-ar .inline-actions,
body.lang-ar .proxy-card-foot {
  direction: rtl;
}
body.lang-ar .social-rail {
  left: 22px;
  right: auto;
}
body.lang-ar .selection-card::after {
  left: 18px;
  right: auto;
}
body.lang-ar .proxy-builder-form .field-group::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

@media (max-width: 980px) {
  .header-tools {
    width: 100%;
    justify-content: space-between;
  }
  .language-switcher {
    margin-inline-start: auto;
  }
  .social-rail {
    position: fixed;
    right: 12px;
    left: auto;
    top: auto;
    bottom: 84px;
    transform: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0;
  }
  body.lang-ar .social-rail {
    left: 12px;
    right: auto;
  }
  .social-rail-link {
    min-width: 132px;
    padding: 10px 12px;
    font-size: .88rem;
  }
}

@media (max-width: 720px) {
  .site-header {
    top: 8px;
  }
  .brand-row {
    gap: 12px;
  }
  .brand-copy {
    display: none;
  }
  .header-tools {
    align-items: stretch;
    gap: 10px;
  }
  .main-nav {
    width: 100%;
    order: 2;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar {
    display: none;
  }
  .language-switcher {
    order: 1;
    align-self: flex-end;
  }
  .social-rail {
    bottom: 74px;
  }
  .social-rail-link {
    min-width: 120px;
    gap: 10px;
    border-radius: 16px;
  }
  .social-icon {
    width: 34px;
    height: 34px;
  }
  .auth-grid {
    gap: 18px;
  }
  .auth-card-main,
  .auth-side-brand,
  .verify-side-brand {
    order: initial;
  }
}


/* Final polish: compact professional header, better language position, mobile social toggle */
.site-header {
  overflow: visible;
}
.brand-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.25fr);
  align-items: center;
  gap: 18px 26px;
}
.brand {
  justify-self: start;
  text-align: start;
}
.header-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 16px;
}
.main-nav {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,249,255,.96));
  border: 1px solid rgba(17,41,73,.10);
  box-shadow: 0 16px 32px rgba(29, 54, 95, 0.09);
}
.main-nav.is-authenticated {
  max-width: 930px;
}
.main-nav a,
.auth-tab {
  min-height: 44px;
  padding: 10px 15px;
  font-size: .95rem;
  font-weight: 900;
  box-shadow: none;
}
.main-nav a {
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
}
.main-nav a.active,
.auth-tab.active {
  color: #0f2942;
  background: linear-gradient(135deg, #ffb44d, #ffd27a);
  box-shadow: 0 14px 26px rgba(255, 170, 61, 0.22);
}
.language-switcher {
  justify-self: end;
  align-self: start;
  position: relative;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,247,255,.96));
  border-color: rgba(17,41,73,.12);
}
.language-switcher::before {
  content: '🌐';
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(22,48,76,.06);
  font-size: 1rem;
}
.lang-pill {
  min-width: 48px;
  padding: 8px 13px;
}

.social-fab {
  display: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  position: fixed;
  right: 14px;
  bottom: 18px;
  z-index: 82;
  width: 56px;
  height: 56px;
  border-radius: 20px;
  color: #17304c;
  background: linear-gradient(135deg, #ffffff, #eef5ff);
  border: 1px solid rgba(17,41,73,.12);
  box-shadow: 0 18px 34px rgba(24, 47, 83, 0.16);
}
.social-fab-icon {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.social-fab-icon svg {
  width: 22px;
  height: 22px;
  transition: transform .24s ease;
}
body.social-open .social-fab {
  background: linear-gradient(135deg, #ffb44d, #ffd27a);
}
body.social-open .social-fab-icon svg {
  transform: rotate(45deg);
}

body.lang-ar .brand {
  justify-self: end;
  text-align: start;
}
body.lang-ar .header-tools {
  grid-template-columns: auto minmax(0, 1fr);
}
body.lang-ar .language-switcher {
  justify-self: start;
}
body.lang-ar .main-nav {
  justify-content: flex-start;
}
body.lang-ar .social-fab {
  left: 14px;
  right: auto;
}

.proxy-builder-head,
.proxy-selection-board {
  display: none !important;
}

@media (max-width: 1180px) {
  .brand-row {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .header-tools {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .main-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding-right: 12px;
  }
  .brand-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
  }
  .brand {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .header-tools {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .language-switcher {
    order: 1;
    justify-self: start;
    align-self: center;
  }
  .main-nav {
    order: 2;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px;
    border-radius: 20px;
  }
  .main-nav a {
    white-space: nowrap;
    min-height: 42px;
    padding: 10px 14px;
    font-size: .92rem;
  }
  .social-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .social-rail {
    right: 16px;
    left: auto;
    bottom: 84px;
    top: auto;
    transform: translateY(12px) scale(.96);
    opacity: 0;
    pointer-events: none;
    gap: 10px;
    transition: opacity .22s ease, transform .22s ease;
  }
  body.social-open .social-rail {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .social-rail-link {
    width: 54px;
    min-width: 54px;
    height: 54px;
    padding: 0;
    border-radius: 18px;
    justify-content: center;
  }
  .social-rail-link > span:last-child {
    display: none !important;
  }
  .social-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
  body.lang-ar .social-rail {
    left: 16px;
    right: auto;
  }
}


/* Final responsive toggles v2: desktop/mobile unified social + header dropdown + smoother scrolling */
html, body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.site-header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(255,255,255,.98) !important;
  will-change: transform;
  transform: translateZ(0);
  box-shadow: 0 10px 24px rgba(26, 54, 95, 0.10) !important;
}
.site-header.header-hidden {
  transform: translate3d(0, calc(-100% - 18px), 0);
  opacity: 1;
}
.brand-row {
  grid-template-columns: minmax(260px,1fr) auto;
  align-items: center;
}
.header-tools {
  grid-template-columns: 1fr;
  gap: 10px;
  justify-items: end;
  position: relative;
}
.header-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.language-switcher {
  justify-self: auto;
  align-self: auto;
  margin: 0;
  box-shadow: 0 10px 20px rgba(20,47,84,.08);
}
.menu-toggle {
  appearance: none;
  border: 1px solid rgba(17,41,73,.10);
  background: linear-gradient(180deg, #ffffff, #f3f7ff);
  color: var(--text);
  border-radius: 999px;
  min-height: 46px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(20,47,84,.08);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(20,47,84,.12);
}
.menu-toggle-icon {
  width: 18px;
  height: 14px;
  display: inline-grid;
  align-content: space-between;
}
.menu-toggle-icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
body.nav-open .menu-toggle-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .menu-toggle-icon span:nth-child(2) { opacity: 0; }
body.nav-open .menu-toggle-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-toggle-label { line-height: 1; }
.main-nav {
  position: absolute;
  top: calc(100% + 12px);
  inset-inline-end: 0;
  width: min(560px, calc(100vw - 40px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255,255,255,.99);
  border: 1px solid rgba(17,41,73,.10);
  box-shadow: 0 20px 42px rgba(24, 51, 90, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 45;
}
.main-nav.is-authenticated {
  width: min(760px, calc(100vw - 40px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.nav-open .main-nav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.main-nav a,
.auth-tab {
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 46px;
}
body.lang-ar .header-tools {
  justify-items: start;
}
body.lang-ar .header-toolbar {
  flex-direction: row-reverse;
}
body.lang-ar .main-nav {
  inset-inline-end: auto;
  inset-inline-start: 0;
}
.social-fab {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  min-width: 58px;
  height: 58px;
  padding: 0 16px;
  border-radius: 999px;
  bottom: 18px;
  right: 18px;
}
.social-fab-label {
  font-weight: 900;
  white-space: nowrap;
}
.social-fab-icon svg {
  width: 22px;
  height: 22px;
  transition: transform .22s ease;
}
body.social-open .social-fab-icon svg {
  transform: scale(0.92);
}
.social-rail {
  right: 18px !important;
  left: auto !important;
  top: auto !important;
  bottom: 86px !important;
  transform: translateY(12px) scale(.96);
  opacity: 0;
  pointer-events: none;
  display: grid;
  gap: 10px;
  transition: opacity .18s ease, transform .18s ease;
}
body.social-open .social-rail {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.social-rail-link {
  width: 56px !important;
  min-width: 56px !important;
  height: 56px;
  padding: 0 !important;
  border-radius: 18px !important;
  justify-content: center !important;
  position: relative;
}
.social-rail-link > span:last-child {
  display: none !important;
}
.social-rail-link::after {
  content: attr(aria-label);
  position: absolute;
  inset-inline-end: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(22,48,76,.94);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(22,48,76,.18);
}
.social-rail-link:hover::after {
  opacity: 1;
}
body.lang-ar .social-fab {
  left: 18px;
  right: auto;
}
body.lang-ar .social-rail {
  left: 18px !important;
  right: auto !important;
}
body.lang-ar .social-rail-link::after {
  inset-inline-end: auto;
  inset-inline-start: calc(100% + 10px);
}
@media (max-width: 900px) {
  .brand-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .brand-copy { display: none; }
  .main-nav,
  .main-nav.is-authenticated {
    width: min(460px, calc(100vw - 28px));
    grid-template-columns: 1fr;
  }
  .social-fab {
    padding: 0 14px;
    min-width: 54px;
    height: 54px;
  }
  .social-fab-label {
    font-size: .9rem;
  }
}
@media (max-width: 640px) {
  .app-shell { padding-right: 10px; width: min(calc(100% - 20px), calc(var(--container) + 20px)); }
  .brand-row { grid-template-columns: 1fr auto; }
  .header-tools { width: auto; }
  .header-toolbar { gap: 8px; }
  .menu-toggle { padding: 8px 12px; min-height: 44px; }
  .menu-toggle-label { display: none; }
  .language-switcher::before { width: 30px; height: 30px; }
  .lang-pill { min-width: 42px; padding: 8px 10px; }
  .main-nav,
  .main-nav.is-authenticated {
    top: calc(100% + 10px);
    width: min(360px, calc(100vw - 20px));
    padding: 12px;
    border-radius: 20px;
  }
  .main-nav a { min-height: 44px; font-size: .93rem; }
  .social-fab { bottom: 16px; right: 12px; left: auto; }
  .social-fab-label { display: none; }
  .social-rail { right: 12px !important; bottom: 78px !important; }
  body.lang-ar .social-fab { left: 12px; right: auto; }
  body.lang-ar .social-rail { left: 12px !important; right: auto !important; }
}


.proxy-access-panel {
  display: grid;
  gap: 18px;
  margin: 16px 0 22px;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,250,255,.97));
  border: 1px solid rgba(17,41,73,.08);
  box-shadow: 0 16px 36px rgba(25, 48, 83, 0.08);
}
.proxy-access-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.proxy-access-head h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
}
.proxy-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.proxy-access-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(244,247,253,.95);
  border: 1px solid rgba(17,41,73,.08);
}
.proxy-access-row.full-span {
  grid-column: 1 / -1;
}
.proxy-access-label {
  font-size: .9rem;
  font-weight: 900;
  color: #48607a;
}
.proxy-access-value {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(17,41,73,.08);
  color: var(--text);
  font-weight: 800;
  line-height: 1.7;
  white-space: nowrap;
  overflow-x: auto;
}
.copy-btn {
  appearance: none;
  border: 1px solid rgba(17,41,73,.10);
  background: linear-gradient(135deg, rgba(34,199,255,.10), rgba(123,97,255,.10));
  color: var(--text);
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
}
.copy-btn.is-copied {
  background: linear-gradient(135deg, rgba(22,163,108,.16), rgba(104,226,156,.16));
  border-color: rgba(22,163,108,.30);
  color: #0f7b50;
}
.copy-all-btn {
  min-height: 46px;
}
.proxy-meta-details {
  margin-top: 14px;
}
.proxy-meta-details > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(245,248,252,.9);
}
.proxy-meta-details span::before {
  display: none;
}
@media (max-width: 900px) {
  .proxy-access-grid {
    grid-template-columns: 1fr;
  }
  .proxy-access-row,
  .proxy-access-row.full-span {
    grid-template-columns: 1fr;
  }
  .proxy-access-row .copy-btn {
    width: 100%;
  }
}
body.lang-ar .proxy-access-row {
  grid-template-columns: auto minmax(0, 1fr) 110px;
}
body.lang-ar .proxy-access-label {
  text-align: right;
}
@media (max-width: 900px) {
  body.lang-ar .proxy-access-row {
    grid-template-columns: 1fr;
  }
}

.proxy-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.proxy-open-meta {
  margin-top: 4px;
}
.spacious-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 8px;
}
.proxy-list-shell {
  padding: 18px;
}
.proxy-string-list {
  display: grid;
  gap: 14px;
}
.proxy-string-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(246,250,255,.96));
  border: 1px solid rgba(17,41,73,.08);
  box-shadow: 0 14px 30px rgba(20,46,78,.07);
}
.proxy-string-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.proxy-string-topline {
  min-width: 0;
}
.proxy-inline-string {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(17,41,73,.08);
  color: var(--text);
  font-weight: 800;
  line-height: 1.9;
  white-space: nowrap;
  overflow-x: auto;
  font-size: .98rem;
}
.proxy-string-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.proxy-string-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(243,247,253,.96);
  border: 1px solid rgba(17,41,73,.07);
  color: #425873;
  font-weight: 700;
}
.proxy-string-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.emphasis-row {
  background: linear-gradient(135deg, rgba(74,164,255,.08), rgba(86,214,164,.12));
  border-color: rgba(35,104,168,.12);
}
.big-value {
  font-size: 1.02rem;
  line-height: 1.95;
}
@media (max-width: 900px) {
  .proxy-string-row {
    grid-template-columns: 1fr;
  }
  .proxy-string-actions {
    justify-content: stretch;
  }
  .proxy-string-actions .btn,
  .proxy-string-actions .copy-btn {
    flex: 1 1 160px;
  }
  .proxy-access-actions {
    width: 100%;
  }
  .proxy-access-actions > * {
    flex: 1 1 180px;
  }
}
body.lang-ar .proxy-string-actions {
  justify-content: flex-start;
}


@media (max-width: 720px) {
  .proxy-string-actions .btn,
  .proxy-string-actions .copy-btn {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: .86rem;
    flex: 0 0 auto;
  }
  .proxy-string-actions {
    gap: 8px;
  }
  .proxy-access-row .copy-btn,
  .proxy-access-actions .copy-btn,
  .proxy-open-actions .btn,
  .proxy-edit-tools .btn {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: .86rem;
  }
}

.compact-section-head {
  margin-bottom: 18px;
}

.stacked-select-only {
  grid-template-columns: 1fr;
  gap: 18px;
}

.stacked-select-only .field-group {
  max-width: 780px;
}

.proxy-meta-details strong {
  display: inline-block;
  margin-inline-start: 16px;
  font-weight: 900;
}

.proxy-access-row {
  gap: 18px;
}

.proxy-access-label {
  min-width: 110px;
}

.proxy-access-value {
  padding: 13px 16px;
}

@media (max-width: 720px) {
  .stacked-select-only .field-group {
    max-width: 100%;
  }
}


/* Header auth cleanup: remove floating logout and keep logout inside the menu */
.nav-logout-form {
  margin: 0;
  width: 100%;
}
.nav-logout-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid rgba(17,41,73,.10);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.nav-logout-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(214, 61, 73, .25);
  background: linear-gradient(180deg, #fff6f7, #fff1f3);
  box-shadow: 0 12px 24px rgba(214, 61, 73, .10);
}
.nav-logout-btn:active {
  transform: translateY(0);
}
.floating-logout {
  display: none !important;
}
@media (max-width: 640px) {
  .nav-logout-btn {
    min-height: 44px;
    font-size: .93rem;
  }
}


.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(255,255,255,.75);
}
.status-green { background: #16a34a; }
.status-yellow { background: #f59e0b; }
.status-red { background: #ef4444; }
.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.inject-ip-preview {
  color: #4a637d;
  font-weight: 700;
  font-size: .92rem;
}
.allowed-ips-row {
  align-items: stretch;
}
.allowed-ips-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.allowed-ips-heading {
  display: block;
  margin-bottom: 0;
}
.allowed-ips-row .proxy-access-value {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 56px;
}
.allowed-ips-row .proxy-access-value.is-empty {
  color: #6b7b90;
  font-style: normal;
}
@media (max-width: 900px) {
  .allowed-ips-row {
    grid-template-columns: 1fr;
  }
}
.field-group.is-hidden {
  display: none !important;
}
.proxy-string-row.is-inject-row {
  border-color: rgba(16,185,129,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(240,255,249,.98));
}
[data-inject-ips-group] textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17,41,73,.10);
  background: #fff;
  font: inherit;
  color: var(--text);
  resize: vertical;
}
.readonly-group input[readonly] {
  background: rgba(244,248,253,.95);
}


.partial-edit-grid .field-group .field-note {
  min-height: 2.8em;
}

.partial-edit-grid .field-group input[type="text"],
.partial-edit-grid .field-group textarea,
.partial-edit-grid .field-group select {
  background: #fff;
}

.partial-edit-grid .field-group[data-auth-group="password"] {
  margin-top: .15rem;
}

.partial-edit-grid .field-group.is-complete {
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.08);
}


.form-message-inline{display:none;margin:0 0 18px;padding:14px 16px;border-radius:16px;font-size:14px;line-height:1.7;font-weight:700}
.form-message-inline.active{display:block}
.form-message-inline.is-error{background:#fff4f4;border:1px solid rgba(211,72,86,.18);color:#9f2332;box-shadow:0 10px 30px rgba(159,35,50,.06)}
.form-message-inline.is-success{background:#f4fff7;border:1px solid rgba(36,160,92,.16);color:#1a7a48}

/* Desktop polish for edit submit button */
.proxy-builder-form > .btn-primary {
  grid-column: 1 / -1;
  justify-self: start;
  align-self: start;
  width: auto;
  min-width: 180px;
  max-width: 220px;
  min-height: 46px;
  padding: 0 18px;
  margin-top: 8px;
}

@media (min-width: 981px) {
  .proxy-builder-form > .btn-primary {
    font-size: 0.96rem;
    border-radius: 14px;
  }
}
