:root {
  --navy-950: #06283d;
  --navy-900: #08334d;
  --navy-800: #0b4263;
  --teal-500: #13a39a;
  --teal-400: #27b9ac;
  --sky-100: #eaf5f7;
  --ink: #142531;
  --muted: #687b87;
  --line: #dce7eb;
  --surface: #ffffff;
  --danger: #b42318;
  --success: #16794f;
  --shadow: 0 24px 70px rgba(6, 40, 61, .16);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #edf3f5; }
body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #edf3f5;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(440px, 1.05fr) minmax(480px, .95fr);
}

.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 78% 14%, rgba(39,185,172,.3), transparent 28%),
    radial-gradient(circle at 14% 80%, rgba(18,123,151,.32), transparent 34%),
    linear-gradient(145deg, #06283d 0%, #083a56 47%, #0a4a67 100%);
}
.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  z-index: -1;
}
.brand-panel::before { width: 680px; height: 680px; right: -390px; top: -260px; }
.brand-panel::after { width: 480px; height: 480px; left: -300px; bottom: -250px; }
.brand-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom right, #000, transparent 70%);
}
.brand-content {
  min-height: 100vh;
  padding: 48px clamp(42px, 6vw, 88px);
  display: flex;
  flex-direction: column;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  color: #fff;
  text-decoration: none;
}
.brand-mark {
  width: 48px;
  height: 48px;
  color: var(--teal-400);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.2));
}
.brand-mark svg { width: 100%; height: 100%; }
.brand strong { display: block; font-size: 20px; letter-spacing: -.025em; }
.brand small { display: block; margin-top: 3px; color: rgba(255,255,255,.66); font-size: 12px; }

.hero-copy { max-width: 660px; margin: auto 0 46px; }
.eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  margin-bottom: 22px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #a8e8e0;
  background: rgba(255,255,255,.06);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-copy h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(38px, 4.3vw, 65px);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.hero-copy p {
  max-width: 610px;
  margin: 24px 0 0;
  color: rgba(255,255,255,.74);
  font-size: 16px;
  line-height: 1.75;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}
.feature-grid article {
  min-height: 145px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(8px);
}
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 17px;
  border-radius: 10px;
  color: #bff7ef;
  background: rgba(39,185,172,.17);
  font-size: 11px;
  font-weight: 800;
}
.feature-grid strong { display: block; font-size: 13px; }
.feature-grid p { margin: 8px 0 0; color: rgba(255,255,255,.61); font-size: 11.5px; line-height: 1.55; }
.brand-foot { margin: 0; color: rgba(255,255,255,.42); font-size: 11px; }

.login-panel {
  min-height: 100vh;
  padding: 34px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 88% 9%, rgba(39,185,172,.12), transparent 24%),
    linear-gradient(180deg, #f8fbfc, #edf3f5);
}
.login-card {
  width: min(100%, 490px);
  padding: 46px 46px 32px;
  border: 1px solid rgba(15,72,96,.08);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.mobile-brand { display: none; }
.login-heading { margin-bottom: 34px; }
.security-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}
.security-pill span { width: 8px; height: 8px; border-radius: 50%; background: #23a56c; box-shadow: 0 0 0 5px rgba(35,165,108,.11); }
.login-heading h2 { margin: 0; color: var(--navy-950); font-size: 31px; letter-spacing: -.04em; }
.login-heading p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.field-group { margin-bottom: 21px; }
.field-group label, .dialog-card label { display: block; margin-bottom: 9px; color: #263c49; font-size: 13px; font-weight: 700; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.input-wrap { position: relative; }
.input-wrap input, .dialog-card input {
  width: 100%;
  height: 54px;
  padding: 0 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fbfdfe;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.input-wrap input::placeholder, .dialog-card input::placeholder { color: #9baab3; }
.input-wrap input:focus, .dialog-card input:focus { border-color: var(--teal-500); background: #fff; box-shadow: 0 0 0 4px rgba(19,163,154,.11); }
.input-wrap input.invalid { border-color: #e36a61; box-shadow: 0 0 0 4px rgba(227,106,97,.09); }
.input-icon {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #78909c;
  font-weight: 700;
}
.input-icon.lock::before { content: ""; width: 11px; height: 10px; border: 2px solid #78909c; border-radius: 3px; }
.input-icon.lock::after { content: ""; position: absolute; width: 8px; height: 7px; top: 1px; border: 2px solid #78909c; border-bottom: 0; border-radius: 7px 7px 0 0; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  background: transparent;
}
.password-toggle:hover { background: var(--sky-100); }
.eye { position: absolute; inset: 0; margin: auto; width: 17px; height: 11px; border: 2px solid #78909c; border-radius: 60% 60%; }
.eye::after { content: ""; position: absolute; inset: 2px 5px; border-radius: 50%; background: #78909c; }
.password-toggle[aria-pressed="true"] .eye::before { content: ""; position: absolute; width: 21px; height: 2px; left: -4px; top: 3px; transform: rotate(-43deg); background: #78909c; }
.text-button { padding: 0; border: 0; color: var(--teal-500); background: none; cursor: pointer; font-size: 12px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.field-error { display: block; min-height: 17px; padding-top: 5px; color: var(--danger); font-size: 11px; }

.remember-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 26px;
  color: #61747f;
  cursor: pointer;
  font-size: 12px;
}
.remember-row input { position: absolute; opacity: 0; }
.custom-check { width: 18px; height: 18px; border: 1px solid #c8d8df; border-radius: 5px; background: #fff; }
.remember-row input:checked + .custom-check { border-color: var(--teal-500); background: var(--teal-500); box-shadow: inset 0 0 0 3px #fff; }
.primary-button {
  width: 100%;
  height: 55px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--navy-800), var(--teal-500));
  box-shadow: 0 15px 28px rgba(8,66,99,.22);
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 18px 32px rgba(8,66,99,.26); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { opacity: .7; cursor: wait; }
.arrow { font-size: 19px; }
.form-message { min-height: 22px; padding-top: 10px; text-align: center; color: var(--muted); font-size: 12px; }
.form-message.success { color: var(--success); }
.form-message.error { color: var(--danger); }
.security-note {
  display: flex;
  gap: 11px;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid #dbecee;
  border-radius: 12px;
  background: #f5fbfb;
}
.shield-small { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--teal-500); font-size: 12px; font-weight: 800; }
.security-note p { margin: 0; color: #66808b; font-size: 11.5px; line-height: 1.55; }
.security-note strong { color: #36525f; }
.login-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 29px; padding-top: 22px; border-top: 1px solid #e6eef1; color: #95a4ac; font-size: 10.5px; }
.login-footer a { color: #718996; text-decoration: none; }
.login-footer a:hover { color: var(--teal-500); }

.recovery-dialog { width: min(92vw, 440px); padding: 0; border: 0; border-radius: 20px; background: transparent; box-shadow: 0 24px 70px rgba(6,40,61,.3); }
.recovery-dialog::backdrop { background: rgba(4,25,37,.62); backdrop-filter: blur(4px); }
.dialog-card { position: relative; padding: 36px; border-radius: 20px; background: #fff; }
.dialog-close { position: absolute; right: 16px; top: 13px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #70838e; background: #eef4f6; cursor: pointer; font-size: 23px; line-height: 1; }
.dialog-icon { display: grid; place-items: center; width: 47px; height: 47px; margin-bottom: 19px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--navy-800), var(--teal-500)); font-weight: 800; }
.dialog-card h3 { margin: 0; color: var(--navy-950); font-size: 24px; letter-spacing: -.035em; }
.dialog-card p { margin: 10px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.dialog-card input { margin-bottom: 18px; padding: 0 16px; }
.dialog-card small { display: block; margin-top: 12px; color: #8a9aa3; font-size: 10.5px; line-height: 1.5; }

@media (max-width: 1050px) {
  .page-shell { grid-template-columns: .9fr 1.1fr; }
  .brand-content { padding: 40px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { min-height: auto; display: flex; gap: 13px; }
  .feature-icon { flex: 0 0 auto; margin-bottom: 0; }
}
@media (max-width: 800px) {
  .page-shell { display: block; }
  .brand-panel { display: none; }
  .login-panel { min-height: 100svh; padding: 22px; }
  .login-card { padding: 34px 27px 27px; border-radius: 20px; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; color: var(--navy-950); }
  .brand-mark.mini { width: 34px; height: 34px; }
  .mobile-brand strong { font-size: 17px; }
}
@media (max-width: 430px) {
  .login-panel { padding: 0; background: #fff; }
  .login-card { min-height: 100svh; width: 100%; padding: 28px 22px 22px; border: 0; border-radius: 0; box-shadow: none; }
  .login-heading h2 { font-size: 28px; }
  .login-footer { flex-direction: column; align-items: center; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
