/* =========================================
   HOSPITAL LOGIN - COMPACT DESIGN
========================================= */

:root {
  --login-primary: #08b7d4;
  --login-primary-dark: #069bb9;

  --login-navy: #123b5c;
  --login-navy-dark: #0b2d49;

  --login-text: #173956;
  --login-muted: #71849b;

  --login-border: #dce4ec;
  --login-error: #dc3545;
}

/* =========================================
   PAGE
========================================= */

.login-page {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;

  padding: 24px;

  display: flex;
  justify-content: center;
  align-items: center;

  position: relative;
  isolation: isolate;
  overflow: hidden;

  background: #edf2f7;
}

/* Background image - replace path here */

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;

  background:
    linear-gradient(120deg, rgb(244 248 251 / 0%), rgb(236 243 249 / 1%)),
    url("/images/login-bg.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Subtle decorative background */

.login-page::after {
  content: "";
  position: absolute;
  z-index: -1;

  width: 450px;
  height: 450px;

  right: -180px;
  bottom: -230px;

  border: 1px solid rgba(8, 183, 212, 0.2);
  border-radius: 50%;

  box-shadow:
    0 0 0 35px rgba(8, 183, 212, 0.025),
    0 0 0 75px rgba(8, 183, 212, 0.025);
}

/* =========================================
   MAIN SHARED CONTAINER
========================================= */

.login-layout-card {
  width: 100%;
  max-width: 1020px;

  min-height: 510px;

  display: grid;
  grid-template-columns: 1fr 0.92fr;

  background: rgba(255, 255, 255, 0.94);

  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;

  overflow: hidden;

  box-shadow:
    0 22px 65px rgba(26, 56, 83, 0.13),
    0 4px 15px rgba(26, 56, 83, 0.04);

  position: relative;
  z-index: 1;
}

/* =========================================
   LEFT SECTION
========================================= */

.login-left-panel {
  padding: 48px 45px 25px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  position: relative;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 12% 90%,
      rgba(8, 183, 212, 0.12),
      transparent 35%
    ),
    linear-gradient(145deg, #eef7fa 0%, #e8f0f7 100%);
}

/* Decorative circle */

.login-left-panel::before {
  content: "";
  position: absolute;

  width: 320px;
  height: 320px;

  right: -180px;
  bottom: -180px;

  border: 1px solid rgba(8, 183, 212, 0.16);
  border-radius: 50%;

  box-shadow:
    0 0 0 24px rgba(8, 183, 212, 0.025),
    0 0 0 50px rgba(8, 183, 212, 0.025);
}

.login-left-content {
  position: relative;
  z-index: 1;
}

/* =========================================
   BRAND ROW
========================================= */

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 9px;

  color: #59758e;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.login-brand-dot {
  width: 9px;
  height: 9px;

  flex-shrink: 0;

  border-radius: 50%;

  background: var(--login-primary);

  box-shadow: 0 0 0 4px rgba(8, 183, 212, 0.12);
}

/* =========================================
   HERO CONTENT
========================================= */

.login-hero-content {
  margin-top: 90px;

  max-width: 410px;
}

.login-hero-content h1 {
  margin: 0;

  color: #153653;

  font-family: Georgia, "Times New Roman", serif;

  font-size: clamp(34px, 3.4vw, 43px);
  font-weight: 700;

  line-height: 1.12;
  letter-spacing: -1.4px;
}

.login-title-accent {
  width: 48px;
  height: 5px;

  margin: 19px 0;

  border-radius: 20px;

  background: var(--login-primary);
}

.login-hero-content p {
  max-width: 370px;

  margin: 0;

  color: #657c95;

  font-size: 14px;
  font-weight: 400;

  line-height: 1.75;
}

/* =========================================
   LEFT FOOTER
========================================= */

.login-footer {
  position: relative;
  z-index: 1;

  color: #8194a7;

  font-size: 10px;
  font-weight: 500;
}

/* =========================================
   RIGHT SECTION
========================================= */

.login-right-panel {
  min-width: 0;

  padding: 35px 48px 27px;

  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(255, 255, 255, 0.88);
}

/* No extra nested card - shared outer card */

.login-box {
  width: 100%;
  max-width: 350px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* =========================================
   LOGO
========================================= */

.login-logo-section {
  width: 100%;
  min-height: 68px;

  display: flex;
  justify-content: center;
  align-items: center;

  margin-bottom: 9px;
}

.login-logo-display {
  display: block;

  max-width: 200px;
  max-height: 65px;

  width: auto;
  height: auto;

  object-fit: contain;
}

.login-logo-section > svg {
  max-width: 150px;
  max-height: 55px;
}

.login-logo-skeleton {
  width: 110px;
  height: 43px;

  border-radius: 8px;

  background: linear-gradient(90deg, #edf1f6 25%, #f8fafc 50%, #edf1f6 75%);

  background-size: 200% 100%;

  animation: login-shimmer 1.5s infinite;
}

@keyframes login-shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

/* =========================================
   LOGIN HEADER
========================================= */

.login-header {
  width: 100%;

  text-align: center;

  margin-bottom: 27px;
}

.login-header h2 {
  margin: 0;

  color: #153653;

  font-size: 27px;
  font-weight: 700;

  letter-spacing: -0.7px;
}

.login-header-divider {
  display: block;

  width: 27px;
  height: 2px;

  margin: 10px auto;

  border-radius: 10px;

  background: #64829c;
}

.login-header p {
  margin: 0;

  color: #788ba1;

  font-size: 13px;
  font-weight: 400;
}

/* =========================================
   FORM
========================================= */

.login-form-wrapper {
  width: 100%;

  display: flex;
  flex-direction: column;

  gap: 15px;
}

.login-form-group {
  width: 100%;

  display: flex;
  flex-direction: column;

  gap: 6px;
}

.login-form-label {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip: rect(0, 0, 0, 0);

  white-space: nowrap;
  border: 0;
}

/* =========================================
   INPUT
========================================= */

.login-input-wrapper {
  width: 100%;
  height: 51px;

  padding: 0 15px;

  display: flex;
  align-items: center;

  gap: 12px;

  border: 1px solid var(--login-border);
  border-radius: 11px;

  background: #fff;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.login-input-wrapper:focus-within {
  border-color: var(--login-primary);

  box-shadow: 0 0 0 3px rgba(8, 183, 212, 0.1);
}

.login-input-wrapper.error {
  border-color: var(--login-error);
}

.login-input-icon {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 19px;
  height: 19px;

  flex-shrink: 0;

  color: #7890a9;
}

.login-input-icon svg {
  width: 19px;
  height: 19px;
}

.login-input {
  width: 100%;
  height: 100%;

  min-width: 0;

  border: none;
  outline: none;

  background: transparent;

  color: #193b5c;

  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
}

.login-input::placeholder {
  color: #8799ad;
  opacity: 1;
}

/* Autofill */

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #193b5c;
  transition: background-color 5000s ease-in-out 0s;
}

/* =========================================
   PASSWORD TOGGLE
========================================= */

.login-password-toggle {
  width: 27px;
  height: 30px;

  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  border: none;
  outline: none;

  background: transparent;

  color: #7890a9;

  cursor: pointer;

  transition: color 0.2s ease;
}

.login-password-toggle:hover {
  color: var(--login-primary-dark);
}

.login-password-toggle svg {
  width: 18px;
  height: 18px;
}

/* =========================================
   VALIDATION
========================================= */

.login-error-message {
  padding-left: 3px;
  min-height: 18px;

  color: var(--login-error);

  font-size: 11px;
  font-weight: 500;
}

/* =========================================
   LOGIN BUTTON
========================================= */

.login-submit-btn {
  width: 100%;
  height: 51px;

  margin-top: 7px;
  padding: 0 18px;

  display: flex;
  justify-content: center;
  align-items: center;

  gap: 12px;

  border: none;
  border-radius: 11px;

  background: linear-gradient(110deg, #22577d, #0d3455);

  color: #fff;

  font-family: inherit;
  font-size: 15px;
  font-weight: 600;

  cursor: pointer;

  box-shadow: 0 5px 13px rgba(13, 52, 85, 0.12);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.login-submit-btn:hover:not(:disabled) {
  background: linear-gradient(110deg, #174f77, #092c49);

  transform: translateY(-1px);

  box-shadow: 0 8px 17px rgba(13, 52, 85, 0.18);
}

.login-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.login-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-submit-btn svg {
  width: 19px;
  height: 19px;
}

/* =========================================
   LOADER
========================================= */

.login-spinner {
  width: 20px;
  height: 20px;

  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;

  border-radius: 50%;

  animation: login-spin 0.7s linear infinite;
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================
   CARD FOOTER
========================================= */

.login-card-footer {
  margin-top: 25px;

  color: #a0adba;

  font-size: 10px;
  font-weight: 500;

  text-align: center;
}

.login-mobile-footer {
  display: none;
}

/* =========================================
   RESPONSIVE - LAPTOP
========================================= */

@media (max-width: 900px) {
  .login-layout-card {
    max-width: 850px;
    grid-template-columns: 1fr 0.95fr;
    min-height: 475px;
  }

  .login-left-panel {
    padding: 40px 32px 23px;
  }

  .login-hero-content {
    margin-top: 75px;
  }

  .login-hero-content h1 {
    font-size: 36px;
  }

  .login-right-panel {
    padding: 30px;
  }
}

/* =========================================
   RESPONSIVE - TABLET
========================================= */

@media (max-width: 680px) {
  .login-page {
    padding: 22px;
    overflow-y: auto;
    align-items: flex-start;
  }

  .login-layout-card {
    max-width: 440px;

    grid-template-columns: 1fr;

    min-height: auto;
  }

  .login-left-panel {
    min-height: 240px;

    padding: 28px 30px 22px;
  }

  .login-hero-content {
    margin-top: 35px;
  }

  .login-hero-content h1 {
    font-size: 32px;
  }

  .login-hero-content p {
    font-size: 13px;
    max-width: 350px;
  }

  .login-title-accent {
    margin: 13px 0;
  }

  .login-footer {
    display: none;
  }

  .login-right-panel {
    padding: 32px 35px 27px;
  }

  .login-box {
    max-width: 100%;
  }

  .login-mobile-footer {
    display: block;

    margin-top: 16px;

    color: #71849b;
    font-size: 10px;

    text-align: center;
  }
}

/* =========================================
   RESPONSIVE - SMALL MOBILE
========================================= */

@media (max-width: 380px) {
  .login-page {
    padding: 13px;
  }

  .login-left-panel {
    min-height: 210px;
    padding: 24px 23px 20px;
  }

  .login-hero-content {
    margin-top: 27px;
  }

  .login-hero-content h1 {
    font-size: 29px;
  }

  .login-right-panel {
    padding: 27px 22px 24px;
  }

  .login-header {
    margin-bottom: 22px;
  }
}

/* =========================================
   SHORT SCREENS
========================================= */

@media (min-width: 681px) and (max-height: 650px) {
  .login-page {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .login-layout-card {
    min-height: 450px;
  }

  .login-left-panel {
    padding-top: 30px;
  }

  .login-hero-content {
    margin-top: 55px;
  }

  .login-right-panel {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .login-logo-section {
    min-height: 55px;
  }

  .login-header {
    margin-bottom: 19px;
  }

  .login-card-footer {
    margin-top: 17px;
  }
}

/* =========================================
   ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {
  .login-page *,
  .login-page *::before,
  .login-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
