:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1c1f24;
  --muted: #5d6470;
  --line: #d9dde3;
  --accent: #1f6feb;
  --accent-text: #ffffff;
  --error-bg: #fdecec;
  --error-text: #a11d1d;
  --notice-bg: #e8f4ec;
  --notice-text: #1d6b37;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --card: #181c22;
    --text: #e6e8eb;
    --muted: #9aa3ae;
    --line: #2c333c;
    --accent: #4c8dff;
    --error-bg: #3a1717;
    --error-text: #ffb4b4;
    --notice-bg: #14301f;
    --notice-text: #a6e3b8;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
}
.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px;
}
.brand { font-weight: 700; color: var(--accent); letter-spacing: .5px; margin-bottom: 8px; }
h1 { font-size: 1.4rem; margin: 0 0 16px; }
p { margin: 0 0 12px; }
form { display: grid; gap: 14px; margin-bottom: 12px; }
form.inline { display: block; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 380px) { .row { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; font-size: .95rem; color: var(--muted); }
input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[dir="ltr"] { text-align: left; }
input.code { letter-spacing: 6px; font-size: 1.2rem; text-align: center; }
button, .btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.link { background: none; color: var(--accent); padding: 0; width: auto; font-weight: 400; }
a { color: var(--accent); }
.links { text-align: center; font-size: .95rem; margin-top: 12px; }
.hint { font-size: .9rem; color: var(--muted); }
.rules { margin: 0; padding-inline-start: 20px; font-size: .9rem; color: var(--muted); }
.error, .notice { padding: 10px 12px; border-radius: var(--radius); font-size: .95rem; }
.error { background: var(--error-bg); color: var(--error-text); }
ul.error { padding-inline-start: 28px; }
.notice { background: var(--notice-bg); color: var(--notice-text); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 16px 0; font-size: .9rem; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
