:root {
  --bg: #0b1020;
  --card: #121933;
  --muted: #9fb0ff;
  --text: #eaf0ff;
  --green: #31c48d;
  --red: #ff6b6b;
  --yellow: #ffd166;
  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial;
}
a { color: var(--muted); text-decoration: none; }
button { cursor: pointer; }

/* App content hidden until unlocked */
#appContent[hidden] { display: none !important; }

/* Floating toolbar once unlocked */
.toolbar {
  position: fixed; inset: 16px 16px auto auto; display: flex; gap: 8px; z-index: 30;
}
.btn { 
  border: 0; padding: 10px 14px; border-radius: 12px; background: #1a2550; color: var(--text);
  box-shadow: var(--shadow); font-weight: 600; transition: transform .12s ease, opacity .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.green { background: #123e32; color: #bff5df; }
.btn.red { background: #3e1212; color: #ffd3d3; }

/* Centered lock view */
.center { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; z-index: 50; }
.card { width: 100%; max-width: 420px; background: linear-gradient(180deg, #0e1533 0%, #0a0f25 100%); border: 1px solid #243066; border-radius: var(--radius); box-shadow: var(--shadow); }
.card h1 { margin: 0 0 10px; font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.card .sub { opacity: .75; font-size: 13px; }
.card .body { padding: 22px; }

.field { display: grid; gap: 6px; margin: 12px 0; }
.field label { font-size: 12px; opacity: .8; }
.field input { 
  width: 100%; padding: 12px 14px; background: #0c142d; border: 1px solid #253066; border-radius: 12px; color: var(--text);
  outline: none; font-size: 14px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .15s ease, border-color .15s ease;
}
.field input:focus { border-color: #4a64ff; box-shadow: inset 0 0 0 1px #4a64ff; }

.actions { display: flex; gap: 10px; margin-top: 14px; }
.actions .btn.primary { background: #243066; color: #dbe4ff; }

.muted { color: var(--muted); font-size: 12px; }
.hint { font-size: 12px; opacity: .8; }

.status { margin-top: 8px; font-size: 13px; }
.ok { color: var(--green); }
.bad { color: var(--red); }

/* Modal (change password) */
dialog { 
  border: 1px solid #243066; border-radius: var(--radius); background: #0a0f25; color: var(--text); box-shadow: var(--shadow);
  max-width: 520px; width: min(92vw, 520px); padding: 0;
}
dialog::backdrop { background: rgba(2,4,12,.6); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid #1c244d; display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 18px 22px; }
.modal-actions { padding: 18px 22px; border-top: 1px solid #1c244d; display: flex; gap: 10px; justify-content: flex-end; }

.placeholder { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.placeholder h2 { margin: 0 0 8px; font-size: 28px; }
.placeholder p { opacity: .8; }

.tiny { font-size: 11px; opacity: .7; }
.code { font-family: ui-monospace, Menlo, Monaco, Consolas, monospace; }