/* Customer form wizard, thank-you, and admin (shared base) */

:root {
  --color-bg: #0f1419;
  --color-surface: #1a2332;
  --color-border: #2d3a4d;
  --color-text: #e6edf3;
  --color-muted: #8b9eb0;
  --color-primary: #58a6ff;
  --color-primary-hover: #79b8ff;
  --color-error: #f85149;
  --color-success: #3fb950;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --font-sans:
    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ----- Wizard ----- */
.wizard-container {
  max-width: 490px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.wizard-header {
  margin-bottom: 2rem;
}

.wizard-header h1 {
  margin: 0 0 0.5rem;
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Hero / marketing header */
.hero {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.hero-text {
  flex: 1 1 auto;
}
.hero-title {
  margin: 0 0 0.25rem;
  font-size: 5rem;
  line-height: 1.15;
  font-weight: 700;
  background: linear-gradient(90deg, var(--color-primary), #7c5cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  margin: 0 0 0.5rem;
  color: var(--color-muted);
  font-weight: 600;
  font-size: 1.25rem;
}
.hero-desc {
  margin: 0 0 0.5rem;
  color: var(--color-text);
  font-size: 0.95rem;
}
.hero-bullets {
  margin: 0.5rem 0 0.5rem 1.1rem;
  padding: 0;
  list-style: none;
}
.hero-bullets li {
  margin: 0.25rem 0;
  position: relative;
  padding-left: 34px;
}
.hero-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect width='24' height='24' rx='4' fill='%2358a6ff'/><path d='M6 12l3 3 9-9' stroke='%230f1419' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}
.hero-graphic {
  flex: 0 0 160px;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-graphic {
    width: 100%;
    flex: none;
  }
  .hero-title {
    font-size: 1.25rem;
  }
}

.wizard-progress {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.progress-dots {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.progress-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  transition: background 0.2s;
}

.progress-dots .dot.active {
  background: var(--color-primary);
}

.progress-dots .dot.done {
  background: var(--color-primary);
}

.wizard-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* Honeypot: off-screen */
.hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.step {
  min-height: 140px;
}

.step[hidden] {
  display: none !important;
}

.step label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.char-meta {
  margin-top: 0.4rem;
}
.char-count {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.step .req {
  color: var(--color-error);
}

.step input[type='text'],
.step input[type='email'],
.step input[type='tel'],
.step input[type='url'],
.step textarea,
.step select {
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.step input:focus,
.step textarea:focus,
.step select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.step select option {
  background: var(--color-surface);
  color: var(--color-text);
}

.step input::placeholder,
.step textarea::placeholder {
  color: var(--color-muted);
}

.step textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-number-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.country-code-select {
  flex: 0 0 20%;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.country-code-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.country-code-select option {
  background: var(--color-surface);
  color: var(--color-text);
}

.contact-number-group input[type='tel'] {
  flex: 1;
}

.field-error {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-error);
}

.field-error:empty {
  display: none;
}

/* Consent step */
.consent-block {
  margin-bottom: 0.5rem;
}

.consent-block p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.consent-label input[type='checkbox'] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

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

.consent-block a:hover {
  text-decoration: underline;
}

/* Step 8: Turnstile + submit intro */
.turnstile-wrap {
  margin-bottom: 1rem;
}

.submit-intro {
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* Buttons */
.wizard-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.wizard-actions .btn {
  padding: 0.75rem 1.5rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s,
    opacity 0.2s;
}

.wizard-actions .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

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

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

.btn-secondary:hover:not(:disabled) {
  background: #3d4d66;
}

/* ----- Thank-you page ----- */
.thank-you-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

.thank-you-container .card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.thank-you-container h1 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.thank-you-container .email-display {
  font-weight: 500;
  color: var(--color-primary);
}

/* ----- Admin ----- */
.admin-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.admin-actions a,
.admin-actions .btn-link {
  color: var(--color-primary);
  text-decoration: none;
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.admin-actions a:hover,
.admin-actions .btn-link:hover {
  text-decoration: underline;
}

/* Admin login form */
.login-container {
  max-width: 380px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.login-container .card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.login-container h1 {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
}

.login-container .form-group {
  margin-bottom: 1.25rem;
}

.login-container label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.login-container input {
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

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

.login-container .btn {
  width: 100%;
  padding: 0.75rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

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

.login-container .error-msg {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(248, 81, 73, 0.15);
  border: 1px solid var(--color-error);
  border-radius: 8px;
  color: var(--color-error);
  font-size: 0.9rem;
}

/* Dashboard table */
.table-wrap {
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

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

.dashboard-table th {
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

.dashboard-table .col-ip,
.dashboard-table .col-browser,
.dashboard-table .col-device,
.dashboard-table .col-location {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-table .empty-state {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--color-muted);
}
