:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-deep: #1e1b4b;
  --accent: #f59e0b;
  --accent-coral: #f97316;
  --ok: #10b981;
  --bad: #ef4444;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 16px/1.75 "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 780px;
}

h1, h2, h3, h4 {
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 16px;
}

h1 small {
  display: block;
  font-size: 16px;
  color: var(--ok);
  font-weight: 700;
  margin-top: 6px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: #f8fafc;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hint {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 6px;
  min-height: 20px;
}

.hint.ok {
  color: var(--ok);
  font-weight: 700;
}

.hint.bad {
  color: var(--bad);
  font-weight: 700;
}

.addr {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
  background: #f1f5f9;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #cbd5e1;
}

.addr input {
  direction: ltr;
  text-align: left;
  border: 0;
  background: #fff;
}

.addr span {
  color: var(--brand-deep);
  font-weight: 700;
  white-space: nowrap;
  font-family: monospace;
  font-size: 15px;
}

button {
  margin-top: 22px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), #4f46e5);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

button.ghost {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  box-shadow: none;
  margin-top: 10px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.terms input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--brand);
}

.otp {
  font-size: 32px;
  letter-spacing: 12px;
  text-align: center;
  direction: ltr;
  font-weight: 800;
  background: #fff;
}

#view .bar {
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0;
}

#view .bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--ok));
  transition: width 0.6s ease;
}

ul.steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.steps li {
  padding: 8px 0;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
}

ul.steps li.Done {
  color: var(--ok);
  font-weight: 700;
}

ul.steps li.Running {
  color: var(--brand);
  font-weight: 800;
}

ul.steps li::before {
  content: "○ ";
}

ul.steps li.Done::before {
  content: "✓ ";
}

ul.steps li.Running::before {
  content: "◔ ";
}

code {
  background: #eef2ff;
  color: #3730a3;
  padding: 3px 8px;
  border-radius: 6px;
  direction: ltr;
  unicode-bidi: embed;
  user-select: all;
  font-weight: 700;
  font-size: 0.92em;
}

.cred {
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 16px 0;
}

.cred p {
  margin: 8px 0;
}

dialog {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 460px;
  width: 92%;
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

dialog h3 {
  margin: 0 0 10px;
}

dialog button {
  margin-top: 16px;
}
