/* TUNNEL GO VPN Grid + Protocol Checkout */
html, body {
  min-height: 100%;
  background: #081121;
  overscroll-behavior-y: none;
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(78, 70, 229, .20), transparent 26rem),
    radial-gradient(circle at 80% 18%, rgba(56, 189, 248, .11), transparent 24rem),
    linear-gradient(180deg, #080d1d 0%, #0b1425 44%, #081121 100%);
}

.vpn-main {
  background:
    radial-gradient(circle at 70% 0%, rgba(99,102,241,.12), transparent 28rem),
    linear-gradient(180deg, rgba(8,13,29,.82), rgba(8,17,33,.98));
  min-height: 100vh;
}

.mobile-menu-button { display: none; }

.vpn-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0 20px;
}

.vpn-title {
  margin: 8px 0 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: .92;
  letter-spacing: -.075em;
  font-weight: 1000;
  color: #fff;
}

.vpn-subtitle {
  margin: 12px 0 0;
  color: #94a3b8;
  line-height: 1.75;
  max-width: 720px;
}

.vpn-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vpn-filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, .6fr) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 28px;
  background: rgba(15, 23, 42, .54);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
  margin-bottom: 16px;
}

.vpn-status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.vpn-status-row .stat-card {
  background: rgba(15, 23, 42, .56);
  border-color: rgba(148, 163, 184, .16);
}

.vpn-server-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.vpn-server-card {
  position: relative;
  min-height: 260px;
  border-radius: 34px;
  padding: 26px 24px;
  border: 1px solid rgba(148, 163, 184, .13);
  background:
    radial-gradient(circle at 76% 0%, rgba(99,102,241,.10), transparent 12rem),
    linear-gradient(180deg, rgba(30,41,59,.86), rgba(15,23,42,.88));
  box-shadow: 0 18px 50px rgba(0,0,0,.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
  overflow: hidden;
}

.vpn-server-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, .45);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}

.vpn-server-card.offline,
.vpn-server-card.full {
  opacity: .62;
  filter: saturate(.72);
}

.vpn-server-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(2, 6, 23, .34);
  border: 1px solid rgba(148, 163, 184, .20);
  color: #766bff;
  font-size: 32px;
  box-shadow: inset 0 0 20px rgba(99,102,241,.10);
}

.vpn-server-dot {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 18px rgba(34,197,94,.5);
}

.vpn-server-dot.warn { background: #f59e0b; box-shadow: 0 0 18px rgba(245,158,11,.45); }
.vpn-server-dot.danger { background: #ef4444; box-shadow: 0 0 18px rgba(239,68,68,.45); }

.vpn-server-name {
  margin: 28px 0 0;
  color: #fff;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.12;
  letter-spacing: -.045em;
  font-weight: 1000;
  text-transform: uppercase;
}

.vpn-server-location {
  margin-top: 12px;
  color: #7d8798;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.vpn-server-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.vpn-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(148,163,184,.14);
  color: #a7b0c0;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vpn-server-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}

.vpn-price-label {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.vpn-price {
  display: block;
  margin-top: 4px;
  color: #908bff;
  font-size: 26px;
  font-weight: 1000;
  letter-spacing: -.05em;
}

.vpn-choose {
  min-width: 108px;
}

.vpn-server-card.offline .vpn-choose,
.vpn-server-card.full .vpn-choose {
  pointer-events: none;
  opacity: .62;
}

.vpn-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  border: 1px dashed rgba(148,163,184,.25);
  border-radius: 30px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 900;
  background: rgba(15,23,42,.34);
}

.vpn-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 22px 0 0;
  flex-wrap: wrap;
}

.vpn-page-button {
  min-width: 42px;
  min-height: 42px;
  border-radius: 15px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(15,23,42,.60);
  color: #cbd5e1;
  font-weight: 950;
}

.vpn-page-button.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  border-color: transparent;
}

.vpn-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.vpn-modal.show { display: flex; }

.vpn-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(12px);
}

.vpn-modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 34px;
  border: 1px solid rgba(148,163,184,.18);
  background:
    radial-gradient(circle at 80% 0%, rgba(99,102,241,.14), transparent 18rem),
    linear-gradient(180deg, #111827 0%, #0f172a 100%);
  color: #fff;
  box-shadow: 0 30px 100px rgba(0,0,0,.46);
  padding: 26px;
}

.vpn-modal-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  letter-spacing: -.06em;
  font-weight: 1000;
}

.vpn-modal-sub {
  margin: 10px 0 0;
  color: #94a3b8;
  line-height: 1.7;
}

.vpn-protocols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.vpn-protocol {
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  padding: 13px 12px;
  background: rgba(255,255,255,.04);
  color: #cbd5e1;
  font-weight: 1000;
  letter-spacing: .04em;
}

.vpn-protocol.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(37,99,235,.86), rgba(124,58,237,.86));
  border-color: transparent;
}

.vpn-order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.vpn-field {
  display: grid;
  gap: 7px;
}

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

.vpn-field label {
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 1000;
}

.vpn-input,
.vpn-select {
  width: 100%;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(2,6,23,.36);
  color: #fff;
  border-radius: 17px;
  padding: 13px 14px;
  outline: none;
}

.vpn-input:focus,
.vpn-select:focus {
  border-color: rgba(129,140,248,.72);
  box-shadow: 0 0 0 4px rgba(99,102,241,.18);
}

.vpn-summary {
  margin-top: 18px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 24px;
  background: rgba(255,255,255,.04);
  padding: 16px;
}

.vpn-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #a7b0c0;
  padding: 7px 0;
}

.vpn-summary-row strong {
  color: #fff;
  text-align: right;
}

.vpn-summary-row.total {
  border-top: 1px solid rgba(148,163,184,.16);
  margin-top: 6px;
  padding-top: 13px;
  font-size: 18px;
}

.vpn-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.vpn-result-box {
  margin-top: 16px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 24px;
  background: rgba(2,6,23,.34);
  padding: 16px;
}

.vpn-copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148,163,184,.12);
}

.vpn-copy-row:last-child { border-bottom: 0; }

.vpn-copy-key {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.vpn-copy-value {
  color: #fff;
  margin-top: 3px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.vpn-output-text {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  color: #e5e7eb;
  background: rgba(2,6,23,.62);
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}

.vpn-toast {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 160;
  transform: translateX(-50%) translateY(-14px);
  opacity: 0;
  pointer-events: none;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 950;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  transition: .18s ease;
}

.vpn-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.vpn-toast.error { background: #991b1b; }
.vpn-toast.warn { background: #92400e; }
.vpn-toast.ok { background: #166534; }

.vpn-drawer { display: none; }

@media(max-width: 1240px) {
  .vpn-server-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media(max-width: 1040px) {
  .mobile-menu-button { display: inline-flex; }
  .vpn-server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vpn-status-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vpn-drawer {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: none;
  }
  .vpn-drawer.show { display: block; }
  .vpn-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2,6,23,.68);
    backdrop-filter: blur(8px);
  }
  .vpn-drawer-panel {
    position: relative;
    width: min(330px, 88vw);
    height: 100%;
    padding: 22px;
    background: #0f172a;
    border-right: 1px solid rgba(148,163,184,.16);
    box-shadow: 0 30px 90px rgba(0,0,0,.4);
  }
  .vpn-drawer-nav {
    display: grid;
    gap: 8px;
    margin-top: 22px;
  }
  .vpn-drawer-nav a,
  .vpn-drawer-nav button {
    border: 0;
    text-align: left;
    background: rgba(255,255,255,.04);
    color: #cbd5e1;
    border-radius: 16px;
    padding: 13px 14px;
    font-weight: 950;
  }
}

@media(max-width: 760px) {
  .vpn-main { padding-bottom: 34px; }
  .vpn-page-head { display: block; }
  .vpn-head-actions { justify-content: flex-start; margin-top: 14px; }
  .vpn-filter-card { grid-template-columns: 1fr; }
  .vpn-status-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vpn-server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .vpn-server-card { min-height: 235px; border-radius: 28px; padding: 22px 20px; }
  .vpn-server-icon { width: 58px; height: 58px; }
  .vpn-server-name { font-size: 21px; }
  .vpn-server-location { font-size: 12px; }
  .vpn-server-bottom { display: block; }
  .vpn-choose { width: 100%; margin-top: 12px; }
  .vpn-protocols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vpn-order-grid { grid-template-columns: 1fr; }
  .vpn-field.full { grid-column: auto; }
  .vpn-modal-card { border-radius: 28px; padding: 22px; }
  .vpn-modal-actions .btn { width: 100%; }
}

@media(max-width: 430px) {
  .vpn-server-grid { gap: 12px; }
  .vpn-server-card { min-height: 220px; padding: 18px 16px; }
  .vpn-server-icon { width: 52px; height: 52px; border-radius: 17px; }
  .vpn-server-name { font-size: 18px; }
  .vpn-price { font-size: 22px; }
}


/* HOTFIX: checkout only shows user-required fields */
.vpn-form-section{margin-top:18px;display:grid;gap:14px}
.vpn-order-grid.clean{grid-template-columns:1fr}
.vpn-duration-row{display:grid;grid-template-columns:minmax(0,1fr) 132px;gap:10px;align-items:end}
.vpn-duration-presets{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.vpn-preset{min-height:36px;border-radius:999px;border:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.04);color:#cbd5e1;padding:8px 12px;font-weight:950;font-size:12px}
.vpn-preset.active,.vpn-preset:hover{color:#fff;border-color:transparent;background:linear-gradient(135deg,rgba(37,99,235,.86),rgba(124,58,237,.86))}
.vpn-estimate-note{display:block;margin-top:8px;color:#94a3b8;font-size:12px;line-height:1.55}
.vpn-summary-row.muted strong,.vpn-summary-row.muted span{color:#94a3b8}
.vpn-loading{opacity:.68;pointer-events:none}
@media(max-width:760px){.vpn-duration-row{grid-template-columns:1fr}}

/* FRONTEND STAGE 3: Professional VPN user order flow */
.vpn-protocol-preview{display:flex;flex-wrap:wrap;gap:6px;margin-top:16px}
.protocol-mini{display:inline-flex;align-items:center;justify-content:center;min-width:34px;padding:5px 7px;border-radius:999px;border:1px solid rgba(148,163,184,.14);font-size:9px;font-weight:1000;letter-spacing:.08em;color:#94a3b8;background:rgba(255,255,255,.035)}
.protocol-mini.on{color:#dbeafe;border-color:rgba(59,130,246,.28);background:rgba(37,99,235,.13)}
.protocol-mini.off{color:#64748b;text-decoration:line-through;opacity:.62}
.danger-chip{color:#fecaca!important;border-color:rgba(239,68,68,.28)!important;background:rgba(127,29,29,.20)!important}
.vpn-checkout-card{width:min(940px,100%)}
.vpn-checkout-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.vpn-stepper{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:18px}
.vpn-stepper span{border:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.04);color:#94a3b8;border-radius:999px;padding:9px 10px;font-size:11px;font-weight:1000;text-align:center;text-transform:uppercase;letter-spacing:.08em}
.vpn-stepper span.active{color:#fff;border-color:transparent;background:linear-gradient(135deg,rgba(37,99,235,.88),rgba(124,58,237,.88))}
.vpn-server-strip{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.vpn-server-strip span{border-radius:999px;padding:8px 10px;background:rgba(2,6,23,.38);border:1px solid rgba(148,163,184,.16);color:#cbd5e1;font-size:11px;font-weight:1000;letter-spacing:.08em}
.section-title{margin:0;color:#fff;font-size:13px;letter-spacing:.12em;text-transform:uppercase;font-weight:1000}
.vpn-protocols.pro{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:10px}
.vpn-protocol{display:grid;gap:5px;text-align:left;min-height:58px;cursor:pointer}
.vpn-protocol small{display:block;color:#fecaca;font-size:10px;font-weight:900;letter-spacing:0;text-transform:none}
.vpn-protocol.disabled{opacity:.54;cursor:not-allowed;background:rgba(127,29,29,.13);border-color:rgba(239,68,68,.22)}
.vpn-protocol-hint{margin:8px 0 0;color:#94a3b8;font-size:12px;line-height:1.55}
.vpn-result-card{width:min(860px,100%)}
.vpn-copy-row.important{border-radius:18px;margin:8px 0;padding:12px;background:rgba(37,99,235,.09);border:1px solid rgba(59,130,246,.20)}
.vpn-server-card .btn[disabled],.vpn-protocol[disabled]{filter:saturate(.7);opacity:.62}
@media(max-width:760px){.vpn-checkout-head{display:block}.vpn-checkout-head .btn{margin-top:12px;width:100%}.vpn-stepper{grid-template-columns:1fr}.vpn-protocols.pro{grid-template-columns:1fr}.vpn-server-strip span{width:100%;text-align:center}.vpn-copy-row{grid-template-columns:1fr}.vpn-copy-row .btn{width:100%}}


/* Stage 3 - bot-style VPN output and copy UX */
.vpn-result-card{width:min(940px,100%)}
.vpn-copy-value.mono,.vpn-output-text{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;line-height:1.55}
.vpn-copy-row.important.payload{background:linear-gradient(135deg,rgba(34,211,238,.12),rgba(59,130,246,.08));border-color:rgba(34,211,238,.28)}
.vpn-copy-row.important.tls,.vpn-copy-row.important.ntls,.vpn-copy-row.important.grpc{background:linear-gradient(135deg,rgba(124,58,237,.12),rgba(34,211,238,.07));border-color:rgba(124,58,237,.24)}
.vpn-copy-row .vpn-copy-value{word-break:break-word;white-space:pre-wrap;max-height:140px;overflow:auto;padding-right:4px}
.vpn-output-text{min-height:220px;white-space:pre;resize:vertical;background:rgba(2,6,23,.72);border:1px solid rgba(148,163,184,.18);color:#dbeafe;border-radius:18px;padding:14px;width:100%;box-sizing:border-box}
@media(max-width:760px){.vpn-result-card{max-height:92vh;overflow:auto}.vpn-copy-row.important .vpn-copy-value{max-height:180px}.vpn-output-text{min-height:260px;font-size:12px}}
