/**
 * BioCross OS - Centralized Authentication Modal & User Badge Styles
 * Compatible con Paciente, Profesional e Industria
 */

/* ========================================================
   TOPBAR & BADGE DE IDENTIFICADOR DE USUARIO
   ======================================================== */
.patient-navbar {
  width: 100%;
  padding: 10px 24px;
  background: rgba(24, 34, 41, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: relative;
  z-index: 999;
}

.user-greeting-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25333d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.user-greeting-badge:hover {
  background: #2d3c47;
  border-color: rgba(52, 211, 153, 0.4);
}

.user-greeting-badge .user-icon {
  font-size: 14px;
}

.user-greeting-badge .user-name {
  color: #f8fafc;
  font-weight: 700;
}

.user-greeting-badge .btn-login-trigger {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  color: #10b981;
  margin-left: 6px;
  padding: 2px 4px;
}

.user-greeting-badge .btn-login-trigger:hover {
  color: #059669;
}

.user-greeting-badge .btn-logout-trigger {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  color: #ef4444;
  margin-left: 6px;
  padding: 2px 4px;
}

.user-greeting-badge .btn-logout-trigger:hover {
  color: #b91c1c;
}

.user-greeting-badge .btn-admin-link {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  text-decoration: none;
  padding: 3px 8px;
  background: rgba(5, 150, 105, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(5, 150, 105, 0.2);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.user-greeting-badge .btn-admin-link:hover {
  background: rgba(5, 150, 105, 0.2);
}

/* ========================================================
   MODAL BACKDROP & CARD
   ======================================================== */
.auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: authFadeIn 0.2s ease-out;
}

@keyframes authFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-card {
  background: #182229;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  width: 90%;
  max-width: 440px;
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  animation: authScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authScaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.auth-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.auth-close-btn:hover {
  color: #f8fafc;
  background: #23313a;
}

.auth-icon {
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
}

.auth-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  text-align: center;
}

.auth-sub {
  margin: 6px 0 20px 0;
  font-size: 13px;
  color: #64748b;
  text-align: center;
  line-height: 1.4;
}

/* ========================================================
   OAUTH SOCIAL BUTTONS (GOOGLE & MICROSOFT VECTORES SVG)
   ======================================================== */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.btn-oauth-dark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #1e293b;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}

.btn-oauth-dark:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn-oauth-dark svg {
  flex-shrink: 0;
}

/* ========================================================
   DIVIDER
   ======================================================== */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: #94a3b8;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 12px;
  text-transform: lowercase;
}

/* ========================================================
   PESTAÑAS LOGIN / SIGNUP
   ======================================================== */
.auth-tabs {
  display: flex;
  background: #23313a;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
  gap: 4px;
}

.tab-pill {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-pill.active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ========================================================
   FORM FIELDS
   ======================================================== */
.auth-fields-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.field-group label {
  font-size: 12px;
  font-weight: 700;
  color: #8b9ea9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-text {
  width: 100%;
  padding: 12px 14px;
  background: #131c22;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 14px;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s;
  font-family: inherit;
}

.input-text:focus {
  background: #182229;
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.auth-msg-box {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 4px;
}

.btn-submit-main {
  width: 100%;
  padding: 13px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-submit-main:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.btn-submit-main:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-card-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.3px;
}
