/* ============================================================
   TELTOL — Wizard Design System (Indigo Blue)
   ============================================================ */

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

:root {
  --indigo:       #338fff;
  --indigo-dark:  #1a6fd6;
  --indigo-light: #5ca8ff;
  --indigo-50:    #edf5ff;
  --indigo-100:   #dbeafe;
  --ink:          #0f1d33;
  --ink-2:        #1e3a5f;
  --text:         #1e1b4b;
  --text-2:       #64748b;
  --text-3:       #94a3b8;
  --success:      #059669;
  --success-bg:   #dcfce7;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --bg:           #f8fafc;
  --surface:      #ffffff;
  --surface-2:    #f1f5f9;
  --border:       #e2e8f0;
  --radius-md:    10px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --shadow-sm:    0 1px 3px rgba(15,29,51,0.06);
  --shadow-md:    0 4px 16px rgba(15,29,51,0.08);
  --shadow-indigo: 0 4px 20px rgba(51,143,255,0.25);

  /* compat aliases */
  --primary:      var(--indigo);
  --primary-dark:  var(--indigo-dark);
  --primary-light: var(--indigo-light);
  --primary-bg:    var(--indigo-50);
  --shadow-primary: var(--shadow-indigo);
}

html, body {
  height: 100%;
  font-family: 'Inter', 'Noto Sans JP', -apple-system, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { opacity: 0.8; }

/* ============================================================
   WIZARD LAYOUT
   ============================================================ */
.wizard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---------- Left panel ---------- */
.wizard-panel {
  width: 42%;
  background: linear-gradient(160deg, var(--indigo) 0%, var(--indigo-dark) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.wizard-panel::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.wizard-panel::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.panel-logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: 1;
}
.panel-logo-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  color: #fff;
}

.panel-body { z-index: 1; flex: 1; padding: 44px 0 28px; }

.panel-headline {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.panel-sub {
  font-size: 0.88rem;
  opacity: 0.75;
  line-height: 1.7;
  margin-bottom: 32px;
}

.panel-feature-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.panel-feature-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.85rem; opacity: 0.88;
}
.panel-feature-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}

.panel-testimonial {
  z-index: 1;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  font-size: 0.82rem;
  line-height: 1.7;
}
.panel-testimonial-author {
  margin-top: 8px;
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ---------- Right form area ---------- */
.wizard-form-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--surface);
  overflow-y: auto;
}

.wizard-form-inner {
  flex: 1;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   STEP INDICATOR
   ============================================================ */
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
  gap: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.step-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  transition: background 0.25s, border-color 0.25s;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
}

.step-circle.done {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
.step-circle.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(51,143,255,0.15);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 5px;
  margin-bottom: 16px;
  transition: background 0.25s;
}
.step-line.done { background: var(--indigo); }

.step-label {
  font-size: 0.6rem;
  margin-top: 4px;
  color: var(--text-3);
  white-space: nowrap;
}
.step-item.active .step-label { color: var(--indigo); font-weight: 600; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 5px;
}
.form-label .required-badge {
  display: inline-block;
  background: var(--indigo);
  color: #fff;
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.form-input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(51,143,255,0.12);
}
.form-input::placeholder { color: var(--text-3); }
.form-input.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.form-select-wrap { position: relative; }
.form-select-wrap::after {
  content: '\25BE';
  position: absolute;
  right: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  font-size: 0.85rem;
}
.form-select {
  width: 100%;
  padding: 10px 34px 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-select:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(51,143,255,0.12);
}

.field-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}
.field-error.visible { display: block; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  background: var(--indigo);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-indigo);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--indigo-dark); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(51,143,255,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }

/* ============================================================
   WIZARD FOOTER
   ============================================================ */
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   PAGE HEADING
   ============================================================ */
.page-heading { margin-bottom: 24px; }
.page-heading h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.page-heading p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  max-width: 320px;
}
.toast.toast-error { background: var(--danger); }
.toast.toast-success { background: var(--success); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .wizard-panel { width: 36%; padding: 36px 24px; }
}
@media (max-width: 768px) {
  .wizard-panel { display: none; }
  .wizard-form-area { min-height: 100vh; }
  .wizard-form-inner { padding: 24px 18px 20px; }
}
