:root { color-scheme: light; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f4f6fa; color: #172033; }
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(1180px, calc(100% - 32px)); margin: 36px auto 60px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 4px; }
h2 { font-size: 18px; margin: 0; }
header, .section-title, nav, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header { margin-bottom: 22px; }
.card { background: #fff; border: 1px solid #e3e8f1; border-radius: 16px; padding: 22px; box-shadow: 0 8px 30px rgba(29, 42, 68, .06); margin-bottom: 20px; }
.login-card { width: min(420px, 100%); margin: 10vh auto; }
.muted, .hint { color: #6d778a; }
.hint { font-size: 13px; }
label { display: grid; gap: 7px; margin: 16px 0; font-size: 14px; font-weight: 600; }
input, textarea { width: 100%; padding: 11px 12px; border: 1px solid #cdd5e2; border-radius: 9px; font: inherit; resize: vertical; }
input:focus, textarea:focus { outline: 3px solid #dce8ff; border-color: #3977e8; }
button { border: 0; border-radius: 9px; padding: 10px 16px; color: white; background: #2867da; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(.96); }
button:disabled { opacity: .5; cursor: wait; }
button.secondary { background: #e8edf5; color: #273249; }
button.danger { background: #c83f4b; }
button.ghost { background: transparent; color: #ad2632; }
.error { color: #c32635; min-height: 20px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stats article { background: #182741; color: #fff; padding: 20px; border-radius: 14px; display: grid; gap: 4px; }
.stats strong { font-size: 30px; }
.stats span { color: #b9c6db; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; text-align: left; border-bottom: 1px solid #edf0f5; white-space: nowrap; }
th { color: #667186; font-size: 13px; }
td small { color: #7b8596; display: block; margin-top: 3px; }
.badge { display: inline-block; border-radius: 99px; padding: 4px 9px; font-size: 12px; font-weight: 700; background: #e7ebf2; color: #4d596c; }
.badge.online, .badge.unlocked { background: #dff7e8; color: #187642; }
.badge.locked { background: #fee3e5; color: #a41f2c; }
.row-actions { display: flex; gap: 7px; }
.row-actions button { padding: 7px 10px; font-size: 12px; }
.empty { text-align: center; padding: 30px; color: #7b8596; }
.audit-list { margin-top: 14px; display: grid; gap: 8px; }
.audit-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf0f5; font-size: 14px; }
.audit-item time { color: #7b8596; white-space: nowrap; }
dialog { width: min(560px, calc(100% - 30px)); border: 0; border-radius: 16px; padding: 24px; box-shadow: 0 30px 80px rgba(16, 24, 40, .25); }
dialog::backdrop { background: rgba(10, 18, 32, .5); }
.dialog-actions { justify-content: flex-end; margin-top: 22px; }
code { display: block; padding: 18px; border-radius: 10px; background: #111c30; color: #9fffc4; word-break: break-all; font-size: 16px; }
#toast { position: fixed; right: 24px; bottom: 24px; background: #172033; color: #fff; padding: 12px 16px; border-radius: 10px; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
#toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 720px) { main { margin-top: 18px; } .stats { grid-template-columns: 1fr; } header { align-items: flex-start; } .card { padding: 16px; } }

