/* ═══════════════════════════════════════════════════════════════════════════════
   HOSPITAL LOGIN — Premium Medical Theme
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── PAGE SHELL ─────────────────────────────────────────────────────────────── */
.hosp-login-page {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #F0FDFA 0%, #F8FAFC 40%, #ECFDF5 100%);
  position: relative;
  overflow: hidden;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ─── BACKGROUND EFFECTS ─────────────────────────────────────────────────────── */
.hosp-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(13, 148, 136, 0.04) 0%, transparent 55%),
    linear-gradient(rgba(16, 185, 129, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
}

.hosp-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  animation: orb-float 18s ease-in-out infinite alternate;
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.1) 0%, transparent 70%);
  animation: orb-float 22s ease-in-out infinite alternate-reverse;
}

.orb-3 {
  width: 350px;
  height: 350px;
  top: 50%;
  left: 60%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  animation: orb-float 15s ease-in-out infinite alternate;
}

@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(-30px, 30px) scale(0.95); }
}

.hosp-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), transparent);
  animation: hosp-scan 4s linear infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes hosp-scan {
  0% { top: -2px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100vh; opacity: 0; }
}

/* ─── FLOATING MEDICAL ICONS ─────────────────────────────────────────────────── */
.hosp-floating-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.float-icon {
  position: absolute;
  color: rgba(16, 185, 129, 0.12);
}

.fi-1 { top: 15%; left: 12%; }
.fi-2 { top: 60%; right: 15%; }
.fi-3 { bottom: 20%; left: 20%; }

/* ─── LOGIN CARD ─────────────────────────────────────────────────────────────── */
.hosp-login-card {
  width: 460px;
  max-width: calc(100vw - 32px);
  padding: 48px 44px 40px;
  z-index: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(16, 185, 129, 0.1);
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.04),
    0 30px 80px rgba(0, 0, 0, 0.07),
    0 0 60px rgba(16, 185, 129, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hosp-login-card.success-glow {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow:
    0 0 0 2px rgba(16, 185, 129, 0.15),
    0 30px 80px rgba(16, 185, 129, 0.1),
    0 0 100px rgba(16, 185, 129, 0.08);
}

.hosp-card-accent {
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10b981, #0d9488, transparent);
  border-radius: 0 0 8px 8px;
  opacity: 0.8;
}

.hosp-card-accent::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: accent-shimmer 3s infinite;
}

@keyframes accent-shimmer {
  0% { left: -60%; }
  100% { left: 160%; }
}

/* ─── HEADER ─────────────────────────────────────────────────────────────────── */
.hosp-login-header {
  text-align: center;
  margin-bottom: 32px;
}

.hosp-logo-container {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hosp-logo-inner {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(13, 148, 136, 0.08));
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 18px;
  color: #0d9488;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
}

.hosp-logo-ring {
  position: absolute;
  inset: -4px;
  border: 1.5px solid rgba(16, 185, 129, 0.15);
  border-radius: 22px;
  animation: ring-pulse 3s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.15; transform: scale(1.1); }
}

.hosp-logo-pulse {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(16, 185, 129, 0.08);
  border-radius: 26px;
  animation: ring-pulse 3s ease-in-out infinite 0.5s;
}

.hosp-title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: -0.7px;
}

.hosp-subtitle {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin: 0;
}

/* ─── FORM ───────────────────────────────────────────────────────────────────── */
.hosp-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hosp-input-group {
  margin-bottom: 20px;
}

.hosp-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.hosp-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.hosp-input-icon {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  transition: color 0.3s;
  pointer-events: none;
  z-index: 2;
}

.hosp-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.02);
  border: 1.5px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px 16px 14px 48px;
  color: #0f172a;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  position: relative;
}

.hosp-input.mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: 4px;
  text-align: center;
  font-size: 20px;
  padding-left: 48px;
}

.hosp-input::placeholder {
  color: rgba(0, 0, 0, 0.25);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.hosp-input:focus {
  background: rgba(16, 185, 129, 0.03);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08), 0 0 20px rgba(16, 185, 129, 0.05);
}

.hosp-input:focus ~ .hosp-input-icon,
.hosp-input-wrap:focus-within .hosp-input-icon {
  color: #10b981;
}

.hosp-input-focus-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #0d9488);
  border-radius: 0 0 14px 14px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
}

.hosp-input:focus ~ .hosp-input-focus-line {
  left: 0;
  right: 0;
  opacity: 1;
}

.hosp-eye-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  z-index: 2;
  transition: color 0.2s;
}

.hosp-eye-btn:hover { color: #10b981; }

/* ─── EXTRAS ─────────────────────────────────────────────────────────────────── */
.hosp-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 12.5px;
}

.hosp-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  position: relative;
}

.hosp-remember input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}

.hosp-remember input[type="checkbox"]:checked {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
}

.hosp-remember input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: #10b981;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.hosp-forgot {
  color: #0d9488;
  text-decoration: none;
  font-weight: 600;
  font-size: 12.5px;
  transition: color 0.2s;
}

.hosp-forgot:hover { color: #10b981; }

/* ─── SUBMIT BUTTON ──────────────────────────────────────────────────────────── */
.hosp-submit-btn {
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, #10b981, #0d9488);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 8px 30px rgba(16, 185, 129, 0.25),
    0 0 0 1px rgba(16, 185, 129, 0.2);
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.hosp-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.hosp-submit-btn:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.hosp-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 14px 40px rgba(16, 185, 129, 0.35),
    0 0 0 1px rgba(16, 185, 129, 0.3);
}

.hosp-submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.hosp-submit-btn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.hosp-loader {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hosp-success-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── MFA ────────────────────────────────────────────────────────────────────── */
.hosp-mfa-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin: 0 0 20px;
  text-align: center;
}

.hosp-back-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: color 0.2s;
  font-family: 'Outfit', sans-serif;
}

.hosp-back-btn:hover { color: #0d9488; }

/* ─── ERROR BADGE ────────────────────────────────────────────────────────────── */
.hosp-error-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  color: #EF4444;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 12px;
  overflow: hidden;
}

/* ─── SECURITY BADGE ─────────────────────────────────────────────────────────── */
.hosp-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  margin-top: 20px;
  color: #10b981;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.12);
  border-radius: 12px;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────────── */
.hosp-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.hosp-portal-link {
  color: #64748b;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  text-transform: uppercase;
}

.hosp-portal-link:hover {
  color: #0d9488;
}

/* ─── STATUS BAR ─────────────────────────────────────────────────────────────── */
.hosp-status-bar {
  position: absolute;
  bottom: 28px;
  right: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.3;
}

.hosp-status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.hosp-status-dot {
  width: 4px;
  height: 4px;
  background: #10b981;
  border-radius: 50%;
  animation: dot-blink 2s ease-in-out infinite;
}

@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hosp-login-card {
    padding: 40px 28px 32px;
    border-radius: 24px;
  }

  .hosp-title { font-size: 24px; }
  .hosp-subtitle { font-size: 11px; letter-spacing: 1.5px; }
  .float-icon { display: none; }
}

@media (max-width: 480px) {
  .hosp-login-card {
    padding: 32px 20px 28px;
    border-radius: 20px;
  }

  .hosp-title { font-size: 22px; }
  .hosp-subtitle { font-size: 10px; }
  .hosp-status-bar { display: none; }

  .hosp-submit-btn {
    height: 50px;
    font-size: 13px;
  }

  .hosp-extras {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  .hosp-login-card {
    padding: 28px 16px 24px;
  }
  .hosp-logo-container { width: 56px; height: 56px; }
  .hosp-logo-inner { width: 46px; height: 46px; border-radius: 14px; }
}
