:root {
  --bg: #020b14;
  --surface: rgba(4, 18, 32, .72);
  --surface-strong: rgba(6, 21, 38, .88);
  --line: rgba(89, 221, 255, .26);
  --line-strong: rgba(77, 216, 255, .56);
  --cyan: #25d7ff;
  --cyan-2: #39bff6;
  --teal: #29f0d0;
  --white: #f4fbff;
  --text: #d7e7f4;
  --muted: #8fa5b7;
  --danger: #ff6b84;
  --success: #45f0b5;
  --shadow: 0 30px 120px rgba(0, 0, 0, .45);
  --font: Aptos, "Segoe UI Variable", "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(90deg, rgba(1, 8, 16, .32) 0%, rgba(2, 11, 20, .05) 45%, rgba(2, 11, 20, .52) 100%),
    url("/assets/bg-login-medtech.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 23% 72%, rgba(37, 215, 255, .18), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(41, 240, 208, .10), transparent 34%),
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.38));
}

button,
input { font: inherit; }
button { cursor: pointer; }

.login-shell {
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
  align-items: center;
  gap: clamp(34px, 5vw, 88px);
  padding: clamp(22px, 5vw, 74px);
}

.brand-panel {
  min-height: min(760px, calc(100vh - 80px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(10px, 2vw, 24px) 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(34px, 6vh, 72px);
  color: var(--white);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 850;
  letter-spacing: -.035em;
}

.brand-lockup::after {
  content: "";
  width: 1px;
  height: 44px;
  order: -1;
  display: none;
}

.brand-logo {
  width: clamp(118px, 16vw, 190px);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.45));
}

.brand-lockup span {
  color: var(--cyan);
  text-shadow: 0 0 26px rgba(37, 215, 255, .18);
}

.hero-copy { width: min(650px, 100%); }
.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-size: .78rem;
  line-height: 1.1;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
}

.hero-copy h1 {
  margin: 16px 0 0;
  color: var(--white);
  font-size: clamp(2.8rem, 5vw, 5.25rem);
  line-height: .95;
  letter-spacing: -.07em;
  font-weight: 900;
  text-wrap: balance;
}

.hero-copy h1 span { color: var(--cyan); }
.hero-text {
  width: min(590px, 100%);
  margin: 24px 0 0;
  color: rgba(225, 239, 249, .88);
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  line-height: 1.62;
  font-weight: 520;
}

.feature-strip {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: clamp(34px, 6vh, 64px);
}

.feature-item {
  min-width: 0;
  padding: 0 clamp(16px, 2.6vw, 36px);
  border-left: 1px solid rgba(138, 211, 235, .20);
  color: var(--white);
}
.feature-item:first-child { padding-left: 0; border-left: 0; }
.feature-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(37, 215, 255, .55);
  border-radius: 18px;
  color: var(--cyan);
  background: rgba(6, 32, 50, .48);
  box-shadow: inset 0 0 18px rgba(37, 215, 255, .08), 0 0 20px rgba(37, 215, 255, .08);
}
.feature-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.feature-item strong,
.feature-item span:not(.feature-icon) { display: block; }
.feature-item strong { font-size: 1rem; font-weight: 760; }
.feature-item span:not(.feature-icon) { margin-top: 2px; color: rgba(219, 235, 247, .84); }

.access-panel { display: flex; justify-content: center; align-items: center; }
.login-card {
  width: min(100%, 510px);
  position: relative;
  padding: clamp(30px, 4.2vw, 54px);
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(11, 32, 52, .84), rgba(4, 14, 27, .82)),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(37, 215, 255, .08);
  backdrop-filter: blur(26px) saturate(130%);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 33px;
  pointer-events: none;
  background:
    radial-gradient(circle at 74% 0%, rgba(37,215,255,.16), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.07), transparent 38%);
}
.login-card > * { position: relative; }

.card-header { text-align: left; }
.card-header h2 {
  margin: 12px 0 8px;
  color: var(--white);
  font-size: clamp(2.05rem, 4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -.055em;
  font-weight: 900;
}
.card-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 560;
}

.message {
  min-height: 0;
  margin: 18px 0 0;
  padding: 0;
  border-radius: 16px;
  font-size: .94rem;
  font-weight: 760;
  line-height: 1.38;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease, padding .2s ease;
}
.message.is-visible { opacity: 1; transform: translateY(0); padding: 12px 14px; }
.message.error { color: #ffdbe2; background: rgba(255, 87, 118, .13); border: 1px solid rgba(255, 107, 132, .28); }
.message.success { color: #d5fff0; background: rgba(69, 240, 181, .12); border: 1px solid rgba(69, 240, 181, .28); }

.field-group { margin-top: 20px; }
.field-group label {
  display: block;
  margin: 0 0 9px;
  color: var(--white);
  font-size: .94rem;
  font-weight: 820;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 62px;
  border: 1px solid rgba(159, 196, 219, .26);
  border-radius: 17px;
  background: rgba(1, 10, 21, .40);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input-wrap:focus-within {
  border-color: rgba(37, 215, 255, .72);
  box-shadow: 0 0 0 4px rgba(37, 215, 255, .12), inset 0 1px 0 rgba(255,255,255,.06);
  background: rgba(2, 13, 26, .66);
}
.field-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-left: 18px;
  color: #b9cad8;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.input-wrap input {
  width: 100%;
  height: 60px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  padding: 0 16px;
  font-size: 1rem;
  font-weight: 580;
}
.input-wrap input::placeholder { color: #7f91a3; }
.toggle-password {
  width: 44px;
  height: 44px;
  margin-right: 8px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  color: #b9cad8;
  background: transparent;
  transition: color .18s ease, background .18s ease;
}
.toggle-password:hover,
.toggle-password:focus-visible { color: var(--cyan); background: rgba(37, 215, 255, .10); outline: none; }
.toggle-password svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 24px;
}
.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(235, 246, 255, .92);
  font-size: .95rem;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
}
.remember-me input { position: absolute; opacity: 0; pointer-events: none; }
.remember-me span {
  width: 21px;
  height: 21px;
  border-radius: 6px;
  border: 1px solid rgba(37, 215, 255, .72);
  display: grid;
  place-items: center;
  background: rgba(4, 18, 32, .58);
  transition: background .18s ease, box-shadow .18s ease;
}
.remember-me input:checked + span {
  background: var(--cyan);
  box-shadow: 0 0 22px rgba(37, 215, 255, .22);
}
.remember-me input:checked + span::after {
  content: "✓";
  color: #03101b;
  font-size: .9rem;
  font-weight: 900;
}
.forgot-password,
.create-access {
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: .94rem;
  font-weight: 800;
  padding: 0;
}
.forgot-password:hover,
.forgot-password:focus-visible,
.create-access:hover,
.create-access:focus-visible { color: #7aeaff; outline: none; }

.login-button,
.create-access {
  width: 100%;
  min-height: 62px;
  border-radius: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.login-button {
  border: 0;
  color: #04101c;
  background: linear-gradient(135deg, #28dfff, #32b9f4);
  box-shadow: 0 18px 38px rgba(37, 215, 255, .22), inset 0 1px 0 rgba(255,255,255,.35);
  font-size: 1.08rem;
  font-weight: 900;
}
.login-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 22px 46px rgba(37, 215, 255, .28); }
.login-button:focus-visible { outline: 3px solid rgba(37,215,255,.25); outline-offset: 4px; }
.login-button:disabled { opacity: .7; cursor: progress; }
.button-icon { margin-left: auto; padding-right: 20px; font-size: 1.35rem; }
.button-text { margin-left: auto; }

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 22px 0;
  color: var(--muted);
  font-weight: 720;
}
.divider::before,
.divider::after { content: ""; height: 1px; background: rgba(159, 196, 219, .20); }
.create-access {
  border: 1px solid rgba(37, 215, 255, .60);
  color: var(--cyan);
  background: rgba(3, 16, 30, .26);
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.create-access:hover { border-color: rgba(37, 215, 255, .92); background: rgba(37, 215, 255, .08); transform: translateY(-1px); }

.access-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 0;
  color: #9baec1;
  font-size: .92rem;
  line-height: 1.4;
  text-align: center;
  font-weight: 620;
}
.access-note svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 22px;
  }
  .brand-panel {
    min-height: auto;
    padding-top: 18px;
  }
  .brand-lockup { margin-bottom: 26px; }
  .hero-copy h1 { font-size: clamp(2.4rem, 10vw, 4rem); }
  .feature-strip { margin-top: 28px; }
  .access-panel { align-items: stretch; }
  .login-card { width: min(100%, 620px); margin: 0 auto; }
}

@media (max-width: 620px) {
  body::before { background-position: 32% center; }
  .login-shell { padding: 16px; }
  .brand-lockup span { display: none; }
  .brand-logo { width: 110px; }
  .hero-copy h1 { letter-spacing: -.055em; }
  .hero-text { font-size: .98rem; }
  .feature-strip { grid-template-columns: 1fr; gap: 14px; }
  .feature-item { border-left: 0; padding: 0; display: grid; grid-template-columns: 52px 1fr; column-gap: 13px; align-items: center; }
  .feature-icon { grid-row: span 2; margin-bottom: 0; }
  .login-card { padding: 24px; border-radius: 26px; }
  .login-card::before { border-radius: 25px; }
  .form-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .button-icon { padding-right: 14px; }
}

@supports not (backdrop-filter: blur(1px)) {
  .login-card { background: rgba(4, 18, 32, .95); }
}
