/* ===== PlomVPN Mini App — calm dark theme (blue) ===== */
:root {
  --color-background: #0a0a0c;
  --color-foreground: #f4f5f7;
  --color-primary: #3390ec;
  --color-accent: #4ea4f0;
  --brand-primary-rgb: 51 144 236;
  --brand-accent-rgb: 78 164 240;
  --brand-cta-from: #4a9bf0;
  --brand-cta-to: #2f7fd6;
  --brand-cta-foreground: #ffffff;
  --color-success: #38e0a5;
  --color-destructive: #f0656a;
  --text-muted: #8a8c93;
  --text-faint: #6b6d74;

  --calm-card: linear-gradient(168deg, #1a1b1e, #151517);
  --calm-card-hero: linear-gradient(168deg, #1c1e22, #141518);
  --calm-card-border: rgba(255, 255, 255, 0.06);
  --calm-card-border-strong: rgba(255, 255, 255, 0.08);
  --calm-card-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --calm-cta: linear-gradient(180deg, var(--brand-cta-from), var(--brand-cta-to));
  --calm-cta-shadow: 0 14px 30px -12px rgb(var(--brand-primary-rgb) / .75), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  --calm-track: rgba(255, 255, 255, 0.07);
  --calm-bar-green: linear-gradient(90deg, #2bbd86, #38e0a5);
  --calm-bar-orange: linear-gradient(90deg, var(--brand-cta-to), var(--color-accent));
  --calm-nav-bg: rgba(10, 10, 12, 0.78);
  --calm-nav-border: rgba(255, 255, 255, 0.09);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

#root { min-height: 100vh; }
.page { max-width: 430px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) 16px 120px; }

/* ---------- views ---------- */
.view { display: none; animation: enter-soft .25s cubic-bezier(.16,1,.3,1); }
.view.active { display: block; }
@keyframes enter-soft { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }

.view-title { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
.view-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; }
.hint { color: var(--text-faint); font-size: 11px; line-height: 1.45; margin-top: 12px; }
.hint.center { text-align: center; }
.mono-label { font-size: 10px; letter-spacing: .4px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px; }

/* ---------- cards ---------- */
.calm-card, .calm-card-hero {
  background: var(--calm-card);
  border: 1px solid var(--calm-card-border);
  border-radius: 24px;
}
.calm-card-hero { background: var(--calm-card-hero); border-color: var(--calm-card-border-strong); box-shadow: var(--calm-card-shadow); }

.hero-card { position: relative; overflow: hidden; padding: 22px; margin-bottom: 14px; }
.hero-glow {
  position: absolute; top: -120px; right: -120px; width: 250px; height: 250px;
  border-radius: 50%; background: var(--color-primary);
  filter: blur(80px); opacity: .18; pointer-events: none;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 20px; position: relative; z-index: 1; }
.plan-name { font-size: 23px; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge--active { background: rgba(56, 224, 165, .12); color: var(--color-success); }
.badge--active .dot { background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.badge--expired { background: rgba(240, 101, 106, .12); color: var(--color-destructive); }
.badge--expired .dot { background: var(--color-destructive); box-shadow: 0 0 6px var(--color-destructive); }
.badge--loading { background: rgba(255, 255, 255, .08); color: var(--text-muted); }
.badge--loading .dot { background: var(--text-muted); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.bars { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; position: relative; z-index: 1; }
.bar-labels { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 9px; color: var(--text-muted); }
.bar-labels b { color: var(--color-foreground); font-variant-numeric: tabular-nums; }
.track { height: 7px; border-radius: 999px; background: var(--calm-track); overflow: hidden; }
.bar { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.7,.2,1); transform-origin: left; animation: bar-grow .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes bar-grow { from { transform: scaleX(0);} to { transform: none;} }
.bar-green { background: var(--calm-bar-green); box-shadow: 0 0 10px rgba(56, 224, 165, .5); }
.bar-orange { background: var(--calm-bar-orange); box-shadow: 0 0 10px rgba(78, 164, 240, .5); }

.sub-url-box {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .035);
  margin-bottom: 16px; position: relative; z-index: 1;
}
.sub-url-icon { font-size: 17px; }
.sub-url-text { flex: 1; min-width: 0; }
.sub-url-title { font-size: 12px; font-weight: 600; }
.sub-url-value { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
.icon-btn { background: rgb(var(--brand-primary-rgb) / .12); border: none; border-radius: 10px; width: 36px; height: 36px; font-size: 15px; cursor: pointer; transition: transform .15s; }
.icon-btn:active { transform: scale(.92); }

.cta {
  width: 100%; padding: 15px; border: none; border-radius: 16px;
  background: var(--calm-cta); box-shadow: var(--calm-cta-shadow);
  color: var(--brand-cta-foreground); font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: transform .15s; position: relative; z-index: 1;
}
.cta:active { transform: scale(.98); }
.cta.small { width: auto; padding: 10px 18px; font-size: 13px; }

.actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.action-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 4px; border-radius: 16px;
  background: var(--calm-card); border: 1px solid var(--calm-card-border);
  color: #c2c4ca; font-size: 11px; font-weight: 600; cursor: pointer;
  transition: transform .15s;
}
.action-card:active { transform: scale(.96); }
.action-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgb(var(--brand-primary-rgb) / .12); font-size: 18px;
}
.action-icon.big { width: 44px; height: 44px; font-size: 20px; }

.servers-card { display: block; padding: 20px; text-decoration: none; color: inherit; cursor: pointer; }
.servers-head { display: flex; align-items: center; gap: 12px; }
.servers-info { flex: 1; }
.servers-count { font-weight: 700; font-size: 15px; }
.servers-count b { font-size: 17px; }
.chev { color: var(--text-muted); font-size: 22px; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.flag {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .04); font-size: 17px;
}

/* ---------- plans ---------- */
.plans-list { display: flex; flex-direction: column; gap: 10px; }
.plan-card {
  position: relative; padding: 18px; border-radius: 20px;
  background: var(--calm-card); border: 1px solid var(--calm-card-border);
  cursor: pointer; transition: transform .15s, border-color .2s;
}
.plan-card:active { transform: scale(.98); }
.plan-card.featured { border-color: rgb(var(--brand-primary-rgb) / .45); }
.plan-head { display: flex; justify-content: space-between; align-items: center; }
.plan-title { font-size: 16px; font-weight: 700; }
.plan-days { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.plan-price { font-size: 19px; font-weight: 800; white-space: nowrap; }
.plan-badge {
  position: absolute; top: -8px; right: 14px;
  background: var(--calm-cta); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .3px;
  padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 6px 14px -6px rgb(var(--brand-primary-rgb) / .8);
}
.plan-buttons { display: flex; gap: 8px; margin-top: 14px; }
.plan-pay {
  flex: 1; padding: 11px; border-radius: 12px; border: none; cursor: pointer;
  background: var(--calm-cta); color: #fff;
  font-size: 13px; font-weight: 700; transition: transform .15s;
  box-shadow: 0 8px 18px -10px rgb(var(--brand-primary-rgb) / .9);
}
.plan-pay:active { transform: scale(.96); }
.plan-pay.alt {
  background: rgba(255, 255, 255, .07); color: var(--color-foreground);
  box-shadow: none;
}

/* ---------- referral / profile ---------- */
.ref-card, .profile-card { padding: 22px; }
.ref-stat { text-align: center; margin-bottom: 18px; }
.ref-num { font-size: 42px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.ref-link-box { display: flex; flex-direction: column; gap: 10px; }
.ref-link-box code {
  display: block; padding: 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  font-size: 12px; word-break: break-all; color: #c2c4ca;
}
.profile-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 14px; }
.profile-row:last-child { border-bottom: none; }
.profile-row span { color: var(--text-muted); }
.danger-btn {
  width: 100%; margin-top: 12px; padding: 14px; border-radius: 16px;
  background: rgba(240, 101, 106, .1); border: 1px solid rgba(240, 101, 106, .25);
  color: var(--color-destructive); font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  display: flex; gap: 2px; padding: 6px; border-radius: 999px;
  background: var(--calm-nav-bg); border: 1px solid var(--calm-nav-border);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12);
  z-index: 50;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 64px; padding: 8px 14px; border-radius: 999px;
  background: transparent; border: none; cursor: pointer;
  color: rgba(255, 255, 255, .5); transition: all .2s;
}
.nav-item span { font-size: 18px; }
.nav-item label { font-size: 10px; font-weight: 600; cursor: pointer; }
.nav-item.active { background: rgb(var(--brand-primary-rgb) / .2); color: var(--color-accent); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px);
  background: #212327; border: 1px solid rgba(255, 255, 255, .1);
  color: var(--color-foreground); font-size: 13px; font-weight: 600;
  padding: 12px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 99;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton { color: var(--text-faint); }

/* ---------- svg icons (accent color on tinted bg) ---------- */
.action-icon svg, .list-icon svg, .home-device-icon svg {
  width: 18px; height: 18px;
  color: var(--color-accent);
}
.list-icon svg { width: 17px; height: 17px; }

/* ---------- activity (journal) ---------- */
.filter-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.filter-chip {
  padding: 8px 16px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .06); color: var(--text-muted);
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  transition: all .2s;
}
.filter-chip.active {
  background: var(--calm-cta); color: #fff;
  box-shadow: 0 6px 14px -6px rgb(var(--brand-primary-rgb) / .8);
}
.act-card { padding: 13px 16px; margin-bottom: 8px; }
.act-row { display: flex; align-items: center; gap: 12px; }
.act-check { color: var(--color-success); flex-shrink: 0; display: inline-flex; }
.act-check svg { width: 22px; height: 22px; }
.act-info { flex: 1; min-width: 0; }
.act-device { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-ip { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.act-when { font-size: 11px; color: var(--text-faint); white-space: nowrap; }

/* ---------- home devices ---------- */
.devices-card { padding: 18px; margin-bottom: 14px; }
.devices-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.devices-head h3 { font-size: 15px; font-weight: 700; }
.manage-link {
  background: transparent; border: none; cursor: pointer;
  color: var(--color-accent); font-size: 13px; font-weight: 600;
}
.home-device-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 14px;
  background: rgba(255, 255, 255, .03); margin-bottom: 8px;
}
.home-device-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgb(var(--brand-primary-rgb) / .12); color: var(--color-accent);
}
.home-device-icon svg { width: 17px; height: 17px; }
.home-device-info { flex: 1; min-width: 0; }
.home-device-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-device-status { font-size: 11px; color: var(--color-success); margin-top: 2px; }
.home-device-status.off { color: var(--color-destructive); }

/* ---------- topup ---------- */
.amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.amount-chip {
  padding: 14px; border-radius: 14px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .05); color: var(--color-foreground);
  font-size: 14px; font-weight: 700; transition: all .2s;
}
.amount-chip.active {
  background: var(--calm-cta); color: #fff;
  box-shadow: 0 8px 18px -8px rgb(var(--brand-primary-rgb) / .9);
}
.amount-input {
  width: 100%; padding: 13px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
  color: var(--color-foreground); font-size: 14px; outline: none;
  margin-bottom: 14px;
}
.amount-input:focus { border-color: rgb(var(--brand-primary-rgb) / .5); }
.pay-method .pay-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .2); flex-shrink: 0;
}
.pay-method.active { background: rgb(var(--brand-primary-rgb) / .08); }
.pay-method.active .pay-radio {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: inset 0 0 0 3px var(--color-background);
}

/* ---------- locations (continent groups) ---------- */
.cont-card { padding: 16px; margin-bottom: 12px; }
.cont-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cont-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgb(var(--brand-primary-rgb) / .12); font-size: 15px;
}
.cont-title { font-size: 15px; font-weight: 700; flex: 1; }
.cont-count {
  font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: #c2c4ca;
  text-transform: uppercase; letter-spacing: .5px;
}
.cont-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.loc-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}
.loc-code {
  font-size: 11px; font-weight: 800; color: var(--text-muted);
  letter-spacing: .3px; min-width: 20px;
}
.loc-name { font-size: 13px; font-weight: 600; color: var(--color-foreground); }

/* ---------- devices ---------- */
.loc-card { padding: 14px 16px; margin-bottom: 8px; }
.loc-row { display: flex; align-items: center; gap: 12px; }
.loc-flag {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgb(var(--brand-primary-rgb) / .12); font-size: 20px;
}
.loc-info { flex: 1; min-width: 0; }
.loc-name { font-size: 14px; font-weight: 700; }
.loc-nodes { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.loc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-success); box-shadow: 0 0 6px var(--color-success);
}

/* ---------- devices ---------- */
.device-toggle {
  padding: 8px 14px; border-radius: 10px; border: none; cursor: pointer;
  background: rgba(240, 101, 106, .12); color: var(--color-destructive);
  font-size: 12px; font-weight: 700; transition: transform .15s;
}
.device-toggle:active { transform: scale(.94); }
.device-toggle.off {
  background: rgba(56, 224, 165, .12); color: var(--color-success);
}

/* ---------- profile (reference style) ---------- */
.profile-hero { padding: 20px; margin-bottom: 18px; }
.profile-hero-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.profile-avatar {
  width: 58px; height: 58px; border-radius: 16px; object-fit: cover; flex-shrink: 0;
}
.profile-hero-info { flex: 1; min-width: 0; }
.profile-name { font-size: 16px; font-weight: 800; }
.profile-username { font-size: 13px; color: var(--text-muted); margin: 2px 0 8px; }

.section-label {
  font-size: 10px; letter-spacing: .4px; text-transform: uppercase;
  color: var(--text-faint); margin: 16px 4px 8px;
}
.list-card { padding: 0; overflow: hidden; }
.list-row {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; background: transparent; border: none;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  color: var(--color-foreground); cursor: pointer; text-align: left;
  transition: background .15s;
}
.list-row:last-child { border-bottom: none; }
.list-row:active { background: rgba(255, 255, 255, .03); }
.list-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgb(var(--brand-primary-rgb) / .12); font-size: 16px;
}
.list-title { flex: 1; font-size: 14px; font-weight: 600; }
.list-row .chev { color: var(--text-muted); font-size: 20px; }
.profile-footer {
  text-align: center; font-size: 12px; padding-top: 16px;
  color: rgb(90, 92, 99);
}

/* ---------- devices limit label ---------- */
.devices-limit {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  margin-left: 6px;
}

/* ---------- admin: servers management ---------- */
.srv-card { padding: 14px; margin-bottom: 10px; }
.srv-card.srv-hidden { opacity: .55; }
.srv-top { display: flex; align-items: center; gap: 12px; }
.srv-info { flex: 1; min-width: 0; }
.srv-name { font-size: 14px; font-weight: 700; word-break: break-word; }
.srv-addr {
  font-size: 11px; color: var(--text-muted);
  font-family: ui-monospace, "SF Mono", Monaco, Consolas, monospace;
  word-break: break-all; margin-top: 2px;
}
.srv-eye {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04);
  color: var(--color-foreground); font-size: 16px; cursor: pointer;
}
.srv-eye:active { transform: scale(.94); }
.srv-edit { display: flex; gap: 8px; margin-top: 10px; }
.srv-input {
  flex: 1; min-width: 0; padding: 10px 12px; font-size: 13px;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03); color: var(--color-foreground);
  outline: none; font-family: inherit;
}
.srv-input:focus { border-color: rgb(var(--brand-primary-rgb) / .5); }
.srv-input::placeholder { color: rgb(90, 92, 99); }
.srv-save {
  width: 42px; height: 40px; border-radius: 12px; flex-shrink: 0;
  border: none; background: rgb(var(--brand-primary-rgb) / .18);
  color: var(--color-foreground); font-size: 15px; cursor: pointer;
}
.srv-save:active { transform: scale(.94); }
.cta.danger {
  background: rgba(255, 69, 58, .14); color: #ff6b60;
  border: 1px solid rgba(255, 69, 58, .25); margin-top: 14px;
}

/* ---------- device meta line ---------- */
.loc-when {
  font-size: 11px; color: var(--text-faint); margin-top: 2px;
}

/* ---------- connect modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-backdrop[hidden] { display: none; }
.connect-modal {
  width: 100%; max-width: 340px;
  background: linear-gradient(168deg, #1c1e22, #141518);
  border: 1px solid var(--calm-card-border-strong);
  border-radius: 24px; padding: 30px 22px 22px;
  text-align: center; box-shadow: var(--calm-card-shadow);
}
.connect-icon {
  width: 86px; height: 86px; margin: 0 auto 18px; border-radius: 50%;
  background: rgba(56, 224, 165, .12);
  display: flex; align-items: center; justify-content: center;
}
.connect-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.connect-sub { color: var(--text-muted); font-size: 14px; margin: 8px 0 20px; }
.connect-other {
  width: 100%; margin-top: 14px; padding: 10px;
  background: transparent; border: none; cursor: pointer;
  color: var(--color-destructive); font-size: 14px; font-weight: 700;
  font-family: inherit;
}
.connect-other:active { opacity: .7; }

/* ---------- strip-traffic toggle ---------- */
.srv-actions { display: flex; gap: 8px; }
.srv-eye.on {
  background: rgba(56, 224, 165, .14);
  border-color: rgba(56, 224, 165, .4);
}

/* layout safety: buttons never shrink, long names wrap */
.srv-eye, .srv-save { flex-shrink: 0; }
.srv-name { overflow-wrap: anywhere; }

/* ---------- subscription switcher ---------- */
.sub-switcher { margin-bottom: 12px; }
.switcher-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.switcher-chip {
  flex-shrink: 0; padding: 10px 14px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03);
  color: var(--color-foreground); font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.switcher-chip.active {
  border-color: rgb(var(--brand-primary-rgb) / .6);
  background: rgb(var(--brand-primary-rgb) / .14);
}
.switcher-chip.expired { opacity: .5; }

/* ---------- plans (blue, selectable) ---------- */
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan2-card {
  position: relative; text-align: left; cursor: pointer;
  padding: 16px; border-radius: 20px;
  border: 1px solid var(--calm-card-border);
  background: var(--calm-card); color: var(--color-foreground);
  font-family: inherit;
}
.plan2-card.selected {
  border-color: rgb(var(--brand-primary-rgb) / .8);
  background: linear-gradient(168deg, rgb(var(--brand-primary-rgb) / .14), #141518);
}
.plan2-check {
  position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  display: none; align-items: center; justify-content: center;
  font-size: 12px;
}
.plan2-card.selected .plan2-check {
  display: flex; background: var(--color-primary); border-color: var(--color-primary);
}
.plan2-badge {
  position: absolute; top: -8px; left: 12px;
  background: var(--color-primary); color: #fff;
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 6px;
}
.plan2-title { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.plan2-meta { font-size: 12px; color: var(--text-muted); margin: 3px 0; }
.plan2-meta.ok { color: var(--color-success); }
.plan2-price { font-size: 22px; font-weight: 800; margin-top: 10px; }
.plan2-perday { font-size: 11px; color: var(--text-muted); }
.plan2-free {
  grid-column: 1 / -1; width: 100%; padding: 12px;
  border-radius: 14px; border: 1px dashed rgba(255, 255, 255, .15);
  background: transparent; color: var(--text-muted); font-size: 13px;
  cursor: pointer; font-family: inherit;
}

/* sticky buy/pay bar */
.buy-bar { position: sticky; bottom: 12px; z-index: 5; margin-top: 14px; }

/* note card */
.note-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px; border-radius: 16px; margin-bottom: 12px;
  background: rgb(var(--brand-primary-rgb) / .08);
  border: 1px solid rgb(var(--brand-primary-rgb) / .25);
  font-size: 13px; color: var(--text-muted);
}
.note-card b { color: var(--color-foreground); }
.note-icon { flex-shrink: 0; }
.note-card a { color: var(--color-accent); font-weight: 700; text-decoration: none; }

/* checkout */
.order-card { padding: 16px; margin-bottom: 12px; }
.order-title { font-size: 16px; font-weight: 800; }
.order-meta { font-size: 12px; color: var(--text-muted); margin: 4px 0 8px; }
.order-price { font-size: 24px; font-weight: 800; color: var(--color-accent); }
.pay2-method.active {
  background: rgb(var(--brand-primary-rgb) / .10);
  box-shadow: inset 0 0 0 1px rgb(var(--brand-primary-rgb) / .6);
}
.pay2-method.disabled { opacity: .6; }
.pay2-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .22); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.pay2-radio.checked { border-color: var(--color-primary); background: var(--color-primary); }
.pay2-radio.checked::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 800; }
.list-title small { color: var(--text-muted); font-weight: 400; }
.accent { color: var(--color-accent); font-weight: 700; }

/* promo */
.promo-row { display: flex; gap: 8px; }
.text-input {
  flex: 1; min-width: 0; padding: 12px 14px; font-size: 14px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03); color: var(--color-foreground);
  outline: none; font-family: inherit;
}
.promo-apply {
  padding: 12px 18px; border: none; border-radius: 14px; cursor: pointer;
  background: var(--calm-cta); color: var(--brand-cta-foreground);
  font-size: 14px; font-weight: 700; font-family: inherit;
}
.promo-result { font-size: 13px; margin: 8px 4px 0; }
.promo-result.ok { color: var(--color-success); }
.promo-result.bad { color: var(--color-destructive); }

/* balance card */
.balance-card { padding: 18px; margin-bottom: 12px; }
.balance-num { font-size: 30px; font-weight: 800; margin-top: 4px; }

/* blue globe icon in profile */
.icon-blue { color: var(--color-primary); }

/* ---------- renew screen ---------- */
.price-block { margin-top: 12px; }
.order-meta.ok { color: var(--color-success); }
