/* ==========================================================================
   HIS STATS - Clinical Home Login Portal Styles
   Enterprise Hospital Healthcare Analytics & Medical Intelligence Hub
   ========================================================================== */

/* ---------- Design Tokens (Clinical Palette) ---------- */
:root {
  --his-navy-950: #040911;
  --his-navy-900: #08121f;
  --his-navy-850: #0d1a2d;
  --his-navy-800: #12233c;
  --his-navy-700: #1a3254;

  --his-cyan-500: #0ea5e9;
  --his-cyan-400: #38bdf8;
  --his-cyan-300: #7dd3fc;
  --his-cyan-glow: rgba(14, 165, 233, 0.25);

  --his-teal-600: #0d9488;
  --his-teal-500: #14b8a6;
  --his-teal-400: #2dd4bf;
  --his-teal-glow: rgba(20, 184, 166, 0.2);

  --his-emerald: #10b981;
  --his-rose: #f43f5e;
  --his-amber: #f59e0b;

  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;

  --glass-bg: rgba(13, 26, 45, 0.72);
  --glass-border: rgba(56, 189, 248, 0.18);
  --glass-border-hover: rgba(56, 189, 248, 0.4);
  --glass-input-bg: rgba(8, 18, 31, 0.65);
  --glass-input-border: rgba(148, 163, 184, 0.18);

  --shadow-portal: 0 24px 60px -12px rgba(0, 0, 0, 0.65), 0 0 35px rgba(14, 165, 233, 0.12);
  --shadow-btn: 0 10px 25px -4px rgba(14, 165, 233, 0.4), 0 4px 10px -2px rgba(20, 184, 166, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--his-navy-950);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Animated Clinical Grid & Ambient Glows */
.login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-glow-1 {
  position: absolute;
  top: -10%;
  left: -5%;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, rgba(14, 165, 233, 0) 70%);
  filter: blur(60px);
  border-radius: 50%;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.ambient-glow-2 {
  position: absolute;
  bottom: -10%;
  right: -5%;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, rgba(20, 184, 166, 0) 70%);
  filter: blur(70px);
  border-radius: 50%;
  animation: floatOrb 22s ease-in-out infinite alternate-reverse;
}

.clinical-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.8;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.2) 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.2) 80%);
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-20px, 50px) scale(0.95); }
}

/* Header Bar */
.login-header-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 18, 31, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--his-cyan-500), var(--his-teal-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 0 16px var(--his-cyan-glow);
  position: relative;
}

.brand-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  border: 1px solid var(--his-cyan-400);
  opacity: 0.4;
  animation: pulseRings 3s infinite;
}

@keyframes pulseRings {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 0.15; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-main {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(14, 165, 233, 0.18);
  color: var(--his-cyan-300);
  border: 1px solid rgba(14, 165, 233, 0.35);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #6ee7b7;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--his-emerald);
  box-shadow: 0 0 10px var(--his-emerald);
  animation: blinkDot 1.8s infinite ease-in-out;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.live-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: var(--radius-md);
}

/* Main Centered Container */
.login-main-wrapper {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: calc(100vh - 130px);
}

.login-card-container {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}

/* Ambient Radial Aura Behind Centered Card */
.login-card-container::before {
  content: '';
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle at 50% 35%, rgba(14, 165, 233, 0.22), rgba(20, 184, 166, 0.1) 45%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
  border-radius: 40px;
}

/* High-End Glassmorphic Login Card */
.clinical-login-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 38px 34px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-portal);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.clinical-login-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 28px 70px -12px rgba(0, 0, 0, 0.75), 0 0 45px rgba(14, 165, 233, 0.18);
}

.clinical-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--his-cyan-500), var(--his-teal-500), var(--his-cyan-400));
}

.card-header-block {
  margin-bottom: 26px;
}

.card-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.card-subtitle {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.5;
}

/* Alert Notification Banner */
.login-alert {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 20px;
  display: none;
  align-items: flex-start;
  gap: 10px;
  animation: slideDown 0.25s ease forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-alert.alert-danger {
  display: flex;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

.login-alert.alert-success {
  display: flex;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.login-alert.alert-info {
  display: flex;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #7dd3fc;
}

.alert-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-message {
  flex: 1;
}

/* Form Groups & Clinical Inputs */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.input-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.clinical-input {
  width: 100%;
  background: var(--glass-input-bg);
  border: 1px solid var(--glass-input-border);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 42px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.clinical-input:hover {
  border-color: rgba(148, 163, 184, 0.35);
}

.clinical-input:focus {
  border-color: var(--his-cyan-400);
  background: rgba(8, 18, 31, 0.85);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.clinical-input:focus + .input-field-icon,
.input-field-wrapper:focus-within .input-field-icon {
  color: var(--his-cyan-400);
}

.clinical-input::placeholder {
  color: #475569;
}

/* Password Toggle Eye */
.btn-password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-password-toggle:hover {
  color: var(--his-cyan-300);
}

/* Clinical Department Select */
.clinical-select {
  width: 100%;
  background: var(--glass-input-bg);
  border: 1px solid var(--glass-input-border);
  border-radius: var(--radius-md);
  padding: 11px 14px 11px 42px;
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clinical-select:focus {
  border-color: var(--his-teal-400);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.select-caret-icon {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.85rem;
}

.clinical-select option {
  background: var(--his-navy-900);
  color: #fff;
}

/* Form Auxiliary Controls (Remember & Forgot) */
.form-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-top: -4px;
}

.remember-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  color: var(--text-sub);
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1px solid var(--glass-input-border);
  border-radius: 4px;
  background: var(--glass-input-bg);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.custom-checkbox:checked {
  background: var(--his-cyan-500);
  border-color: var(--his-cyan-400);
}

.custom-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.forgot-link {
  color: var(--his-cyan-400);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: var(--his-cyan-300);
  text-decoration: underline;
}

/* Submit Action Button */
.btn-submit-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 45%, #0d9488 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.btn-submit-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px rgba(14, 165, 233, 0.5), 0 6px 14px -2px rgba(20, 184, 166, 0.35);
  background: linear-gradient(135deg, #0396de 0%, #38bdf8 50%, #14b8a6 100%);
}

.btn-submit-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinner-border-sm {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Demo Access Quick Fill / Bypass */
.demo-access-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.demo-access-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.demo-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.btn-demo-fill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--his-cyan-300);
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-demo-fill:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.35);
  color: #fff;
}

.demo-credentials-pill {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(8, 18, 31, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Footer Bottom Bar */
.login-footer-bar {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 16px 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(8, 18, 31, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.login-footer-bar a {
  color: var(--his-cyan-400);
  text-decoration: none;
}

.login-footer-bar a:hover {
  text-decoration: underline;
}

/* Responsive Breakpoints */
@media (max-width: 576px) {
  .login-header-bar {
    padding: 14px 18px;
  }

  .header-status .live-time-chip {
    display: none;
  }

  .login-main-wrapper {
    padding: 24px 16px;
  }

  .clinical-login-card {
    padding: 28px 20px;
    border-radius: var(--radius-md);
  }

  .card-title {
    font-size: 1.4rem;
  }
}


