/* ── Reset & custom properties ─────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --orange:        #FFC51B;
  --orange-hover:  #E6B100;
  --orange-light:  #FFFBE6;
  --page-bg:       #F5F0E8;
  --white:         #FFFFFF;
  --border:        #E2D9CE;
  --border-input:  #CEC6BB;
  --text:          #1C1C1E;
  --text-muted:    #6B7280;
  --text-light:    #9CA3AF;
  --green:         #22C55E;
  --green-light:   #F0FDF4;
  --red:           #EF4444;
  --shadow:        0 2px 14px rgba(0, 0, 0, 0.08);
  --radius-sm:     7px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                   'Helvetica Neue', Arial, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ── App shell ───────────────────────────────────────── */
.app {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: 114px;
  background: var(--orange);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding-top: 14px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: white;
  font-weight: 700;
  font-size: 13px;
  padding: 0 10px 10px;
  letter-spacing: 0.1px;
}

.lang-picker {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px 18px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.smiley-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 8px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 6px;
  color: #1C1C1E;
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: background 0.15s, color 0.15s;
  text-align: center;
  line-height: 1.25;
}

.nav-item:hover  { background: rgba(0, 0, 0, 0.08); }
.nav-item.active { background: var(--white); color: var(--orange); }

/* ── Main wrapper ─────────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Topbar ───────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  padding: 7px 16px;
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font);
  width: 180px;
}

.search-bar input::placeholder { color: var(--text-light); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.notif-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.notif-btn:hover { color: var(--orange); }

.user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.avatar {
  width: 32px;
  height: 32px;
  background: var(--orange);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Page content ─────────────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 38px 48px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-title {
  font-size: 25px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 30px;
  text-align: center;
}

/* ── Stepper ──────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 680px;
  margin-bottom: 28px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.step-bubble {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #D1D5DB;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.step-active .step-bubble {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.step-done .step-bubble {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.step-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  max-width: 130px;
}

.step-label strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}

.step-active .step-label strong { color: var(--text); }
.step-done   .step-label strong { color: var(--orange); }

.step-label small {
  font-size: 10.5px;
  color: var(--text-light);
  line-height: 1.35;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: #D9D9D9;
  margin-top: 21px;
  min-width: 40px;
  transition: background 0.3s;
}

.step-connector.done { background: var(--orange); }

/* ── Step views ───────────────────────────────────────── */
.step-view { animation: fadeIn 0.2s ease; }
.step-view.hidden { display: none; }

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

/* ── Card ─────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  width: 100%;
  max-width: 680px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.card-icon {
  width: 46px;
  height: 46px;
  background: var(--orange-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--text);
}

.card-header p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.card-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}

/* ── Form layout ──────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
}

.form-row .form-group { margin-bottom: 0; }

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

.req { color: var(--red); margin-left: 2px; }

/* ── Select wrap ──────────────────────────────────────── */
.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 10px 42px 10px 13px;
  font-size: 13.5px;
  color: var(--text);
  font-family: var(--font);
  background: var(--white);
  outline: none;
  cursor: pointer;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.select-wrap select.is-placeholder { color: #BAAFA6; }

.select-wrap select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 197, 27, 0.14);
}

.select-wrap select.valid {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.select-wrap select.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.select-arrow {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: transform 0.18s;
}

.select-wrap select:focus ~ .select-arrow {
  color: var(--orange);
}

/* ── Input wrap (positions icons) ─────────────────────── */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  width: 100%;
  padding-right: 38px;
}

/* ── Inputs ───────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"] {
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 13.5px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--white);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 197, 27, 0.14);
}

input::placeholder {
  color: #BAAFA6;
  font-size: 13px;
}

/* ── Valid state ──────────────────────────────────────── */
input.valid {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

input.valid:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

/* ── Error state ──────────────────────────────────────── */
input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.field-error {
  display: none;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--red);
  margin-top: 1px;
}

.form-group.has-error .field-error { display: block; }

/* ── Icons inside inputs ──────────────────────────────── */
.icon-check,
.icon-info {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  flex-shrink: 0;
}

/* Check icon: hidden by default, shown when valid */
.icon-check { display: none; }
input.valid ~ .icon-check  { display: flex; }
input.valid ~ .icon-info   { display: none; }

/* Info icon: circle with ? */
.icon-info {
  width: 22px;
  height: 22px;
  background: #E9E5DF;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  user-select: none;
}

/* ── Form footer ──────────────────────────────────────── */
.form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.form-footer.two-btn {
  justify-content: space-between;
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.1px;
}

.btn-next:hover    { background: var(--orange-hover); }
.btn-next:active   { transform: translateY(1px); }
.btn-next:disabled {
  background: #D1C9BE;
  cursor: not-allowed;
  transform: none;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.btn-back:hover { border-color: var(--text-muted); background: #F9F6F2; }

/* ── Step 3: Overview ─────────────────────────────────── */
.overview-section {
  margin-bottom: 22px;
}

.overview-section h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.overview-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.overview-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.overview-row dt {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.overview-row dd {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

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

/* ── Success view ─────────────────────────────────────── */
.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 0 12px;
  text-align: center;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.success-content p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.55;
}

/* ── Page footer ──────────────────────────────────────── */
.page-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.page-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-footer a:hover { color: var(--text); }

/* ── Modal overlay ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  max-width: 400px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  animation: fadeIn 0.18s ease;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}

.modal-close:hover { background: #F3F4F6; color: var(--text); }

.modal-icon {
  width: 72px;
  height: 72px;
  background: var(--orange-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.modal h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.modal > p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.modal > p strong { color: var(--text); }

.modal-info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #FFF7E6;
  border: 1px solid #FFE566;
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: left;
  margin-bottom: 22px;
}

.modal-info-box svg { flex-shrink: 0; margin-top: 1px; }

.modal-info-box strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.modal-info-box p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: background 0.15s;
  margin-bottom: 12px;
}

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

.modal-footer-text {
  font-size: 12px;
  color: var(--text-light);
}

/* ── Scrollbar ────────────────────────────────────────── */
.page-content::-webkit-scrollbar        { width: 6px; }
.page-content::-webkit-scrollbar-track  { background: transparent; }
.page-content::-webkit-scrollbar-thumb  { background: #D1C9BE; border-radius: 3px; }
.page-content::-webkit-scrollbar-thumb:hover { background: #B8AFA4; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .form-row, .overview-list {
    grid-template-columns: 1fr;
  }

  .page-content { padding: 24px 20px 32px; }
  .card         { padding: 22px 18px; }

  .stepper      { gap: 4px; }
  .step-connector { min-width: 20px; }
}
