/* CLEO VPN — Friendly Techno-Minimal Design System */

:root {
  --bg: #0b0d19;
  --bg2: #12152a;
  --bg3: #1b1f3a;
  --surface: #222747;
  --border: rgba(255,255,255,.07);
  --border2: rgba(255,255,255,.12);
  --teal: #6ee7b7;
  --cyan: #7c9df7;
  --blue: #5b6ef0;
  --navy: #2a2f5e;
  --accent: #6ee7b7;
  --accent2: #7c9df7;
  --text: #e4e7f1;
  --text2: #9ba3c2;
  --muted: #636d8c;
  --danger: #f87171;
  --success: #6ee7b7;
  --warning: #fbbf24;
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', 'SF Mono', Consolas, monospace;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  top: -30%; left: -10%;
  width: 70%; height: 70%;
  background: radial-gradient(ellipse, rgba(110,231,183,.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%; right: -15%;
  width: 60%; height: 60%;
  background: radial-gradient(ellipse, rgba(91,110,240,.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); }

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* AUTH PAGES */
#auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 48px 36px;
  position: relative;
  box-shadow: 0 0 0 1px rgba(110,231,183,.04), 0 20px 60px -12px rgba(0,0,0,.5);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
}

.logo {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 4px;
  color: #fff;
}

.logo span {
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 36px;
  font-weight: 400;
}

.auth-mascot {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-mascot img {
  width: 72px; height: 72px;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(110,231,183,.15);
}

.tabs {
  display: flex;
  background: var(--bg3);
  border-radius: var(--r-full);
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.tab {
  flex: 1;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
  border-radius: var(--r-full);
  text-decoration: none;
  text-align: center;
  display: block;
}

.tab.active {
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #0a0e1a;
  box-shadow: 0 2px 8px rgba(110,231,183,.25);
}

.tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255,255,255,.05);
}

.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110,231,183,.1);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #0a0e1a;
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  margin-top: 8px;
  border-radius: var(--r-md);
  box-shadow: 0 4px 14px rgba(110,231,183,.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(110,231,183,.3);
}

.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.tg-widget-wrapper {
  display: flex;
  justify-content: center;
  min-height: 40px;
  align-items: center;
}

.alert {
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  border-radius: var(--r-md);
  border: 1px solid;
}

.alert-error {
  background: rgba(251,113,133,.08);
  border-color: rgba(251,113,133,.2);
  color: var(--danger);
}

.alert-success {
  background: rgba(110,231,183,.08);
  border-color: rgba(110,231,183,.2);
  color: var(--success);
}

/* NAVBAR */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(17,24,39,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  letter-spacing: .5px;
  text-decoration: none;
}

.nav-logo span {
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-badge { font-size: 13px; color: var(--text2); }

.btn-logout {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 7px 16px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  border-radius: var(--r-full);
}

.btn-logout:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(251,113,133,.06);
}

/* CABINET BODY */
.cabinet-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.greeting {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.greeting-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 28px;
  color: #fff;
}

.greeting-name strong {
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* HERO STATUS CARD */
.hero-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  margin-bottom: 20px;
}

.hero-active {
  background: linear-gradient(145deg, rgba(110,231,183,.04) 0%, var(--bg2) 40%, rgba(91,110,240,.03) 100%);
  border-color: rgba(110,231,183,.12);
}

.hero-inactive {
  background: linear-gradient(145deg, rgba(251,113,133,.03) 0%, var(--bg2) 50%);
  border-color: rgba(251,113,133,.1);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.hero-active::before {
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
}

.hero-inactive::before {
  background: linear-gradient(90deg, var(--danger), #fbbf24);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.hero-greeting {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}

.hero-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border: 1px solid;
  border-radius: var(--r-full);
}

.badge-on {
  border-color: rgba(110,231,183,.25);
  color: var(--teal);
  background: rgba(110,231,183,.08);
}

.badge-off {
  border-color: rgba(251,113,133,.25);
  color: var(--danger);
  background: rgba(251,113,133,.08);
}

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

.hero-chip {
  padding: 7px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
}

.hero-traffic-bar {
  margin-top: 18px;
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: var(--r-full);
  overflow: hidden;
}

.hero-traffic-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  border-radius: var(--r-full);
  transition: width .8s ease;
}

/* ACTION GRID */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all .25s;
  font-family: var(--sans);
  font-size: inherit;
}

.action-btn:hover {
  background: rgba(255,255,255,.04);
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.action-icon {
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(110,231,183,.08), rgba(124,157,247,.06));
  border: 1px solid rgba(110,231,183,.1);
  border-radius: var(--r-lg);
  transition: all .25s;
  color: var(--teal);
}

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

.action-btn:hover .action-icon {
  background: linear-gradient(135deg, rgba(110,231,183,.15), rgba(124,157,247,.1));
  border-color: rgba(110,231,183,.2);
  box-shadow: 0 0 16px rgba(110,231,183,.1);
}

.action-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
  line-height: 1.3;
}

.action-btn:hover .action-label { color: var(--text); }

/* CONNECT CARD */
.connect-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.connect-header { margin-bottom: 0; }

.connect-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.happ-app-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
}

.happ-app-row:hover {
  background: rgba(255,255,255,.06);
  border-color: var(--border2);
}

.happ-app-icon { width: 40px; height: 40px; flex-shrink: 0; }
.happ-app-icon svg { width: 40px; height: 40px; }
.happ-app-info { flex: 1; min-width: 0; }
.happ-app-name { font-weight: 600; font-size: 14px; color: #fff; }
.happ-app-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.happ-app-arrow { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.happ-app-arrow svg { width: 20px; height: 20px; }

.connect-divider { height: 1px; background: var(--border); margin: 12px 0; }

.sub-url-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.sub-url {
  flex: 1;
  background: var(--bg3);
  color: var(--accent);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  user-select: all;
  border: none;
}

.btn-copy {
  padding: 12px 16px;
  background: var(--bg3);
  border: none;
  border-left: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
}

.btn-copy:hover {
  color: var(--accent);
  background: rgba(110,231,183,.06);
}

.connect-steps { display: flex; flex-direction: column; gap: 10px; }

.step { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text2); }

.step-num {
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(110,231,183,.1), rgba(124,157,247,.08));
  border: 1px solid rgba(110,231,183,.15);
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
}

.step-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.step-link:hover { text-decoration: underline; }

.connect-empty { text-align: center; padding: 32px 12px; }
.connect-empty p { color: var(--text2); font-size: 14px; margin-bottom: 18px; }

.connect-empty-btn {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #0a0e1a;
  font-size: 13px; font-weight: 700;
  text-decoration: none;
  border-radius: var(--r-full);
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(110,231,183,.2);
}

.connect-empty-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(110,231,183,.3);
}

/* INFO CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.info-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
}

.card-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.card-value { font-size: 22px; font-weight: 600; color: #fff; }
.card-value.active { color: var(--teal); }
.card-value.inactive { color: var(--danger); }
.card-value.none { color: var(--muted); font-size: 14px; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

.no-sub {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}

.no-sub .icon { font-size: 32px; margin-bottom: 12px; }
.no-sub .hint { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* TOAST */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg2);
  color: var(--accent);
  padding: 14px 28px;
  border: 1px solid rgba(110,231,183,.2);
  border-radius: var(--r-full);
  font-size: 13px; font-weight: 600;
  display: none;
  z-index: 1000;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  max-width: 90%; text-align: center;
  transition: transform .3s ease;
}

.toast.show {
  display: block;
  animation: toastUp .3s ease forwards;
}

@keyframes toastUp {
  to { transform: translateX(-50%) translateY(0); }
}

/* LOADER */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  flex-direction: column;
  gap: 20px;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.08);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.fade-in { animation: fadeIn .4s ease; }

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

/* RESPONSIVE — AUTH / DASHBOARD */
@media (max-width: 600px) {
  .auth-card { padding: 36px 24px; }
  .navbar { padding: 0 16px; }
  .cabinet-body { padding: 28px 16px 60px; }
  .cards-grid { grid-template-columns: 1fr; }
  .greeting-name { font-size: 22px; }
  .hero-card { padding: 22px 18px; border-radius: var(--r-xl); }
  .hero-greeting { font-size: 18px; }
  .hero-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-chips { gap: 6px; }
  .hero-chip { padding: 5px 12px; font-size: 11px; }
  .action-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .action-btn { padding: 18px 10px 14px; border-radius: var(--r-lg); }
  .action-icon { width: 40px; height: 40px; border-radius: var(--r-md); }
  .action-icon svg { width: 18px; height: 18px; }
  .action-label { font-size: 10px; }
  .connect-card { padding: 18px 16px; border-radius: var(--r-xl); gap: 10px; }
  .happ-app-row { padding: 10px 12px; border-radius: var(--r-md); }
}

/* PROFILE PAGE */
.profile-nav { margin-bottom: 32px; }

.profile-nav-item {
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color .2s;
}

.profile-nav-item:hover { color: var(--text); }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 28px;
  min-width: 0;
}

.section-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-rows { display: flex; flex-direction: column; }

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.profile-row:last-child { border-bottom: none; }

.profile-row-full {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.row-key {
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}

.row-val {
  font-size: 13px;
  color: var(--text);
  text-align: right;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row-val.mono { font-family: var(--mono); font-size: 12px; }
.row-val.accent { color: var(--accent); }
.row-val.muted { color: var(--muted); }
.row-sub { font-size: 11px; color: var(--muted); margin-left: 6px; }

.uuid-val {
  font-size: 10px !important;
  color: var(--muted) !important;
  word-break: break-all;
  text-align: right;
  max-width: 180px;
}

.badge {
  font-size: 10px; font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-full);
}

.badge-ok {
  background: rgba(110,231,183,.1);
  border: 1px solid rgba(110,231,183,.25);
  color: var(--teal);
}

.badge-warn {
  background: rgba(251,113,133,.08);
  border: 1px solid rgba(251,113,133,.2);
  color: var(--danger);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-active {
  background: var(--teal);
  box-shadow: 0 0 8px rgba(110,231,183,.5);
}

.dot-inactive { background: var(--danger); }

.color-active { color: var(--teal); font-weight: 600; font-size: 13px; }
.color-inactive { color: var(--danger); font-weight: 600; font-size: 13px; }

.traffic-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.traffic-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: var(--r-full);
  overflow: hidden;
}

.traffic-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  border-radius: var(--r-full);
  transition: width .6s ease;
}

.traffic-pct {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 40px;
}

.sub-link-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.sub-link-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.sub-link-row {
  display: flex;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.sub-link-val {
  flex: 1;
  background: var(--bg3);
  color: var(--accent);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  user-select: all;
  border: none;
}

.btn-copy-sm {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  border: none;
  color: #0a0e1a;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
  white-space: nowrap;
}

.btn-copy-sm:hover { opacity: .85; }

.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  gap: 8px;
}

.empty-icon { font-size: 28px; margin-bottom: 4px; opacity: .4; }
.empty-hint { font-size: 11px; color: var(--muted); opacity: .6; }

@media (max-width: 700px) {
  .profile-grid { grid-template-columns: 1fr; gap: 12px; }
  .profile-section { padding: 22px 16px; }
  .uuid-val { max-width: 130px; }
  .sub-link-row { flex-direction: column; }
  .sub-link-val { border-bottom: none; }
  .btn-copy-sm { width: 100%; }
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  width: 90%;
  max-width: 380px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 36px 28px 28px;
  text-align: center;
  transform: translateY(12px) scale(.97);
  transition: transform .25s ease;
  box-shadow: 0 24px 48px rgba(0,0,0,.3);
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
}

.modal-close:hover { color: #fff; }

.modal-icon { font-size: 42px; margin-bottom: 10px; }

.modal-title {
  font-size: 18px; font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.modal-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin: 0 0 22px;
}

.modal-btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #0a0e1a;
  font-size: 14px; font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(110,231,183,.2);
}

.modal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(110,231,183,.3);
}

.modal-btn-secondary {
  display: block;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: transparent;
  color: #fff;
  font-size: 14px; font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  margin-bottom: 10px;
}

.modal-btn-secondary:hover {
  background: rgba(255, 255, 255, .05);
  border-color: var(--border2);
}

.modal-btn-secondary-link {
  display: inline-block;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 6px;
  transition: color .2s;
}

.modal-btn-secondary-link:hover { color: #fff; }

.modal-input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.modal-input::placeholder { color: var(--muted); opacity: .6; }

.modal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110,231,183,.1);
}

.modal-form-error {
  font-size: 12px;
  color: var(--danger);
  margin-bottom: 10px;
  text-align: center;
}

.modal-form-success {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
  text-align: center;
}

.happ-copy-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text2);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}

.happ-copy-row:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  border-color: var(--border2);
}

.happ-copy-row.copied {
  color: var(--teal);
  border-color: rgba(110,231,183,.3);
}

.happ-copy-row svg { flex-shrink: 0; }

/* FAQ */
.faq-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 24px;
  margin-bottom: 20px;
}

.faq-card h2 {
  font-size: 18px; font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
}

.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px; font-weight: 600;
  text-align: left;
  cursor: pointer;
  list-style: none;
  transition: color .2s;
}

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

.faq-question::after {
  content: '+';
  font-size: 18px; font-weight: 300;
  color: var(--muted);
  transition: transform .25s, color .25s;
  flex-shrink: 0;
  margin-left: 12px;
}

details[open] > .faq-question::after {
  content: '\2212';
  color: var(--teal);
}

.faq-answer {
  padding: 0 0 16px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

@media (max-width: 480px) {
  .modal-card {
    width: 94%;
    padding: 28px 20px 22px;
  }
  .faq-card { padding: 18px 16px; }
  .faq-question { font-size: 13px; }
}
