﻿@charset "UTF-8";
/* ==========================================================================
   YoozPanel — Apple-style UI template
   Design system: tokens, materials, typography, iOS components
   RTL / Persian first · Light + Dark · No external dependencies
   ========================================================================== */

/* ---------- Fonts (local) ---------- */
@font-face { font-family: "Vazirmatn"; font-weight: 300; font-display: swap; src: url("../fonts/Vazirmatn-Light.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 500; font-display: swap; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 600; font-display: swap; src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 800; font-display: swap; src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 900; font-display: swap; src: url("../fonts/Vazirmatn-Black.woff2") format("woff2"); }

/* ---------- Tokens: light ---------- */
:root {
  color-scheme: light;
  --font: "Vazirmatn", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-2: #f2f2f7;
  --surface-3: #e5e5ea;
  --material: rgba(249, 249, 252, 0.72);
  --material-thick: rgba(249, 249, 252, 0.88);
  --separator: rgba(60, 60, 67, 0.16);
  --separator-strong: rgba(60, 60, 67, 0.29);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);

  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.72);
  --label-3: rgba(60, 60, 67, 0.46);
  --label-inverse: #ffffff;

  --blue: #007aff;
  --indigo: #5856d6;
  --purple: #af52de;
  --teal: #30b0c7;
  --cyan: #32ade6;
  --green: #34c759;
  --mint: #00c7be;
  --orange: #ff9500;
  --yellow: #ffcc00;
  --red: #ff3b30;
  --pink: #ff2d55;
  --gold-1: #f7d27a;
  --gold-2: #c8912e;

  --accent: var(--blue);
  --accent-tint: rgba(0, 122, 255, 0.12);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-3: 0 10px 30px rgba(0, 0, 0, 0.1), 0 30px 80px rgba(20, 30, 80, 0.14);
  --inner-hi: inset 0 1px 0 rgba(255, 255, 255, 0.9);

  --aurora-1: rgba(0, 122, 255, 0.16);
  --aurora-2: rgba(88, 86, 214, 0.14);
  --aurora-3: rgba(50, 173, 230, 0.12);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --tabbar-h: 84px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ---------- Tokens: dark (system or forced) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --surface: rgba(28, 28, 30, 0.72);
    --surface-solid: #1c1c1e;
    --surface-2: #2c2c2e;
    --surface-3: #3a3a3c;
    --material: rgba(22, 22, 26, 0.66);
    --material-thick: rgba(22, 22, 26, 0.86);
    --separator: rgba(84, 84, 88, 0.42);
    --separator-strong: rgba(84, 84, 88, 0.65);
    --fill: rgba(120, 120, 128, 0.24);
    --fill-2: rgba(120, 120, 128, 0.36);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.66);
    --label-3: rgba(235, 235, 245, 0.36);
    --label-inverse: #000000;
    --blue: #0a84ff; --indigo: #5e5ce6; --purple: #bf5af2; --teal: #40c8e0; --cyan: #64d2ff;
    --green: #30d158; --mint: #63e6e2; --orange: #ff9f0a; --yellow: #ffd60a; --red: #ff453a; --pink: #ff375f;
    --accent-tint: rgba(10, 132, 255, 0.18);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.06);
    --inner-hi: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --aurora-1: rgba(10, 132, 255, 0.28);
    --aurora-2: rgba(94, 92, 230, 0.26);
    --aurora-3: rgba(100, 210, 255, 0.14);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-elevated: #1c1c1e;
  --surface: rgba(28, 28, 30, 0.72);
  --surface-solid: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --material: rgba(22, 22, 26, 0.66);
  --material-thick: rgba(22, 22, 26, 0.86);
  --separator: rgba(84, 84, 88, 0.42);
  --separator-strong: rgba(84, 84, 88, 0.65);
  --fill: rgba(120, 120, 128, 0.24);
  --fill-2: rgba(120, 120, 128, 0.36);
  --label: #ffffff;
  --label-2: rgba(235, 235, 245, 0.66);
  --label-3: rgba(235, 235, 245, 0.36);
  --label-inverse: #000000;
  --blue: #0a84ff; --indigo: #5e5ce6; --purple: #bf5af2; --teal: #40c8e0; --cyan: #64d2ff;
  --green: #30d158; --mint: #63e6e2; --orange: #ff9f0a; --yellow: #ffd60a; --red: #ff453a; --pink: #ff375f;
  --accent-tint: rgba(10, 132, 255, 0.18);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.06);
  --inner-hi: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --aurora-1: rgba(10, 132, 255, 0.28);
  --aurora-2: rgba(94, 92, 230, 0.26);
  --aurora-3: rgba(100, 210, 255, 0.14);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--label);
  background: var(--bg);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* ambient aurora behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 90vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 80% 10%, var(--aurora-1), transparent 70%),
    radial-gradient(45% 45% at 15% 25%, var(--aurora-2), transparent 70%),
    radial-gradient(35% 35% at 55% 60%, var(--aurora-3), transparent 70%);
  filter: blur(10px);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Icons ---------- */
.i { display: inline-block; vertical-align: -0.22em; width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 18px; height: 18px; }
.i-xs { width: 14px; height: 14px; }
.i-lg { width: 28px; height: 28px; }
.i-xl { width: 40px; height: 40px; }
.i-fill { fill: currentColor; stroke: none; }

/* ---------- Typography (Apple text styles) ---------- */
.t-large  { font-size: 34px; line-height: 1.2; font-weight: 800; letter-spacing: -0.4px; }
.t-title1 { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -0.3px; }
.t-title2 { font-size: 22px; line-height: 1.3; font-weight: 700; }
.t-title3 { font-size: 20px; line-height: 1.35; font-weight: 700; }
.t-headline { font-size: 17px; font-weight: 700; }
.t-body { font-size: 17px; }
.t-callout { font-size: 16px; }
.t-sub { font-size: 15px; }
.t-foot { font-size: 13px; }
.t-cap { font-size: 12px; }
.t-2 { color: var(--label-2); }
.t-3 { color: var(--label-3); }
.t-accent { color: var(--accent); }
.t-green { color: var(--green); }
.t-red { color: var(--red); }
.t-orange { color: var(--orange); }
.t-center { text-align: center; }
.t-bold { font-weight: 700; }
.t-heavy { font-weight: 900; }
.m0 { margin: 0; }

/* ---------- Layout helpers ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.w-100 { width: 100%; }
.mx-auto { margin-inline: auto; }

/* ---------- Materials ---------- */
.material {
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
}
.material-thick {
  background: var(--material-thick);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
}
.hairline-b { box-shadow: inset 0 -0.5px 0 var(--separator-strong); }
.hairline-t { box-shadow: inset 0 0.5px 0 var(--separator-strong); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1), var(--inner-hi);
  padding: 18px;
  position: relative;
}
.card-solid { background: var(--surface-solid); }
.card-lg { padding: 24px; border-radius: var(--r-xl); }
.card-flat { box-shadow: none; }
.card-link { display: block; color: inherit; transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out); }
.card-link:active { transform: scale(0.98); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.1px;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s;
  user-select: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.97); filter: brightness(0.94); }
.btn[disabled], .btn.is-disabled { opacity: 0.4; pointer-events: none; }
.btn-block { width: 100%; }
.btn-pill { border-radius: var(--r-pill); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.btn-md { min-height: 44px; font-size: 16px; }
.btn-tinted { --btn-bg: var(--accent-tint); --btn-fg: var(--accent); }
.btn-gray { --btn-bg: var(--fill); --btn-fg: var(--label); }
.btn-plain { --btn-bg: transparent; --btn-fg: var(--accent); padding: 0 8px; }
.btn-danger { --btn-bg: var(--red); }
.btn-danger-tinted { --btn-bg: color-mix(in srgb, var(--red) 14%, transparent); --btn-fg: var(--red); }
.btn-success { --btn-bg: var(--green); }
.btn-glow {
  background: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 55%, #bf5af2 100%);
  box-shadow: 0 10px 30px -8px rgba(10, 132, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.35) 45%, transparent 60%);
  transform: translateX(120%);
  animation: sheen 3.6s var(--ease) infinite;
}
@keyframes sheen { 0%, 60% { transform: translateX(120%); } 100% { transform: translateX(-120%); } }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--fill); color: var(--accent);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.icon-btn:active { transform: scale(0.9); }
/* «پشتیبانی» next to the theme button */
.support-btn {
  height: 36px; padding: 0 12px 0 10px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-tint); color: var(--accent);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.support-btn .i { width: 18px; height: 18px; }
.support-btn:active { transform: scale(0.94); }

/* ---------- Navigation bar (iOS large title) ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  padding-top: var(--safe-t);
  transition: background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.nav-bar { height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px; }
.nav-bar .nav-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 17px; opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s var(--ease-out); }
.nav-side { display: flex; align-items: center; gap: 8px; min-width: 72px; }
.nav-side.end { justify-content: flex-end; }
.nav-back { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; color: var(--accent); white-space: nowrap; }
.nav-side.end { flex: none; }
@media (max-width: 420px) {
  .nav-bar .nav-title { font-size: 15px; }
  .nav-back { font-size: 15px; }
}
.nav-back .i { transform: scaleX(-1); } /* chevron points right in RTL (back) */
.nav.is-scrolled {
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: inset 0 -0.5px 0 var(--separator-strong);
}
.nav.is-scrolled .nav-title, .nav.always-title .nav-title { opacity: 1; transform: none; }
.large-title { padding: 2px 20px 10px; }
.large-title h1 { margin: 0; }
.large-title p { margin: 4px 0 0; }

/* ---------- Page container (mini app) ---------- */
.app { max-width: 520px; margin: 0 auto; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); position: relative; }
.app.no-tabbar { padding-bottom: calc(120px + var(--safe-b)); }
.section { padding: 0 16px; margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 10px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.section-head a { font-size: 15px; }
.section-foot { padding: 8px 20px 0; font-size: 13px; color: var(--label-2); }

/* ---------- Grouped inset list (Settings style) ---------- */
.list {
  background: var(--surface);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.list-header { padding: 0 20px 8px; font-size: 13px; color: var(--label-2); text-transform: none; }
.cell {
  display: flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 10px 16px;
  position: relative; color: var(--label);
  transition: background 0.15s;
}
a.cell:active, button.cell:active, .cell.is-tappable:active { background: var(--fill); }
button.cell { width: 100%; text-align: start; }
.cell + .cell::before {
  content: ""; position: absolute; top: 0; left: 0; right: 60px;
  height: 0.5px; background: var(--separator-strong);
}
.list.no-icons .cell + .cell::before { right: 16px; }
.cell-body { flex: 1 1 auto; min-width: 0; }
.cell-title { font-size: 16px; font-weight: 500; }
.cell-sub { font-size: 13px; color: var(--label-2); margin-top: 1px; }
.cell-value { color: var(--label-2); font-size: 15px; text-align: left; }
.cell-chevron { color: var(--label-3); }
.cell-chevron .i { transform: scaleX(-1); width: 16px; height: 16px; }

/* Icon squircle (iOS settings) */
.sq {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; color: #fff; flex: none;
  background: var(--sq, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.12);
}
.sq .i { width: 19px; height: 19px; stroke-width: 2; }
.sq-lg { width: 44px; height: 44px; border-radius: 11px; }
.sq-lg .i { width: 24px; height: 24px; }
.sq-blue { --sq: linear-gradient(180deg, #3b9bff, #0a6cff); }
.sq-indigo { --sq: linear-gradient(180deg, #7a78ff, #4e4cd6); }
.sq-green { --sq: linear-gradient(180deg, #4cd964, #28b347); }
.sq-orange { --sq: linear-gradient(180deg, #ffb340, #ff8a00); }
.sq-red { --sq: linear-gradient(180deg, #ff6b61, #ff2d20); }
.sq-pink { --sq: linear-gradient(180deg, #ff6485, #ff2d55); }
.sq-purple { --sq: linear-gradient(180deg, #d27cf2, #a445d6); }
.sq-teal { --sq: linear-gradient(180deg, #5ad2e8, #1ea8c6); }
.sq-gray { --sq: linear-gradient(180deg, #a1a1a6, #7c7c80); }
.sq-gold { --sq: linear-gradient(180deg, #f7d27a, #c8912e); }

/* ---------- Product 3D app-icons ---------- */
.p-icon {
  --size: 64px;
  width: var(--size); height: var(--size);
  border-radius: calc(var(--size) * 0.2237);
  display: grid; place-items: center; color: #fff; flex: none;
  position: relative;
  background: var(--p-grad);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -6px 14px rgba(0, 0, 0, 0.18),
    0 10px 24px -8px var(--p-glow, rgba(0, 0, 0, 0.4)),
    0 2px 4px rgba(0, 0, 0, 0.12);
  transform: translateZ(0);
  isolation: isolate;
}
.p-icon::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(120% 80% at 30% 0%, rgba(255, 255, 255, 0.45), transparent 55%);
}
.p-icon .i { width: 52%; height: 52%; stroke-width: 1.7; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.p-icon.sm { --size: 44px; }
.p-icon.xs { --size: 36px; }
.p-icon.lg { --size: 88px; }
.p-icon.xl { --size: 112px; }
.p-vip { --p-grad: linear-gradient(145deg, #ffe29a 0%, #f5b83d 45%, #c97a12 100%); --p-glow: rgba(245, 170, 40, 0.7); }
.p-v2  { --p-grad: linear-gradient(145deg, #6fb6ff 0%, #2f6bff 50%, #5b3df5 100%); --p-glow: rgba(47, 107, 255, 0.7); }
.p-ov  { --p-grad: linear-gradient(145deg, #7cf0c5 0%, #1fc38b 50%, #0b8f7a 100%); --p-glow: rgba(31, 195, 139, 0.65); }
.p-wg  { --p-grad: linear-gradient(145deg, #ff9a9e 0%, #ff4d6d 50%, #c9184a 100%); --p-glow: rgba(255, 77, 109, 0.65); }
.p-wallet { --p-grad: linear-gradient(145deg, #a18cff 0%, #6f5cff 50%, #3b2ecf 100%); --p-glow: rgba(111, 92, 255, 0.65); }

/* ---------- Avatar ---------- */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 13px; background: linear-gradient(135deg, #5e5ce6, #bf5af2); flex: none; overflow: hidden; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Badges / chips / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: var(--fill); color: var(--label-2);
}
.badge-blue { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); }
.badge-green { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.badge-orange { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.badge-red { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.badge-purple { background: color-mix(in srgb, var(--purple) 16%, transparent); color: var(--purple); }
.badge-gold { background: linear-gradient(135deg, #ffe29a, #f5b83d); color: #5a3a00; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot-live { position: relative; }
.dot-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3); opacity: 0; } }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 6px; margin: 0 -16px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); color: var(--label);
  box-shadow: var(--shadow-1); font-size: 15px; font-weight: 500;
  scroll-snap-align: start; transition: background 0.2s, color 0.2s, transform 0.15s;
}
.chip:active { transform: scale(0.96); }
.chip.is-active { background: var(--label); color: var(--label-inverse); }

/* ---------- Segmented control ---------- */
.segmented {
  --n: 2; --i: 0;
  position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr);
  background: var(--fill); border-radius: 10px; padding: 2px; height: 36px;
  isolation: isolate;
}
.segmented::before {
  content: ""; position: absolute; z-index: -1; top: 2px; bottom: 2px;
  width: calc((100% - 4px) / var(--n));
  right: calc(2px + var(--i) * (100% - 4px) / var(--n));
  background: var(--surface-solid); border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  transition: right 0.32s var(--ease-spring);
}
:root[data-theme="dark"] .segmented::before { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented::before { background: #636366; } }
.segmented button { font-size: 14px; font-weight: 600; color: var(--label); border-radius: 8px; transition: opacity 0.2s; }
.segmented button:not(.is-active) { opacity: 0.7; }

/* ---------- Switch ---------- */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 100%; height: 100%; border-radius: 999px; background: var(--fill-2); cursor: pointer; transition: background 0.25s; }
.switch input:checked { background: var(--green); }
.switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06); transition: transform 0.3s var(--ease-spring); pointer-events: none; }
.switch:has(input:checked)::after { transform: translateX(-20px); }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--label-2); padding: 0 4px; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border-radius: 14px; border: 0; outline: 0;
  background: var(--surface-solid); color: var(--label);
  box-shadow: inset 0 0 0 0.5px var(--separator-strong);
  font-size: 17px; transition: box-shadow 0.2s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--label-3); }
.input-hint { font-size: 12px; color: var(--label-3); padding: 0 4px; }
.search {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 10px; border-radius: 12px;
  background: var(--fill); color: var(--label-2);
}
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 17px; color: var(--label); }
.search input::placeholder { color: var(--label-3); }

/* ---------- Tab bar (iOS) ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 50;
  height: calc(var(--tabbar-h) + var(--safe-b) - 20px);
  padding: 8px 8px calc(var(--safe-b) + 6px);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--material-thick);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  box-shadow: inset 0 0.5px 0 var(--separator-strong);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--label-3); transition: color 0.2s, transform 0.2s var(--ease-spring); }
.tab .i { width: 26px; height: 26px; stroke-width: 1.8; }
.tab:active { transform: scale(0.9); }
.tab.is-active { color: var(--accent); }
.tab.is-active .i { stroke-width: 2.2; }
.tab-center .tab-orb {
  width: 54px; height: 54px; margin-top: -24px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6 60%, #bf5af2);
  box-shadow: 0 10px 24px -6px rgba(10, 132, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 5px var(--bg);
}
.tab-center .tab-orb .i { width: 26px; height: 26px; stroke-width: 2.2; }

/* ---------- Bottom action bar ---------- */
.action-bar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 45;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: var(--material-thick);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  box-shadow: inset 0 0.5px 0 var(--separator-strong);
}
.action-bar .summary { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 14px; color: var(--label-2); }
.action-bar .summary strong { font-size: 20px; color: var(--label); font-weight: 800; }

/* ---------- Sheet (bottom modal) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, 0.36);
  opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease);
}
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 91;
  width: 100%; max-width: 520px;
  transform: translate(-50%, 105%);
  background: var(--bg-elevated);
  border-radius: 14px 14px 0 0;
  padding: 8px 20px calc(24px + var(--safe-b));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.45s var(--ease-out);
  max-height: 92vh; overflow-y: auto;
}
.sheet-grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 14px; }
.sheet.is-open { transform: translate(-50%, 0); }
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
body.sheet-lock { overflow: hidden; }

/* ---------- Toast / HUD ---------- */
.toast {
  position: fixed; top: calc(12px + var(--safe-t)); left: 50%; z-index: 120;
  transform: translate(-50%, -140%);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--material-thick);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--shadow-2); font-size: 15px; font-weight: 600;
  transition: transform 0.5s var(--ease-spring);
}
.toast.is-show { transform: translate(-50%, 0); }
.toast .i { color: var(--green); }

/* ---------- Progress ring ---------- */
.ring { --size: 56px; --stroke: 6px; --p: 0.6; --c: var(--accent); width: var(--size); height: var(--size); position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg) scaleY(-1); }
.ring circle { fill: none; stroke-width: var(--stroke); }
.ring .track { stroke: var(--fill); }
.ring .bar { stroke: var(--c); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--p) * 100); transition: stroke-dashoffset 1.2s var(--ease-out); }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800; text-align: center; line-height: 1.1; }
.ring-label small { display: block; font-size: 9px; font-weight: 600; color: var(--label-2); }

/* Linear meter */
.meter { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.meter > i { display: block; height: 100%; width: var(--w, 50%); border-radius: inherit; background: var(--c, var(--accent)); transition: width 1s var(--ease-out); }

/* ---------- 3D tilt ---------- */
.tilt { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%; transform-style: preserve-3d; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.6s var(--ease-out); will-change: transform; }
.tilt.is-tilting { transition: transform 0.08s linear; }
.tilt .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.28), transparent 55%); opacity: 0; transition: opacity 0.4s; mix-blend-mode: soft-light; }
.tilt.is-tilting .glare { opacity: 1; }
.depth-1 { transform: translateZ(20px); }
.depth-2 { transform: translateZ(40px); }

/* ---------- Wallet card (Apple Card inspired) ---------- */
.wallet-card {
  position: relative; border-radius: 24px; padding: 22px; min-height: 196px; color: #fff; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.28), transparent 45%),
    linear-gradient(135deg, #1b1f3b 0%, #2a2f6b 35%, #4b3fb5 70%, #7b5cf0 100%);
  box-shadow: 0 30px 60px -20px rgba(59, 47, 180, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 0 0 0.5px rgba(255, 255, 255, 0.15);
  isolation: isolate;
}
.wallet-card::before {
  content: ""; position: absolute; inset: -40%; z-index: -1; opacity: 0.55;
  background: conic-gradient(from 180deg at 50% 50%, #0a84ff, #bf5af2, #ff375f, #ffd60a, #30d158, #0a84ff);
  filter: blur(60px);
  animation: spin 18s linear infinite;
}
.wallet-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 6px);
}
@keyframes spin { to { transform: rotate(360deg); } }
.wallet-card .chip-gold { width: 42px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #f8e3a3, #c9a14a); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); position: relative; }
.wallet-card .chip-gold::before { content: ""; position: absolute; inset: 8px 6px; border-top: 1px solid rgba(0,0,0,.25); border-bottom: 1px solid rgba(0,0,0,.25); }
.wallet-balance { font-size: 34px; font-weight: 900; letter-spacing: -0.5px; line-height: 1.1; }
.wallet-card .t-2 { color: rgba(255, 255, 255, 0.7); }

/* ---------- Plan card ---------- */
.plan {
  position: relative; border-radius: var(--r-lg); padding: 18px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-2), var(--inner-hi);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  display: flex; flex-direction: column; gap: 14px;
  cursor: pointer; transition: box-shadow 0.3s;
}
.plan::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(160deg, rgba(255,255,255,.5), transparent 40%, transparent 60%, var(--plan-edge, transparent)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.plan.is-featured { --plan-edge: color-mix(in srgb, var(--accent) 80%, transparent); box-shadow: 0 20px 50px -18px color-mix(in srgb, var(--accent) 60%, transparent), var(--inner-hi); }
.plan.is-selected { box-shadow: 0 0 0 2.5px var(--accent), var(--shadow-2); }
.plan-top { display: flex; align-items: center; justify-content: space-between; }
.plan-months { font-size: 28px; font-weight: 900; line-height: 1; }
.plan-months small { font-size: 14px; font-weight: 600; color: var(--label-2); margin-inline-start: 4px; }
.plan-price { font-size: 20px; font-weight: 800; }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--label-2); }
.plan-per { font-size: 12px; color: var(--label-3); }
.plan-feats { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-feat { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--label-2); background: var(--fill); padding: 4px 9px; border-radius: 8px; }
.plan-feat .i { width: 14px; height: 14px; color: var(--green); stroke-width: 2.4; }
.ribbon { position: absolute; top: 14px; left: -34px; transform: rotate(-45deg); background: linear-gradient(90deg, #ff9f0a, #ff375f); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 38px; box-shadow: 0 4px 10px rgba(255, 55, 95, 0.4); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 8px 20px 0; text-align: center; }
.hero-3d { position: relative; margin: 0 auto; width: min(320px, 82vw); aspect-ratio: 1; }
.hero-3d canvas { width: 100%; height: 100%; }
.hero-glow { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(10, 132, 255, 0.35), transparent 70%); filter: blur(30px); z-index: -1; }

/* ---------- 3D shield orb ---------- */
.shield-orb { width: 150px; height: 150px; margin: 0 auto; position: relative; transform-style: preserve-3d; animation: float 6s var(--ease) infinite; }
.shield-orb .ring3d { position: absolute; inset: -14px; border-radius: 50%; border: 1.5px solid rgba(100, 210, 255, 0.45); transform: rotateX(70deg); animation: orbit 8s linear infinite; box-shadow: 0 0 20px rgba(100, 210, 255, 0.35); }
.shield-orb .ring3d.r2 { inset: -26px; border-color: rgba(191, 90, 242, 0.4); animation-duration: 12s; animation-direction: reverse; transform: rotateX(70deg) rotateY(30deg); }
.shield-orb .core { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #8fd3ff 0%, #0a84ff 35%, #3a2fb8 75%, #140f3d 100%);
  box-shadow: inset -12px -18px 30px rgba(0, 0, 0, 0.45), inset 10px 12px 26px rgba(255, 255, 255, 0.35), 0 30px 60px -10px rgba(10, 132, 255, 0.6), 0 0 80px rgba(94, 92, 230, 0.4); }
.shield-orb .core .i { width: 64px; height: 64px; color: #fff; stroke-width: 1.6; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes orbit { from { transform: rotateX(70deg) rotateZ(0); } to { transform: rotateX(70deg) rotateZ(360deg); } }

/* ---------- Success check (3D) ---------- */
.success-orb { width: 112px; height: 112px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 35% 30%, #8ff0a4, #30d158 45%, #0f8a35 100%);
  box-shadow: inset -10px -14px 24px rgba(0, 0, 0, 0.3), inset 8px 10px 20px rgba(255, 255, 255, 0.4), 0 24px 50px -12px rgba(48, 209, 88, 0.7);
  animation: pop 0.7s var(--ease-spring) both; }
.success-orb .i { width: 56px; height: 56px; stroke-width: 2.6; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.6s 0.35s var(--ease-out) forwards; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- QR ---------- */
.qr-frame { width: 220px; margin: 0 auto; padding: 16px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-3); position: relative; }
.qr-frame img, .qr-frame svg { width: 100%; height: auto; border-radius: 6px; }
.qr-frame .qr-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ---------- Code / config block ---------- */
.code {
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
  direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-all;
  background: var(--surface-2); color: var(--label); border-radius: 14px; padding: 14px 16px;
  max-height: 180px; overflow: auto; margin: 0;
  box-shadow: inset 0 0 0 0.5px var(--separator);
}

/* ---------- Key/Value details ---------- */
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.kv + .kv { box-shadow: inset 0 0.5px 0 var(--separator-strong); }
.kv dt { color: var(--label-2); font-size: 15px; }
.kv dd { margin: 0; font-weight: 600; font-size: 15px; text-align: left; }

/* ---------- Stat tiles ---------- */
.stat { padding: 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-1); }
.stat-label { font-size: 13px; color: var(--label-2); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 26px; font-weight: 900; letter-spacing: -0.3px; margin-top: 4px; line-height: 1.2; }
.stat-delta { font-size: 12px; font-weight: 700; margin-top: 2px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 48px 24px; color: var(--label-2); }
.empty .p-icon { margin: 0 auto 16px; }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--fill) 0%, var(--fill-2) 50%, var(--fill) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Entrance animations ---------- */
.reveal { opacity: 0; transform: translateY(14px) scale(0.99); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: var(--d, 0ms); }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; display: grid; place-items: center; font-weight: 600; font-size: 15px; background: var(--surface); color: var(--label); box-shadow: var(--shadow-1); }
.pager .is-active { background: var(--accent); color: #fff; }
.pager .is-disabled { opacity: 0.35; pointer-events: none; }

/* ---------- Alert / banner ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-1); }
.banner-warn { background: color-mix(in srgb, var(--orange) 14%, var(--surface-solid)); }
.banner-error { background: color-mix(in srgb, var(--red) 12%, var(--surface-solid)); }
.banner-info { background: color-mix(in srgb, var(--blue) 12%, var(--surface-solid)); }
.banner-ok { background: color-mix(in srgb, var(--green) 12%, var(--surface-solid)); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Loading state (Yooz.busy) ---------- */
.spinner {
  display: inline-block; flex: none;
  width: 1.1em; height: 1.1em;
  border-radius: 50%;
  border: 2.2px solid currentColor;
  border-inline-end-color: transparent;
  opacity: 0.9;
  animation: spin 0.7s linear infinite;
}
.is-loading { pointer-events: none; cursor: progress; }
.btn.is-loading { filter: none; transform: none; }
a.is-loading:not(.btn) { opacity: 0.8; }
.tab.is-loading { color: var(--accent); }
.tab.is-loading .spinner { border-width: 2.6px; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.6s; } }
