@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --auth-forest: #0b3438;
  --auth-forest-light: #145158;
  --auth-ink: #153237;
  --auth-muted: #5a7074;
  --auth-teal: #13a59e;
  --auth-teal-light: #e0f5f2;
  --auth-paper: #f5f8f7;
  --auth-line: #d7e2df;
  --auth-coral: #dc6753;
  --auth-success: #26875d;
  --auth-shadow: 0 28px 80px rgba(5, 34, 38, .13);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--auth-paper); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--auth-ink); font-family: "DM Sans", sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 3px solid rgba(19,165,158,.32); outline-offset: 3px; }

.auth-page { display: grid; min-height: 100vh; grid-template-columns: minmax(520px, .92fr) minmax(560px, 1.08fr); }
.auth-aside { position: relative; display: flex; overflow: hidden; flex-direction: column; padding: 39px clamp(42px, 4.5vw, 82px); background: var(--auth-forest); color: white; }
.auth-aside::before { position: absolute; right: -150px; bottom: -150px; width: 480px; height: 480px; border: 1px solid rgba(107,218,211,.2); border-radius: 50%; box-shadow: 0 0 0 34px rgba(107,218,211,.035), 0 0 0 70px rgba(107,218,211,.025); content: ""; }
.auth-aside::after { position: absolute; top: 25%; right: 27%; width: 1px; height: 320px; background: linear-gradient(transparent, rgba(107,218,211,.28), transparent); content: ""; transform: rotate(31deg); }
.auth-brand { position: relative; z-index: 1; display: inline-flex; width: max-content; align-items: center; gap: 10px; font-size: 20px; font-weight: 500; }
.auth-brand strong { color: #6ce0d9; }
.auth-brand-mark { position: relative; display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; color: #6ce0d9; }
.auth-brand-mark::before, .auth-brand-mark::after { position: absolute; width: 14px; height: 2px; border-radius: 2px; background: currentColor; content: ""; }
.auth-brand-mark::after { transform: rotate(90deg); }
.aside-content { position: relative; z-index: 1; width: min(100%, 590px); margin: auto 0; padding: 58px 0 66px; }
.auth-kicker { margin: 0 0 19px; color: #70d9d2; font: 600 10px "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.aside-content h1 { max-width: 590px; margin: 0; font-size: clamp(46px, 3.35vw, 64px); font-weight: 500; line-height: 1.01; letter-spacing: 0; }
.aside-content h1 em { color: #6ce0d9; font-family: "Instrument Serif", serif; font-weight: 400; }
.aside-content > p:not(.auth-kicker) { max-width: 500px; margin: 23px 0 0; color: #b4ced0; font-size: 15px; line-height: 1.75; }
.access-map { display: grid; gap: 0; margin-top: 42px; border-top: 1px solid rgba(255,255,255,.16); }
.access-map-row { display: grid; min-height: 70px; grid-template-columns: 29px 1fr auto; gap: 13px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.16); }
.access-map-row > span:first-child { color: #6ce0d9; font: 10px "IBM Plex Mono", monospace; }
.access-map-row strong, .access-map-row small { display: block; }
.access-map-row strong { font-size: 13px; }
.access-map-row small { margin-top: 2px; color: #8eabad; font-size: 11px; }
.access-map-row > svg { width: 16px; color: #6ce0d9; }
.aside-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin-top: auto; color: #88a8ab; font: 9px "IBM Plex Mono", monospace; letter-spacing: .04em; text-transform: uppercase; }
.system-badge { display: flex; align-items: center; gap: 7px; }
.system-badge i { width: 6px; height: 6px; border-radius: 50%; background: #5bd29b; box-shadow: 0 0 0 4px rgba(91,210,155,.12); }

.auth-main { display: grid; min-height: 100vh; place-items: center; padding: 44px 38px; background: var(--auth-paper); }
.auth-card { width: min(500px, 100%); }
.mobile-brand { display: none; }
.auth-card-header { margin-bottom: 30px; }
.auth-card-header h2 { margin: 0; font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: 0; }
.auth-card-header p { margin: 10px 0 0; color: var(--auth-muted); font-size: 14px; }
.auth-card-header p a { color: var(--auth-forest-light); font-weight: 700; }
.auth-form { display: grid; gap: 17px; }
.auth-field { display: grid; gap: 7px; }
.auth-field label { display: flex; align-items: center; justify-content: space-between; color: #29464b; font-size: 12px; font-weight: 700; }
.auth-field label a { color: var(--auth-forest-light); font-size: 11px; font-weight: 600; }
.auth-control { position: relative; }
.auth-control > svg { position: absolute; top: 14px; left: 13px; width: 16px; color: #789094; pointer-events: none; }
.auth-control input, .auth-control select { width: 100%; height: 47px; padding: 0 43px; border: 1px solid #cbd9d6; border-radius: 4px; background: white; color: var(--auth-ink); }
.auth-control input:focus, .auth-control select:focus { border-color: var(--auth-teal); outline: none; box-shadow: 0 0 0 3px rgba(19,165,158,.1); }
.auth-control input.invalid, .auth-control select.invalid { border-color: var(--auth-coral); }
.password-toggle { position: absolute; top: 1px; right: 1px; display: grid; width: 43px; height: 45px; padding: 0; place-items: center; border: 0; background: transparent; color: #789094; }
.password-toggle svg { width: 16px; }
.field-message { display: none; color: var(--auth-coral); font-size: 11px; }
.auth-field.invalid .field-message { display: block; }
.auth-field-hint { margin-top: -2px; color: var(--auth-muted); font-size: 11px; }
.auth-check { display: flex; align-items: flex-start; gap: 9px; color: var(--auth-muted); font-size: 12px; }
.auth-check input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--auth-teal); }
.auth-check a { color: var(--auth-forest-light); font-weight: 700; }
.auth-submit { display: inline-flex; width: 100%; min-height: 49px; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; border: 0; border-radius: 4px; background: var(--auth-forest); color: white; font-size: 13px; font-weight: 700; transition: background .18s ease, transform .18s ease; }
.auth-submit:hover { background: var(--auth-forest-light); transform: translateY(-1px); }
.auth-submit:disabled { cursor: wait; opacity: .7; transform: none; }
.auth-submit svg { width: 17px; }
.auth-divider { display: flex; align-items: center; gap: 13px; margin: 23px 0 20px; color: #8ba0a2; font: 10px "IBM Plex Mono", monospace; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--auth-line); content: ""; }
.demo-button { display: flex; width: 100%; min-height: 47px; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--auth-line); border-radius: 4px; background: white; color: var(--auth-forest); font-size: 12px; font-weight: 700; }
.demo-button:hover { border-color: var(--auth-teal); background: var(--auth-teal-light); }
.demo-button svg { width: 16px; color: var(--auth-teal); }
.auth-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 21px; padding: 12px 13px; border: 1px solid #d5e6e2; background: #edf8f6; color: #32666a; font-size: 11px; }
.auth-note svg { width: 16px; flex: 0 0 auto; color: var(--auth-teal); }
.auth-legal { margin: 28px 0 0; color: #829497; font-size: 10px; line-height: 1.6; text-align: center; }
.auth-legal a { color: var(--auth-forest-light); font-weight: 600; }
.auth-toast { position: fixed; right: 22px; bottom: 22px; z-index: 10; display: none; width: min(360px, calc(100% - 44px)); padding: 14px; border-left: 3px solid var(--auth-coral); background: white; box-shadow: var(--auth-shadow); color: var(--auth-ink); font-size: 12px; }
.auth-toast.visible { display: block; animation: toast-in .2s ease; }
.auth-toast.success { border-color: var(--auth-success); }
.auth-session-state { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; gap: 7px; padding: 24px; background: var(--auth-paper); color: var(--auth-ink); text-align: center; }
.auth-session-state span { color: var(--auth-muted); font-size: 12px; }
.auth-session-state button { min-height: 40px; margin: 8px auto 0; padding: 0 16px; border: 1px solid var(--auth-line); border-radius: 4px; background: white; font-weight: 700; }
.auth-session-state[hidden] { display: none; }
.password-strength { display: grid; gap: 7px; margin-top: -3px; }
.strength-bar { display: grid; height: 4px; grid-template-columns: repeat(4,1fr); gap: 3px; }
.strength-bar span { background: #e2eae8; }
.strength-bar.weak span:first-child { background: var(--auth-coral); }.strength-bar.medium span:nth-child(-n+2) { background: var(--auth-amber, #d39a35); }.strength-bar.strong span:nth-child(-n+3) { background: var(--auth-teal); }.strength-bar.very-strong span { background: var(--auth-success); }
.strength-label { color: var(--auth-muted); font: 10px "IBM Plex Mono", monospace; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { min-height: 390px; padding: 25px 28px; }
  .aside-content { margin: auto 0 0; padding: 60px 0 25px; }
  .aside-content h1 { font-size: clamp(38px, 8vw, 56px); }
  .aside-content > p:not(.auth-kicker), .access-map { display: none; }
  .aside-footer { margin-top: 35px; }
  .auth-main { min-height: auto; padding: 50px 28px 60px; }
}

@media (min-width: 901px) and (max-height: 820px) {
  .auth-aside { padding-top: 28px; padding-bottom: 28px; }
  .aside-content { padding-top: 34px; padding-bottom: 38px; }
  .aside-content h1 { font-size: clamp(42px, 3vw, 56px); }
  .aside-content > p:not(.auth-kicker) { margin-top: 17px; }
  .access-map { margin-top: 27px; }
  .access-map-row { min-height: 60px; }
}

@media (max-width: 520px) {
  .auth-aside { min-height: 300px; padding: 20px; }
  .aside-content { padding-top: 52px; }
  .aside-content h1 { font-size: 40px; }
  .aside-footer { font-size: 8px; }
  .auth-main { padding: 38px 20px 45px; }
  .auth-card-header h2 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
