/* ============================================================
   LetsTango Marketplace — app.css
   Extends Bootstrap 5 with brand tokens and page-specific components.
   Bootstrap 5 CDN is loaded first; this file only adds / overrides.
   ============================================================ */

/* ── Brand Tokens ──────────────────────────────────────────── */
:root {
  --lt-teal:        #52bfd1;
  --lt-teal-dark:   #3aafc3;
  --lt-teal-light:  #eef8fb;
  --lt-orange:      #ffa73b;
  --lt-orange-dark: #e8902a;
  --lt-dark:        #1d1d1b;
  --lt-muted:       #6b7280;
  --lt-border:      #ddeef2;
  --lt-bg:          #f5f9fb;
  --lt-white:       #ffffff;

  /* Bootstrap overrides */
  --bs-primary:     #52bfd1;
  --bs-primary-rgb: 82, 191, 209;
  --bs-link-color:  #52bfd1;
  --bs-border-color: #ddeef2;
  --bs-body-font-family: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --bs-body-color:  #1d1d1b;
  --bs-body-bg:     #f5f9fb;
}

/* ── Base ─────────────────────────────────────────────────── */
body { font-family: var(--bs-body-font-family); -webkit-font-smoothing: antialiased; }

a { color: var(--lt-teal); }
a:hover { color: var(--lt-teal-dark); }

/* ── Bootstrap btn-primary → LetsTango teal ──────────────── */
.btn-primary {
  --bs-btn-bg:           var(--lt-teal);
  --bs-btn-border-color: var(--lt-teal);
  --bs-btn-hover-bg:     var(--lt-teal-dark);
  --bs-btn-hover-border-color: var(--lt-teal-dark);
  --bs-btn-active-bg:    var(--lt-teal-dark);
  --bs-btn-color:        #fff;
  --bs-btn-hover-color:  #fff;
  --bs-btn-focus-shadow-rgb: 82, 191, 209;
  font-weight: 700;
}
.btn-outline-primary {
  --bs-btn-color:        var(--lt-teal);
  --bs-btn-border-color: var(--lt-teal);
  --bs-btn-hover-bg:     var(--lt-teal);
  --bs-btn-hover-color:  #fff;
}

/* ── Form controls ─────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: var(--lt-teal);
  box-shadow: 0 0 0 .2rem rgba(82, 191, 209, .2);
}
.form-label { font-weight: 600; font-size: .875rem; color: var(--lt-dark); }
.form-text  { font-size: .78rem; }

/* ── Registration layout ────────────────────────────────────── */
.reg-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

/* Left panel */
.reg-panel {
  width: 420px;
  flex-shrink: 0;
  background: #dff5fa;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.reg-panel-logo { margin-bottom: 2.5rem; }
.reg-panel-logo img { height: 34px; }

.reg-panel-headline {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--lt-dark);
  line-height: 1.25;
  margin-bottom: .75rem;
}
.reg-panel-sub {
  font-size: .9rem;
  color: var(--lt-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

/* Benefit bullets */
.reg-benefits { list-style: none; padding: 0; margin: 0 0 2.5rem; }
.reg-benefits li {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--lt-dark);
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: .85rem;
}
.reg-benefits .ben-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; flex-shrink: 0;
  color: var(--lt-teal-dark);
}

/* Step sidebar descriptions (login / forgot-password / reset-password) */
.reg-step-desc {
  margin-top: auto;
  background: rgba(255,255,255,.6);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}
.reg-step-desc .step-title { font-size: .8rem; color: var(--lt-teal-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3rem; }
.reg-step-desc .step-body  { font-size: .88rem; color: var(--lt-dark); line-height: 1.5; }
.reg-step-desc .step-body a { color: var(--lt-teal-dark); font-weight: 700; }

/* Trust badges */
.reg-trust-card {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, #4fc6da 0%, #a9e6ef 100%);
  border-radius: 14px;
  padding: 1.1rem 1.1rem;
}
.reg-trust {
  display: flex; gap: .6rem; flex-wrap: wrap;
}
.reg-trust-badge {
  background: #fff;
  border-radius: 20px;
  padding: .3rem .8rem;
  font-size: .72rem;
  color: var(--lt-dark);
  font-weight: 700;
}
.reg-trust-badge i { color: var(--lt-teal-dark); }

/* Right panel */
.reg-form-panel {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #fff;
  min-height: 100vh;
}

.reg-form-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2.25rem 2.5rem 0;
}
.reg-form-header .signin-link {
  font-size: .84rem;
  color: var(--lt-muted);
}
.reg-form-header .signin-link a { color: var(--lt-teal); font-weight: 700; }

.reg-step-indicator {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .85rem;
  padding: 1.25rem 2.5rem 0;
  font-size: 1.05rem;
}
.reg-step-indicator .step-counter {
  font-weight: 800;
  color: var(--lt-dark);
  white-space: nowrap;
}
.reg-step-indicator .step-counter .text-muted { font-weight: 600; color: var(--lt-muted) !important; }
.reg-step-indicator .step-context {
  font-weight: 700;
  color: var(--lt-dark);
}

/* ── Progress stepper ───────────────────────────────────────── */
.reg-stepper {
  display: flex;
  align-items: center;
  padding: 1.5rem 2.5rem;
  gap: 0;
  overflow: hidden;
}
.reg-step-item {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}
.reg-step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800;
  background: #e9ecef;
  color: #999;
  flex-shrink: 0;
  transition: all .25s;
  position: relative;
  z-index: 1;
}
.reg-step-item.active   .reg-step-circle { background: var(--lt-teal); color: #fff; box-shadow: 0 0 0 4px rgba(82,191,209,.2); }
.reg-step-item.done     .reg-step-circle { background: var(--lt-teal); color: #fff; }
.reg-step-item.done     .reg-step-circle::after { content: '✓'; }
.reg-step-item.done     .step-num         { display: none; }
.reg-step-connector {
  flex: 1;
  height: 2px;
  background: #e9ecef;
  margin: 0 4px;
  transition: background .25s;
}
.reg-step-item.done + .reg-step-item .reg-step-connector,
.reg-step-connector.done { background: var(--lt-teal); }
.reg-step-label {
  position: absolute;
  top: calc(100% + 4px);
  left: 16px;
  transform: translateX(-50%);
  font-size: .62rem;
  white-space: nowrap;
  color: var(--lt-muted);
  font-weight: 600;
}
.reg-step-item.active .reg-step-label { color: var(--lt-teal); }
.reg-step-item.done   .reg-step-label { color: var(--lt-teal); }

/* ── Step panels ────────────────────────────────────────────── */
.reg-form-body {
  flex: 1;
  padding: 1rem 2.5rem 2.5rem;
}

.reg-step-panel {
  display: none;
  animation: fadeSlideIn .3s ease;
}
.reg-step-panel.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-16px); }
}

.step-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--lt-dark);
  margin-bottom: .35rem;
}
.step-subheading {
  font-size: .9rem;
  color: var(--lt-muted);
  margin-bottom: 1.75rem;
}

/* ── Account type cards ─────────────────────────────────────── */
.acc-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }

.acc-type-card {
  border: 2px solid var(--lt-border);
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #fff;
  position: relative;
}
.acc-type-card:hover {
  border-color: var(--lt-teal);
  background: var(--lt-teal-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(82,191,209,.18);
}
.acc-type-card.selected {
  border-color: var(--lt-teal);
  background: var(--lt-teal-light);
  box-shadow: 0 4px 18px rgba(82,191,209,.22);
}
.acc-type-card.selected::after {
  content: '✓';
  position: absolute;
  top: .6rem; right: .75rem;
  width: 22px; height: 22px;
  background: var(--lt-teal);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800;
  line-height: 22px;
}
.acc-type-icon {
  width: 56px; height: 56px;
  background: var(--lt-teal-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--lt-teal);
  margin: 0 auto .85rem;
}
.acc-type-card.selected .acc-type-icon {
  background: rgba(82,191,209,.2);
}
.acc-type-title { font-size: 1rem; font-weight: 800; color: var(--lt-dark); margin-bottom: .3rem; }
.acc-type-desc  { font-size: .78rem; color: var(--lt-muted); line-height: 1.4; }

/* ── OTP input ──────────────────────────────────────────────── */
.otp-wrap {
  display: flex;
  gap: .6rem;
  justify-content: center;
  margin: 1.5rem 0;
}
.otp-cell {
  width: 52px; height: 60px;
  border: 2px solid var(--lt-border);
  border-radius: 10px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--lt-dark);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.otp-cell:focus {
  border-color: var(--lt-teal);
  box-shadow: 0 0 0 3px rgba(82,191,209,.2);
}
.otp-cell.filled { border-color: var(--lt-teal); background: var(--lt-teal-light); }

.otp-resend { text-align: center; font-size: .84rem; color: var(--lt-muted); margin-top: .5rem; }
.otp-resend a, .otp-resend button {
  color: var(--lt-teal); font-weight: 700; background: none;
  border: none; cursor: pointer; padding: 0; text-decoration: underline;
}
.otp-resend button:disabled { color: var(--lt-muted); text-decoration: none; cursor: default; }

/* ── Navigation buttons ─────────────────────────────────────── */
.reg-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lt-border);
}
.btn-reg-next {
  min-width: 160px;
  padding: .7rem 1.5rem;
  font-size: .95rem;
  font-weight: 700;
  border-radius: 10px;
  background: var(--lt-orange);
  border-color: var(--lt-orange);
  color: #fff;
}
.btn-reg-next:hover:not(:disabled) {
  background: var(--lt-orange-dark);
  border-color: var(--lt-orange-dark);
  color: #fff;
}
.btn-reg-next:disabled {
  background: #dde2e6;
  border-color: #dde2e6;
  color: #98a1aa;
  opacity: 1;
  cursor: not-allowed;
}
.btn-reg-back {
  background: none;
  border: none;
  color: var(--lt-muted);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.btn-reg-back:hover { color: var(--lt-dark); }
.btn-reg-back i { margin-right: .35rem; }

/* ── Password strength ──────────────────────────────────────── */
.pw-strength { margin-top: .4rem; }
.pw-bar-track { height: 4px; background: #e9ecef; border-radius: 9999px; overflow: hidden; margin-bottom: .3rem; }
.pw-bar-fill  { height: 100%; border-radius: 9999px; transition: width .3s, background .3s; }
.pw-rules { display: flex; flex-wrap: wrap; gap: .35rem .75rem; }
.pw-rule  { font-size: .72rem; color: var(--lt-muted); display: flex; align-items: center; gap: .25rem; }
.pw-rule.pass { color: #2eca6a; }
.pw-rule.pass::before { content: '✓'; font-weight: 800; }
.pw-rule:not(.pass)::before { content: '○'; }

/* ── Success screen ─────────────────────────────────────────── */
.reg-success {
  text-align: center;
  padding: 3rem 1rem;
}
.success-circle {
  width: 88px; height: 88px;
  background: linear-gradient(135deg, var(--lt-teal), var(--lt-teal-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(82,191,209,.35);
  animation: popIn .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-heading { font-size: 1.6rem; font-weight: 800; margin-bottom: .5rem; }
.success-sub     { color: var(--lt-muted); font-size: .95rem; max-width: 380px; margin: 0 auto 2rem; line-height: 1.65; }
.next-steps { text-align: left; background: var(--lt-teal-light); border-radius: 12px; padding: 1.25rem 1.5rem; }
.next-steps h6 { font-weight: 800; color: var(--lt-dark); margin-bottom: .75rem; }
.next-steps li { font-size: .875rem; color: var(--lt-muted); margin-bottom: .4rem; }

/* ── Input with show/hide password ─────────────────────────── */
.input-pw-wrap { position: relative; }
.input-pw-wrap input { padding-right: 2.75rem; }
.pw-toggle-btn {
  position: absolute; top: 50%; right: .9rem; transform: translateY(-50%);
  background: none; border: none; color: var(--lt-muted);
  cursor: pointer; font-size: 1rem; padding: 0; line-height: 1;
}
.pw-toggle-btn:hover { color: var(--lt-dark); }

/* ── Phone input with flag ──────────────────────────────────── */
.phone-wrap { display: flex; gap: .5rem; }
.phone-code-select {
  width: 110px; flex-shrink: 0;
  border-radius: .375rem;
  border: 1px solid var(--lt-border);
  font-size: .875rem;
  padding: .45rem .5rem;
  background-color: #fff;
  cursor: pointer;
}
.phone-code-select:focus { border-color: var(--lt-teal); outline: none; box-shadow: 0 0 0 .2rem rgba(82,191,209,.2); }

/* ── Field error state ──────────────────────────────────────── */
.field-error .form-control,
.field-error .form-select,
.field-error input,
.field-error select { border-color: #dc3545 !important; }
.field-error-msg { font-size: .78rem; color: #dc3545; margin-top: .25rem; }

/* ── Toast notification ─────────────────────────────────────── */
#reg-toast-area {
  position: fixed; top: 1.25rem; right: 1.25rem; z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem;
}
.reg-toast {
  min-width: 280px; max-width: 360px;
  padding: .9rem 1.2rem;
  border-radius: 10px;
  font-size: .875rem; font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  animation: toastIn .25s ease;
  display: flex; align-items: center; gap: .6rem;
}
.reg-toast-success { background: #eafff3; color: #1a7c44; border-left: 4px solid #2eca6a; }
.reg-toast-error   { background: #fff0f0; color: #9b2020; border-left: 4px solid #e04040; }
.reg-toast-info    { background: var(--lt-teal-light); color: #1d6a7a; border-left: 4px solid var(--lt-teal); }
@keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 992px) {
  .reg-panel { display: none; }
  .reg-form-header { padding: 1.25rem 1.5rem 0; }
  .reg-stepper     { padding: 1.25rem 1.5rem; }
  .reg-form-body   { padding: .75rem 1.5rem 2rem; }
}
@media (max-width: 576px) {
  .acc-type-grid { grid-template-columns: 1fr; }
  .otp-cell      { width: 44px; height: 52px; font-size: 1.35rem; }
  .reg-form-body { padding: .75rem 1rem 1.5rem; }
  .reg-stepper   { display: none; }
  .step-heading  { font-size: 1.25rem; }
}
