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

:root {
  --primary:   #0ea5e9;   /* sky-blue  — distinct from admin's indigo */
  --primary-h: #0284c7;
  --danger:    #ef4444;
  --success:   #22c55e;
  --bg:        #f0f9ff;
  --card:      #ffffff;
  --border:    #e0f2fe;
  --text:      #0f172a;
  --muted:     #64748b;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,.08);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ── Card ── */
.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  justify-content: center;
  margin-bottom: 1.8rem;
}
.auth-logo .logo-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.auth-logo span { font-size: 1.3rem; font-weight: 700; color: var(--text); }

.auth-title {
  font-size: 1.5rem; font-weight: 700;
  text-align: center; margin-bottom: .35rem;
}
.auth-subtitle {
  text-align: center; color: var(--muted);
  font-size: .875rem; margin-bottom: 1.8rem;
}

/* ── Form ── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block; font-size: .8rem; font-weight: 600;
  margin-bottom: .4rem; color: var(--text);
}
.input-wrap { position: relative; }
.input-wrap .icon {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: .95rem; pointer-events: none;
}
.input-wrap input {
  width: 100%;
  padding: .65rem .85rem .65rem 2.4rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem; color: var(--text); background: #fff;
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}
.auth-select {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  color: var(--text);
  background: #fff;
  outline: none;
}
.auth-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}
.input-wrap .toggle-pw {
  position: absolute; right: .85rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: .9rem; padding: 0;
}

/* ── OTP boxes ── */
.otp-group {
  display: flex; gap: .6rem; justify-content: center;
  margin-bottom: 1.4rem;
}
.otp-group input {
  width: 48px; height: 52px;
  text-align: center; font-size: 1.3rem; font-weight: 700;
  border: 1.5px solid var(--border); border-radius: 8px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.otp-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}

/* ── Buttons ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .75rem;
  border: none; border-radius: 8px;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-primary:disabled { background: #7dd3fc; cursor: not-allowed; transform: none; }

.btn-loader {
  display: none; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.loading .btn-text  { display: none; }
.btn.loading .btn-loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alerts ── */
.alert {
  padding: .7rem 1rem; border-radius: 8px;
  font-size: .85rem; margin-bottom: 1rem; display: none;
}
.alert.show { display: block; }
.alert-danger  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ── Links ── */
.auth-footer {
  text-align: center; margin-top: 1.5rem;
  font-size: .85rem; color: var(--muted);
}
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

.forgot-link {
  display: block; text-align: right;
  font-size: .8rem; color: var(--primary);
  text-decoration: none; margin-top: .3rem;
}
.forgot-link:hover { text-decoration: underline; }

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.2rem 0; color: var(--muted); font-size: .8rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Resend timer ── */
.resend-row {
  text-align: center; font-size: .85rem;
  color: var(--muted); margin-top: .8rem;
}
.resend-row button {
  background: none; border: none; color: var(--primary);
  font-weight: 600; cursor: pointer; font-size: .85rem;
}
.resend-row button:disabled { color: var(--muted); cursor: not-allowed; }

/* ── Step indicator ── */
.steps {
  display: flex; justify-content: center; gap: .5rem;
  margin-bottom: 1.6rem;
}
.steps .step {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: background .3s;
}
.steps .step.active { background: var(--primary); }
.steps .step.done   { background: var(--success); }
