/* ============================================================
   HOSTINGPRO — Main Stylesheet
   Colors: #EE602C (main), #1474BD (accent)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --main:       #EE602C;
  --main-dark:  #E03206;
  --accent:     #1474BD;
  --accent-dark:#0e5a96;
  --white:      #ffffff;
  --bg:         #f5f5f5;
  --border:     #d8d8d8;
  --text:       #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --success:    #2e7d32;
  --error:      #c62828;
  --warning:    #e65100;
  --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);
  --radius:     4px;
  --radius-md:  8px;
}

html, body {
  height: 100%;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* ── LAYOUT WRAPPER ─────────────────────────────────────── */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOP NAV BAR ────────────────────────────────────────── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-svg-wrapper {
  width: 140px;
  height: 38px;
  display: flex;
  align-items: center;
}

.logo-svg-wrapper svg,
.logo-svg-wrapper img {
  max-width: 100%;
  max-height: 38px;
}

/* SVG PLACEHOLDER */
.logo-placeholder {
  width: 140px;
  height: 38px;
  border: 2px dashed var(--main);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--main);
  font-weight: 600;
  letter-spacing: .5px;
  background: rgba(238,96,44,.05);
  cursor: pointer;
  transition: background .2s;
}

.topbar-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-light);
}

.topbar-lang svg {
  width: 18px; height: 18px;
  color: var(--text-muted);
}

/* ── MAIN CONTENT AREA ──────────────────────────────────── */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 40px;
}

/* ── CARD ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

.card-wide {
  max-width: 720px;
}

.card-header {
  padding: 24px 28px 0;
}

.card-body {
  padding: 20px 28px 28px;
}

/* ── PHASE CONTAINERS ───────────────────────────────────── */
.phase {
  display: none;
  width: 100%;
  max-width: 720px;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeInUp .4s ease both;
}

.phase.active {
  display: flex;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PHASE 0 — PREVIEW SCREEN ───────────────────────────── */
#phase-preview {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  animation: none;
  max-width: none;
}

#phase-preview.fade-out {
  animation: fadeOutOverlay .6s ease forwards;
}

@keyframes fadeOutOverlay {
  to { opacity: 0; pointer-events: none; }
}

.preview-screenshot {
  width: 100%;
  max-width: 900px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  filter: blur(0px);
  transition: filter .4s;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .6s;
}

/* ── PHASE 1 — CONNECTING SCREEN ────────────────────────── */
#phase-connecting {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--white);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  animation: none;
  max-width: none;
}

#phase-connecting.active {
  display: flex;
}

#phase-connecting.fade-out {
  animation: fadeOutOverlay .6s ease forwards;
}

.connecting-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 40px 48px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.connecting-logo {
  margin-bottom: 28px;
  display: flex;
  justify-content: center;
}

.connecting-logo .logo-placeholder {
  width: 160px;
  height: 44px;
}

.connecting-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.connecting-sub {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 28px;
  line-height: 1.6;
}

.saved-credentials {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 24px;
  text-align: left;
}

.saved-credentials-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 8px;
}

.saved-credentials-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  padding: 3px 0;
}

.saved-credentials-row .icon {
  width: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ── SPINNER ────────────────────────────────────────────── */
.spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #eee;
  border-top-color: var(--main);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

.spinner-text {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

/* Progress bar */
.progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: #eee;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 20px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--main), var(--main-dark));
  border-radius: 99px;
  width: 0%;
  transition: width .3s ease;
}

/* ── PHASE 2 — LOGIN FORM ───────────────────────────────── */
.login-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.login-sub {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* Form fields */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 400;
}

.form-link:hover {
  text-decoration: underline;
}

.input-wrap {
  position: relative;
}

.form-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20,116,189,.12);
}

.form-input.typing {
  animation: typingPulse .15s ease;
}

@keyframes typingPulse {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: var(--main); }
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

/* Btn primary */
.btn-primary {
  display: block;
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, var(--main) 0%, var(--main-dark) 100%);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(238,96,44,.3);
}

.btn-primary:hover {
  opacity: .92;
  box-shadow: 0 4px 16px rgba(238,96,44,.4);
}

.btn-primary:active {
  transform: scale(.98);
}

.btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: var(--white);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

.new-account-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.new-account-row span {
  font-size: 13px;
  color: var(--text-light);
}

/* ── VERIFICATION STEPS ─────────────────────────────────── */
.verify-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 28px 32px;
  width: 100%;
  max-width: 480px;
}

.verify-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.verify-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.verify-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.verify-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  opacity: .35;
  transition: opacity .3s;
}

.verify-step:last-child { border-bottom: none; }

.verify-step.done  { opacity: 1; }
.verify-step.active { opacity: 1; }

.step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: border-color .3s, background .3s;
}

.verify-step.done .step-icon {
  border-color: var(--success);
  background: var(--success);
}

.verify-step.active .step-icon {
  border-color: var(--accent);
  background: var(--white);
}

.step-icon svg { width: 12px; height: 12px; }

.step-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(20,116,189,.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}

.verify-step.active .step-spinner { display: block; }
.verify-step.active .step-checkmark { display: none; }
.verify-step.done .step-spinner { display: none; }
.verify-step.done .step-checkmark { display: block; color: white; }
.verify-step:not(.active):not(.done) .step-spinner { display: none; }
.verify-step:not(.active):not(.done) .step-checkmark { display: none; }

.step-content {}

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.step-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── ALERT BOX ──────────────────────────────────────────── */
.alert {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  animation: fadeInUp .4s ease both;
}

.alert-danger {
  background: #fff3f0;
  border: 1.5px solid #f44336;
}

.alert-warning {
  background: #fff8e1;
  border: 1.5px solid #ff8f00;
}

.alert-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-danger .alert-icon { color: #f44336; }
.alert-warning .alert-icon { color: #ff8f00; }

.alert-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.alert-danger .alert-title { color: #c62828; }
.alert-warning .alert-title { color: #e65100; }

.alert-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.alert-text strong {
  font-weight: 600;
}

/* ── INVOICE ────────────────────────────────────────────── */
.invoice-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  overflow: hidden;
}

.invoice-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.invoice-header-logo .logo-placeholder {
  border-color: rgba(255,255,255,.4);
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.05);
}

.invoice-company-info {
  text-align: right;
}

.invoice-company-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.invoice-company-detail {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
}

.invoice-body {
  padding: 24px 28px;
}

.invoice-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.invoice-meta-group {}

.invoice-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.invoice-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.invoice-meta-value.highlight {
  color: var(--error);
  font-size: 16px;
}

/* Status badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.badge-overdue {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.badge-urgent {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}

/* Invoice table */
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.invoice-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  padding: 8px 12px;
  text-align: left;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

.invoice-table th:last-child { text-align: right; }

.invoice-table td {
  padding: 14px 12px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.invoice-table td:last-child { text-align: right; font-weight: 600; }

.invoice-table-service {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: block;
  margin-bottom: 3px;
}

.invoice-table-detail {
  font-size: 12px;
  color: var(--text-muted);
}

/* Totals */
.invoice-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding: 16px 0 20px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.totals-row {
  display: flex;
  gap: 40px;
  font-size: 13px;
}

.totals-row .totals-label { color: var(--text-muted); }
.totals-row .totals-value { font-weight: 600; min-width: 80px; text-align: right; }

.totals-row.grand-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--error);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

/* Technical details */
.tech-details {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.tech-details-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 24px;
}

.tech-item {}

.tech-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.tech-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Courier New', monospace;
}

/* Legal notice */
.legal-notice {
  background: #fff8e1;
  border-left: 3px solid #ff8f00;
  padding: 12px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 12px;
  color: #5d4037;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Payment section */
.payment-section {
  text-align: center;
  padding: 20px 0 4px;
  border-top: 1px solid var(--border);
}

.payment-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--error);
  margin-bottom: 4px;
}

.payment-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-payment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 36px;
  background: linear-gradient(135deg, var(--main) 0%, var(--main-dark) 100%);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(238,96,44,.4);
  transition: opacity .2s, transform .15s, box-shadow .2s;
}

.btn-payment:hover {
  opacity: .93;
  box-shadow: 0 6px 28px rgba(238,96,44,.5);
  transform: translateY(-1px);
}

.btn-payment:active {
  transform: translateY(0) scale(.98);
}

.btn-payment svg { width: 18px; height: 18px; }

.payment-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
}

.payment-security svg {
  width: 13px; height: 13px;
  color: var(--success);
}

/* ── PROMOTIONAL BANNER ──────────────────────────────────── */
.promo-banner {
  width: 100%;
  max-width: 680px;
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.promo-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-icon svg {
  width: 22px; height: 22px;
  color: var(--main);
}

.promo-content { flex: 1; min-width: 0; }

.promo-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.promo-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.promo-point {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

.promo-point svg { width: 13px; height: 13px; color: var(--main); }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

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

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

/* ── URGENCY COUNTDOWN ──────────────────────────────────── */
.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #e65100;
}

.countdown-badge svg { width: 14px; height: 14px; }

/* ── SEPARATOR TEXT ─────────────────────────────────────── */
.sep-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  width: 100%;
  margin: 4px 0;
}

.sep-line::before,
.sep-line::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

/* ── TRANSITION OVERLAY ─────────────────────────────────── */
.transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}

.transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  .content-area { padding: 20px 12px 32px; }
  .card-body, .card-header { padding-left: 18px; padding-right: 18px; }
  .connecting-box { padding: 28px 22px; }
  .invoice-body { padding: 18px 16px; }
  .invoice-header { padding: 18px 16px; }
  .invoice-header { flex-direction: column; }
  .invoice-company-info { text-align: left; }
  .btn-payment { width: 100%; }
  .tech-grid { grid-template-columns: 1fr 1fr; }
}
