:root {
  color-scheme: dark;
  --sfg-night: #061326;
  --sfg-deep: #081a31;
  --sfg-panel: #0a1c34;
  --sfg-panel-soft: #0c203a;
  --sfg-line: rgba(194, 164, 105, 0.22);
  --sfg-gold: #d8b66f;
  --sfg-gold-light: #f0d697;
  --sfg-gold-dark: #9c773d;
  --sfg-white: #f7f5ef;
  --sfg-muted: #a7b1bf;
  --sfg-font: "Avenir Next", "Segoe UI", sans-serif;
  --sfg-display: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: var(--sfg-night); }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--sfg-white);
  background:
    radial-gradient(ellipse at 14% 14%, rgba(21, 53, 86, .38), transparent 43%),
    linear-gradient(135deg, #061326, #091a30 52%, #071427);
  font-family: var(--sfg-font);
  -webkit-font-smoothing: antialiased;
}

body::after {
  position: fixed;
  z-index: 5;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(420px, .84fr);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.artwork-side {
  position: relative;
  display: grid;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 36% 46%, rgba(17, 52, 88, .56), transparent 58%),
    linear-gradient(145deg, #07172b 4%, #0a1c33 57%, #071326);
}

.artwork-side::after {
  position: absolute;
  z-index: 1;
  top: 8%;
  right: 0;
  bottom: 8%;
  width: 1px;
  content: "";
  background: linear-gradient(transparent, rgba(216, 182, 111, .36) 45%, transparent);
}

.artwork-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  object-fit: contain;
  object-position: center;
  animation: artwork-arrive 1.1s cubic-bezier(.2,.7,.2,1) both;
}

.login-side {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(34px, 6vw, 88px);
  background:
    radial-gradient(ellipse at 100% 2%, rgba(30, 58, 86, .28), transparent 47%),
    linear-gradient(115deg, rgba(8, 25, 46, .86), rgba(7, 20, 38, .98));
}

.login-side::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  content: "";
  opacity: .55;
  background: linear-gradient(90deg, transparent, rgba(216, 182, 111, .42), transparent);
}

.login-card {
  position: relative;
  width: min(100%, 438px);
  padding: clamp(28px, 3.3vw, 43px);
  border: 1px solid rgba(190, 164, 112, .22);
  border-radius: 13px;
  background:
    linear-gradient(150deg, rgba(14, 34, 58, .97), rgba(8, 24, 44, .98));
  box-shadow:
    0 32px 90px rgba(0, 0, 0, .34),
    0 1px 0 rgba(255, 255, 255, .035) inset,
    0 0 50px rgba(21, 47, 74, .14);
  animation: card-arrive .8s .12s cubic-bezier(.2,.7,.2,1) both;
}

.card-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 26px;
  color: var(--sfg-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .19em;
  line-height: 1.4;
  text-transform: uppercase;
}

.kicker-rule {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--sfg-gold), rgba(216, 182, 111, .18));
}

.login-title {
  margin: 0;
  color: var(--sfg-white);
  font-family: var(--sfg-display);
  font-size: clamp(31px, 3.2vw, 39px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.15;
}

.login-subtitle {
  margin: 11px 0 31px;
  color: var(--sfg-muted);
  font-size: 14px;
  line-height: 1.65;
}

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 21px;
  padding: 13px 14px;
  border: 1px solid rgba(216, 182, 111, .38);
  border-radius: 7px;
  color: #f0d9a7;
  background: rgba(104, 78, 36, .14);
  font-size: 13px;
  line-height: 1.5;
}

.error-mark {
  flex: 0 0 17px;
  display: grid;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  place-items: center;
  border: 1px solid rgba(240, 214, 151, .72);
  border-radius: 50%;
  color: var(--sfg-gold-light);
  font-size: 11px;
  font-weight: 700;
}

.field-group { margin-top: 20px; }

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #e6e8eb;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .025em;
}

.input-wrap { position: relative; }

.field-input {
  display: block;
  width: 100%;
  height: 51px;
  padding: 0 15px;
  border: 1px solid rgba(157, 174, 193, .2);
  border-radius: 6px;
  outline: none;
  color: var(--sfg-white);
  background: rgba(4, 16, 31, .56);
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.field-input::placeholder { color: #78879a; opacity: 1; }

.field-input:hover { border-color: rgba(216, 182, 111, .4); }

.field-input:focus {
  border-color: var(--sfg-gold);
  background: rgba(4, 16, 31, .78);
  box-shadow: 0 0 0 3px rgba(216, 182, 111, .12);
}

.field-input.has-toggle { padding-right: 83px; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 5px 3px;
  border: 0;
  border-radius: 3px;
  color: #c8b17d;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transform: translateY(-50%);
  transition: color .18s ease;
}

.password-toggle:hover { color: var(--sfg-gold-light); }
.password-toggle:focus-visible { outline: 2px solid var(--sfg-gold); outline-offset: 3px; }

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin: 19px 0 25px;
}

.remember-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #c0c8d1;
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}

.remember-checkbox {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #c3a365;
  cursor: pointer;
}

.session-note {
  color: #8190a1;
  font-size: 10px;
  letter-spacing: .025em;
  text-align: right;
}

.submit-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  overflow: hidden;
  border: 1px solid #dfc27e;
  border-radius: 6px;
  color: #172238;
  background: linear-gradient(105deg, #d7b56e, #f0d99f 52%, #d2ae64);
  box-shadow: 0 8px 22px rgba(173, 133, 62, .14), 0 1px 0 rgba(255,255,255,.28) inset;
  cursor: pointer;
  font-family: var(--sfg-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .035em;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.submit-button::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.32) 48%, transparent 73%);
  transform: translateX(-35%);
  transition: transform .45s ease, opacity .2s ease;
}

.submit-button:hover {
  box-shadow: 0 10px 27px rgba(173, 133, 62, .26), 0 1px 0 rgba(255,255,255,.36) inset;
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.submit-button:hover::before { opacity: .7; transform: translateX(35%); }
.submit-button:active { transform: translateY(0); }
.submit-button:focus-visible { outline: 2px solid var(--sfg-white); outline-offset: 4px; }
.submit-button:disabled { cursor: wait; filter: saturate(.72); transform: none; }

.button-label, .button-arrow, .button-spinner { position: relative; z-index: 1; }
.button-arrow { font-size: 17px; font-weight: 500; line-height: 1; transition: transform .2s ease; }
.submit-button:hover .button-arrow { transform: translateX(3px); }

.button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(23, 34, 56, .28);
  border-top-color: #172238;
  border-radius: 50%;
  animation: spinner-turn .75s linear infinite;
}

.submit-button.is-loading .button-arrow { display: none; }
.submit-button.is-loading .button-spinner { display: block; }

@keyframes artwork-arrive {
  from { opacity: .45; transform: scale(.99); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes card-arrive {
  from { opacity: 0; transform: translateY(11px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spinner-turn { to { transform: rotate(360deg); } }

@media (min-width: 1500px) {
  .login-shell { grid-template-columns: minmax(0, 1.25fr) minmax(480px, .75fr); }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: minmax(0, 1fr) minmax(370px, .9fr); }
  .login-side { padding: clamp(26px, 4vw, 48px); }
  .login-card { padding: 30px; }
}

@media (max-width: 700px) {
  .login-shell { display: flex; flex-direction: column; min-height: 100dvh; overflow: visible; }
  .artwork-side {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
    max-height: none;
  }
  .artwork-side::after { top: auto; right: 9%; bottom: 0; left: 9%; width: auto; height: 1px; }
  .artwork-image { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; min-width: 0; max-height: none; }
  .login-side {
    flex: 1 0 auto;
    min-height: 0;
    padding: 25px 22px 30px;
    background: linear-gradient(180deg, rgba(8, 25, 46, .66), rgba(7, 20, 38, .98));
  }
  .login-side::before { display: none; }
  .login-card { width: min(100%, 438px); padding: 27px clamp(22px, 6vw, 32px); }
  .card-kicker { margin-bottom: 20px; }
  .login-subtitle { margin-bottom: 24px; }
}

@media (max-width: 390px) {
  .login-side { padding-right: 16px; padding-left: 16px; }
  .login-card { padding-right: 20px; padding-left: 20px; }
  .form-options { align-items: flex-start; gap: 10px; }
  .session-note { max-width: 125px; }
}

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