/* Text OTP SMS - single stylesheet (light + dark aware) */
:root{
  --bg:#0e1220; --bg-soft:#161c2f; --card:#1a2032;
  --line:#28304a; --text:#e8ecf6; --muted:#98a2c0; --brand:#2f6fed;
  --brand-2:#2f6fed; --ok:#37d39b; --warn:#f5b544; --error:#ff5d6c;
  --radius:14px; --shadow:0 10px 30px rgba(0,0,0,.35);
  /* Solid, professional button colour (no gradients). */
  --grad:#2f6fed;
  --sidebar-bg:#10152a; --sidebar-line:#2b3350; --sidebar-shadow:rgba(0,0,0,.28);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:'Segoe UI',system-ui,-apple-system,Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);line-height:1.5;min-height:100vh;
}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4{margin:0 0 .4em;font-weight:650;letter-spacing:-.01em}
p{margin:0 0 1em}

/* ---------------- App shell ---------------- */
.app{display:flex;min-height:100vh}
.sidebar{
  width:250px;flex-shrink:0;background:var(--bg-soft);
  border-right:1px solid var(--line);padding:22px 16px;position:sticky;top:0;height:100vh;
  overflow-y:auto;overscroll-behavior:contain;                 /* scroll when nav is taller than the screen */
  scrollbar-width:thin;scrollbar-color:var(--line) transparent;
}
.sidebar::-webkit-scrollbar{width:8px}
.sidebar::-webkit-scrollbar-thumb{background:var(--line);border-radius:8px}
.brand{display:flex;align-items:center;gap:9px;font-weight:700;font-size:18px;margin:4px 6px 26px}
.brand-mark{color:var(--brand);font-size:22px}
.brand-tag{font-size:11px;background:var(--grad);color:#fff;padding:2px 8px;border-radius:20px;margin-left:auto}
.nav{display:flex;flex-direction:column;gap:4px}
.nav-link{
  display:flex;align-items:center;gap:11px;padding:11px 13px;border-radius:10px;
  color:var(--muted);font-weight:550;font-size:14.5px;transition:.15s;
}
.nav-link:hover{background:var(--card);color:var(--text)}
.nav-link.is-active{background:var(--grad);color:#fff;box-shadow:var(--shadow)}
.nav-logout{margin-top:20px;color:var(--error)}
.nav-section{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);opacity:.55;padding:15px 13px 5px}
.nav-section:first-child{padding-top:2px}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 28px;border-bottom:1px solid var(--line);background:rgba(14,18,32,.7);
  backdrop-filter:blur(8px);position:sticky;top:0;z-index:5;
}
.topbar-title{font-weight:650;font-size:18px}
.topbar-right{display:flex;align-items:center;gap:14px}
.wallet-pill{
  display:flex;align-items:center;gap:7px;background:var(--card);border:1px solid var(--line);
  padding:8px 14px;border-radius:30px;font-weight:650;font-size:14px;
}
.wallet-pill:hover{border-color:var(--brand)}
.avatar{
  width:38px;height:38px;border-radius:50%;display:grid;place-items:center;
  background:var(--grad);color:#fff;font-weight:700;
}
.content{padding:28px;max-width:1200px;width:100%;margin:0 auto}

/* ---------------- Cards / grid ---------------- */
.grid{display:grid;gap:18px}
.grid-4{grid-template-columns:repeat(4,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
.card{
  background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:20px;box-shadow:var(--shadow);
}
.stat{display:flex;flex-direction:column;gap:6px}
.stat .label{color:var(--muted);font-size:13px;font-weight:550}
.stat .value{font-size:26px;font-weight:750;letter-spacing:-.02em}
.stat .value.grad{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}

/* ---------------- Service cards ---------------- */
.services{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:16px}
.service{
  background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:18px;display:flex;flex-direction:column;gap:12px;transition:.15s;
}
.service:hover{border-color:var(--brand);transform:translateY(-2px)}
.service .svc-ic{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;font-size:22px;background:var(--bg-soft)}
.service .svc-name{font-weight:650}
.service .svc-country{color:var(--muted);font-size:12.5px}
.service .svc-price{font-weight:750;font-size:19px}
.service form{margin:0}

/* ---------------- Tables ---------------- */
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius)}
table{width:100%;border-collapse:collapse;font-size:14px;min-width:560px}
th,td{padding:12px 14px;text-align:left;border-bottom:1px solid var(--line)}
th{color:var(--muted);font-weight:600;font-size:12.5px;text-transform:uppercase;letter-spacing:.03em;background:var(--bg-soft)}
tr:last-child td{border-bottom:none}
tbody tr:hover{background:rgba(91,140,255,.05)}
.mono{font-family:ui-monospace,Menlo,Consolas,monospace}

/* ---------------- Badges ---------------- */
.badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:600}
.badge-ok{background:rgba(55,211,155,.15);color:var(--ok)}
.badge-warn{background:rgba(245,181,68,.15);color:var(--warn)}
.badge-error{background:rgba(255,93,108,.15);color:var(--error)}
.badge-muted{background:rgba(152,162,192,.15);color:var(--muted)}

/* ---------------- Forms ---------------- */
.field{margin-bottom:16px}
.field label{display:block;font-size:13.5px;font-weight:600;margin-bottom:6px;color:var(--muted)}
input,select,textarea{
  width:100%;padding:11px 13px;background:var(--bg-soft);border:1px solid var(--line);
  border-radius:10px;color:var(--text);font-size:14.5px;font-family:inherit;
}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(91,140,255,.18)}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 18px;border-radius:10px;border:none;cursor:pointer;
  font-weight:650;font-size:14.5px;font-family:inherit;background:var(--card);color:var(--text);
  border:1px solid var(--line);transition:.15s;
}
.btn:hover{border-color:var(--brand)}
.btn-primary{background:var(--grad);color:#fff;border:none}
.btn-primary:hover{opacity:.92}
.btn-danger{background:rgba(255,93,108,.15);color:var(--error);border-color:transparent}
.btn-block{width:100%}
.btn-sm{padding:7px 12px;font-size:13px}

/* ---------------- Alerts ---------------- */
.alert{padding:13px 16px;border-radius:10px;margin-bottom:18px;font-weight:550;font-size:14px;border:1px solid transparent}
.alert-success{background:rgba(55,211,155,.12);color:var(--ok);border-color:rgba(55,211,155,.3)}
.alert-error{background:rgba(255,93,108,.12);color:var(--error);border-color:rgba(255,93,108,.3)}
.alert-info{background:rgba(91,140,255,.12);color:var(--brand);border-color:rgba(91,140,255,.3)}
.alert-warning{background:rgba(255,183,77,.14);color:#c8891f;border-color:rgba(255,183,77,.35)}
.ic-shield{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E")}

/* ---------------- Wallet balance card (bank-card styling) ---------------- */
.balance-card{
  position:relative;overflow:hidden;border-radius:18px;padding:22px 24px;
  background:linear-gradient(135deg,#2b2f77 0%,#4338ca 45%,#6d28d9 100%);
  color:#fff;box-shadow:0 14px 34px rgba(49,46,129,.34);
  /* Real card proportions — full width stretches into a banner and stops
     reading as a card at all. */
  max-width:420px;min-height:206px;
  display:flex;flex-direction:column;justify-content:space-between;
}
/* Soft light sweep, like the gloss on a real card. */
.balance-card::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(130% 90% at 88% 8%,rgba(255,255,255,.22),transparent 58%);
}
.balance-card::after{
  content:"";position:absolute;right:-56px;bottom:-78px;width:230px;height:230px;
  border-radius:50%;background:rgba(255,255,255,.07);pointer-events:none;
}
.balance-card > *{position:relative;z-index:1}

.bc-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.bc-label{font-size:12.5px;letter-spacing:.14em;text-transform:uppercase;
  color:rgba(255,255,255,.82);font-weight:600}
/* The little gold contact plate every card has. */
.bc-chip{width:40px;height:30px;border-radius:6px;flex:0 0 auto;
  background:linear-gradient(145deg,#f6d98a,#d4a944 55%,#b5892c);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.bc-chip::after{content:"";display:block;margin:9px auto 0;width:22px;height:1px;
  background:rgba(0,0,0,.28);box-shadow:0 5px 0 rgba(0,0,0,.28)}

.bc-amount{font-size:clamp(30px,7vw,42px);font-weight:800;letter-spacing:-.5px;line-height:1.1;
  text-shadow:0 2px 10px rgba(0,0,0,.18)}

.bc-bottom{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;flex-wrap:wrap}
.bc-holder{display:flex;flex-direction:column;gap:3px;min-width:0}
.bc-holder-label{font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;
  color:rgba(255,255,255,.65)}
.bc-holder-name{font-size:14.5px;font-weight:650;letter-spacing:.4px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}

.bc-action{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;
  padding:10px 16px;border-radius:999px;font-size:14px;font-weight:700;
  background:rgba(255,255,255,.96);color:#3b2fbf;text-decoration:none;
  transition:transform .12s ease,box-shadow .12s ease}
.bc-action:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(0,0,0,.2)}

@media(max-width:430px){
  .balance-card{padding:18px;min-height:168px}
  .bc-holder-name{max-width:40vw}
}

/* ===================== Landing page refresh ===================== */
.hero-v2{position:relative;overflow:hidden}
/* Soft colour wash behind the headline — depth without a heavy image. */
.hero-v2::before{
  content:"";position:absolute;inset:-30% -10% auto -10%;height:560px;pointer-events:none;z-index:0;
  background:
    radial-gradient(48% 42% at 18% 32%,rgba(109,40,217,.20),transparent 68%),
    radial-gradient(44% 40% at 82% 22%,rgba(59,130,246,.18),transparent 68%);
  filter:blur(8px);
}
.hero-v2 > *{position:relative;z-index:1}

.hero-badge .pulse{display:inline-block;width:7px;height:7px;border-radius:50%;
  background:var(--ok);margin-right:7px;vertical-align:middle;
  box-shadow:0 0 0 0 rgba(55,211,155,.65);animation:hpulse 2s infinite}
@keyframes hpulse{
  70%{box-shadow:0 0 0 9px rgba(55,211,155,0)}
  100%{box-shadow:0 0 0 0 rgba(55,211,155,0)}
}

.hero-stats{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:26px 0 6px}
.hstat{min-width:128px;padding:13px 18px;border-radius:14px;
  background:var(--card);border:1px solid var(--line);text-align:center}
.hstat b{display:block;font-size:21px;font-weight:800;letter-spacing:-.4px}
.hstat span{display:block;font-size:11.5px;color:var(--muted);margin-top:2px;
  letter-spacing:.05em;text-transform:uppercase}

.btn-ghost-light{background:transparent}

/* Rentals promo */
.rent-promo{display:grid;grid-template-columns:1.25fr .75fr;gap:34px;align-items:center;
  margin:56px auto;max-width:1040px;padding:34px;border-radius:22px;
  background:linear-gradient(135deg,rgba(109,40,217,.10),rgba(59,130,246,.10));
  border:1px solid var(--line)}
.rp-text h2{margin:10px 0 10px;font-size:clamp(23px,3.4vw,31px);letter-spacing:-.6px}
.rp-text p{color:var(--muted);font-size:15px;line-height:1.65;margin:0 0 20px}

/* A small phone mock-up, so "inbox" is obvious at a glance. */
.rp-phone{display:flex;justify-content:center}
.rp-screen{width:100%;max-width:248px;border-radius:20px;padding:14px;
  background:var(--card);border:1px solid var(--line);box-shadow:0 16px 36px rgba(16,24,48,.14)}
.rp-bar{font-size:12.5px;font-weight:700;padding-bottom:10px;margin-bottom:10px;
  border-bottom:1px solid var(--line);display:flex;align-items:center;gap:7px}
.rp-dot{width:7px;height:7px;border-radius:50%;background:var(--ok);flex:0 0 auto}
.rp-msg{background:var(--bg-soft);border-radius:12px 12px 12px 4px;padding:9px 11px;margin-bottom:8px}
.rp-msg b{display:block;font-size:11px;color:var(--muted)}
.rp-msg span{font-size:13px;font-weight:600}

/* Feature icons — these were empty boxes after the emoji clear-out. */
.feature .fi{width:44px;height:44px;border-radius:13px;display:flex;align-items:center;
  justify-content:center;margin-bottom:14px;color:#fff;background:var(--grad)}
.feature .fi svg{width:22px;height:22px}

@media(max-width:860px){
  .rent-promo{grid-template-columns:1fr;gap:24px;padding:26px;margin:40px 16px}
  .rp-phone{order:-1}
  .hstat{min-width:0;flex:1 1 42%}
}

/* --------- Rent a number: hero, durations, inbox --------- */
.rent-hero{display:flex;gap:18px;justify-content:space-between;align-items:flex-start;flex-wrap:wrap}
.rent-hero-bal{text-align:right}
.rent-hero-bal .label{display:block;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.rent-hero-bal .value{font-size:22px;font-weight:800}

.rent-durations{display:flex;gap:8px;flex-wrap:wrap}
.rent-dur{padding:9px 15px;border-radius:999px;border:1px solid var(--line);
  text-decoration:none;color:inherit;font-size:14px;font-weight:600;transition:.12s}
.rent-dur:hover{border-color:var(--brand)}
.rent-dur.is-on{background:var(--grad);color:#fff;border-color:transparent}

/* Phone-style messages */
.inbox-head{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.inbox-head-main{display:flex;gap:13px;align-items:center;min-width:0}
.inbox-avatar{width:46px;height:46px;border-radius:50%;flex:0 0 auto;display:flex;
  align-items:center;justify-content:center;font-size:22px;background:var(--bg-soft);
  border:1px solid var(--line)}
.inbox-number{font-size:19px;font-weight:800;letter-spacing:.6px}

.inbox-wrap{margin-top:16px}
.inbox-thread{display:flex;flex-direction:column;gap:16px;padding:4px 0}
.sms{max-width:min(560px,92%)}
.sms-from{font-size:12px;font-weight:700;color:var(--muted);margin:0 0 5px 13px}
.sms-bubble{background:var(--bg-soft);border:1px solid var(--line);
  border-radius:17px 17px 17px 5px;padding:13px 15px}
.sms-code{display:inline-block;font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:23px;font-weight:800;letter-spacing:5px;background:transparent;border:none;
  color:var(--brand);cursor:pointer;padding:0;margin:0 0 4px}
.sms-code:hover{opacity:.75}
.sms-text{font-size:14px;line-height:1.55;word-break:break-word}
.sms-time{font-size:11.5px;color:var(--muted);margin:5px 0 0 13px}

.inbox-empty{display:flex;flex-direction:column;align-items:center;gap:7px;
  text-align:center;padding:46px 20px;color:var(--muted)}
.inbox-empty-ic{opacity:.5}
.inbox-empty b{color:var(--text);font-size:15px}
.inbox-empty span{font-size:13px;max-width:300px}

/* ------------------- Rented numbers ------------------- */
.rent-badge{display:inline-block;padding:3px 9px;border-radius:999px;font-size:11px;
  font-weight:700;letter-spacing:.04em;background:rgba(109,40,217,.14);color:#7c3aed;
  border:1px solid rgba(109,40,217,.28)}
.rental-card{border:1px solid rgba(109,40,217,.3)}
.rent-inbox{display:flex;flex-direction:column;gap:10px;max-height:420px;overflow:auto}
.rent-msg{background:var(--bg-soft);border:1px solid var(--line);border-radius:12px;padding:12px 14px}
.rent-msg-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.rent-code{font-size:21px;font-weight:800;letter-spacing:4px;font-family:ui-monospace,Menlo,Consolas,monospace}
.rent-when{font-size:12px}
.rent-text{margin-top:6px;font-size:13.5px;line-height:1.5;word-break:break-word}

/* Rental options on the buy page — hidden until asked for, so the ordinary
   one-code purchase stays a single click. */
.cr-extra{grid-column:1/-1;margin-top:8px;padding-top:10px;border-top:1px dashed var(--line)}
.rent-toggle{display:flex;gap:9px;align-items:center;font-size:13px;cursor:pointer}
.rent-fields{display:flex;gap:12px;flex-wrap:wrap;margin-top:10px}
.rent-field{display:flex;flex-direction:column;gap:4px;min-width:150px}
.rent-field label{font-size:12px;font-weight:600}
.rent-note{flex-basis:100%;font-size:12px;margin:4px 0 0}

/* Signup CAPTCHA */
.captcha-row{display:flex;gap:10px;align-items:center;margin-bottom:8px;flex-wrap:wrap}
.captcha-img{border-radius:10px;border:1px solid var(--line);display:block;
  max-width:100%;height:auto;background:#f5f7fc}
.captcha-input{text-align:center}
@media(max-width:420px){.captcha-row{justify-content:center}}

.badge-err{background:rgba(255,93,108,.14);color:var(--error);border-color:rgba(255,93,108,.32)}

/* Small status dot, e.g. "verification is on/off" */
.dot{width:10px;height:10px;border-radius:50%;flex:0 0 10px;display:inline-block}
.dot-on{background:var(--ok);box-shadow:0 0 0 3px rgba(55,211,155,.18)}
.dot-off{background:var(--error);box-shadow:0 0 0 3px rgba(255,93,108,.18)}
.alert a{color:inherit;text-decoration:underline}

/* ---------------- Page bits ---------------- */
.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;flex-wrap:wrap;gap:12px}
.section-title{font-size:16px;color:var(--muted);margin:26px 0 14px;font-weight:600}
.muted{color:var(--muted)}
.right{text-align:right}
.flex{display:flex;gap:10px;align-items:center}
.gap{gap:10px}
.mt{margin-top:18px}
.hidden{display:none}

/* OTP display */
.otp-box{background:var(--bg-soft);border:1px dashed var(--brand);border-radius:12px;padding:20px;text-align:center}
.otp-code{font-size:34px;font-weight:800;letter-spacing:.15em;font-family:ui-monospace,Consolas,monospace;color:var(--ok)}
.pulse{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--warn);animation:pulse 1.2s infinite}
@keyframes pulse{0%,100%{opacity:.3}50%{opacity:1}}

/* ---------------- Auth / marketing ---------------- */
.auth{min-height:100vh;display:grid;place-items:center;padding:24px}
.auth-card{width:100%;max-width:420px;background:var(--card);border:1px solid var(--line);border-radius:18px;padding:34px;box-shadow:var(--shadow)}
.auth-brand{display:flex;align-items:center;gap:9px;font-weight:750;font-size:22px;margin-bottom:6px;justify-content:center}
.auth-sub{text-align:center;color:var(--muted);margin-bottom:26px}
.auth-alt{text-align:center;margin-top:18px;color:var(--muted);font-size:14px}
.auth-alt a{color:var(--brand);font-weight:600}

.landing{max-width:1080px;margin:0 auto;padding:28px}
.lnav{display:flex;align-items:center;justify-content:space-between;padding:8px 0 40px}
.lnav .brand{margin:0}
.hero{text-align:center;padding:40px 0 30px}
.hero h1{font-size:clamp(32px,6vw,56px);line-height:1.05}
.hero .grad{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{font-size:18px;color:var(--muted);max-width:640px;margin:14px auto 26px}
.hero .flex{justify-content:center}
.logos{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin:36px 0}
.logo-chip{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px 18px;font-weight:600;display:flex;gap:8px;align-items:center}
.features{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:40px 0}
.feature .fi{font-size:26px;margin-bottom:10px}
.lfoot{text-align:center;color:var(--muted);padding:40px 0 20px;font-size:14px;border-top:1px solid var(--line);margin-top:30px}

/* ---------------- Line icons ----------------
   Real SVG icons (not text symbols), drawn as a mask so they always take the
   surrounding text colour — the same look every modern dashboard uses. */
.ic{width:18px;height:18px;display:inline-block;flex-shrink:0;
  background-color:currentColor;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-position:center;mask-position:center;
  -webkit-mask-size:contain;mask-size:contain}

.ic-grid{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E")}

.ic-phone{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='2'/%3E%3Cline x1='10' y1='18' x2='14' y2='18'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='2'/%3E%3Cline x1='10' y1='18' x2='14' y2='18'/%3E%3C/svg%3E")}

.ic-list{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Ccircle cx='3.5' cy='6' r='1.2'/%3E%3Ccircle cx='3.5' cy='12' r='1.2'/%3E%3Ccircle cx='3.5' cy='18' r='1.2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Ccircle cx='3.5' cy='6' r='1.2'/%3E%3Ccircle cx='3.5' cy='12' r='1.2'/%3E%3Ccircle cx='3.5' cy='18' r='1.2'/%3E%3C/svg%3E")}

.ic-wallet{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h12v4'/%3E%3Cpath d='M3 7v10a2 2 0 0 0 2 2h14a1 1 0 0 0 1-1v-3'/%3E%3Cpath d='M21 9v6h-4a3 3 0 0 1 0-6z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h12v4'/%3E%3Cpath d='M3 7v10a2 2 0 0 0 2 2h14a1 1 0 0 0 1-1v-3'/%3E%3Cpath d='M21 9v6h-4a3 3 0 0 1 0-6z'/%3E%3C/svg%3E")}

.ic-users{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E")}

.ic-plug{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E")}

.ic-cog{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06A1.65 1.65 0 0 0 15 19.4a1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09A1.65 1.65 0 0 0 15 4.6a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9v0a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06A1.65 1.65 0 0 0 15 19.4a1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09A1.65 1.65 0 0 0 15 4.6a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9v0a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E")}

.ic-out{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E")}

.ic-back{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'/%3E%3Cpolyline points='12 19 5 12 12 5'/%3E%3C/svg%3E")}

/* ---------------- Responsive ---------------- */
@media(max-width:900px){.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3,.features{grid-template-columns:1fr}}
@media(max-width:760px){
  .app{flex-direction:column}
  .sidebar{width:100%;height:auto;position:static;display:flex;flex-direction:column}
  .nav{flex-direction:row;flex-wrap:wrap}
  .grid-2{grid-template-columns:1fr}
  .content{padding:18px}
}

/* Light mode — device default only.
   The :not([data-theme="dark"]) guard is essential: without it, choosing Dark
   on a light phone still rendered light because this block kept winning. */
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){
    --bg:#f4f6fb;--bg-soft:#ffffff;--card:#ffffff;--line:#e3e8f2;
    --text:#141a2b;--muted:#5c6685;--shadow:0 8px 24px rgba(20,30,60,.08);
  }
  :root:not([data-theme="dark"]) body{background:var(--bg)}
  :root:not([data-theme="dark"]) th{background:#f6f8fd}
}

/* Forced light — the site default for every visitor, and the "Light" toggle.
   Unlike the block above, this is NOT gated by the device preference, so light
   mode shows even on a phone/computer set to dark. */
:root[data-theme="light"]{
  --bg:#f4f6fb;--bg-soft:#ffffff;--card:#ffffff;--line:#e3e8f2;
  --text:#141a2b;--muted:#5c6685;--shadow:0 8px 24px rgba(20,30,60,.08);
}
:root[data-theme="light"] body{background:var(--bg)}
:root[data-theme="light"] th{background:#f6f8fd}

/* ---------------- Pagination ---------------- */
.pagination{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  flex-wrap:wrap;margin-top:14px;
}
.pagination-info{font-size:13px;color:var(--muted)}
.pagination-links{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pg{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:36px;height:36px;padding:0 11px;border-radius:10px;
  border:1px solid var(--line);background:var(--card);color:var(--text);
  font-size:13.5px;font-weight:550;transition:.15s;
}
.pg:hover{border-color:var(--brand);color:var(--brand)}
.pg.is-current{background:var(--grad);border-color:transparent;color:#fff;box-shadow:var(--shadow)}
.pg.is-off{opacity:.35;pointer-events:none}
.pg-gap{color:var(--muted);padding:0 2px}
.pg-mobile{display:none;font-size:13px;color:var(--muted);padding:0 6px}

/* ---------------- Responsive tables ---------------- */
/* Desktop keeps a normal table; below 760px each row becomes a card. */
@media(max-width:760px){
  .table-wrap{border:none;border-radius:0;overflow:visible}
  .table-wrap table{min-width:0;width:100%;font-size:13.5px}
  .table-wrap thead{
    position:absolute;width:1px;height:1px;overflow:hidden;
    clip:rect(0 0 0 0);white-space:nowrap;
  }
  .table-wrap tr{
    display:block;background:var(--card);border:1px solid var(--line);
    border-radius:var(--radius);padding:6px 4px;margin-bottom:12px;
  }
  .table-wrap td{
    display:flex;align-items:center;justify-content:space-between;gap:14px;
    padding:8px 12px;border:none;text-align:right;
  }
  .table-wrap td+td{border-top:1px solid var(--line)}
  /* Label each cell using the data-label attribute */
  .table-wrap td::before{
    content:attr(data-label);font-weight:600;color:var(--muted);
    font-size:12px;text-transform:uppercase;letter-spacing:.03em;
    text-align:left;flex-shrink:0;
  }
  .table-wrap td:not([data-label])::before{content:none}
  /* Action cells stack full width */
  .table-wrap td.cell-actions{justify-content:flex-end;flex-wrap:wrap}

  /* Opt-out: keep a real table on mobile (reference/lookup tables) */
  .table-wrap.table-plain{border:1px solid var(--line);border-radius:var(--radius);overflow-x:auto}
  .table-wrap.table-plain thead{position:static;width:auto;height:auto;clip:auto}
  .table-wrap.table-plain tr{display:table-row;background:none;border:none;border-radius:0;padding:0;margin:0}
  .table-wrap.table-plain td{display:table-cell;text-align:left;padding:7px 10px}
  .table-wrap.table-plain td+td{border-top:none}
  .table-wrap.table-plain td::before{content:none}

  .pagination{justify-content:center;text-align:center}
  .pagination-info{width:100%;text-align:center;order:2}
  .pagination-links{order:1;justify-content:center;width:100%}
  .pg-num,.pg-gap{display:none}
  .pg-mobile{display:inline-block}
}

/* ================= Service icons ================= */
.svc-icon{
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:14px;color:#fff;font-weight:700;flex-shrink:0;
  line-height:1;text-shadow:0 1px 2px rgba(0,0,0,.25);
}
.svc-icon-lg{width:52px;height:52px;font-size:24px;border-radius:16px}
.svc-icon-sm{width:32px;height:32px;font-size:15px;border-radius:10px}
.svc-icon-auto{letter-spacing:-.02em}

/* ================= App grid ================= */
.app-grid{
  display:grid;gap:12px;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
}
.app-tile{
  display:flex;flex-direction:column;align-items:center;gap:10px;
  padding:20px 14px;background:var(--card);border:1px solid var(--line);
  border-radius:var(--radius);text-align:center;transition:.16s;
}
.app-tile:hover{
  transform:translateY(-2px);border-color:var(--brand);
  box-shadow:0 8px 24px rgba(91,140,255,.18);
}
.app-name{font-weight:600;font-size:14.5px;line-height:1.3;word-break:break-word}
.app-go{font-size:11.5px;color:var(--muted);opacity:0;transition:.16s}
.app-tile:hover .app-go{opacity:1}

/* ================= Buy: country picker ================= */
.back-link{display:inline-block;color:var(--muted);font-size:13.5px;margin-bottom:12px}
.back-link:hover{color:var(--brand)}

.buy-hero{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.buy-hero-bal{margin-left:auto;text-align:right}
.buy-hero-bal .label{display:block;font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.buy-hero-bal .value{font-size:20px;font-weight:700}

.country-list{
  display:flex;flex-direction:column;
  border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;
}
.country-row{
  display:grid;align-items:center;gap:12px;
  grid-template-columns:34px 1fr auto auto 84px 84px;
  padding:11px 14px;background:var(--card);
  border-bottom:1px solid var(--line);transition:.12s;
}
.country-row:last-child{border-bottom:none}
.country-row:hover{background:var(--bg-soft)}
.cr-flag{font-size:22px;line-height:1}
.cr-name{font-weight:550;font-size:14.5px;min-width:0}
.cr-name small{display:block;font-weight:400;font-size:11.5px}
.cr-stock{font-size:12px;color:var(--muted);white-space:nowrap}
.cr-stock.is-low{color:var(--warn)}
.cr-rate{font-size:12px;color:var(--ok);white-space:nowrap;min-width:34px;text-align:right}
.cr-price{font-weight:700;font-size:15px;text-align:right;white-space:nowrap}
.cr-buy{white-space:nowrap}
/* Country step (no price) and server step (no flag) — trimmed grids so the
   button stays flush right instead of leaving an empty column. */
.country-row.cr-pick{grid-template-columns:34px 1fr auto auto}
.country-row.cr-server{grid-template-columns:1fr repeat(3,auto)}

/* ================= Order page ================= */
.otp-countdown{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-weight:700;font-size:14px;color:var(--warn);background:var(--bg-soft);
  padding:3px 10px;border-radius:20px;letter-spacing:.02em}
.otp-countdown.is-up{color:var(--error)}
.order-head{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.copy-row{display:flex;align-items:center;gap:10px;margin-top:6px;flex-wrap:wrap}
.big-mono{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:26px;font-weight:700;letter-spacing:.02em;word-break:break-all;
}
.big-mono.otp{letter-spacing:.14em;color:var(--ok)}
.big-mono.is-in{animation:pop .4s ease}
@keyframes pop{0%{transform:scale(.85);opacity:0}100%{transform:scale(1);opacity:1}}
.order-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.order-actions .label{display:block;font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.order-actions .value{font-size:20px;font-weight:700}
.btn.is-busy{opacity:.6;cursor:progress}
.is-copied{background:var(--ok)!important;color:#04231a!important;border-color:transparent!important}

.spinner{
  display:inline-block;width:11px;height:11px;vertical-align:-1px;
  border:2px solid var(--line);border-top-color:var(--brand);
  border-radius:50%;animation:spin .7s linear infinite;margin-right:5px;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ================= Mobile ================= */
@media(max-width:760px){
  .app-grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}
  .app-tile{padding:15px 8px;gap:8px}
  .app-name{font-size:12.5px}
  .app-go{display:none}
  .svc-icon-lg{width:44px;height:44px;font-size:20px}

  .country-row{
    grid-template-columns:30px 1fr auto;
    grid-template-areas:"flag name price" "flag meta buy";
    row-gap:6px;
  }
  .cr-flag{grid-area:flag}
  .cr-name{grid-area:name}
  .cr-price{grid-area:price}
  .cr-stock{grid-area:meta}
  .cr-rate{display:none}
  .cr-buy{grid-area:buy}
  .country-row.cr-pick,.country-row.cr-server{grid-template-columns:30px 1fr auto}

  .big-mono{font-size:22px}
  .buy-hero-bal{margin-left:0;text-align:left;width:100%}
  .order-actions{flex-direction:column;align-items:flex-start}
}

/* Real brand logos on a neutral tile so every colour stays legible */
.svc-icon-img{
  background:#fff;padding:0;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);
}
.svc-icon-img img{
  width:60%;height:60%;object-fit:contain;display:block;
}
.svc-icon-lg.svc-icon-img img{width:30px;height:30px}
.svc-icon-sm.svc-icon-img img{width:19px;height:19px}
@media(max-width:760px){ .svc-icon-lg.svc-icon-img img{width:26px;height:26px} }

/* ================= Landing redesign ================= */
.lnav{position:sticky;top:0;z-index:20;background:rgba(14,18,32,.72);backdrop-filter:blur(10px);
  margin:0 -28px;padding:14px 28px 14px;border-bottom:1px solid var(--line)}
.btn-lg{padding:13px 22px;font-size:15.5px;border-radius:12px}

.hero{text-align:center;padding:54px 0 26px}
.hero-badge{display:inline-block;background:var(--card);border:1px solid var(--line);
  color:var(--muted);font-size:13px;font-weight:600;padding:6px 14px;border-radius:20px;margin-bottom:20px}
.hero h1{font-size:clamp(30px,6vw,56px);line-height:1.05;margin-bottom:14px}
.hero p{font-size:clamp(15px,2.2vw,19px);color:var(--muted);max-width:600px;margin:0 auto 26px}
.hero-cta{justify-content:center;gap:12px}
.trust-row{display:flex;gap:10px 22px;justify-content:center;flex-wrap:wrap;
  margin-top:26px;color:var(--muted);font-size:13.5px;font-weight:500}

.logos{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:34px 0 8px}
.logo-chip{background:var(--card);border:1px solid var(--line);border-radius:12px;
  padding:8px 14px 8px 8px;font-weight:600;font-size:14px;display:flex;gap:8px;align-items:center}
.logos-note{text-align:center;color:var(--muted);font-size:14px;margin-bottom:10px}

.section-h{text-align:center;font-size:clamp(22px,4vw,30px);margin:14px 0 30px}
.steps-wrap{padding:44px 0 20px}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.step{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:26px 22px;position:relative}
.step-n{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;
  border-radius:12px;background:var(--grad);color:#fff;font-weight:800;font-size:18px;margin-bottom:14px;box-shadow:var(--shadow)}
.step h3{margin:0 0 6px;font-size:18px}

.features{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:44px 0}
.feature{padding:26px 22px}
.feature .fi{font-size:30px;margin-bottom:12px}
.feature h3{font-size:18px;margin-bottom:6px}

.cta-band{text-align:center;background:var(--grad);border-radius:22px;padding:48px 24px;margin:20px 0 10px;color:#fff}
.cta-band h2{font-size:clamp(24px,4vw,34px);margin-bottom:8px}
.cta-band p{opacity:.92;margin-bottom:22px;font-size:17px}
.cta-band .btn-primary{background:#fff;color:#2f6fed;border:none;font-weight:700}
.cta-band .btn-primary:hover{opacity:.92}

/* ================= Login / auth redesign ================= */
.auth-split{padding:24px}
.auth-shell{width:100%;max-width:920px;display:grid;grid-template-columns:1fr 1fr;
  background:var(--card);border:1px solid var(--line);border-radius:22px;overflow:hidden;box-shadow:var(--shadow)}
.auth-aside{background:var(--bg-soft);padding:40px 34px;display:flex;flex-direction:column;justify-content:center;border-right:1px solid var(--line)}
.auth-brand-link{display:flex;align-items:center;gap:9px;font-weight:750;font-size:20px;margin-bottom:26px}
.auth-aside h2{font-size:26px;margin-bottom:8px}
.auth-aside>p{color:var(--muted);margin-bottom:22px}
.auth-benefits{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px}
.auth-benefits li{color:var(--text);font-size:14.5px;font-weight:500}
.auth-shell .auth-card{border:none;box-shadow:none;border-radius:0;max-width:none;display:flex;flex-direction:column;justify-content:center}
.auth-title{font-size:26px;margin-bottom:4px;text-align:left}
.auth-shell .auth-sub{text-align:left;margin-bottom:22px}
.auth-brand-mobile{display:none;justify-content:flex-start;margin-bottom:18px}

@media(max-width:820px){
  .auth-shell{grid-template-columns:1fr;max-width:440px}
  .auth-aside{display:none}
  .auth-brand-mobile{display:flex}
  .auth-shell .auth-card{padding:32px}
}

/* ================= Landing mobile ================= */
@media(max-width:820px){
  .steps,.features{grid-template-columns:1fr}
  .lnav{margin:0 -20px;padding:12px 20px}
  .hero{padding:36px 0 20px}
}

/* ================= Search suggestions ================= */
.suggest-wrap{position:relative;display:inline-block}
.suggest-drop{
  position:absolute;top:calc(100% + 6px);left:0;right:0;min-width:240px;z-index:50;
  background:var(--card);border:1px solid var(--line);border-radius:12px;
  box-shadow:var(--shadow);overflow:hidden;max-height:340px;overflow-y:auto;
}
.suggest-item{
  display:flex;align-items:center;gap:10px;padding:9px 12px;cursor:pointer;
  border-bottom:1px solid var(--line);font-size:14px;
}
.suggest-item:last-child{border-bottom:none}
.suggest-item:hover,.suggest-item.is-active{background:var(--bg-soft)}
.suggest-item .svc-icon{width:26px;height:26px;font-size:13px;border-radius:8px}
.suggest-item .svc-icon-img img{width:16px;height:16px}
.sug-label{flex:1;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sug-meta{color:var(--muted);font-size:12px;white-space:nowrap}
.sug-flag{font-size:20px;line-height:1}
@media(max-width:760px){
  .suggest-wrap{display:block}
  .suggest-drop{min-width:0}
}

/* ================= Login: simple centered ================= */
.auth-box{width:100%;max-width:400px}
.auth-logo{display:flex;align-items:center;justify-content:center;gap:9px;
  font-weight:750;font-size:22px;margin-bottom:18px;color:var(--text)}
.auth-box .auth-card{width:100%;max-width:none;padding:30px}

/* ================= Provider badge (1 = SMSPool, 2 = 5SIM) ================= */
.prov-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:17px;height:17px;padding:0 4px;border-radius:5px;
  background:var(--bg-soft);border:1px solid var(--line);
  color:var(--muted);font-size:11px;font-weight:700;vertical-align:middle;margin-left:4px;
}

/* Dashboard popular-service card now wraps the real logo + is fully clickable */
.service{color:inherit}
.service .svc-ic{background:none;width:auto;height:auto;border-radius:0}
.service .svc-ic .svc-icon{width:46px;height:46px;font-size:22px}

/* Notification bell in the admin topbar */
.tb-bell{background:none;border:1px solid var(--line);color:var(--muted);cursor:pointer;
  width:40px;height:40px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;transition:.15s}
.tb-bell:hover{background:var(--bg-soft);color:var(--text)}
.tb-bell svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tb-bell.on{color:#12b365;border-color:#12b365}

/* ============ Admin mobile: sidebar as a slide-in drawer ============ */
.topbar-burger{display:none;background:none;border:none;color:var(--text);cursor:pointer;
  width:42px;height:42px;border-radius:10px;align-items:center;justify-content:center;flex-shrink:0}
.topbar-burger:hover{background:var(--bg-soft)}
.topbar-burger svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sidebar-scrim{position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:.25s;z-index:80}
.sidebar-scrim.show{opacity:1;pointer-events:auto}

@media(max-width:760px){
  body.is-admin .topbar-burger{display:inline-flex}
  body.is-admin .app{display:block}
  body.is-admin .sidebar{
    display:flex;flex-direction:column;position:fixed;top:0;left:0;bottom:0;
    width:272px;max-width:85vw;height:100vh;z-index:81;overflow-y:auto;
    transform:translateX(-100%);transition:transform .25s ease;
  }
  body.is-admin .sidebar.open{transform:none}
  body.is-admin .nav{flex-direction:column;flex-wrap:nowrap}
}

/* ================= Mobile bottom navigation ================= */
.bnav{display:none}

@media(max-width:760px){
  /* Hide the sidebar, let the main area go full width */
  .app{display:block}
  .sidebar{display:none}
  .main{min-height:100vh}
  .topbar{padding:14px 16px}
  .content{padding:16px}
  body.has-bottom-nav .content{padding-bottom:104px}

  .bnav{
    display:flex;position:fixed;z-index:200;
    left:12px;right:12px;bottom:12px;
    background:rgba(22,28,47,.92);backdrop-filter:blur(16px);
    border:1px solid var(--line);border-radius:24px;
    padding:8px 8px 10px;justify-content:space-around;align-items:flex-end;
    box-shadow:0 10px 34px rgba(0,0,0,.45);
  }
  .bnav-item{
    display:flex;flex-direction:column;align-items:center;gap:3px;flex:1;
    color:var(--muted);font-size:10px;font-weight:600;padding:4px 0;
    border-radius:14px;transition:.15s;min-width:0;
  }
  .bnav-item:active{transform:scale(.92)}
  .bnav-item.is-active{color:var(--brand)}
  .bnav-ic{font-size:21px;line-height:1}
  .bnav-lbl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

  /* Raised centre "Buy" button */
  .bnav-center .bnav-ic{
    width:56px;height:56px;margin-top:-30px;border-radius:50%;
    background:var(--grad);color:#fff;
    display:flex;align-items:center;justify-content:center;font-size:26px;
    box-shadow:0 8px 20px rgba(91,140,255,.55);
    border:4px solid var(--bg);
  }
  .bnav-center.is-active .bnav-ic{filter:brightness(1.1)}
  .bnav-center .bnav-lbl{margin-top:2px;color:var(--text)}
}

/* Light theme surface for the bar */
@media (max-width:760px) and (prefers-color-scheme: light){
  :root:not([data-theme="dark"]) .bnav{background:rgba(255,255,255,.92)}
}

/* ================= Password show/hide eye ================= */
.pw-wrap{position:relative;display:block}
.pw-wrap > input{width:100%;padding-right:44px}
.pw-eye{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  background:none;border:none;cursor:pointer;line-height:0;
  padding:7px;opacity:.65;border-radius:8px;color:var(--muted);transition:.15s;
}
.pw-eye svg{width:19px;height:19px;display:block;fill:none;stroke:currentColor;
  stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.pw-eye:hover{opacity:1;background:var(--bg-soft);color:var(--text)}

/* ================= Wallet payment methods ================= */
.pay-methods{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pay-btn{
  display:flex;align-items:center;gap:12px;text-align:left;
  background:var(--card);border:1.5px solid var(--line);border-radius:14px;
  padding:14px 16px;cursor:pointer;color:var(--text);transition:.15s;font:inherit;
}
.pay-btn:hover{border-color:var(--brand);transform:translateY(-2px);box-shadow:0 8px 22px rgba(91,140,255,.16)}
.pay-ic{
  width:42px;height:42px;flex-shrink:0;border-radius:11px;background:var(--bg-soft);
  display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800;
}
.pay-btn small{font-size:11.5px}
@media(max-width:520px){ .pay-methods{grid-template-columns:1fr} }

/* ================= On-site USDT checkout ================= */
.pay-wrap{max-width:560px;margin:0 auto}
.pay-card{padding:22px}
.pay-head{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.pay-coin{width:46px;height:46px;border-radius:12px;background:#26a17b;color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;flex-shrink:0}
.pay-status{display:flex;align-items:center;gap:8px;justify-content:center;
  padding:11px;border-radius:12px;font-weight:600;font-size:14px;margin-bottom:16px}
.pay-waiting{background:var(--bg-soft);color:var(--warn)}
.pay-done{background:rgba(55,211,155,.15);color:var(--ok)}
.pay-failed{background:rgba(255,93,108,.14);color:var(--error)}
.pay-body{display:flex;gap:18px;flex-wrap:wrap}
.pay-qr{flex-shrink:0;background:#fff;padding:8px;border-radius:12px;line-height:0}
.pay-qr img{display:block;border-radius:6px}
.pay-fields{flex:1;min-width:220px;display:flex;flex-direction:column;gap:14px}
.pay-field .label{display:block;font-size:11.5px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:4px}
.pay-addr{word-break:break-all;font-size:13px}
.pay-timer{font-size:13px;color:var(--muted)}
@media(max-width:520px){ .pay-body{justify-content:center} .pay-qr{margin:0 auto} }

/* ================= Nav visibility + transitions ================= */
/* Make the sidebar clearly distinct from the page background */
.sidebar{
  background:var(--sidebar-bg);
  border-right:1px solid var(--sidebar-line);
  box-shadow:2px 0 18px var(--sidebar-shadow);
}
.nav-link{position:relative}
.nav-link:hover{background:var(--card);color:var(--text);transform:translateX(2px)}
/* Clear, animated active state with a sliding indicator bar */
.nav-link.is-active{
  background:var(--grad);color:#fff;box-shadow:0 6px 18px rgba(91,140,255,.4);
  animation:navpop .25s ease;
}
.nav-link.is-active::before{
  content:"";position:absolute;left:-16px;top:50%;transform:translateY(-50%);
  width:4px;height:60%;border-radius:0 4px 4px 0;background:#fff;
}
@keyframes navpop{from{transform:scale(.96);opacity:.6}to{transform:scale(1);opacity:1}}

/* Page-enter animation — tells the user a new page loaded */
.page-enter{animation:pageEnter .32s ease both}
@keyframes pageEnter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){ .page-enter{animation:none} }

/* Top loading bar shown while navigating */
#navbar-progress{
  position:fixed;top:0;left:0;height:3px;width:0;z-index:9999;
  background:var(--grad);box-shadow:0 0 10px rgba(91,140,255,.7);
  opacity:0;transition:width .3s ease,opacity .3s ease;pointer-events:none;
}
#navbar-progress.active{opacity:1;width:85%;transition:width 8s cubic-bezier(.1,.7,.1,1)}
#navbar-progress.done{opacity:0;width:100%;transition:width .2s ease,opacity .3s ease .1s}

/* Clickable stat cards */
.stat-link{display:flex;flex-direction:column;color:inherit;transition:.16s}
.stat-link:hover{border-color:var(--brand);transform:translateY(-3px);box-shadow:0 10px 26px rgba(91,140,255,.18)}
.stat-go{font-size:12px;color:var(--muted);margin-top:8px;opacity:0;transition:.16s}
.stat-link:hover .stat-go{opacity:1;color:var(--brand)}

/* Active state also on the mobile bottom bar item */
.bnav-item.is-active .bnav-ic{transform:scale(1.12);transition:.15s}

/* Small-screen safety: never let anything force horizontal scroll */
@media(max-width:760px){
  html,body{overflow-x:hidden}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .topbar{position:sticky;top:0;z-index:30}
  .stat-go{opacity:1}
}

/* ================= Bottom nav — distinct + 2D icons ================= */
@media(max-width:760px){
  .bnav{
    background:#161d33;
    border:1px solid #333c5c;
    box-shadow:0 14px 40px rgba(0,0,0,.6);
    backdrop-filter:none;
  }
  .bnav-item{color:#8891ad}
  .bnav-item.is-active{color:#fff}
  .bnav-item.is-active .bnav-lbl{color:#5b8cff}
  /* icon rendering */
  .bnav-ic{display:inline-flex;align-items:center;justify-content:center}
  .bnav-ic svg{width:23px;height:23px;fill:none;stroke:currentColor;
    stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  /* active pill behind non-centre items */
  .bnav-item.is-active:not(.bnav-center) .bnav-ic{
    background:rgba(91,140,255,.16);border-radius:12px;padding:5px 12px;color:#5b8cff}
  /* raised centre Buy button */
  .bnav-center .bnav-ic{
    width:56px;height:56px;margin-top:-30px;border-radius:50%;
    background:var(--grad);color:#fff;box-shadow:0 8px 20px rgba(91,140,255,.55);
    border:4px solid #161d33;padding:0;
  }
  .bnav-center .bnav-ic svg{width:26px;height:26px;stroke:#fff}
  .bnav-center.is-active .bnav-ic{filter:brightness(1.1)}
}
@media(max-width:760px) and (prefers-color-scheme:light){
  :root:not([data-theme="dark"]) .bnav{background:#fff;border-color:#dfe3ee}
  :root:not([data-theme="dark"]) .bnav-center .bnav-ic{border-color:#fff}
  :root:not([data-theme="dark"]) .bnav-item{color:#6a7290}
}

/* ============ Bottom nav: sliding raised pill (overrides earlier) ============ */
@media(max-width:760px){
  .bnav{overflow:visible;padding:10px 8px 10px}
  /* the sliding raised circle */
  .bnav-pill{
    position:absolute;top:-20px;left:0;width:54px;height:54px;border-radius:50%;
    background:var(--grad);box-shadow:0 10px 22px rgba(91,140,255,.55);
    border:4px solid #161d33;transform:translateX(-50%);z-index:1;pointer-events:none;
    opacity:0;transition:left .44s cubic-bezier(.34,1.56,.64,1),opacity .3s ease;
  }
  .bnav.bnav-ready .bnav-pill{opacity:1}
  .bnav-item{position:relative;z-index:2}
  .bnav-ic{transition:transform .42s cubic-bezier(.34,1.56,.64,1),color .25s ease}
  .bnav-item:not(.is-active) .bnav-ic{background:none;padding:0;color:#8891ad}
  .bnav-item:not(.is-active) .bnav-ic svg{stroke:#8891ad}
  /* active icon rides up onto the pill */
  .bnav-item.is-active .bnav-ic{transform:translateY(-22px);background:none;padding:0;color:#fff}
  .bnav-item.is-active .bnav-ic svg{stroke:#fff}
  .bnav-item.is-active .bnav-lbl{color:#5b8cff;font-weight:700}
}
@media(max-width:760px) and (prefers-color-scheme:light){
  :root:not([data-theme="dark"]) .bnav-pill{border-color:#fff}
}

/* Forced light (the site default) — make the mobile bottom bar light too,
   because the media queries above only fire when the DEVICE is set to light. */
@media(max-width:760px){
  :root[data-theme="light"] .bnav{background:#fff;border-color:#dfe3ee;box-shadow:0 14px 40px rgba(20,30,60,.14)}
  :root[data-theme="light"] .bnav-center .bnav-ic{border-color:#fff}
  :root[data-theme="light"] .bnav-pill{border-color:#fff}
  :root[data-theme="light"] .bnav-item{color:#6a7290}
  :root[data-theme="light"] .bnav-item:not(.is-active) .bnav-ic{color:#6a7290}
  :root[data-theme="light"] .bnav-item:not(.is-active) .bnav-ic svg{stroke:#6a7290}
}

/* ============ Top bar: wallet icon + deposit (+) button ============ */
.tb-ic{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.wallet-pill{display:inline-flex;align-items:center;gap:7px}
.wallet-pill .ic{display:none}   /* hide the old css-sprite icon if present */
.wallet-add{
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:11px;background:var(--grad);color:#fff;
  box-shadow:0 6px 16px rgba(91,140,255,.4);transition:.15s;flex-shrink:0;
}
.wallet-add:hover{transform:translateY(-1px) scale(1.05)}
.wallet-add .tb-ic{width:18px;height:18px;stroke:#fff;stroke-width:2.5}
.topbar-right{display:flex;align-items:center;gap:10px}

/* ================= Support chat widget (customer) ================= */
#chat-widget{position:fixed;right:18px;bottom:18px;z-index:9000}
body.has-bottom-nav #chat-widget{bottom:92px}   /* clear the mobile bottom bar */
#chat-toggle{
  position:relative;width:58px;height:58px;border-radius:50%;border:none;cursor:pointer;
  background:var(--grad);color:#fff;box-shadow:0 10px 26px rgba(91,140,255,.5);
  display:flex;align-items:center;justify-content:center;transition:transform .2s;
}
#chat-toggle:hover{transform:scale(1.06)}
#chat-toggle svg{width:26px;height:26px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#chat-toggle .chat-close-ic{display:none}
#chat-widget.is-open .chat-open-ic{display:none}
#chat-widget.is-open .chat-close-ic{display:block}
.chat-badge{position:absolute;top:-3px;right:-3px;min-width:20px;height:20px;padding:0 5px;
  background:var(--error);color:#fff;border-radius:11px;font-size:11px;font-weight:700;
  display:flex;align-items:center;justify-content:center;border:2px solid var(--bg)}
.chat-badge[hidden]{display:none}

#chat-panel{
  position:absolute;right:0;bottom:70px;width:340px;max-width:calc(100vw - 36px);
  height:460px;max-height:calc(100vh - 130px);background:var(--card);
  border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);
  display:flex;flex-direction:column;overflow:hidden;animation:chatIn .25s ease}
@keyframes chatIn{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
.chat-head{display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;background:var(--grad);color:#fff}
.chat-head .chat-sub{display:block;font-size:11.5px;opacity:.9;font-weight:400}
#chat-min{background:none;border:none;color:#fff;font-size:20px;cursor:pointer;line-height:1}
.chat-body{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:8px}
.chat-welcome{background:var(--bg-soft);border-radius:12px;padding:10px 12px;font-size:13.5px;color:var(--muted)}
.chat-msg{display:flex;flex-direction:column;max-width:80%}
.chat-msg.mine{align-self:flex-end;align-items:flex-end}
.chat-msg.theirs{align-self:flex-start;align-items:flex-start}
.chat-bubble{padding:9px 13px;border-radius:14px;font-size:14px;line-height:1.4;word-break:break-word}
.chat-msg.mine .chat-bubble{background:var(--brand);color:#fff;border-bottom-right-radius:4px}
.chat-msg.theirs .chat-bubble{background:var(--bg-soft);color:var(--text);border-bottom-left-radius:4px}
.chat-time{font-size:10.5px;color:var(--muted);margin-top:3px}
.chat-form{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line)}
.chat-form input{flex:1;margin:0}
.chat-form button{width:42px;height:42px;flex-shrink:0;border:none;border-radius:11px;
  background:var(--grad);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center}
.chat-form button svg{width:18px;height:18px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:520px){ #chat-panel{height:calc(100vh - 150px)} }

/* Nav badge (admin support unread) */
.nav-badge{margin-left:auto;background:var(--error);color:#fff;font-size:11px;font-weight:700;
  min-width:19px;height:19px;padding:0 5px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center}

/* ================= Admin support inbox ================= */
.support-wrap{display:grid;grid-template-columns:300px 1fr;gap:16px;min-height:60vh}
.support-list{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px;overflow-y:auto;max-height:72vh}
.convo{position:relative;display:block;padding:11px 12px;border-radius:12px;margin-bottom:6px;color:inherit;border:1px solid transparent;transition:.14s}
.convo:hover{background:var(--bg-soft)}
.convo.is-open{background:var(--bg-soft);border-color:var(--brand)}
.convo-top{display:flex;justify-content:space-between;gap:8px}
.convo-name{font-weight:600;font-size:14px}
.convo-time{font-size:11px}
.convo-last{font-size:12.5px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.convo-badge{position:absolute;right:10px;bottom:10px;background:var(--error);color:#fff;
  font-size:11px;font-weight:700;min-width:18px;height:18px;padding:0 5px;border-radius:9px;
  display:flex;align-items:center;justify-content:center}
.support-thread{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);display:flex;flex-direction:column;max-height:72vh;overflow:hidden}
.thread-empty{display:flex;align-items:center;justify-content:center;flex:1;padding:40px}
.thread-head{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line)}
.thread-head .chat-sub{display:block;font-size:12px;color:var(--muted)}
.thread-back{display:none;font-size:20px;color:var(--muted)}
.thread-body{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:8px}
@media(max-width:760px){
  .support-wrap{grid-template-columns:1fr}
  .support-wrap.has-thread .support-list{display:none}
  .support-wrap:not(.has-thread) .support-thread{display:none}
  .thread-back{display:inline}
}

/* ============ Chat widget fixes ============ */
/* FIX: the panel must be hidden until opened (ID rule was overriding [hidden]) */
#chat-panel[hidden]{display:none !important}
#chat-badge[hidden]{display:none !important}

/* Distinct, noticeable chat colour (solid green) — stands apart from the blue theme */
#chat-toggle{background:#1faa53}
#chat-toggle:hover{background:#178f47}
.chat-head{background:#1faa53}
.chat-form button{background:#1faa53}

/* Keep the bubble smaller and out of the way */
#chat-toggle{width:54px;height:54px}
#chat-widget{right:16px;bottom:16px}
body.has-bottom-nav #chat-widget{bottom:96px;right:14px}
/* On desktop, lift it clear of page content edges */
@media(min-width:761px){ #chat-widget{bottom:22px;right:22px} }

/* ============ Chat: mobile-centered panel + clear close button ============ */
#chat-min{font-size:26px;line-height:1;width:34px;height:34px;border-radius:9px;
  display:flex;align-items:center;justify-content:center;transition:.15s}
#chat-min:hover{background:rgba(255,255,255,.18)}

@media(max-width:560px){
  /* full-width, centered panel that clears the bottom nav */
  #chat-panel{
    position:fixed;left:10px;right:10px;bottom:84px;top:auto;
    width:auto;max-width:none;height:auto;max-height:74vh;
  }
  body:not(.has-bottom-nav) #chat-panel{bottom:80px}
  /* bigger, easier-to-tap close button on mobile */
  #chat-min{width:40px;height:40px;font-size:30px}
}

/* ============ Chat: attachments ============ */
.chat-attach{display:flex;align-items:center;justify-content:center;width:38px;height:38px;
  flex-shrink:0;border-radius:11px;cursor:pointer;color:var(--muted);transition:.15s}
.chat-attach:hover{background:var(--bg-soft);color:var(--brand)}
.chat-attach svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.chat-img{display:block;max-width:180px;border-radius:12px;overflow:hidden;line-height:0}
.chat-img img{width:100%;height:auto;display:block}
.chat-file{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border-radius:12px;
  background:var(--bg-soft);color:var(--text);font-size:13px;max-width:220px;text-decoration:none}
.chat-msg.mine .chat-file{background:rgba(255,255,255,.18);color:#fff}
.chat-file svg{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.chat-file span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ============ Avatars (initials / photo) ============ */
.avatar{display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:50%;font-weight:700;font-size:13.5px;
  overflow:hidden;flex-shrink:0;line-height:1;user-select:none}
.avatar-img{background:var(--bg-soft)}
.avatar-img img{width:100%;height:100%;object-fit:cover;display:block}
.avatar-link{display:inline-flex}
.avatar-lg{width:76px;height:76px;font-size:26px}
.avatar-edit{display:flex;align-items:center;gap:18px;flex-wrap:wrap}

/* ============ Email / help buttons ============ */
.btn-ic{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;margin-right:6px;vertical-align:-3px}
.help-cta{display:flex;align-items:center;justify-content:space-between;gap:16px;
  flex-wrap:wrap;background:var(--card);border:1px solid var(--line);
  border-radius:var(--radius);padding:16px 20px}
.help-cta b{display:block}
.help-cta .muted{font-size:13.5px}
@media(max-width:520px){ .hide-sm{display:none} .help-cta{flex-direction:column;align-items:flex-start} }

/* ============ Chat attachment: download affordance ============ */
.chat-img{position:relative}
.chat-img .chat-dl{position:absolute;top:6px;right:6px;width:24px;height:24px;border-radius:50%;
  background:rgba(0,0,0,.55);color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:15px;line-height:1;opacity:0;transition:.15s}
.chat-img:hover .chat-dl{opacity:1}
.chat-file{cursor:pointer}
.chat-file .chat-dl-ic{width:16px;height:16px;flex-shrink:0;margin-left:auto;
  fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.7}
.chat-file:hover{filter:brightness(1.08)}
.chat-file:hover .chat-dl-ic{opacity:1}

/* ============ Chat: distinct window + bubble colours ============ */
#chat-panel{background:#141d3a;border-color:#2c3766}
.chat-body{background:#0c1430}
.chat-welcome{background:#1f2b4f;color:#cdd4ec}
/* incoming (sender / left) bubble — distinct from the chat window */
.chat-msg.theirs .chat-bubble{background:#3b4676;color:#eef1fb}
/* outgoing (right) bubble stays brand blue */
.chat-msg.mine .chat-bubble{background:#4f7bff;color:#fff}
.chat-msg.theirs .chat-file{background:#2a3560;color:#eef1fb}
.chat-form{background:#141d3a;border-top-color:#2c3766}
.chat-form input{background:#0c1430;border-color:#2c3766;color:#fff}
.chat-guest-actions{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.chat-status{align-self:center;font-size:12px;color:var(--muted);padding:4px 10px;
  background:rgba(127,140,180,.15);border-radius:10px;margin-top:2px}
/* Optional name field shown to guests above the composer */
.chat-guestbar{padding:8px 10px 0}
.chat-guestbar input{width:100%;margin:0;font-size:13px;padding:8px 11px}
/* Guest / blocked tags in the admin conversation list */
.convo-tag{display:inline-block;margin-top:6px;margin-right:6px;font-size:10.5px;font-weight:700;
  letter-spacing:.04em;text-transform:uppercase;padding:2px 7px;border-radius:8px;
  background:rgba(127,140,180,.2);color:var(--muted)}
.convo-tag.is-blocked{background:rgba(255,90,110,.18);color:#ff8f9a}

@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]) #chat-panel{background:#f3f5fb;border-color:#dbe0ee}
  :root:not([data-theme="dark"]) .chat-body{background:#e9edf7}
  :root:not([data-theme="dark"]) .chat-welcome{background:#fff;color:#42506e}
  :root:not([data-theme="dark"]) .chat-msg.theirs .chat-bubble{background:#fff;color:#1c2540;box-shadow:0 1px 3px rgba(0,0,0,.08)}
  :root:not([data-theme="dark"]) .chat-form{background:#f3f5fb;border-top-color:#dbe0ee}
  :root:not([data-theme="dark"]) .chat-form input{background:#fff;border-color:#dbe0ee;color:#1c2540}
}

/* ============ Chat: refined placement in the desktop window ============ */
/* Sit clearly in the corner with breathing room; keep the panel fully on-screen
   and anchored just above the toggle so it never clips or floats oddly. */
#chat-widget{z-index:9500}
@media(min-width:761px){
  #chat-widget{right:28px;bottom:28px}
  #chat-panel{
    right:0;bottom:74px;width:360px;max-width:calc(100vw - 56px);
    height:min(520px, calc(100vh - 132px));max-height:none;
  }
}
/* Mid-size windows: make sure it can't run past the top of the viewport */
@media(min-width:561px) and (max-width:900px){
  #chat-panel{height:min(460px, calc(100vh - 130px))}
}

/* ============ Live Visitors (admin) ============ */
.nav-badge-live{background:#12b365;animation:vispulse 1.6s ease-in-out infinite}
@keyframes vispulse{0%,100%{box-shadow:0 0 0 0 rgba(18,179,101,.6)}50%{box-shadow:0 0 0 5px rgba(18,179,101,0)}}

.vis-head{display:flex;align-items:center;justify-content:space-between;gap:16px;
  flex-wrap:wrap;margin-bottom:18px}
.vis-stat{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:700}
.vis-stat #vis-count{color:#12b365}
.vis-dot{width:12px;height:12px;border-radius:50%;background:#12b365;flex-shrink:0;
  animation:vispulse 1.6s ease-in-out infinite}
.vis-sound{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--muted);cursor:pointer}
.vis-sound input{width:auto;margin:0}

.vis-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;margin-bottom:10px}
.vis-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:14px 16px;box-shadow:var(--shadow)}
.vis-card-top{display:flex;align-items:center;gap:10px;margin-bottom:10px;
  padding-bottom:10px;border-bottom:1px solid var(--line)}
.vis-flag{font-size:12px;font-weight:800;letter-spacing:.04em;line-height:1;
  background:var(--bg-soft);border:1px solid var(--line);border-radius:7px;
  padding:6px 7px;color:var(--muted);flex-shrink:0}
.vis-dev svg{width:20px;height:20px;display:block;color:var(--muted)}
.vis-loc{flex:1;min-width:0}
.vis-loc b{display:block;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vis-loc .muted{font-size:12px;display:block}
.vis-dev{font-size:20px;line-height:1}
.vis-card-row{display:flex;justify-content:space-between;gap:12px;font-size:12.5px;
  padding:3px 0;align-items:baseline}
.vis-card-row .muted{flex-shrink:0}
.vis-card-row span:last-child{text-align:right;word-break:break-word;min-width:0}
.vis-card-foot{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.vis-chat{text-align:center}
.vis-guest-note{text-align:center;font-size:12.5px;color:var(--muted);padding:6px 0}

/* ================= Admin support PWA (standalone app) ================= */
.pwa-body{margin:0;height:100vh;overflow:hidden;background:var(--bg)}
.pwa-app{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.pwa-bar{display:flex;align-items:center;gap:12px;padding:12px 14px;
  padding-top:calc(12px + env(safe-area-inset-top));
  background:var(--card);border-bottom:1px solid var(--line);flex-shrink:0}
.pwa-bar-title{font-weight:700;font-size:17px;flex:1}
.pwa-icon-btn{background:none;border:none;color:var(--text);cursor:pointer;
  width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;transition:.15s}
.pwa-icon-btn:hover{background:var(--bg-soft)}
.pwa-icon-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pwa-online{display:inline-flex;align-items:center;gap:6px;background:var(--bg-soft);
  border-radius:20px;padding:5px 11px;color:var(--text);font-size:13px;font-weight:600}
.pwa-online-dot{width:9px;height:9px;border-radius:50%;background:#12b365;animation:vispulse 1.6s ease-in-out infinite}

/* Drawer */
.pwa-scrim{position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:.25s;z-index:60}
.pwa-scrim.show{opacity:1;pointer-events:auto}
.pwa-drawer{position:fixed;top:0;left:0;bottom:0;width:280px;max-width:82vw;background:var(--card);
  border-right:1px solid var(--line);transform:translateX(-100%);transition:transform .25s ease;
  z-index:61;display:flex;flex-direction:column;overflow-y:auto}
.pwa-drawer.open{transform:none}
.pwa-drawer-head{display:flex;align-items:center;gap:12px;padding:20px 18px;border-bottom:1px solid var(--line)}
.pwa-drawer-logo{width:44px;height:44px;border-radius:12px}
.pwa-drawer-nav{flex:1;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.pwa-drawer-nav a{padding:12px 14px;border-radius:10px;color:var(--muted);font-weight:550;font-size:14.5px}
.pwa-drawer-nav a:hover{background:var(--bg-soft);color:var(--text)}
.pwa-drawer-foot{padding:14px 14px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px}
.pwa-drawer-foot .btn{justify-content:center}

/* Main split */
.pwa-main{flex:1;display:flex;min-height:0;overflow:hidden}
.pwa-list{width:340px;flex-shrink:0;border-right:1px solid var(--line);overflow-y:auto;background:var(--bg)}
.pwa-list-empty{padding:28px 18px;text-align:center}
.pwa-convo{width:100%;display:flex;align-items:center;gap:12px;padding:13px 15px;border:none;
  border-bottom:1px solid var(--line);background:none;color:inherit;cursor:pointer;text-align:left;position:relative;transition:.12s}
.pwa-convo:hover{background:var(--bg-soft)}
.pwa-convo.is-open{background:var(--bg-soft)}
.pwa-avatar{width:44px;height:44px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;
  font-weight:700;color:#fff;background:var(--grad);font-size:17px}
.pwa-convo-mid{flex:1;min-width:0}
.pwa-convo-top{display:flex;justify-content:space-between;gap:8px}
.pwa-convo-name{font-weight:650;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pwa-convo-time{font-size:11px;color:var(--muted);flex-shrink:0}
.pwa-convo-last{font-size:12.8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.pwa-badge{position:absolute;right:12px;bottom:12px;background:#12b365;color:#fff;font-size:11px;font-weight:700;
  min-width:19px;height:19px;padding:0 5px;border-radius:10px;display:flex;align-items:center;justify-content:center}

.pwa-thread{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg-soft)}
.pwa-thread-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px;text-align:center}
.pwa-thread-live{flex:1;display:flex;flex-direction:column;min-height:0}
.pwa-thread-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:var(--card);border-bottom:1px solid var(--line)}
.pwa-thread-head .chat-sub{display:block;font-size:12px;color:var(--muted)}
.pwa-back{display:none}
.pwa-thread-body{flex:1;min-height:0}

@media(max-width:760px){
  .pwa-list{width:100%}
  .pwa-thread{position:absolute;inset:0;top:0;transform:translateX(100%);transition:transform .2s ease;z-index:20}
  .pwa-app.thread-open .pwa-thread{transform:none}
  .pwa-app.thread-open .pwa-main{position:relative}
  .pwa-back{display:flex}
  .pwa-thread-empty{display:none}
}

/* Account page rows (app + notification settings) */
.acct-row{display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 0;border-top:1px solid var(--line);flex-wrap:wrap}
.acct-row:first-of-type{border-top:none}
.switch-lbl{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;
  font-weight:600;color:var(--muted);cursor:pointer;margin:0}

/* ================= Profit & Loss ================= */
.pnl-range{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.pnl-verdict{background:var(--card);border:1px solid var(--line);border-left:5px solid var(--muted);
  border-radius:var(--radius);padding:22px 26px;margin-bottom:18px}
.pnl-verdict.is-good{border-left-color:#12b365}
.pnl-verdict.is-bad{border-left-color:#ff5a6e}
.pnl-verdict-big{font-size:26px;font-weight:800;letter-spacing:-.01em;margin-bottom:6px}
.pnl-verdict.is-good .pnl-verdict-big{color:#12b365}
.pnl-verdict.is-bad .pnl-verdict-big{color:#ff5a6e}
.pnl-verdict p{margin:0;font-size:14.5px;line-height:1.6;color:var(--muted)}

.pnl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;margin-bottom:8px}
.pnl-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px}
.pnl-card.is-good{border-color:rgba(18,179,101,.5)}
.pnl-card.is-bad{border-color:rgba(255,90,110,.5)}
.pnl-label{display:block;font-size:12.5px;font-weight:700;color:var(--muted);
  text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}
.pnl-num{display:block;font-size:30px;font-weight:800;letter-spacing:-.02em;line-height:1.1}
.pnl-card.is-good .pnl-num{color:#12b365}
.pnl-card.is-bad .pnl-num{color:#ff5a6e}
.pnl-num.is-cost{color:#f0a35e}
.pnl-card p{margin:8px 0 0;font-size:12.5px;line-height:1.5}
.pnl-cell{text-align:right;font-weight:700;font-size:16px;white-space:nowrap}
.pnl-good{color:#12b365}
.pnl-bad{color:#ff5a6e}
@media(max-width:560px){ .pnl-verdict-big{font-size:21px} .pnl-num{font-size:26px} }

/* Live "you will be charged" note on the wallet top-up form */
.charge-note{background:var(--bg-soft);border:1px solid var(--line);border-left:4px solid var(--brand);
  border-radius:12px;padding:12px 15px;line-height:1.5;margin:-2px 0 16px}
.charge-note[hidden]{display:none}
.charge-lead{display:block;font-size:11.5px;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;color:var(--muted)}
.charge-total{display:block;font-size:23px;font-weight:800;letter-spacing:-.01em;margin:2px 0 4px}
.charge-break{display:block;font-size:12.5px;color:var(--muted)}

/* ================= Admin mailbox ================= */
.mail-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.mail-top form{margin:0}
.mail-top input{margin:0}
.mail-wrap{display:grid;grid-template-columns:170px 300px 1fr;gap:16px;min-height:62vh}
.mail-folders{display:flex;flex-direction:column;gap:4px}
.mail-folder{display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:11px 13px;border-radius:11px;color:var(--muted);font-weight:550;font-size:14px;transition:.14s}
.mail-folder:hover{background:var(--bg-soft);color:var(--text)}
.mail-folder.is-active{background:var(--grad);color:#fff}
.mail-count{background:rgba(127,140,180,.25);color:inherit;font-size:11px;font-weight:700;
  min-width:20px;height:20px;padding:0 6px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center}
.mail-folder.is-active .mail-count{background:rgba(255,255,255,.28)}

.mail-list{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  overflow-y:auto;max-height:72vh}
.mail-item{display:block;padding:13px 15px;border-bottom:1px solid var(--line);color:inherit}
.mail-item:last-child{border-bottom:none}
.mail-item:hover{background:var(--bg-soft)}
.mail-item.is-open{background:var(--bg-soft);box-shadow:inset 3px 0 0 var(--brand)}
.mail-item.is-unread .mail-subject,.mail-item.is-unread .mail-who{font-weight:700}
.mail-item-top{display:flex;justify-content:space-between;gap:8px}
.mail-who{font-size:13.5px;font-weight:600}
.mail-date{font-size:11.5px;flex-shrink:0}
.mail-subject{font-size:13.5px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mail-snippet{font-size:12.5px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.mail-pane{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:22px 24px;overflow-y:auto;max-height:72vh}
.mail-empty{display:flex;align-items:center;justify-content:center;height:100%;min-height:220px;padding:30px;text-align:center}
.mail-read-head{border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:16px}
.mail-body{font-size:14.5px;line-height:1.7;word-break:break-word}
.mail-body img{max-width:100%;height:auto}
.mail-atts{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.mail-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:22px;padding-top:16px;border-top:1px solid var(--line)}
.mail-actions form{margin:0}
.mail-compose textarea{font-family:inherit;font-size:14.5px;line-height:1.6}

@media(max-width:1000px){
  .mail-wrap{grid-template-columns:1fr}
  .mail-folders{flex-direction:row;flex-wrap:wrap}
  .mail-folder{flex:1;min-width:120px;justify-content:center}
  .mail-list{max-height:340px}
  .mail-pane{max-height:none}
}

/* Drawer menu mirrors the admin sidebar: grouped sections + icons */
.pwa-drawer-nav a{display:flex;align-items:center;gap:11px}
.pwa-drawer-nav .nav-section{padding:14px 14px 6px;font-size:10.5px;font-weight:700;
  letter-spacing:.1em;text-transform:uppercase;color:var(--muted);opacity:.75}
.pwa-drawer-nav .nav-section:first-child{padding-top:4px}
.pwa-drawer-nav .ic{opacity:.85;flex-shrink:0}

/* ---- Phone polish: notch/gesture-bar safe areas + comfortable tap targets ---- */
.pwa-bar{padding-top:calc(12px + env(safe-area-inset-top));
  padding-left:calc(14px + env(safe-area-inset-left));
  padding-right:calc(14px + env(safe-area-inset-right))}
.pwa-drawer{padding-top:env(safe-area-inset-top)}
.pwa-thread .chat-form{padding-bottom:calc(10px + env(safe-area-inset-bottom))}

@media(max-width:560px){
  .pwa-bar-title{font-size:16px}
  .pwa-icon-btn{width:42px;height:42px}          /* easier to hit */
  .pwa-online{padding:5px 10px;font-size:12px}
  .pwa-convo{padding:12px 14px;gap:11px}
  .pwa-avatar{width:42px;height:42px}
  .pwa-convo-name{font-size:15px}
  .pwa-convo-last{font-size:13px}
  .pwa-thread-head{padding:10px 12px}
  .pwa-thread-body{padding:12px}
  .pwa-thread .chat-form{padding:8px 10px}
  .pwa-thread .chat-form input{font-size:16px}   /* 16px stops iOS zooming in */
  .pwa-thread .chat-form button{width:44px;height:44px}
  .pwa-drawer-nav a{padding:13px 14px;font-size:15px}
  .chat-msg{max-width:88%}
}

/* ---- Fingerprint / face unlock screen ---- */
.bio-lock{padding:calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom))}
.bio-lock .btn{min-width:180px;padding:13px 22px;font-size:15px}
@media(max-width:560px){
  .bio-emoji{font-size:42px}
  .bio-title{font-size:17px}
  .bio-sub{font-size:13.5px;max-width:280px}
}

/* Toast notifications for new arrivals */
.vis-toasts{position:fixed;right:20px;bottom:20px;z-index:9600;display:flex;
  flex-direction:column;gap:10px;pointer-events:none}
.vis-toast{display:flex;align-items:center;gap:12px;background:var(--card);
  border:1px solid var(--line);border-left:4px solid #12b365;border-radius:14px;
  padding:12px 16px;box-shadow:var(--shadow);min-width:250px;max-width:330px;
  opacity:0;transform:translateX(30px);transition:.35s ease}
.vis-toast.show{opacity:1;transform:none}
.vis-toast-flag{font-size:24px;line-height:1}
.vis-toast b{display:block;font-size:13.5px}
.vis-toast .muted{display:block;font-size:12px;margin-top:2px}
@media(max-width:520px){ .vis-toasts{right:10px;left:10px;bottom:96px} .vis-toast{max-width:none} }

/* ================= Light theme (toggle) ================= */
/* Light palette.
   Applied when the visitor CHOOSES light, and also when they leave the theme
   on "Device default" and their phone/computer is set to light. The site is
   dark by default, so an explicit data-theme="dark" always wins. */
:root[data-theme="light"]{
  --bg:#f5f7fc; --bg-soft:#eceff7; --card:#ffffff;
  --line:#e2e7f2; --text:#1b2440; --muted:#5c6788; --brand:#3f6fff;
  --brand-2:#7c5bff; --ok:#12b365; --warn:#b9820e; --error:#e0384b;
  --shadow:0 10px 30px rgba(30,50,90,.10);
  --sidebar-bg:#ffffff; --sidebar-line:#e2e7f2; --sidebar-shadow:rgba(30,50,90,.10);
}
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]):not([data-theme="light"]){
    --bg:#f5f7fc; --bg-soft:#eceff7; --card:#ffffff;
    --line:#e2e7f2; --text:#1b2440; --muted:#5c6788; --brand:#3f6fff;
    --brand-2:#7c5bff; --ok:#12b365; --warn:#b9820e; --error:#e0384b;
    --shadow:0 10px 30px rgba(30,50,90,.10);
    --sidebar-bg:#ffffff; --sidebar-line:#e2e7f2; --sidebar-shadow:rgba(30,50,90,.10);
  }
  /* Sidebar text must darken with it (mirrors the explicit-light rules). */
  :root:not([data-theme="dark"]):not([data-theme="light"]) .nav-link{color:#4a5678}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .nav-link:hover{background:#eef1f9;color:#141c33}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .nav-section{color:#7c88a8}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .brand{color:#141c33}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .topbar-burger{color:#1b2440}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .sidebar-scrim{background:rgba(20,30,60,.35)}
  /* Chat window in light mode */
  :root:not([data-theme="dark"]):not([data-theme="light"]) #chat-panel{background:#f3f5fb;border-color:#dbe0ee}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .chat-body{background:#e9edf7}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .chat-welcome{background:#fff;color:#42506e}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .chat-msg.theirs .chat-bubble{background:#fff;color:#1c2540;box-shadow:0 1px 3px rgba(0,0,0,.08)}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .chat-form{background:#f3f5fb;border-top-color:#dbe0ee}
  :root:not([data-theme="dark"]):not([data-theme="light"]) .chat-form input{background:#fff;border-color:#dbe0ee;color:#1c2540}
}

/* ================= Toggle switches =================
   Every checkbox on the site renders as a 2D switch — no markup changes
   needed, so new checkboxes get the same treatment automatically. */
input[type="checkbox"]{
  -webkit-appearance:none;appearance:none;
  width:44px !important;height:24px !important;min-width:44px;flex:0 0 auto;
  margin:0;padding:0;border:none;border-radius:999px;cursor:pointer;
  background:var(--line);position:relative;vertical-align:middle;
  transition:background .2s ease;
}
input[type="checkbox"]::after{
  content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;
  border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.35);
  transition:transform .2s ease;
}
input[type="checkbox"]:checked{background:var(--ok)}
input[type="checkbox"]:checked::after{transform:translateX(20px)}
input[type="checkbox"]:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
input[type="checkbox"]:disabled{opacity:.45;cursor:not-allowed}

/* ================= Theme chooser (3 options) ================= */
.theme-seg{display:inline-flex;background:var(--bg-soft);border:1px solid var(--line);
  border-radius:11px;padding:3px;gap:2px}
.theme-seg button{background:none;border:none;cursor:pointer;color:var(--muted);
  font:600 13px/1 inherit;padding:8px 13px;border-radius:9px;display:inline-flex;
  align-items:center;gap:7px;transition:.15s}
.theme-seg button:hover{color:var(--text)}
.theme-seg button.is-on{background:var(--card);color:var(--text);box-shadow:0 1px 4px rgba(0,0,0,.18)}
.theme-seg svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
@media(max-width:420px){ .theme-seg button span{display:none} .theme-seg button{padding:9px 12px} }
/* Sidebar text needs to darken in light mode too */
:root[data-theme="light"] .nav-link{color:#4a5678}
:root[data-theme="light"] .nav-link:hover{background:#eef1f9;color:#141c33}
:root[data-theme="light"] .nav-section{color:#7c88a8}
:root[data-theme="light"] .brand{color:#141c33}
:root[data-theme="light"] .topbar-burger{color:#1b2440}
:root[data-theme="light"] .sidebar-scrim{background:rgba(20,30,60,.35)}
:root[data-theme="light"] body{background:var(--bg)}
:root[data-theme="light"] .topbar{background:rgba(255,255,255,.78)}
:root[data-theme="light"] #tos-preloader{background:#f5f7fc}
:root[data-theme="light"] #tos-preloader .tos-text{color:#42506e}
/* Chat widget in light mode (toggle-driven, independent of the OS setting) */
:root[data-theme="light"] #chat-panel{background:#f3f5fb;border-color:#dbe0ee}
:root[data-theme="light"] .chat-body{background:#e9edf7}
:root[data-theme="light"] .chat-welcome{background:#fff;color:#42506e}
:root[data-theme="light"] .chat-msg.theirs .chat-bubble{background:#fff;color:#1c2540;box-shadow:0 1px 3px rgba(0,0,0,.08)}
:root[data-theme="light"] .chat-msg.theirs .chat-file{background:#fff;color:#1c2540}
:root[data-theme="light"] .chat-form{background:#f3f5fb;border-top-color:#dbe0ee}
:root[data-theme="light"] .chat-form input{background:#fff;border-color:#dbe0ee;color:#1c2540}

/* ================= Light / dark toggle button ================= */
#tos-theme-toggle{position:fixed;left:16px;bottom:16px;z-index:9400;width:44px;height:44px;
  border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--text);
  cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow);transition:.2s}
#tos-theme-toggle:hover{transform:scale(1.07)}
#tos-theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#tos-theme-toggle .tt-sun{display:none}
#tos-theme-toggle[data-mode="dark"] .tt-moon{display:none}
#tos-theme-toggle[data-mode="dark"] .tt-sun{display:block}
/* A dot marks "following your device" so the current setting is never a mystery */
#tos-theme-toggle[data-pref="system"]::after{
  content:"";position:absolute;right:7px;bottom:7px;width:7px;height:7px;
  border-radius:50%;background:var(--ok);border:2px solid var(--card)}
body.has-bottom-nav #tos-theme-toggle{bottom:92px}
@media(max-width:520px){ #tos-theme-toggle{width:40px;height:40px;left:12px} }
