/* ═══════════════════════════════════════════════
   TALI v4 · AUTH CSS
   Login, registro y verificación de usuarios/drivers
═══════════════════════════════════════════════ */

/* ── Modal overlay ── */
#auth-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  overflow-y: auto;
  animation: slideUp .25s ease;
}

/* ── Auth card ── */
.auth-card {
  width: 100%; max-width: 420px;
  padding: 24px 20px 40px;
  display: flex; flex-direction: column;
  gap: 0;
  min-height: 100dvh;
}

/* ── Logo compacto ── */
.auth-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px; letter-spacing: 8px; color: var(--white);
  line-height: 1; text-align: center; margin-bottom: 2px;
}
.auth-tagline {
  font-size: 10px; letter-spacing: 3px; color: var(--gray);
  text-align: center; text-transform: uppercase; margin-bottom: 28px;
}

/* ── Título de pantalla ── */
.auth-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px; letter-spacing: 2px; color: var(--white);
  margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 13px; color: var(--gray2); margin-bottom: 20px; line-height: 1.5;
}

/* ── Campos ── */
.auth-field {
  margin-bottom: 12px;
}
.auth-field .flabel {
  margin-bottom: 6px;
}
.auth-field .irow {
  width: 100%;
}

/* ── Botón principal ── */
.auth-btn {
  width: 100%; padding: 14px; margin-top: 8px;
  background: var(--green); border: none; border-radius: var(--radius);
  color: #050508; font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s, transform .1s;
  letter-spacing: .3px;
}
.auth-btn:hover   { opacity: .9; }
.auth-btn:active  { transform: scale(.98); }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; }
.auth-btn.loading::after {
  content: '';
  width: 16px; height: 16px;
  border: 2px solid rgba(5,5,8,.3);
  border-top-color: #050508;
  border-radius: 50%;
  animation: rot .7s linear infinite;
  margin-left: 8px;
}

/* ── Link de alternativa ── */
.auth-switch {
  text-align: center; margin-top: 16px;
  font-size: 13px; color: var(--gray2);
}
.auth-switch a, .auth-switch button {
  background: none; border: none; cursor: pointer;
  color: var(--cyan); font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600; padding: 0;
  text-decoration: none;
}
.auth-switch a:hover, .auth-switch button:hover { text-decoration: underline; }

/* ── Divisor ── */
.auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0; color: var(--gray); font-size: 11px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Error inline ── */
.auth-error {
  background: rgba(255, 61, 87, .08);
  border: 1px solid rgba(255, 61, 87, .25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #ff3d57; font-size: 13px;
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 12px; line-height: 1.5;
}
.auth-error i { flex-shrink: 0; margin-top: 2px; }

/* ── Éxito inline ── */
.auth-success {
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--green); font-size: 13px;
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 12px; line-height: 1.5;
}
.auth-success i { flex-shrink: 0; margin-top: 2px; }

/* ── Info badge de estado ── */
.auth-status-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--gray2); line-height: 1.5;
  margin-bottom: 16px;
}
.auth-status-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.auth-status-badge.pending .dot { background: var(--yellow); }
.auth-status-badge.active  .dot { background: var(--green); }
.auth-status-badge.banned  .dot { background: #ff3d57; }

/* ── Upload zona ── */
.auth-upload-zone {
  border: 2px dashed var(--border2); border-radius: var(--radius);
  padding: 24px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--surface);
}
.auth-upload-zone:hover { border-color: var(--cyan); background: rgba(0,212,255,.03); }
.auth-upload-zone.has-file { border-color: var(--green); background: rgba(34,197,94,.04); }
.auth-upload-zone .upload-icon { font-size: 28px; color: var(--gray2); margin-bottom: 8px; }
.auth-upload-zone .upload-label { font-size: 14px; font-weight: 500; color: var(--white); margin-bottom: 4px; }
.auth-upload-zone .upload-hint  { font-size: 11px; color: var(--gray); }
.auth-upload-zone input[type=file] { display: none; }

/* ── Doc checklist ── */
.doc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px;
}
.doc-item .doc-icon { font-size: 16px; flex-shrink: 0; }
.doc-item .doc-name { flex: 1; color: var(--white); font-weight: 500; }
.doc-item .doc-status { font-size: 11px; letter-spacing: .5px; font-weight: 600; }
.doc-item .doc-status.none     { color: var(--gray); }
.doc-item .doc-status.pending  { color: var(--yellow); }
.doc-item .doc-status.approved { color: var(--green); }
.doc-item .doc-status.rejected { color: #ff3d57; }
.doc-item .doc-upload-btn {
  background: none; border: 1px solid var(--border2); border-radius: 8px;
  padding: 5px 10px; font-size: 11px; cursor: pointer; color: var(--gray2);
  font-family: 'DM Sans', sans-serif; transition: border-color .15s, color .15s;
}
.doc-item .doc-upload-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Password strength ── */
.pw-strength {
  display: flex; gap: 4px; margin-top: 6px;
}
.pw-bar {
  flex: 1; height: 3px; border-radius: 2px;
  background: var(--border); transition: background .2s;
}
.pw-bar.weak   { background: #ff3d57; }
.pw-bar.medium { background: var(--yellow); }
.pw-bar.strong { background: var(--green); }

/* ── Pasos de registro ── */
.auth-steps {
  display: flex; gap: 6px; margin-bottom: 24px;
  align-items: center;
}
.auth-step {
  display: flex; align-items: center; gap: 6px; flex: 1;
  font-size: 10px; letter-spacing: 1px; color: var(--gray);
  text-transform: uppercase;
}
.auth-step-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border); display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700;
  color: var(--gray); transition: all .2s;
}
.auth-step.done .auth-step-dot   { background: var(--green); border-color: var(--green); color: #050508; }
.auth-step.active .auth-step-dot { background: var(--cyan); border-color: var(--cyan); color: #050508; }
.auth-step-line { flex: 1; height: 1px; background: var(--border); }

/* ── Perfil badge (header) ── */
#hdr-user-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 10px;
  font-size: 12px; color: var(--white);
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: border-color .15s;
}
#hdr-user-btn:hover { border-color: var(--border2); }
#hdr-user-btn .user-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
#hdr-user-btn .user-dot.active  { background: var(--green); }
#hdr-user-btn .user-dot.pending { background: var(--yellow); }

/* ── Menú de usuario ── */
#user-menu {
  position: absolute; top: 56px; right: 12px; z-index: 500;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); min-width: 200px;
  animation: slideUp .15s ease;
}
.user-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; font-size: 14px; cursor: pointer;
  border-bottom: 1px solid var(--border); color: var(--white);
  transition: background .15s;
}
.user-menu-item:last-child { border-bottom: none; }
.user-menu-item:hover { background: var(--surface2); }
.user-menu-item i { font-size: 13px; color: var(--gray2); width: 16px; text-align: center; }
.user-menu-item.danger { color: #ff3d57; }
.user-menu-item.danger i { color: #ff3d57; }

/* ── SMS code input ── */
.sms-code-row {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.sms-digit {
  flex: 1; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 500;
  color: var(--white); outline: none;
  transition: border-color .15s;
  -moz-appearance: textfield;
}
.sms-digit::-webkit-outer-spin-button,
.sms-digit::-webkit-inner-spin-button { -webkit-appearance: none; }
.sms-digit:focus { border-color: var(--cyan); }

/* ── Responsive ── */
@media (max-width: 380px) {
  .auth-card { padding: 20px 16px 32px; }
  .auth-logo  { font-size: 38px; }
}
