:root {
  color-scheme: dark;

  --on: 255, 255, 255;
  --violet: #8b5cf6;
  --violet-600: #6d28d9;
  --violet-300: #c4b5fd;
  --emerald: #34d399;
  --danger: #f87171;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, .55);
  --muted-2: rgba(255, 255, 255, .7);
  --line: rgba(168, 85, 247, .18);
  --glass: rgba(10, 10, 18, .68);
  --page-1: rgba(139, 92, 246, .18);
  --page-2: rgba(109, 40, 217, .12);
  --page-bg: #0b0b18;
  --page-grad: linear-gradient(135deg, #020102 0%, #05010a 45%, #090113 100%);
}

:root[data-theme="light"] {
  color-scheme: light;
  --on: 15, 23, 42;
  --violet: #7c3aed;
  --violet-600: #6d28d9;
  --violet-300: #6d28d9;
  --emerald: #059669;
  --danger: #dc2626;
  --ink: #14142b;
  --muted: rgba(15, 23, 42, .60);
  --muted-2: rgba(15, 23, 42, .78);
  --line: rgba(124, 58, 237, .20);
  --glass: rgba(255, 255, 255, .86);
  --page-1: rgba(124, 58, 237, .13);
  --page-2: rgba(37, 99, 235, .09);
  --page-bg: #f4f5fb;
  --page-grad: linear-gradient(135deg, #f7f7fc 0%, #f2eefb 45%, #eef1fb 100%);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Vazirmatn', 'Vazir', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, var(--page-1), transparent 30%),
    radial-gradient(circle at bottom right, var(--page-2), transparent 28%),
    var(--page-grad);
}

.wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }

.shell {
  width: 100%; max-width: 1120px;
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(var(--on),.1); border-radius: 32px; overflow: hidden;
  background: var(--glass); backdrop-filter: blur(18px);
  box-shadow: 0 20px 80px rgba(0, 0, 0, .55);
}
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; max-width: 480px; } }

.panel { padding: 40px; }
@media (max-width: 480px) { .panel { padding: 26px 20px; } }

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand .mark {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 22px; font-weight: 800; flex: none; overflow: hidden;
  background: linear-gradient(135deg, var(--violet), var(--violet-600));
  box-shadow: 0 12px 30px rgba(109, 40, 217, .35);
}

.brand .mark img {
  width: 100%; height: 100%; object-fit: contain; display: block; padding: 6px;
}
.brand h1 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -.3px; }
.brand p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.tab {
  border: 1px solid rgba(var(--on),.1); background: rgba(var(--on),.04);
  color: var(--muted-2); border-radius: 16px; padding: 12px; font: inherit; font-weight: 600;
  cursor: pointer; transition: .2s;
}
.tab:hover { color: var(--ink); }
.tab.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, .28), rgba(109, 40, 217, .16));
  border-color: rgba(168, 85, 247, .45); color: var(--ink);
}

h2.title { font-size: 24px; margin: 0 0 4px; font-weight: 700; }
p.subtitle { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; color: var(--muted-2); margin-bottom: 8px; }
.input {
  width: 100%; border: 1px solid rgba(var(--on),.1); background: rgba(var(--on),.05);
  color: var(--ink); border-radius: 16px; padding: 13px 16px; font: inherit; font-size: 14px;
  outline: none; transition: .18s;
}
.input::placeholder { color: rgba(255, 255, 255, .3); }
.input:focus { border-color: rgba(168, 85, 247, .7); box-shadow: 0 0 0 4px rgba(168, 85, 247, .12); }
.input.otp { text-align: center; letter-spacing: .5em; font-size: 18px; padding-inline-end: 6px; }
.input.error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(248, 113, 113, .12); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-2); cursor: pointer; }
.remember input { width: 16px; height: 16px; accent-color: var(--violet); }
.link { background: none; border: 0; color: var(--violet-300); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link:hover { color: #ddd6fe; }

.reqs { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; display: grid; gap: 6px; }
.reqs li { color: var(--danger); transition: .15s; }
.reqs li.pass { color: var(--emerald); }
.reqs li::before { content: '• '; }

.btns { display: flex; gap: 12px; margin-top: 8px; }
.btn {
  border: 0; border-radius: 16px; padding: 13px 16px; font: inherit; font-weight: 600;
  cursor: pointer; transition: .18s; flex: 1;
}
.btn.primary { background: linear-gradient(135deg, var(--violet), var(--violet-600)); color: #fff; box-shadow: 0 12px 30px rgba(109, 40, 217, .35); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: rgba(var(--on),.04); border: 1px solid rgba(var(--on),.08); color: var(--ink); }
.btn.ghost:hover { background: rgba(var(--on),.08); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn.full { width: 100%; }

.alert { border-radius: 14px; padding: 11px 14px; font-size: 13px; margin-bottom: 16px; display: none; }
.alert.show { display: block; }
.alert.err { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .3); color: #fecaca; }
.alert.ok { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); color: #bbf7d0; }
.hint { font-size: 12px; color: var(--muted); margin-top: 10px; }
.hint code { background: rgba(var(--on),.07); padding: 1px 7px; border-radius: 6px; color: var(--violet-300); }

.step { display: none; animation: fade .28s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.success { text-align: center; padding: 20px 0; }
.success .check {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 16px; display: grid; place-items: center;
  font-size: 30px; background: rgba(52, 211, 153, .15); color: var(--emerald);
}

.aside {
  position: relative; overflow: hidden; padding: 40px;
  background: linear-gradient(135deg, rgba(88, 28, 135, .2), rgba(76, 29, 149, .2));
  border-inline-start: 1px solid rgba(var(--on),.1);
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
@media (max-width: 900px) { .aside { display: none; } }
.badge {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  border: 1px solid rgba(196, 181, 253, .2); background: rgba(139, 92, 246, .1); color: var(--violet-300);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; margin-bottom: 12px;
}
.aside h2 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -.5px; }
.aside p.lead { font-size: 14px; line-height: 1.9; color: rgba(255, 255, 255, .6); margin: 0; max-width: 34ch; }
.orb {
  position: absolute; inset: 0; margin: auto; width: 260px; height: 260px; border-radius: 999px;
  background: radial-gradient(circle, rgba(139, 92, 246, .35) 0%, rgba(139, 92, 246, 0) 65%);
  filter: blur(18px); animation: pulse 2.6s ease-in-out infinite; z-index: 0;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .45; } 50% { transform: scale(1.08); opacity: .75; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 1; }
.qcard { border: 1px solid rgba(var(--on),.1); background: rgba(var(--on),.05); border-radius: 20px; padding: 14px; }
.qcard .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.qcard .sym { font-weight: 700; font-size: 14px; }
.qcard .nm { font-size: 11px; color: rgba(255, 255, 255, .45); }
.qcard .chg { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(52, 211, 153, .1); color: var(--emerald); }
.qcard .chg.down { background: rgba(248, 113, 113, .1); color: var(--danger); }
.qcard .px { font-size: 17px; font-weight: 700; }
.feats { display: grid; gap: 8px; position: relative; z-index: 1; }
.feat { font-size: 13px; color: var(--muted-2); display: flex; gap: 8px; align-items: center; }
.feat::before { content: '✓'; color: var(--emerald); font-weight: 800; }

.field .opt{ font-size:11px; color:#9ca3af; font-weight:400; }
.ref-hint{ font-size:11px; color:#34d399; margin-top:6px; line-height:1.8; }
