html,body{ height:100%; }
.login-screen{
    background:var(--win-desktop);
    display:flex; align-items:center; justify-content:center;
    padding:24px;
}
.login-shell{ width:min(480px, 100%); }
.login-dialog{ max-width:480px; margin:0 auto; background:var(--win-face); border-radius:var(--win-radius); border:1px solid var(--win-border-light); box-shadow:0 16px 48px rgba(0,0,0,.6), 0 0 0 1px rgba(167,139,250,.08); }
.login-body{ padding:20px 24px 12px; }
.login-logo{
    display:flex; align-items:center; gap:14px;
    margin-bottom:20px; padding-bottom:16px;
    border-bottom:1px solid var(--win-border-light);
}
.login-logo-mark{
    width:48px; height:48px;
    display:grid; place-items:center;
    font-size:22px; font-weight:400; color:#fff;
    background:#a78bfa;
    border-radius:var(--win-radius);
    border:none;
    box-shadow:0 4px 12px rgba(167,139,250,.4);
}
.login-logo-text{ display:flex; flex-direction:column; gap:2px; }
.login-logo-text strong{ font-size:16px; color:var(--win-text); font-weight:400; }
.login-form{ margin-top:12px; display:flex; flex-direction:column; gap:12px; }
.field-row{ display:flex; align-items:center; gap:10px; }
.field-row > span{ width:52px; flex:0 0 52px; text-align:left; color:var(--win-text-muted); font-size:14px; }
.field-row > input,.field-row > select{ flex:1 1 auto; }
.field-row-buttons{ justify-content:flex-end; gap:8px; }
.field-row-buttons > span{ display:none; }
.helper-row{ font-size:12px; color:var(--win-text-muted); }

.win95-link-button{
    display:inline-flex; align-items:center; justify-content:center;
    min-height:30px; padding:0 14px; text-decoration:none;
    color:var(--win-text); background:var(--win-face);
    border:1px solid var(--win-border-light); border-radius:var(--win-radius);
}
.win95-link-button:hover{ border-color:var(--win-accent); text-decoration:none; }

/* Register */
.register-dialog{ max-width:640px; border-radius:var(--win-radius); }
.register-form .agreement-box{ max-height:100px; overflow:auto; padding:12px; background:var(--win-input-bg); border-radius:var(--win-radius); }
.agreement-content{ white-space:pre-wrap; line-height:1.6; color:var(--win-text); }
.checkbox-row{ display:flex; align-items:flex-start; gap:8px; }
.private-key-panel{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
}
.private-key-chip{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 12px;
    border:1px solid var(--win-border-light);
    border-radius:var(--win-radius);
    background:var(--win-input-bg);
}
.private-key-index{
    width:22px;
    height:22px;
    display:grid;
    place-items:center;
    border-radius:999px;
    background:rgba(167,139,250,.1);
    color:var(--win-text-muted);
    font-size:11px;
    flex:0 0 22px;
}
.private-key-chip strong{
    font-size:15px;
    font-weight:400;
    color:var(--win-text);
}

/* Setup security question groups */
.setup-sq-group select{ width:100%; }

@media (max-width: 768px){
    .login-screen{ padding:24px; align-items:center; }
    .login-shell{ width:min(calc(90% + 40px), 100%); }
    .login-dialog,.register-dialog{ max-width:none; min-height:unset; border-width:1px; border-radius:var(--win-radius); }
    .login-body{ padding:20px 24px 12px; }
    .register-form .agreement-box{ max-height:18dvh; }
    .field-row > span{ width:48px; flex:0 0 48px; font-size:13px; }
    .private-key-panel{ grid-template-columns:1fr; }
    .login-footer{ margin:0 6px 6px; }
}

.login-footer{
    text-align:center; padding:9px 8px 4px; font-size:11px; color:var(--win-text-muted);
    border-top:1px solid var(--win-border-light); background:var(--win-face);
    margin:0 6px 6px; border-radius:var(--win-radius);
}
