* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
button, input { font: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
[hidden] { display: none !important; }

.app-header {
    min-height: 88px;
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--header);
    border-bottom: 1px solid var(--divider);
}
.brand { display: inline-flex; align-items: center; gap: 24px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 126px; height: auto; filter: invert(.88) hue-rotate(180deg); }
.brand-divider { width: 1px; height: 28px; background: var(--border); }
.brand-name { font-size: 14px; font-weight: 600; }
.app-label { color: var(--muted); font-size: 12px; }

.login-main { flex: 1; display: grid; place-items: center; padding: 48px 24px; }
.login-workspace { width: 100%; max-width: 420px; }
.login-card { overflow: hidden; padding: 32px 32px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 4px 6px #0a0e1314, 0 16px 40px #0a0e1329; }
.card-heading { margin-bottom: 28px; }
.eyebrow { margin: 0 0 12px; color: var(--link); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
h1 { margin: 0 0 8px; font-size: 27px; font-weight: 650; letter-spacing: -.7px; line-height: 1.25; }
.card-heading > p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.form-field { margin-bottom: 22px; }
label { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-label-row a { font-size: 12px; font-weight: 500; }
input { display: block; width: 100%; min-height: 46px; margin-top: 9px; padding: 11px 13px; border: 1px solid var(--field-border); border-radius: 7px; color: var(--text); background: var(--field); font-size: 14px; transition: background-color .15s, border-color .15s, box-shadow .15s; }
input::placeholder { color: var(--field-placeholder); opacity: 1; }
input:hover { border-color: #94a8c2; }
input:focus { outline: none; background: #3a4b62; border-color: var(--focus); box-shadow: 0 0 0 3px #89aff02e; }
input[aria-invalid="true"] { border-color: #d88e8e; }
input:autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 1000px var(--field) inset; caret-color: var(--text); }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; top: 2px; right: 3px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--field-placeholder); cursor: pointer; }
.password-toggle:hover { background: #425571; color: var(--text); }
.eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .eye-slash { display: block; }
.login-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; margin: 4px 0 28px; border: 1px solid #4d79b5; border-radius: 7px; color: #f4f7fc; background: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 3px #0e142026; transition: background .15s; }
.login-submit:hover { background: #3e70b2; }
.login-submit:active { background: #30598f; }
.login-submit svg { width: 17px; height: 17px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-footer { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 -32px; padding: 17px 20px; color: var(--muted); background: #222a34; border-top: 1px solid var(--divider); font-size: 11px; }
.card-footer svg { width: 14px; height: 14px; }
.workspace-caption { margin: 22px 0 0; color: var(--subtle); text-align: center; font-size: 12px; }
.login-alert { margin-bottom: 22px; padding: 12px 14px; border: 1px solid #704b53; border-radius: 7px; background: #3a2d36; color: #f0b3b3; font-size: 13px; line-height: 1.5; }
.field-error { margin: 7px 0 0; color: #f0b3b3; font-size: 12px; line-height: 1.5; }
.app-footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px 40px; color: var(--subtle); border-top: 1px solid var(--divider); font-size: 11px; }

@media (max-width: 540px) {
    .app-header { min-height: 76px; padding: 14px 20px; gap: 12px; }
    .brand { gap: 14px; }
    .brand img { width: 108px; }
    .brand-name { font-size: 12px; }
    .app-label { display: none; }
    .login-main { padding: 32px 20px; }
    .login-card { padding: 26px 24px 0; border-radius: 12px; }
    .card-footer { margin: 0 -24px; }
    .app-footer { padding: 16px 20px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
