:root {
  --bg1: #eff6ff;
  --bg2: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --input: #f8fafc;
  --primary: #1e3a5f;
  --accent: #2563eb;
  --ok: #16a34a;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  font-family: "Cairo", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.shell {
  width: 100%;
  max-width: 42rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.ghost {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.hero-copy {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-copy h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.step .bubble {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid #d1d5db;
  background: #fff;
  font-weight: 800;
}

.step.is-active { color: var(--accent); }
.step.is-active .bubble {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.step.is-done { color: var(--ok); }
.step.is-done .bubble {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
}

.step-line {
  width: 2.5rem;
  height: 2px;
  background: #d1d5db;
}
.step-line.is-done { background: var(--ok); }

.card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.35rem 1.5rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.card-desc {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.field { margin-bottom: 0.95rem; }
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
}
.req { color: var(--danger); }

.field input,
.field select {
  width: 100%;
  height: 2.7rem;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: var(--input);
  padding: 0 0.9rem;
  font: inherit;
  color: var(--text);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.25);
  border-color: #93c5fd;
}

.subdomain {
  display: flex;
  align-items: stretch;
  direction: ltr;
}

.subdomain input {
  border-radius: 10px 0 0 10px;
  border-left: 1px solid #dbe3ee;
}

.subdomain .suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.85rem;
  background: #f3f4f6;
  border: 1px solid #dbe3ee;
  border-left: 0;
  border-radius: 0 10px 10px 0;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.grid-2 {
  display: grid;
  gap: 0.95rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.password-wrap { position: relative; }
.password-wrap input { padding-inline-end: 2.6rem; }
.password-wrap button {
  position: absolute;
  inset-inline-end: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
}

.err {
  margin: 0.3rem 0 0;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 2.85rem;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn.outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-row {
  display: flex;
  gap: 0.75rem;
}
.btn-row .btn { flex: 1; }

.summary {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.1rem;
  margin-bottom: 1rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
}
.summary-row span:first-child { color: var(--muted); font-weight: 600; }
.summary-row strong { font-weight: 800; }
.summary-total {
  border-top: 1px solid var(--line);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.summary-total .amount {
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 800;
}

.alert {
  margin-bottom: 1rem;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-weight: 700;
  font-size: 0.9rem;
}
.alert.info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.prov-list { display: grid; gap: 0.85rem; }
.prov-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.prov-item .dot {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  margin-top: 0.15rem;
  flex: 0 0 auto;
}
.prov-item.is-run .dot {
  border-color: var(--accent);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}
.prov-item.is-ok .dot {
  border-color: var(--ok);
  background: var(--ok);
}
.prov-item h4 { margin: 0; font-size: 0.95rem; }
.prov-item p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.82rem; }

.success-box {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.success-box label {
  display: block;
  font-size: 0.75rem;
  color: #166534;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.success-box a, .success-box code {
  color: #14532d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-submit { margin-top: 1.1rem; }
.field select { position: relative; z-index: 1; }

.success-domain{
  display:block;
  font-size:1.35rem;
  font-weight:800;
  direction:ltr;
  margin-top:.35rem;
  color:#166534;
  word-break:break-all;
}
.grant-banner{
  margin:0 0 0.85rem;
  padding:0.7rem 0.85rem;
  border-radius:10px;
  background:#dcfce7;
  border:1px solid #86efac;
  color:#14532d;
  font-weight:700;
  text-align:center;
}

.sys-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.sys-card {
  text-align: right;
  width: 100%;
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.sys-card:hover { border-color: #93c5fd; }
.sys-card.is-selected {
  border-color: var(--accent);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.sys-card strong { display: block; font-size: 1.05rem; font-weight: 800; }
.sys-sub {
  display: block;
  margin-top: 0.15rem;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.88rem;
}
.sys-desc {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}
.sys-pill {
  display: inline-block;
  margin-inline-start: 0.35rem;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
}
.sys-links {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}
.sys-link {
  display: block;
  text-align: center;
  text-decoration: none;
  background: #fff;
  color: #14532d;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-weight: 800;
}
.sys-link:hover { background: #dcfce7; }
