:root {
  --bg: #effbfd;
  --bg2: #d5f3f7;
  --ink: #06303b;
  --muted: #4b6f78;
  --card: rgba(255, 255, 255, .86);
  --line: #c3e6ec;
  --brand: #0aa5b8;
  --brand-d: #077a89;
  --brand-ink: #ffffff;
  --accent: #5eead4;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --ok: #067647;
  --shadow: 0 24px 60px -24px rgba(6, 78, 94, .35), 0 2px 8px rgba(6, 78, 94, .08);
  --radius: 22px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #04161b;
    --bg2: #082a33;
    --ink: #e6f8fb;
    --muted: #8db5be;
    --card: rgba(9, 38, 47, .82);
    --line: #164552;
    --brand: #22c3d6;
    --brand-d: #5eead4;
    --brand-ink: #032b33;
    --danger: #fda29b;
    --danger-bg: #3a1411;
    --ok: #75e0a7;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Vazirmatn, "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40rem 28rem at 85% -10%, rgba(94, 234, 212, .35), transparent 60%),
    radial-gradient(36rem 26rem at -10% 110%, rgba(10, 165, 184, .28), transparent 60%);
}
.shell {
  flex: 1;
  width: min(1080px, 100% - 2rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: 2.5rem;
}
.brand { padding-inline: .5rem; }
.logo { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.6rem; }
.wordmark { font-size: 1.9rem; font-weight: 800; letter-spacing: .02em; direction: ltr; }
.wordmark b { color: var(--brand); font-weight: 800; }
.brand h1 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.35; margin: 0 0 1.4rem; font-weight: 800; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; color: var(--muted); }
.points li { display: flex; gap: .7rem; align-items: flex-start; }
.points li::before {
  content: ""; flex: 0 0 .65rem; height: .65rem; margin-top: .62rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--brand));
}
.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
  animation: rise .5s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card h2 { margin: 0 0 .3rem; font-size: 1.45rem; }
.card .sub { margin: 0 0 1.3rem; color: var(--muted); }
label { display: block; font-weight: 600; font-size: .92rem; margin: 1rem 0 .35rem; }
input[type=text], input[type=email], input[type=password] {
  width: 100%; font: inherit; color: inherit;
  padding: .8rem 1rem; border-radius: 14px;
  border: 1.5px solid var(--line); background: transparent;
  transition: border-color .15s, box-shadow .15s;
}
input[dir=ltr] { text-align: start; }
input:focus-visible, button:focus-visible, .lang:focus-visible {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent);
}
.code-input { text-align: center !important; letter-spacing: .35em; font-size: 1.4rem; font-weight: 700; }
button {
  font: inherit; cursor: pointer; border: 0; border-radius: 14px;
  padding: .85rem 1.2rem; font-weight: 700;
  transition: transform .1s, filter .15s, background .15s;
}
button:active { transform: translateY(1px); }
button[disabled] { opacity: .55; cursor: not-allowed; }
.primary {
  width: 100%; margin-top: 1.4rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  color: var(--brand-ink);
  box-shadow: 0 10px 24px -12px var(--brand);
}
.primary:hover:not([disabled]) { filter: brightness(1.07); }
.ghost { background: transparent; color: var(--brand-d); border: 1.5px solid var(--line); }
.ghost:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.linkish { background: none; color: var(--brand-d); padding: .4rem .2rem; font-weight: 600; }
.row { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
.row > button { flex: 1 1 auto; }
.msg { margin-top: 1rem; padding: .75rem 1rem; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-size: .93rem; }
.msg[hidden] { display: none; }
.qr { display: grid; place-items: center; margin: 1rem 0; }
.qr img { width: 200px; height: 200px; border-radius: 16px; background: #fff; padding: 8px; border: 1px solid var(--line); }
.secret {
  direction: ltr; text-align: center; font-family: ui-monospace, Consolas, monospace;
  background: color-mix(in srgb, var(--brand) 9%, transparent); border-radius: 12px; padding: .6rem; word-break: break-all; font-size: .95rem;
}
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 1rem 0; direction: ltr; }
.codes code {
  text-align: center; padding: .55rem; border-radius: 10px; border: 1px dashed var(--line);
  font-family: ui-monospace, Consolas, monospace; font-size: 1rem;
}
.check { display: flex; gap: .6rem; align-items: center; font-weight: 600; margin-top: 1rem; }
.check input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); }
.pill { display: inline-block; font-size: .8rem; padding: .1rem .6rem; border-radius: 99px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-d); font-weight: 700; }
.pill.off { background: var(--danger-bg); color: var(--danger); }
.list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .6rem; }
.list li { border: 1px solid var(--line); border-radius: 14px; padding: .7rem .9rem; display: flex; justify-content: space-between; gap: .8rem; align-items: center; }
.list .meta { font-size: .85rem; color: var(--muted); direction: ltr; text-align: start; word-break: break-word; }
.list button { padding: .45rem .8rem; font-size: .85rem; }
h3 { margin: 1.4rem 0 .2rem; font-size: 1.05rem; }
.foot { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem 1rem 1.6rem; color: var(--muted); font-size: .85rem; }
.langs { display: flex; gap: .4rem; }
.lang { background: transparent; border: 1px solid var(--line); border-radius: 99px; padding: .25rem .9rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
.lang[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.secure::before { content: "\1F512\00a0"; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding-block: 1.2rem; gap: 1.4rem; }
  .brand { text-align: center; }
  .logo { justify-content: center; }
  .points { display: none; }
}
@media (prefers-reduced-motion: reduce) { .card { animation: none; } * { transition: none !important; } }
