:root {
  --brand: #0f766e;
  --brand-2: #14b8a6;
  --brand-ink: #ffffff;
  --bg: #f3f6f6;
  --card: #ffffff;
  --ink: #12201f;
  --muted: #5f6f6e;
  --line: #e2e8e7;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16,40,38,.06), 0 4px 16px rgba(16,40,38,.06);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1514; --card: #16211f; --ink: #e7efee; --muted: #9db0ae; --line: #253331;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; font-size: 16px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* layout */
.top { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 64px; }
.top .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.top h1 { margin: 0; font-size: 21px; font-weight: 700; }
.top .sub { opacity: .85; font-size: 14px; }
.top .icon-btn { background: rgba(255,255,255,.18); border: 0; color: #fff; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.page { padding: 0 14px calc(96px + var(--safe-b)); margin-top: -46px; max-width: 560px; margin-left: auto; margin-right: auto; }
.page.plain { margin-top: 14px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: var(--safe-b); z-index: 20; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; font-size: 12px; color: var(--muted); text-decoration: none; }
.tabbar a.on { color: var(--brand); font-weight: 600; }
.tabbar svg { width: 24px; height: 24px; }

/* status */
.status { display: flex; gap: 16px; align-items: center; }
.ring { width: 96px; height: 96px; flex: none; position: relative; }
.ring svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring b { font-size: 26px; display: block; line-height: 1; }
.ring span { font-size: 11px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.pill.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 14px; }
.kv small { display: block; color: var(--muted); font-size: 12px; }
.alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.alert.due { background: color-mix(in srgb, var(--bad) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }

/* buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 12px; padding: 14px 16px; font-weight: 700; font-size: 16px; cursor: pointer; background: var(--brand); color: #fff; text-decoration: none; }
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .55; }
.btn.light { background: color-mix(in srgb, var(--brand) 12%, var(--card)); color: var(--brand); }
.btn.sm { width: auto; padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.btn.danger { background: var(--bad); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* plans */
.plan { display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px solid var(--line); border-radius: 14px; margin-bottom: 10px; cursor: pointer; background: var(--card); }
.plan.sel { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.plan .speed { width: 56px; height: 56px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 12%, var(--card)); color: var(--brand); display: grid; place-items: center; text-align: center; font-weight: 800; line-height: 1; flex: none; }
.plan .speed small { display: block; font-size: 10px; font-weight: 600; }
.plan .info { flex: 1; min-width: 0; }
.plan .price { font-weight: 800; font-size: 18px; }
.tag { font-size: 11px; background: var(--brand); color: #fff; padding: 2px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 2px; }
.sum { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.sum div { display: flex; justify-content: space-between; padding: 3px 0; }
.sum .tot { font-weight: 800; font-size: 18px; }

/* lists */
.list .it { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.list .it:first-child { border-top: 0; }
.list .it b { display: block; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg button { border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 8px 13px; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* forms */
label.f { display: block; margin-bottom: 14px; }
label.f span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input, textarea, select { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); outline: none; }
input:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 90px; resize: vertical; }
.err { background: color-mix(in srgb, var(--bad) 10%, var(--card)); color: var(--bad); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; }
.login .hero { background: linear-gradient(160deg, var(--brand), var(--brand-2)); color: #fff; padding: calc(56px + env(safe-area-inset-top, 0px)) 24px 70px; text-align: center; }
.login .logo { width: 72px; height: 72px; border-radius: 20px; background: rgba(255,255,255,.18); display: grid; place-items: center; margin: 0 auto 14px; }
.login .hero h1 { margin: 0; font-size: 26px; }
.login .box { background: var(--card); margin: -40px 16px 0; border-radius: 20px; padding: 22px 18px; box-shadow: var(--shadow); max-width: 440px; align-self: center; width: calc(100% - 32px); }

/* bars */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 8px; }
.bars div { flex: 1; background: color-mix(in srgb, var(--brand) 75%, transparent); border-radius: 5px 5px 2px 2px; min-height: 3px; position: relative; }
.bars-l { display: flex; gap: 6px; font-size: 10px; color: var(--muted); margin-top: 4px; }
.bars-l span { flex: 1; text-align: center; }

/* sheet / toast */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); max-height: 88vh; overflow: auto; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: -6px auto 12px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-b)); background: #102321; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 60; font-size: 15px; max-width: 90vw; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.success { text-align: center; padding: 20px 6px; }
.success .big { width: 76px; height: 76px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; }
.doc-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== look v2 (2.10.15): light, airy, big rounded cards, gradient status card ===== */
:root { --radius: 22px; --brand-3: #0a5c56; --col: 620px; --bg: #f3f7f7; --ink: #0f1f1e; --muted: #61716f; --line: #e5ecec;
  --cta: #0d1f1d; --shadow: 0 1px 2px rgba(16,40,38,.04), 0 10px 30px rgba(16,40,38,.07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cta: linear-gradient(135deg, var(--brand), var(--brand-2));
  --bg: #0b1211; --card: #152120; --line: #223230; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.3); } }
body { -webkit-font-smoothing: antialiased; }
/* top: pale tinted sky instead of a heavy band */
.top { position: relative; padding: calc(14px + env(safe-area-inset-top, 0px)) 0 30px; color: var(--ink);
  background: radial-gradient(90% 120% at 100% 0, color-mix(in srgb, var(--brand-2) 24%, transparent) 0, transparent 60%),
              linear-gradient(180deg, color-mix(in srgb, var(--brand-2) 15%, var(--bg)), var(--bg)); }
.top > .row { max-width: var(--col); margin: 0 auto; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bl { width: 34px; height: 34px; border-radius: 11px; background: #0b0f14; display: grid; place-items: center; flex: none; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.bl img { height: 22px; max-width: 28px; object-fit: contain; }
.bn { font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; text-decoration: none; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.top .hd { margin-top: 18px; align-items: flex-end; }
.top h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 6px; }
.top .sub { color: var(--muted); font-size: 14px; opacity: 1; }
.page { position: relative; z-index: 1; max-width: var(--col); margin: 0 auto; padding: 0 16px calc(112px + var(--safe-b)); }
.sec { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 4px 12px; }
.card { border: 1px solid color-mix(in srgb, var(--line) 55%, transparent); padding: 20px; margin-bottom: 16px; }
.card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: 14px; }
/* gradient status card */
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 20px; color: #fff; margin-bottom: 8px; box-shadow: 0 18px 40px color-mix(in srgb, var(--hero-a) 38%, transparent);
  --hero-a: #0a5c56; --hero-b: #14b8a6;
  background: radial-gradient(70% 90% at 100% 0, rgba(255,255,255,.28) 0, transparent 60%), radial-gradient(60% 70% at 0 110%, rgba(255,255,255,.14) 0, transparent 60%),
              linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
.hero.bad { --hero-a: #9f1239; --hero-b: #fb7185; }
.hero.warn { --hero-a: #b45309; --hero-b: #fbbf24; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hpill { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.28); padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; backdrop-filter: blur(6px); }
.hid { font-weight: 800; font-size: 15px; opacity: .95; }
.hero-body { display: flex; align-items: center; gap: 18px; margin: 18px 0; }
.hero .ring { width: 104px; height: 104px; }
.hero .ring svg { width: 104px; height: 104px; }
.hero .ring b { font-size: 32px; font-weight: 800; }
.hero .ring span { color: rgba(255,255,255,.85); }
.hero-title { font-size: 21px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.hero-sub { opacity: .9; font-size: 14px; margin-top: 6px; }
.hero-cta { display: flex; align-items: center; justify-content: space-between; background: #fff; color: #0b3f3b; text-decoration: none; font-weight: 800; font-size: 16px; padding: 15px 18px; border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.hero-cta span { font-size: 20px; transition: transform .15s; }
.hero-cta:hover span { transform: translateX(3px); }
.hero.bad .hero-cta { color: #9f1239; } .hero.warn .hero-cta { color: #92400e; }
.hero-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.22); }
.hero-kv small { display: block; font-size: 12px; opacity: .8; margin-bottom: 2px; }
.hero-kv b { font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
/* status banner on the Renew page */
.banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 22px; color: #fff; margin-bottom: 16px; position: relative; overflow: hidden;
  --a: #0a5c56; --b: #14b8a6; box-shadow: 0 14px 32px color-mix(in srgb, var(--a) 35%, transparent);
  background: radial-gradient(70% 120% at 100% 0, rgba(255,255,255,.26) 0, transparent 60%), linear-gradient(135deg, var(--a), var(--b)); }
.banner.bad { --a: #9f1239; --b: #fb7185; } .banner.warn { --a: #b45309; --b: #fbbf24; }
.banner b { font-size: 18px; display: block; margin-bottom: 2px; letter-spacing: -.01em; }
.banner div div { font-size: 14px; opacity: .93; line-height: 1.35; }
.bi { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; flex: none; }
/* quick action tiles */
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; }
.qi { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: var(--brand);
  background: radial-gradient(circle at 30% 25%, #fff, color-mix(in srgb, var(--brand-2) 14%, var(--card))); border: 1px solid color-mix(in srgb, var(--brand-2) 22%, var(--line));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 14%, transparent); transition: transform .15s; }
.qa:active .qi { transform: scale(.94); }
.meter { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.pill { padding: 4px 11px; }
/* buttons: dark pill like a bank app; teal gradient in dark mode */
.btn { min-height: 56px; border-radius: 18px; font-size: 17px; background: var(--cta); color: #fff; box-shadow: 0 10px 24px rgba(13,31,29,.22); transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(13,31,29,.2); }
.btn.light { background: color-mix(in srgb, var(--brand) 10%, var(--card)); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); box-shadow: none; }
.btn.danger { background: var(--bad); box-shadow: none; }
.btn + .btn { margin-top: 12px; } .btn-row .btn { margin-top: 0; }
/* plans */
.plan { position: relative; padding: 16px; border-width: 1.5px; border-radius: 20px; transition: border-color .15s, box-shadow .15s, background .15s; }
.plan.sel { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 13%, transparent); background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.plan .speed { width: 64px; height: 64px; border-radius: 18px; font-size: 23px; color: #fff; background: linear-gradient(145deg, var(--brand-3), var(--brand-2)); box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.plan .speed small { opacity: .85; }
.plan .price { font-size: 21px; letter-spacing: -.01em; }
.tag { border-radius: 99px; padding: 2px 9px; }
.sum { margin-top: 14px; padding-top: 14px; }
.sum .tot { font-size: 22px; font-weight: 800; }
.sum .tot span:last-child { color: var(--brand); }
.list .it { padding: 14px 0; }
.alert { border-radius: 18px; margin-top: 12px; }
input, textarea, select { padding: 15px 16px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 60%, var(--card)); transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
label.f span { font-size: 13px; letter-spacing: .03em; color: var(--muted); }
.bars div { background: linear-gradient(180deg, var(--brand-2), var(--brand)); max-width: 56px; margin: 0 auto; }
/* floating tab bar with a highlighted active pill */
.tabbar { left: 50%; right: auto; transform: translateX(-50%); width: min(var(--col), calc(100% - 24px)); bottom: calc(12px + var(--safe-b)); padding: 6px; gap: 4px;
  border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 14px 36px rgba(16,40,38,.2); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(14px); z-index: 20; }
.tabbar a { padding: 9px 0 8px; border-radius: 20px; transition: background .15s, color .15s; }
.tabbar a.on { color: var(--brand); background: color-mix(in srgb, var(--brand-2) 16%, transparent); }
.toast { bottom: calc(100px + var(--safe-b)); }
.sheet { max-width: var(--col); border-radius: 28px 28px 0 0; }
/* login + recharge */
.login { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.login .hero { position: relative; z-index: 0; padding: calc(40px + env(safe-area-inset-top, 0px)) 24px 88px; border-radius: 0; box-shadow: none; margin: 0;
  background: radial-gradient(120% 140% at 100% 0, rgba(255,255,255,.22) 0, transparent 55%), linear-gradient(160deg, var(--brand-3), var(--brand) 55%, var(--brand-2)); }
.login .logo { width: 76px; height: 76px; border-radius: 22px; margin-bottom: 14px; border: 1px solid rgba(255,255,255,.3); box-shadow: 0 10px 28px rgba(0,0,0,.2); }
.login .hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.login .box { position: relative; z-index: 1; margin-top: -56px; padding: 26px 22px; border-radius: 26px; max-width: 440px; border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
@media (min-width: 700px) {
  :root { --col: 680px; }
  .login { background: linear-gradient(160deg, var(--brand-3), var(--brand) 55%, var(--brand-2)); justify-content: center; align-items: center; padding: 32px 16px; }
  .login .hero { background: none; padding: 0 0 22px; }
  .login .box { margin: 0; width: 100%; padding: 28px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.25); border: 0; }
}
@media (max-height: 560px) and (min-width: 700px) { .login .logo { width: 56px; height: 56px; margin-bottom: 8px; } .login .hero { padding-bottom: 14px; } .login .hero h1 { font-size: 24px; } }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) :is(.btn.light, .qi, .tabbar a.on, .sum .tot span:last-child, .pill.ok, a:not(.btn):not(.hero-cta):not(.avatar):not(.qa):not(.tabbar a)) { color: var(--brand-2); }
  html:not([data-theme="light"]) .qi { background: radial-gradient(circle at 30% 25%, #1f3532, #162624); }
  html:not([data-theme="light"]) .btn.light { background: color-mix(in srgb, var(--brand-2) 12%, var(--card)); border-color: color-mix(in srgb, var(--brand-2) 30%, transparent); }
  html:not([data-theme="light"]) .plan.sel { border-color: var(--brand-2); }
  html:not([data-theme="light"]) .top { background: radial-gradient(90% 120% at 100% 0, color-mix(in srgb, var(--brand-2) 18%, transparent) 0, transparent 60%), linear-gradient(180deg, #0f2724, var(--bg)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
