/* Prego www — Tenant Onboard Wizard */
:root {
  --bg: #0f0f12;
  --surface: #1a1a1f;
  --border: #2a2a32;
  --text: #e8e8ed;
  --text-muted: #9898a6;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --font: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.header nav a:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 3rem 0 2rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Subdomain form */
.subdomain-form {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.subdomain-form[aria-hidden="true"] {
  display: none;
}

.subdomain-form h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
}

.form-inline label {
  flex: 0 0 auto;
}

.form-inline input {
  width: 12rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.form-inline input:focus {
  outline: none;
  border-color: var(--primary);
}

.input-suffix {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.input-with-suffix {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.input-with-suffix input {
  flex: 1;
  min-width: 0;
}
.input-with-suffix .input-suffix {
  margin-left: 0;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  margin-top: 0.5rem;
}

.additional-user-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.additional-user-row .invite-email {
  max-width: 14rem;
}
.additional-user-row .invite-name {
  max-width: 10rem;
}

.hint {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.optional-label {
  display: block;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Plans */
.plans {
  padding: 2.5rem 0 3rem;
}

.plans h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.section-desc {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.plan-free {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.plan-header {
  margin-bottom: 1rem;
}

.plan-header h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.plan-tier {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: lowercase;
}

.plan-price {
  margin: 0.5rem 0 0;
  font-size: 1.125rem;
}

.plan-price .period {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.plan-features {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--text-muted);
  flex: 1;
}

.plan-features li {
  padding: 0.25rem 0;
}

.plan-features li::before {
  content: "· ";
  color: var(--primary);
}

.flow-note {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.flow-note strong {
  color: var(--text);
}

.flow-note code {
  background: var(--bg);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.8125rem;
}

.flow-note ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer code {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Wizard */
.wizard-main {
  padding: 2rem 0 3rem;
}

.wizard-progress {
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.wizard-step {
  margin: 0;
}

.wizard-step h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.wizard-step .lead {
  margin-bottom: 1.5rem;
}

.wizard-form {
  max-width: 28rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group .hint {
  margin-top: 0.35rem;
}

.form-group--readonly .readonly-value {
  font-weight: 500;
  padding: 0.35rem 0;
}

.char-count {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-label input {
  margin: 0;
}

#subdomain-name-group[aria-hidden="true"] {
  display: none;
}

.wizard-form .input-suffix {
  margin-left: 0.25rem;
}

.wizard-form .preview {
  margin: 1rem 0 0.5rem;
  font-size: 0.9375rem;
}

.wizard-form .error {
  color: #f87171;
  font-size: 0.875rem;
  margin: 0.5rem 0 0;
}

.availability {
  display: block;
  font-size: 0.8125rem;
  margin-top: 0.35rem;
}
.availability--ok {
  color: #22c55e;
}
.availability--taken {
  color: #f87171;
}
.availability--checking {
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.auth-buttons {
  margin-bottom: 1rem;
}
.auth-buttons .hint { margin-bottom: 0.75rem; }
.auth-buttons .btn { margin-right: 0.5rem; margin-bottom: 0.5rem; }
.auth-skip { margin: 0 0.5rem; color: var(--text-muted); font-size: 0.875rem; }

.demo-note {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.summary {
  margin: 1rem 0;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.summary-list li {
  padding: 0.35rem 0;
  font-size: 0.9375rem;
}

.summary-list li strong {
  display: inline-block;
  width: 7rem;
  color: var(--text-muted);
}

.provision-status {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.provision-status code {
  background: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.provision-status #origin-url-link {
  margin-top: 1rem;
  display: inline-block;
}

/* Plan Grid 4 columns for package cards */
.plan-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .plan-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .plan-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Plan Badge */
.plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-badge.pro {
  background: linear-gradient(135deg, #059669, #10b981);
}

.plan-badge.enterprise {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.plan-card {
  position: relative;
}

/* Plan Highlight */
.plan-highlight {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.3);
}

/* Plan Infrastructure Tags */
.plan-infra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.infra-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.infra-tag.shared {
  background: #1e3a5f;
  color: #60a5fa;
}

.infra-tag.dedicated {
  background: #064e3b;
  color: #6ee7b7;
}

.infra-spec {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.2rem 0;
}

/* Plan Features */
.plan-features .feature-separator {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
  list-style: none;
}

.plan-features .overage {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.plan-features .enterprise-feature {
  color: #a78bfa;
}

/* Billing Table Section */
.billing-table-section {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.billing-table-section h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.billing-table th,
.billing-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.billing-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.billing-table th:first-child {
  width: 30%;
}

.billing-table td:not(:first-child) {
  text-align: center;
}

.billing-table th:not(:first-child) {
  text-align: center;
}

.billing-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.credit-note {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text);
}

.credit-note strong {
  color: var(--primary);
}

/* Auth Container */
.auth-container {
  max-width: 400px;
  margin: 0 auto;
}

.auth-social {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-social h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 1rem;
  color: var(--text);
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #fff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-google:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.google-icon {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  gap: 1rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.email-auth-form {
  margin-bottom: 1rem;
}

.otp-section {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.otp-input-group {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.otp-input-group input {
  flex: 1;
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  font-family: monospace;
}

.otp-error {
  color: var(--danger, #ef4444);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.auth-skip-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Logged In State */
.auth-logged-in {
  max-width: 400px;
  margin: 0 auto;
}

.logged-in-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--border);
  object-fit: cover;
}

.user-info {
  flex: 1;
}

.user-name {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.user-email {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}
