* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { min-height: 100dvh; background: #0D1117; font-family: var(--font-base); }

:root {
  --auth-ink: #0D1117;
  --auth-sub: #4A5568;
  --auth-border: #D1D9E6;
  --auth-stripe: #E22A48;
  --auth-primary: #1E3A8A;
  --auth-primary-dk: #1E40AF;
  --accent: var(--auth-primary);
}

.screen { min-height: 100dvh; display: flex; }
.left-panel { width: 460px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; padding: 56px 52px; background: var(--auth-ink); }
.left-panel::before,
.left-panel::after { content: ""; position: absolute; border-radius: 4px; pointer-events: none; transform: rotate(20deg); background: var(--auth-stripe); }
.left-panel::before { top: -80px; right: -100px; width: 320px; height: 600px; opacity: 0.10; }
.left-panel::after { bottom: -60px; left: -80px; width: 260px; height: 420px; opacity: 0.06; }
.brand-block, .powered { position: relative; z-index: 1; }
.brand-name { color: #FFFFFF; font-family: var(--font-condensed); font-size: 52px; font-weight: 800; letter-spacing: 4px; line-height: 1; }
.brand-name span { color: var(--auth-stripe); }
.brand-sub { margin-top: 8px; color: rgba(255,255,255,0.56); font-size: 13px; font-weight: 500; letter-spacing: 2.5px; text-transform: uppercase; }
.brand-divider { width: 44px; height: 4px; margin: 28px 0; border-radius: 2px; background: var(--auth-stripe); }
.brand-desc { color: rgba(255,255,255,0.68); font-size: 16px; line-height: 1.75; }
.brand-route { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 16px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(255,255,255,0.06); }
.route-badge { padding: 4px 10px; border-radius: 5px; background: var(--auth-stripe); color: #FFFFFF; font-family: var(--font-condensed); font-size: 15px; font-weight: 800; letter-spacing: 1px; }
.route-desc { color: rgba(255,255,255,0.72); font-size: 13px; font-weight: 500; }
.powered { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.42); font-size: 12px; font-weight: 500; letter-spacing: 0.5px; }
.powered strong { color: rgba(255,255,255,0.72); font-weight: 700; }
.home-back { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.15s, background 0.15s, border-color 0.15s; }
.home-back:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
.home-back:focus-visible { outline: 2px solid var(--auth-stripe); outline-offset: 2px; }
.home-back svg { width: 16px; height: 16px; }
.home-back svg * { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

.right-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 72px; background: #F8FAFC; }
.login-box { width: 100%; max-width: 480px; }
.login-box-wide { max-width: 520px; }
.login-greeting { margin-bottom: 6px; color: var(--auth-ink); font-size: 36px; font-weight: 800; line-height: 1.1; }
.login-sub { margin-bottom: 28px; color: var(--auth-sub); font-size: 15px; font-weight: 400; line-height: 1.5; }
.auth-message { --interaction-message-gap: 0 0 22px; font-weight: 400; }
.auth-expired { position: relative; padding-right: 44px; }
.auth-expired[hidden] { display: none; }
.auth-expired-close { position: absolute; top: 8px; right: 8px; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.auth-expired-close:hover { background: rgba(194,65,12,0.1); }
.btn { min-height: 54px; font-size: 20px; }

.auth-form { width: 100%; }
.fields-stack { display: grid; gap: 16px; margin-bottom: 16px; }
.auth-field { margin-bottom: 20px; }
.auth-field-compact { margin-bottom: 16px; }
.fields-stack .auth-field { margin-bottom: 0; }
.auth-field .form-label { margin-bottom: 7px; color: var(--auth-ink); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.auth-input-wrap { position: relative; }
.auth-input-icon { position: absolute; left: 14px; top: 50%; z-index: 1; width: 18px; height: 18px; color: #94A3B8; pointer-events: none; transform: translateY(-50%); }
.auth-input-icon * { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.auth-input.form-input { min-height: 54px; border-width: 2px; border-radius: 10px; padding: 0 44px; font-size: 15px; font-weight: 400; }
.auth-input::placeholder { color: #64748B; font-weight: 400; opacity: 1; }
.auth-password.ivia-password-field { position: relative; max-width: none; min-height: 54px; grid-template-columns: minmax(0, 1fr) 44px; border-width: 2px; border-radius: 10px; }
.auth-password .auth-input { min-height: 50px; padding-left: 44px; border: 0; color: var(--auth-ink); font-size: 15px; font-weight: 400; }
.auth-password .auth-input::placeholder { color: #64748B; font-weight: 400; opacity: 1; }
.auth-password .ivia-password-toggle { justify-self: center; }
.forgot-row { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.forgot-link { color: var(--auth-primary); font-size: 13px; font-weight: 600; text-decoration: none; }
.forgot-link:hover { color: var(--auth-primary-dk); text-decoration: underline; text-underline-offset: 3px; }
.btn-login { width: 100%; }
.btn-login-spaced { margin-top: 8px; }
.back-row { margin-top: 20px; font-size: 14px; text-align: center; }
.back-row-tight { margin-top: 0; }
.back-link { color: var(--auth-primary); font-weight: 600; text-decoration: none; }
.back-link:hover { color: var(--auth-primary-dk); text-decoration: underline; text-underline-offset: 3px; }
.support { margin-top: 20px; color: var(--auth-sub); font-size: 13px; line-height: 1.6; text-align: center; }
.support a { color: var(--auth-ink); font-weight: 700; text-decoration: none; }
.support a:hover { text-decoration: underline; }
.hidden { display: none !important; }

@media (max-width: 899px) {
  .screen { flex-direction: column; }
  .left-panel { width: 100%; min-height: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
  .left-panel::before { top: -40px; right: -60px; width: 180px; height: 300px; }
  .left-panel::after { display: none; }
  .brand-block { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .brand-name { font-size: 32px; letter-spacing: 3px; }
  .brand-sub, .brand-divider, .brand-desc { display: none; }
  .brand-route { margin-top: 0; padding: 6px 10px; }
  .route-badge { font-size: 12px; padding: 3px 8px; }
  .route-desc { font-size: 12px; }
  .powered { gap: 0; }
  .powered-text { display: none; }
  .right-panel { padding: 32px 24px 48px; }
  .login-box { max-width: 520px; }
}
@media (max-width: 480px) {
  .left-panel { flex-wrap: wrap; padding: 16px 20px; }
  .brand-name { font-size: 26px; letter-spacing: 2px; }
  .brand-route { display: none; }
  .right-panel { padding: 24px 16px 40px; }
  .login-greeting { font-size: 28px; }
  .auth-input.form-input { min-height: 50px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
