:root { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #eaf0ff; background: #0b1020; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #172448, #0b1020 55%); }
main { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0; }
header, .toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
h1, h2, h3 { margin-top: 0; }
.card { background: rgba(21, 30, 57, .92); border: 1px solid #344365; border-radius: 14px; padding: 1.25rem; box-shadow: 0 12px 35px rgba(0,0,0,.22); }
.auth-card, #login-card { max-width: 540px; margin: 4rem auto; }
label { display: grid; gap: .4rem; margin: 1rem 0; color: #cbd5ec; }
input, select, button, .button-link { font: inherit; border-radius: 8px; padding: .75rem; }
input, select { width: 100%; height: 2.95rem; border: 1px solid #46567b; background: #0d1428; color: inherit; }
button, .button-link { border: 0; background: #5d7cff; color: white; cursor: pointer; font-weight: 650; }
.button-link { display: inline-block; text-decoration: none; margin-top: .7rem; }
.device-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.device-heading h3 { margin: 0; }
.connection-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }
.connection-actions .button-link { margin-top: 0; }
.connection-actions button { margin-top: 0; }
.connection-actions select { min-width: 15rem; margin: 0; }
.credential-toggle { margin-top: .8rem; }
.credential-form { margin-top: .8rem; padding: .8rem; border: 1px solid #344365; border-radius: 10px; }
.credential-form[hidden] { display: none; }
.credential-form label { margin: .6rem 0; }
button:disabled { cursor: wait; opacity: .65; }
.secondary { background: #334267; }
.danger { background: #9d3044; margin-top: .7rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.enrollment { margin-bottom: 1rem; }
.enrollment form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 1rem; align-items: end; }
dl { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem; font-size: .92rem; }
dt { color: #9fb0d4; }
dd { margin: 0; text-align: right; }
.notice { padding: .8rem 1rem; margin: 0 0 1rem; border-left: 4px solid #f4b942; background: #2d2717; }
.online { color: #5be39c; }.offline { color: #ff8393; }
.muted { color: #9fb0d4; font-size: .9rem; }
#panel-message { color: #ffcc70; min-height: 1.4rem; }
#login-message { color: #ff8393; min-height: 1.4rem; }
#setup-message { color: #ff8393; min-height: 1.4rem; }
#totp-confirm-message { color: #ff8393; min-height: 1.4rem; }
code { display: block; overflow-wrap: anywhere; margin: .8rem 0; padding: .7rem; background: #0d1428; color: #eaf0ff; border-radius: 8px; user-select: all; }
@media (prefers-color-scheme: light) {
  :root { color: #15203a; background: #edf2ff; }
  body { background: linear-gradient(#edf2ff, #fff); }
  .card { background: white; border-color: #d5def0; }
  input, select { background: white; color: #15203a; }
}
