/* Login owns its layout; shared application chrome is not needed here. */
body.theme-page-login {
  --login-bg: #101e30; --login-card: #192c42; --login-text: #eef3fa;
  --login-muted: #b6c5d6; --login-border: #354a62; --login-input: #132337;
  --login-accent: #e0bf77; --login-button: #d5b56e; --login-button-text: #192b43;
  --login-shadow: 0 3px 8px rgba(0,0,0,.12), 0 22px 60px rgba(0,0,0,.24);
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; height: auto;
  background: radial-gradient(ellipse at 15% 5%, rgba(103,139,171,.12), transparent 50%), radial-gradient(ellipse at 85% 75%, rgba(201,163,77,.07), transparent 45%), var(--login-bg) !important;
  color: var(--login-text) !important;
}
html[data-theme="light"] body.theme-page-login {
  --login-bg: #f2f5f9; --login-card: #fcfdff; --login-text: #172b46;
  --login-muted: #53657c; --login-border: #dbe3ed; --login-input: #fff;
  --login-accent: #85601f; --login-button: #284b6a; --login-button-text: #fff;
  --login-shadow: 0 3px 8px rgba(23,43,70,.04), 0 22px 60px rgba(23,43,70,.10);
}
.theme-page-login::before, .theme-page-login::after { display: none !important; }
.login-header {
  width: min(100%, 1184px); margin: 0 auto; padding: 24px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.login-brand { display: flex; align-items: center; gap: 12px; color: var(--login-text); text-decoration: none; min-width: 0; }
.login-brand img { flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(23,43,70,.12)); }
.login-brand strong { display: block; font-size: 19px; letter-spacing: 1.2px; line-height: 1.3; }
.login-brand small { display: block; color: var(--login-muted); font-size: 11px; margin-top: 3px; }
.login-container { flex: 1; display: grid; place-items: center; width: 100%; padding: 32px 24px 48px; }
body.theme-page-login .login-card {
  position: relative; width: min(100%, 560px); padding: 40px 44px; border: 1px solid var(--login-border);
  border-top: 3px solid #c9a34d; border-radius: 24px;
  background: var(--login-card) !important; box-shadow: var(--login-shadow) !important;
}
.login-card-heading { margin-bottom: 32px; text-align: center; }
.login-brand-mark {
  position: relative; isolation: isolate;
  display: grid; place-items: center; width: 120px; height: 112px; margin: 0 auto 10px;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
.login-brand-mark::before {
  content: ""; position: absolute; inset: -18px -32px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse, rgba(218,192,133,.13) 0%, rgba(218,192,133,.06) 32%, rgba(218,192,133,.02) 51%, transparent 72%);
  filter: blur(7px);
}
.login-brand-mark img {
  display: block; width: 108px; height: 108px; object-fit: contain;
  filter: brightness(1.12) drop-shadow(0 0 .7px rgba(226,236,249,.55));
}
html[data-theme="light"] .login-brand-mark img { filter: drop-shadow(0 2px 3px rgba(23,43,70,.10)); }
html[data-theme="light"] .login-brand-mark::before {
  background: radial-gradient(ellipse, rgba(220,195,140,.25) 0%, rgba(226,210,173,.12) 32%, transparent 70%);
}
.login-card-heading h1 { font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -.6px; margin: 0 0 12px; color: var(--login-text); }
.login-card-heading p { color: var(--login-muted); font-size: 16px; line-height: 1.6; margin: 0; }
.login-form { display: grid; gap: 24px; }
.login-field label { display: block; color: var(--login-text); font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.login-input-wrap { position: relative; }
.login-input-wrap > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--login-muted); font-size: 14px; pointer-events: none; }
body.theme-page-login .login-input-wrap input {
  display: block; width: 100%; height: 58px; padding: 14px 50px 14px 44px;
  background: var(--login-input) !important; color: var(--login-text) !important;
  border: 1px solid var(--login-border) !important; border-radius: 10px; font: inherit; font-size: 16px;
  box-shadow: 0 1px 2px rgba(23,43,70,.03); transition: border-color .15s ease, box-shadow .15s ease;
}
body.theme-page-login .login-input-wrap input::placeholder { color: var(--login-muted) !important; opacity: .85; }
body.theme-page-login .login-input-wrap input:focus { outline: none; border-color: #839db9 !important; box-shadow: 0 0 0 3px rgba(91,129,170,.16) !important; }
.login-password-toggle { position: absolute; right: 4px; top: 7px; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--login-muted); cursor: pointer; }
.login-password-toggle:hover { color: var(--login-accent); }
.login-password-toggle[hidden] { display: none; }
body.theme-page-login .login-submit {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; margin-top: 4px;
  padding: 12px 20px; background: var(--login-button); color: var(--login-button-text);
  border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 17px; font-weight: 650; cursor: pointer;
  box-shadow: 0 3px 6px rgba(23,43,70,.10), 0 7px 16px rgba(23,43,70,.08); transition: filter .15s ease, box-shadow .15s ease;
}
.login-submit:hover { filter: brightness(1.07); box-shadow: 0 5px 18px rgba(23,43,70,.19); }
.theme-page-login :is(button,a):focus-visible { outline: 3px solid #839db9; outline-offset: 3px; }
.login-help { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--login-border); color: var(--login-muted); text-align: center; font-size: 13px; line-height: 1.6; }
.login-footer { padding: 0 20px 24px; text-align: center; color: var(--login-muted); font-size: 11px; }
.login-footer span { margin: 0 7px; color: var(--login-accent); }
.login-messages { display: grid; gap: 8px; margin-bottom: 22px; }
.login-notice { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid #48627c; border-radius: 9px; background: #223951; color: #deebf9; font-size: 14px; line-height: 1.5; }
.login-notice i { margin-top: 3px; flex-shrink: 0; }
.login-notice-error { background: #402830; color: #ffd1d5; border-color: #70414c; }
.login-notice-success { background: #193e35; color: #bcebd8; border-color: #3b6f5b; }
html[data-theme="light"] .login-notice { background: #edf3fa; border-color: #d4e0ee; color: #365570; }
html[data-theme="light"] .login-notice-error { background: #fff1f2; border-color: #f0ccd0; color: #9e1f2c; }
html[data-theme="light"] .login-notice-success { background: #edf8f2; border-color: #c4e4d2; color: #135c3f; }
@media (max-width: 480px) {
  .login-header { padding: 20px; gap: 12px; }
  .login-brand { gap: 9px; }
  .login-brand strong { font-size: 16px; letter-spacing: .8px; }
  .login-brand img { width: 36px; height: 36px; }
  .login-brand small { font-size: 10px; }
  .login-container { align-content: start; padding: 20px 16px 32px; }
  body.theme-page-login .login-card { padding: 30px 24px; border-radius: 20px; }
  .login-card-heading h1 { font-size: 32px; }
  .login-brand-mark { width: 108px; height: 100px; margin-bottom: 8px; }
  .login-brand-mark img { width: 96px; height: 96px; }
}
@media (max-height: 650px) { .login-container { align-content: start; padding-top: 16px; } }
@media (prefers-reduced-motion: reduce) { .theme-page-login * { transition: none !important; } }
