:root {
  --bg: #0b0e14;
  --bg-elev: #121722;
  --bg-card: #161c28;
  --bg-hover: #1c2432;
  --border: #232c3d;
  --border-soft: #1a2130;
  --text: #e6ebf4;
  --text-dim: #93a0b8;
  --text-mute: #5f6c85;
  --brand: #6c5ce7;
  --brand-2: #8b7cf0;
  --brand-glow: rgba(108, 92, 231, .35);
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --blue: #38bdf8;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --sidebar-w: 250px;
  font-synthesis: none;
}

/* Light theme — public site only (toggled via <html data-theme="light">). */
html[data-theme="light"] {
  --bg: #f5f7fc;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #eef1f8;
  --border: #dce2ee;
  --border-soft: #e7ebf3;
  --text: #121826;
  --text-dim: #45506a;
  --text-mute: #7a8598;
  --brand-glow: rgba(108, 92, 231, .22);
  --shadow: 0 10px 34px rgba(24, 34, 68, .10);
}

* { box-sizing: border-box; }

html { transition: background-color .25s ease; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
::selection { background: var(--brand-glow); }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #0e131d, #0b0e14);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 22px 18px;
}
.brand img, .brand svg { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 3px 8px var(--brand-glow)); }
.brand .name { font-size: 21px; font-weight: 800; letter-spacing: .22em; color: #fff; line-height: 1.1; }
.brand .tag { font-size: 9.5px; color: var(--text-mute); letter-spacing: .2em; text-transform: uppercase; margin-top: 2px; }

.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--text-mute); padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-weight: 500; transition: all .15s;
}
.nav a:hover { background: var(--bg-hover); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, var(--brand-glow), transparent); color: #fff; box-shadow: inset 2px 0 0 var(--brand); }
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }

.sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--text-mute); }
.sidebar-foot a { color: var(--text-dim); }
.sidebar-foot a:hover { color: var(--brand-2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px; border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; background: rgba(11, 14, 20, .82); backdrop-filter: blur(10px); z-index: 10;
}
.topbar h1 { font-size: 18px; }
.topbar .who { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }

.content { padding: 28px 30px 60px; max-width: 1280px; width: 100%; }

/* ---------- Cards / stat grid ---------- */
.grid { display: grid; gap: 16px; }
/* Dashboard stats: 7 compact cards in one row on desktop, wrap on smaller screens. */
.grid.stats { gap: 12px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 1180px) { .grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid.two { grid-template-columns: 1.6fr 1fr; }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.card h3 { font-size: 14px; margin-bottom: 14px; }

.stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px; position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent, var(--brand)); }
.stat .label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; line-height: 1.15; }
.stat .value.value-sm { font-size: 19px; }
.stat .icon { position: absolute; top: 16px; right: 16px; opacity: .18; width: 30px; height: 30px; }

.acc-brand { --accent: var(--brand); }
.acc-green { --accent: var(--green); }
.acc-amber { --accent: var(--amber); }
.acc-red   { --accent: var(--red); }
.acc-blue  { --accent: var(--blue); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-mute); padding: 13px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }
td.mono, .mono { font-family: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace; font-size: 12.5px; }
.muted { color: var(--text-mute); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.active  { color: var(--green); background: rgba(34,197,94,.12); }
.badge.unused  { color: var(--blue);  background: rgba(56,189,248,.12); }
.badge.expired { color: var(--amber); background: rgba(245,158,11,.12); }
.badge.blocked { color: var(--red);   background: rgba(239,68,68,.12); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: var(--bg-hover); border: 1px solid var(--border); color: var(--text-dim); margin: 2px 2px 0 0; }
.chip.on { color: var(--brand-2); border-color: rgba(139,124,240,.4); background: rgba(139,124,240,.1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); transition: all .15s;
}
.btn:hover { background: var(--bg-hover); border-color: #2e3a52; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; box-shadow: 0 4px 16px var(--brand-glow); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); border-color: rgba(239,68,68,.3); }
.btn.danger:hover { background: rgba(239,68,68,.12); }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn.ghost { background: transparent; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.actions { display: flex; gap: 6px; }
.icon-btn { padding: 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elev); cursor: pointer; color: var(--text-dim); display: inline-grid; place-items: center; }
.icon-btn:hover { color: var(--text); background: var(--bg-hover); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.danger:hover { color: var(--red); border-color: rgba(239,68,68,.4); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=password], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; padding: 10px 13px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  font-size: 13.5px; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
textarea { resize: vertical; min-height: 84px; }
.hint { font-size: 11.5px; color: var(--text-mute); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

.toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.toggle {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--border); cursor: pointer; user-select: none; transition: all .15s;
}
.toggle:hover { border-color: #2e3a52; }
.toggle input { display: none; }
.toggle .box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--text-mute); display: grid; place-items: center; flex-shrink: 0; transition: all .15s; }
.toggle .box svg { width: 12px; height: 12px; opacity: 0; color: #fff; }
.toggle input:checked ~ .box { background: var(--brand); border-color: var(--brand); }
.toggle input:checked ~ .box svg { opacity: 1; }
.toggle .name { font-size: 13px; }
.toggle.premium .name::after { content: "PRO"; font-size: 8px; margin-left: 6px; padding: 1px 4px; border-radius: 4px; background: rgba(139,124,240,.18); color: var(--brand-2); letter-spacing: .06em; vertical-align: middle; }

/* ---------- Toolbar / filters ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-dim); font-size: 13px; margin-top: 3px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar input[type=text], .toolbar select { width: auto; min-width: 190px; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-mute); }
.search input { padding-left: 34px; }

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 13.5px; border: 1px solid; display: flex; align-items: center; gap: 10px; }
.flash.success { color: var(--green); background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); }
.flash.error { color: var(--red); background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(900px 480px at 50% -12%, rgba(124,108,240,.28), transparent 70%),
    radial-gradient(700px 400px at 85% 110%, rgba(91,75,214,.16), transparent 70%),
    var(--bg); }
.login-card {
  width: 100%; max-width: 410px; background: linear-gradient(180deg, #171d2b, #12172099);
  border: 1px solid var(--border); border-radius: 20px; padding: 38px 36px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-logo {
  width: 78px; height: 78px; margin: 0 auto 16px; border-radius: 20px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(167,139,250,.22), transparent 70%);
  box-shadow: 0 10px 30px var(--brand-glow), inset 0 0 0 1px rgba(255,255,255,.06);
}
.login-logo img { width: 60px; height: 60px; object-fit: contain; display: block; }
.login-wordmark {
  font-size: 30px; font-weight: 800; color: #fff; letter-spacing: .34em;
  margin-left: .34em; /* optical-center the tracked text */
}
.login-sub {
  margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: .26em;
  text-transform: uppercase; color: var(--brand-2);
}
.login-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.login-foot { text-align: center; margin-top: 22px; font-size: 11px; letter-spacing: .08em; color: var(--text-mute); }

/* ---------- Misc ---------- */
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; font-size: 13px; }
.dl dt { color: var(--text-dim); }
.dl dd { margin: 0; word-break: break-word; }
.empty { text-align: center; padding: 50px 20px; color: var(--text-mute); }
.empty svg { width: 42px; height: 42px; opacity: .4; margin-bottom: 12px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mute); margin: 26px 0 12px; }
.copy { cursor: pointer; }
hr.sep { border: none; border-top: 1px solid var(--border-soft); margin: 22px 0; }

@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 100; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .grid.two { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 50px; }
  .menu-btn { display: inline-grid !important; }
}
.menu-btn { display: none; }

/* ============================================================= */
/* Public website (rexsacode.com)                                */
/* ============================================================= */
body.pub { display: block; position: relative; min-height: 100vh; }

/* Starfield / high-tech background — fixed behind all content. */
.pub-stars {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 50% -10%, rgba(108,92,231,.18), transparent 70%),
    radial-gradient(900px 520px at 90% 8%, rgba(56,189,248,.10), transparent 70%),
    var(--bg);
}
.pub-stars::before {
  content: ""; position: absolute; inset: 0; opacity: .7;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.4px 1.4px at 75% 20%, rgba(255,255,255,.45), transparent),
    radial-gradient(1.2px 1.2px at 40% 70%, rgba(255,255,255,.40), transparent),
    radial-gradient(1.6px 1.6px at 88% 62%, rgba(255,255,255,.50), transparent),
    radial-gradient(1.2px 1.2px at 12% 82%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.3px 1.3px at 62% 44%, rgba(255,255,255,.40), transparent),
    radial-gradient(1.2px 1.2px at 30% 12%, rgba(255,255,255,.30), transparent);
  background-repeat: repeat; background-size: 480px 480px;
}
html[data-theme="light"] .pub-stars::before { opacity: .0; }
html[data-theme="light"] .pub-stars {
  background:
    radial-gradient(1100px 620px at 50% -10%, rgba(108,92,231,.10), transparent 70%),
    radial-gradient(900px 520px at 90% 8%, rgba(56,189,248,.08), transparent 70%),
    var(--bg);
}

/* ---------- Two-level header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--border-soft); }
.topbar-pub { max-width: 1180px; margin: 0 auto; padding: 14px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pub-brand { display: flex; align-items: center; gap: 11px; }
.pub-brand img { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 3px 10px var(--brand-glow)); }
.pub-word { font-size: 20px; font-weight: 800; letter-spacing: .2em; color: var(--text); }

.top-actions { display: flex; align-items: center; gap: 10px; }
.ic-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-dim); transition: all .15s; }
.ic-btn:hover { color: var(--text); border-color: #2e3a52; background: var(--bg-hover); }
.ic-btn svg { width: 18px; height: 18px; }
.ic-btn .ic-moon { display: none; }
html[data-theme="light"] .ic-btn .ic-sun { display: none; }
html[data-theme="light"] .ic-btn .ic-moon { display: block; }

/* Language selector */
.lang-select { position: relative; }
.lang-trigger { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; cursor: pointer;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; color: var(--text-dim);
  font-size: 13px; font-weight: 600; font-family: inherit; transition: all .15s; }
.lang-trigger:hover { color: var(--text); border-color: #2e3a52; background: var(--bg-hover); }
.lang-trigger svg { width: 16px; height: 16px; }
.lang-caret { transition: transform .18s; }
.lang-select.open .lang-caret { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 168px; z-index: 60;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 40px rgba(0,0,0,.4); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s; }
.lang-select.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 9px 11px; border: none; background: transparent; color: var(--text-dim); border-radius: 8px;
  font-size: 13.5px; font-family: inherit; cursor: pointer; transition: all .12s; }
.lang-menu button:hover { background: var(--bg-hover); color: var(--text); }
.lang-menu button span { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--brand-2);
  background: rgba(139,124,240,.14); border: 1px solid rgba(139,124,240,.3); padding: 2px 7px; border-radius: 999px; }

.pub-login { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border); transition: all .15s; }
.pub-login:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }

/* Second nav bar */
.navbar-pub { border-top: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg-elev) 50%, transparent); }
.pub-links { max-width: 1180px; margin: 0 auto; padding: 8px 26px; display: flex; align-items: center; gap: 4px; }
.pub-links a { position: relative; display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 9px;
  color: var(--text-dim); font-weight: 600; font-size: 14px; transition: all .15s; }
.pub-links a:hover { color: var(--text); background: var(--bg-hover); }
.pub-links a.on { color: var(--text); }
.pub-links a.on::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--blue)); }

.pub-main { min-height: 60vh; }
.btn.lg { padding: 13px 24px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 24px 40px; }
.hero-panel { position: relative; max-width: 1080px; margin: 0 auto; overflow: hidden; text-align: center;
  padding: 84px 32px 88px; border-radius: 26px; border: 1px solid var(--border);
  background:
    radial-gradient(120% 120% at 50% -10%, rgba(108,92,231,.10), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-elev) 70%, transparent), color-mix(in srgb, var(--bg-card) 40%, transparent));
  box-shadow: 0 0 0 1px rgba(108,92,231,.08), 0 40px 120px rgba(0,0,0,.45); }
html[data-theme="light"] .hero-panel { box-shadow: 0 0 0 1px rgba(108,92,231,.06), 0 30px 80px rgba(24,34,68,.10); }
.hero-glow { position: absolute; inset: -40% 0 auto 0; height: 620px; pointer-events: none;
  background: radial-gradient(680px 320px at 50% 0, rgba(124,108,240,.30), transparent 70%); }
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px; font-size: 12.5px;
  font-weight: 600; color: var(--brand-2); background: rgba(139,124,240,.12); border: 1px solid rgba(139,124,240,.3);
  margin-bottom: 24px; }
.pill svg { width: 15px; height: 15px; }
.hero-title { font-size: 60px; line-height: 1.03; font-weight: 800; letter-spacing: -.025em; }
.hero-title .grad { background: linear-gradient(110deg, #a78bfa 10%, #7c6cf0 45%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { max-width: 600px; margin: 22px auto 0; color: var(--text-dim); font-size: 17px; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* ---------- Feature grid ---------- */
.features { max-width: 1080px; margin: 24px auto; padding: 20px 24px 10px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  transition: transform .18s, border-color .18s; }
.feat:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.feat-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent, var(--brand)) 16%, transparent); color: var(--accent, var(--brand)); }
.feat-ic svg { width: 24px; height: 24px; }
.feat h3 { font-size: 16px; margin-bottom: 8px; }
.feat p { color: var(--text-dim); font-size: 14px; margin: 0; line-height: 1.55; }

/* ---------- CTA band ---------- */
.cta-band { max-width: 1080px; margin: 44px auto 76px; padding: 48px 24px; text-align: center;
  background: linear-gradient(135deg, rgba(124,108,240,.16), rgba(56,189,248,.06));
  border: 1px solid var(--border); border-radius: 22px; }
.cta-band h2 { font-size: 28px; margin-bottom: 8px; }
.cta-band p { color: var(--text-dim); margin: 0 0 6px; }

/* ---------- Public sub-pages ---------- */
.pub-page { max-width: 1080px; margin: 0 auto; padding: 60px 24px 80px; }
.pub-head { text-align: center; margin-bottom: 40px; }
.pub-head h1 { font-size: 40px; letter-spacing: -.02em; margin: 16px 0 12px; }
.dl-card { max-width: 640px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px; flex-wrap: wrap; }
.dl-ver { font-size: 22px; font-weight: 700; }
.dl-changelog { padding: 22px 26px; border-top: 1px solid var(--border-soft); color: var(--text-dim); font-size: 14px; }

/* ---------- Product cards ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 20px; }
.prod-card { position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-card), color-mix(in srgb, var(--bg-card) 88%, var(--bg)));
  border: 1px solid var(--border); border-radius: 18px; padding: 24px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.prod-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent, var(--brand)), transparent); }
.prod-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent, var(--brand)) 55%, var(--border));
  box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.prod-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.prod-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--green);
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); padding: 4px 10px; border-radius: 999px; }
.prod-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.prod-tag { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent, var(--brand)); }
.prod-card h3 { font-size: 20px; margin-bottom: 8px; }
.prod-desc { color: var(--text-dim); font-size: 13.5px; line-height: 1.55; margin: 0 0 16px; }
.prod-feats { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 9px; }
.prod-feats li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text); }
.prod-feats svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent, var(--brand)); }
.prod-meta { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-mute);
  padding: 12px 0 18px; margin-top: auto; border-top: 1px solid var(--border-soft); }
.prod-meta svg { width: 15px; height: 15px; }

/* ---------- Status page ---------- */
.status-banner { display: inline-flex; align-items: center; gap: 9px; margin-top: 6px; padding: 9px 18px;
  border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--green);
  background: rgba(34,197,94,.10); border: 1px solid rgba(34,197,94,.32); }
.status-banner .dot, .status-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 10px var(--green); }
.status-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; position: relative; overflow: hidden; }
.status-row::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent, var(--green)); }
.status-name { font-size: 15px; font-weight: 700; }
.status-sub { font-size: 13px; color: var(--text-mute); margin-top: 3px; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  color: var(--green); background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3);
  padding: 6px 13px; border-radius: 999px; white-space: nowrap; }

/* ---------- Auth (public login placeholder) ---------- */
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 40px 34px 34px;
  box-shadow: var(--shadow); }
.auth-logo { width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(167,139,250,.22), transparent 70%);
  box-shadow: 0 10px 30px var(--brand-glow), inset 0 0 0 1px rgba(255,255,255,.06); }
.auth-logo img { width: 50px; height: 50px; object-fit: contain; }
.auth-soon { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 22px; padding: 14px;
  border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--brand-2);
  background: rgba(139,124,240,.1); border: 1px dashed rgba(139,124,240,.35); }
.auth-soon svg { width: 17px; height: 17px; }

/* ---------- Packages (payment) ---------- */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pkg { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; overflow: hidden; transition: transform .18s, border-color .18s; }
.pkg:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent, var(--brand)) 50%, var(--border)); }
.pkg::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent, var(--brand)); }
.pkg h3 { font-size: 18px; margin: 10px 0 4px; }
.pkg-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent, var(--brand)); }
.pkg-price { font-size: 14px; color: var(--text-dim); margin-bottom: 10px; }
.pkg p { font-size: 13.5px; min-height: 40px; }
.pay-steps { color: var(--text-dim); font-size: 14px; padding-left: 18px; margin: 12px 0 0; line-height: 1.9; }
.contact-box { margin-top: 12px; padding: 16px; border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--border); }

/* ---------- Footer ---------- */
.pub-foot { border-top: 1px solid var(--border-soft); background: color-mix(in srgb, var(--bg) 70%, #000); }
html[data-theme="light"] .pub-foot { background: var(--bg-elev); }
.pub-foot-inner { max-width: 1180px; margin: 0 auto; padding: 28px 26px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.pub-foot-inner .pub-brand { justify-self: start; }
.pub-foot-tag { justify-self: center; text-align: center; font-size: 13px; font-weight: 600;
  letter-spacing: .12em; color: var(--brand-2); }
.pub-foot-copy { justify-self: end; text-align: right; font-size: 12px; color: var(--text-mute); }

@media (max-width: 720px) {
  .hero-title { font-size: 40px; }
  .hero-panel { padding: 60px 22px 64px; border-radius: 20px; }
  .topbar-pub { padding: 12px 18px; }
  .pub-links { padding: 6px 12px; overflow-x: auto; }
  .pub-word { display: none; }
  .lang-trigger .lang-current { display: none; }
  .pub-foot-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px; }
  .pub-foot-inner .pub-brand { justify-self: center; }
  .pub-foot-tag { justify-self: center; }
  .pub-foot-copy { justify-self: center; text-align: center; }
}

/* ============================================================= */
/* Custom dropdown (rx-select) — License Duration, etc.          */
/* ============================================================= */
.rx-select { position: relative; }
.rx-select-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  font-size: 13.5px; font-family: inherit; cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.rx-select-trigger:hover { border-color: #2e3a52; background: var(--bg-hover); }
.rx-select.open .rx-select-trigger { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); background: var(--bg-elev); }
.rx-select-value { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rx-sel-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-chevron { width: 18px; height: 18px; color: var(--text-mute); transition: transform .18s, color .18s; flex-shrink: 0; }
.rx-select.open .rx-chevron { transform: rotate(180deg); color: var(--brand-2); }

.rx-select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 14px 36px rgba(0,0,0,.5); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
  max-height: 320px; overflow-y: auto;
}
.rx-select.open .rx-select-menu { opacity: 1; visibility: visible; transform: none; }
.rx-select-option {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 7px;
  cursor: pointer; color: var(--text-dim); font-size: 13.5px;
  transition: background .12s, color .12s;
}
.rx-select-option:hover { background: var(--bg-hover); color: var(--text); }
.rx-select-option.is-selected { color: #fff; background: rgba(139,124,240,.12); }
.rx-opt-label { flex: 1 1 auto; white-space: nowrap; text-align: left; }
.rx-opt-hint {
  display: inline-flex; align-items: center; flex-shrink: 0; line-height: 1;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-2); background: rgba(139,124,240,.14); border: 1px solid rgba(139,124,240,.32);
  padding: 3px 8px; border-radius: 999px;
}
/* Fixed check column on the far right so badges + checkmarks line up across rows. */
.rx-opt-check { width: 16px; height: 16px; color: var(--brand-2); flex-shrink: 0; visibility: hidden; }
.rx-select-option.is-selected .rx-opt-check { visibility: visible; }
