.login-page,
.admin-page {
  min-height: 100vh;
  color: var(--text);
  cursor: auto !important;
}

.login-page {
  background:
    radial-gradient(circle at 14% 16%, rgba(255,255,255,.16), transparent 18rem),
    linear-gradient(135deg, #6d716d 0%, #5d625e 44%, #6b6f6b 100%);
}

.admin-page {
  background:
    radial-gradient(circle at 18% 18%, rgba(230,48,34,.20), transparent 28rem),
    radial-gradient(circle at 82% 12%, rgba(37,99,235,.14), transparent 30rem),
    var(--bg);
}

.login-page *,
.admin-page * {
  cursor: auto !important;
}

.login-page a,
.login-page button,
.login-page input,
.admin-page a,
.admin-page button,
.admin-page input {
  cursor: pointer !important;
}

.login-page input,
.admin-page input {
  cursor: text !important;
}

.login-shell,
.admin-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  position: relative;
  width: min(1040px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(300px, .94fr) minmax(360px, 1.06fr);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(48, 16, 12, .3);
  isolation: isolate;
}

.auth-card--register {
  min-height: 680px;
}

.auth-visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 62px);
  overflow: hidden;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 28% 34%, rgba(255,107,53,.36), transparent 19rem),
    linear-gradient(150deg, var(--red-dark) 0%, var(--red) 54%, #8f1c15 100%);
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-visual::before {
  width: min(520px, 72vw);
  aspect-ratio: 1;
  right: -285px;
  top: -175px;
  border: 48px solid rgba(255,255,255,.78);
  opacity: .78;
}

.auth-visual::after {
  width: 420px;
  aspect-ratio: 1;
  left: -190px;
  bottom: -170px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.04);
}

.auth-logo {
  position: relative;
  z-index: 1;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  color: var(--red);
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  border-radius: 50%;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(0,0,0,.16);
}

.auth-logo span {
  transform: translateY(-1px);
}

.auth-logo::after {
  content: "portfolio";
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  color: rgba(255,255,255,.78);
  font-family: var(--ff-body);
  font-size: .68rem;
  font-weight: 700;
  transform: translateX(-50%);
}

.auth-visual h2 {
  position: relative;
  z-index: 1;
  margin: 20px 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 700;
  line-height: 1.1;
}

.auth-visual p {
  position: relative;
  z-index: 1;
  max-width: 300px;
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: .9rem;
  line-height: 1.7;
}

.auth-ghost {
  position: relative;
  z-index: 1;
  min-width: 184px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 34px;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 999px;
  text-decoration: none;
  transition: background var(--t), color var(--t), transform var(--t);
}

.auth-ghost:hover {
  color: var(--red);
  background: #fff;
  transform: translateY(-1px);
}

.login-panel {
  width: 100%;
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 72px);
  background: #fff;
}

.login-kicker {
  margin-bottom: 8px;
  color: rgba(230,48,34,.62);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
}

.login-panel h1,
.admin-board h1 {
  margin-bottom: 7px;
}

.login-panel h1 {
  color: var(--red);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: lowercase;
}

.admin-board h1 {
  color: var(--text);
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.02;
}

.login-copy {
  color: #8d6d68;
  font-size: .88rem;
  line-height: 1.6;
  text-align: center;
}

.admin-board p:not(.login-kicker) {
  color: var(--text-3);
  line-height: 1.75;
}

.login-form {
  display: grid;
  gap: 13px;
  width: min(100%, 340px);
  margin: 28px auto 0;
}

.auth-card--register .login-form {
  gap: 11px;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 6px;
}

.login-form label span {
  color: #8d625b;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  min-height: 42px;
  padding: 0 18px;
  color: #4a201b;
  font: inherit;
  font-size: .86rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f4d3cd;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.password-field {
  position: relative;
  display: grid;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: rgba(116, 52, 43, .72);
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translateY(-50%);
  transition: color var(--t), background var(--t);
}

.password-toggle:hover {
  color: var(--red);
  background: rgba(230,48,34,.08);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle__eye-off,
.password-toggle.is-visible .password-toggle__eye {
  display: none;
}

.password-toggle.is-visible .password-toggle__eye-off {
  display: block;
}

.login-form input::placeholder {
  color: rgba(116, 52, 43, .72);
}

.login-form input:focus {
  border-color: var(--red);
  background: #f8e1dd;
  box-shadow: 0 0 0 4px rgba(230,48,34,.15);
}

.auth-muted-link {
  justify-self: center;
  color: #9b817c;
  font-size: .75rem;
  line-height: 1.2;
  text-decoration: none;
}

.auth-muted-link:hover {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-submit {
  width: min(184px, 100%);
  min-height: 38px;
  justify-self: center;
  margin-top: 8px;
  color: #fff;
  font: inherit;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .08em;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 14px 26px rgba(230,48,34,.28);
  transition: transform var(--t), box-shadow var(--t), opacity var(--t);
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(230,48,34,.34);
}

.login-submit:disabled {
  opacity: .55;
  cursor: not-allowed !important;
  box-shadow: none;
}

.login-form.is-ready .login-submit {
  background: linear-gradient(135deg, #18b66f, #0b8f54);
  box-shadow: 0 14px 26px rgba(18, 139, 84, .28);
}

.login-form.is-ready .login-submit:hover {
  box-shadow: 0 18px 30px rgba(18, 139, 84, .34);
}

.password-rules {
  display: grid;
  gap: 6px;
  margin-top: 0;
  padding: 10px 14px;
  border: 1px solid #efd6d1;
  border-radius: 14px;
  background: #fff8f6;
}

.password-rules p,
.password-match {
  position: relative;
  margin: 0;
  padding-left: 18px;
  color: #967b75;
  font-size: .74rem;
  line-height: 1.35;
}

.password-rules p::before,
.password-match::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d8c4bf;
}

.password-rules p.is-valid,
.password-match.is-valid {
  color: #118a52;
}

.password-rules p.is-valid::before,
.password-match.is-valid::before {
  background: #18b66f;
}

.password-rules p.is-invalid,
.password-match.is-invalid {
  color: #c6463b;
}

.password-rules p.is-invalid::before,
.password-match.is-invalid::before {
  background: #e63022;
}

.login-alert {
  width: min(100%, 340px);
  margin: 18px auto 0;
  padding: 10px 14px;
  color: #a32920;
  font-size: .82rem;
  line-height: 1.5;
  border: 1px solid rgba(230,48,34,.22);
  border-radius: 14px;
  background: rgba(230,48,34,.08);
}

.login-alert--success {
  color: #8b3b23;
  border-color: rgba(255,107,53,.28);
  background: rgba(255,107,53,.1);
}

.auth-switch {
  margin-top: 18px;
  color: #8d706a;
  font-size: .82rem;
  line-height: 1.6;
  text-align: center;
}

.auth-switch a {
  color: var(--red);
  font-weight: 900;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.login-brand {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--text);
  font-family: var(--ff-display);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.login-brand span {
  color: var(--red);
}

.admin-shell {
  align-content: start;
  place-items: stretch;
}

.admin-topbar {
  width: min(1120px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 28px;
}

.admin-topbar .login-brand {
  margin-bottom: 0;
}

.admin-logout {
  min-height: 40px;
  padding: 0 16px;
  color: var(--text);
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  cursor: pointer;
}

.admin-board {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    var(--bg-card);
  box-shadow: 0 30px 90px rgba(0,0,0,.34);
}

.admin-user {
  margin: 0 0 18px;
  color: var(--text-2);
  font-size: .95rem;
}

.admin-user strong {
  color: var(--text);
}

@media (max-width: 800px) {
  .login-shell,
  .admin-shell {
    padding: 18px;
  }

  .auth-card {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 250px;
    padding: 34px 24px;
  }

  .auth-visual::before {
    width: 360px;
    right: -230px;
    top: -185px;
    border-width: 36px;
  }

  .auth-visual::after {
    left: -240px;
    bottom: -260px;
  }

  .auth-ghost {
    margin-top: 22px;
  }

  .auth-form-panel {
    padding: 34px 22px 38px;
  }
}

@media (max-width: 460px) {
  .login-shell {
    padding: 14px;
  }

  .auth-card {
    border-radius: 14px;
  }

  .auth-logo {
    width: 60px;
    height: 60px;
    font-size: 1.1rem;
  }

  .auth-visual h2 {
    font-size: 1.35rem;
  }

  .login-panel h1 {
    font-size: 2.15rem;
  }

  .login-form input {
    min-height: 40px;
  }
}
