:root {
  --navy-950: #061624;
  --navy-900: #0a263c;
  --navy-800: #0d3b5a;
  --cyan-500: #12a9d6;
  --cyan-100: #dff6fd;
  --ink-900: #17222b;
  --ink-600: #5d6c76;
  --line: #d8e2e8;
  --danger: #b42318;
  --shadow: 0 30px 70px rgba(5, 24, 38, 0.18);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink-900);
  background: #eef3f6;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-width: 320px; }
button, input { font: inherit; }

.login-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1.12fr) minmax(430px, 0.88fr);
  min-height: 100vh;
}

.login-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(5, 22, 36, .96), rgba(9, 62, 91, .82)),
    url("/assets/medical-imaging-cover.jpg") center / cover no-repeat;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 80% 15%, rgba(18, 169, 214, .36), transparent 34%),
    linear-gradient(180deg, transparent 40%, rgba(3, 17, 29, .72));
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.hero-content {
  width: min(760px, 100%);
  padding: clamp(42px, 7vw, 100px);
}

.hero-logo {
  width: 118px;
  height: 73px;
  object-fit: contain;
  margin-bottom: 38px;
  padding: 7px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(0,0,0,.22);
}

.hero-eyebrow,
.login-kicker {
  display: block;
  margin-bottom: 12px;
  color: #7fddf7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.hero-content > p {
  max-width: 660px;
  margin: 24px 0 36px;
  color: #c7deeb;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.62;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-metrics div {
  min-width: 142px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(8px);
}

.hero-metrics strong,
.hero-metrics span { display: block; }
.hero-metrics strong { font-size: 25px; }
.hero-metrics span { margin-top: 3px; color: #bcd5e3; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

.login-panel {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  padding: 34px clamp(28px, 6vw, 88px) 24px;
  background: linear-gradient(160deg, #fff, #f2f6f8 70%);
}

.login-card {
  width: min(440px, 100%);
  margin: auto;
  padding: 48px 46px;
  border: 1px solid rgba(215, 227, 234, .88);
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}

.mobile-brand { display: none; }
.login-kicker { color: #0b86ac; }
.login-card h2 { margin: 0; color: var(--navy-950); font-size: 34px; letter-spacing: -.03em; }
.login-intro { margin: 10px 0 30px; color: var(--ink-600); font-size: 14px; line-height: 1.55; }

form { display: grid; gap: 10px; }
label { margin-top: 8px; color: #34434d; font-size: 12px; font-weight: 800; }

.field-shell {
  display: flex;
  align-items: center;
  height: 49px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}

.field-shell:focus-within {
  border-color: #1c9dc3;
  box-shadow: 0 0 0 3px rgba(28,157,195,.13);
}

.field-shell svg,
.security-note svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-left: 14px;
  fill: none;
  stroke: #6b7d88;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-shell input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: var(--ink-900);
  background: transparent;
  font-size: 14px;
}

.password-toggle {
  height: 100%;
  padding: 0 13px;
  border: 0;
  color: #39718c;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.login-error {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #f2c6c2;
  border-radius: 6px;
  color: var(--danger);
  background: #fff3f2;
  font-size: 12px;
  line-height: 1.45;
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  margin-top: 12px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(90deg, #0a4b70, #0c83ab);
  box-shadow: 0 10px 24px rgba(10,100,142,.24);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
}

.submit-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(10,100,142,.3); }
.submit-button:disabled { opacity: .72; cursor: wait; }
.button-spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.submit-button.is-loading .button-spinner { display: block; }

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid #e8eef2;
  color: #72818a;
  font-size: 11px;
  line-height: 1.5;
}
.security-note svg { width: 18px; height: 18px; margin: 0; stroke: #2e91af; }
.login-panel footer { align-self: end; color: #82909a; font-size: 10px; text-align: center; }

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

@media (max-width: 920px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; padding: 24px; }
  .login-card { padding: 38px 34px; }
  .mobile-brand { display: block; margin-bottom: 26px; }
  .mobile-brand img { width: 100px; height: 64px; object-fit: contain; padding: 6px; border: 1px solid #e2e9ed; border-radius: 5px; background: #fff; }
}

@media (max-width: 480px) {
  .login-panel { padding: 14px; background: #f5f8fa; }
  .login-card { padding: 30px 24px; border-radius: 9px; box-shadow: 0 18px 44px rgba(5,24,38,.14); }
  .login-card h2 { font-size: 29px; }
}
