/* ─── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #111827;
  background: #f9fafb;
}
a { color: #1a56db; }

/* ─── Layout ────────────────────────────────────────────────────────────── */
.site-header {
  background: #1a56db;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-header .logo-mark { display: flex; align-items: center; }
.site-header .brand {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hero { margin-bottom: 40px; }
.hero h1 {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
}
.hero p {
  font-size: 17px;
  color: #374151;
  margin: 0;
}

/* ─── Card ──────────────────────────────────────────────────────────────── */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);
}
.card h2 {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 600;
}

/* ─── Form ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
}
input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  background: #fff;
  transition: border-color .15s;
}
input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
input[type="text"]::placeholder,
input[type="email"]::placeholder { color: #9ca3af; }

.subdomain-row {
  display: flex;
  align-items: center;
  gap: 0;
}
.subdomain-row input {
  border-radius: 8px 0 0 8px;
  flex: 1;
  min-width: 0;
}
.subdomain-suffix {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-left: none;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}
.subdomain-preview {
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
  min-height: 18px;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}
.terms-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #1a56db;
}
.terms-row label {
  font-size: 14px;
  font-weight: 400;
  color: #374151;
  margin: 0;
}

/* ─── Button ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  margin-top: 8px;
}
.btn-primary {
  background: #1a56db;
  color: #ffffff;
}
.btn-primary:hover:not(:disabled) { background: #1547c0; }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

/* ─── Feedback ──────────────────────────────────────────────────────────── */
.error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  color: #b91c1c;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.error-box.visible { display: block; }

/* ─── Status page ───────────────────────────────────────────────────────── */
.status-icon { font-size: 48px; text-align: center; margin-bottom: 16px; }
.status-message { text-align: center; }
.status-message h1 { font-size: 22px; margin: 0 0 8px; }
.status-message p { color: #374151; margin: 0 0 12px; }
.site-link {
  display: block;
  margin: 24px auto 0;
  max-width: 400px;
  padding: 14px 20px;
  background: #1a56db;
  color: #ffffff;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}
.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #1a56db;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: #9ca3af;
}
.site-footer a { color: #6b7280; }
