:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #182033;
  --muted: #647084;
  --line: #d9e2ef;
  --blue: #1f66cc;
  --blue-dark: #174d9b;
  --green: #147a4d;
  --red: #b42318;
  --amber: #946200;
  --shadow: 0 12px 32px rgba(24, 32, 51, 0.08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand-stack { display: flex; align-items: center; gap: 18px; }
.brand-stack.centered { flex-direction: column; text-align: center; }
.brand-logo { max-width: 220px; height: auto; }
h1 { margin: 0; font-size: 24px; }
h2 { margin: 0 0 8px; font-size: 20px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.banner { margin: 22px auto; max-width: 1180px; background: #fff8e8; border: 1px solid #f4d48a; border-radius: 14px; padding: 14px 18px; display: flex; gap: 12px; flex-wrap: wrap; color: #513800; }
.container { max-width: 1180px; margin: 0 auto 28px; padding: 0 18px; }
.grid-two { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; align-items: start; }
.panel, .login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.result-panel { margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.form-grid.single { grid-template-columns: 1fr; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: 14px; }
label.check { flex-direction: row; align-items: center; font-weight: 500; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; background: white; }
input:focus, select:focus { outline: 2px solid rgba(31,102,204,0.2); border-color: var(--blue); }
button, .open-session { border: 0; border-radius: 10px; padding: 11px 14px; font-weight: 750; cursor: pointer; text-decoration: none; text-align: center; display: inline-block; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--blue-dark); }
.secondary { background: #e8f0ff; color: var(--blue-dark); }
.danger { background: #fee4e2; color: var(--red); }
.ghost { background: transparent; color: var(--blue-dark); border: 1px solid var(--line); }
.span { grid-column: 1 / -1; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.alert.error { background: #fee4e2; color: var(--red); border: 1px solid #fecdca; }
.alert.info { background: #e8f0ff; color: var(--blue-dark); border: 1px solid #bcd2ff; }
.status-line { font-weight: 700; margin: 10px 0; }
.status-line.ok { color: var(--green); }
.status-line.bad { color: var(--red); }
.open-session { background: var(--green); color: white; margin: 8px 0 12px; }
pre { background: #0f172a; color: #dbeafe; border-radius: 14px; padding: 16px; overflow-x: auto; min-height: 120px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 22px; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); }
@media (max-width: 880px) { .grid-two, .form-grid { grid-template-columns: 1fr; } .topbar { align-items: flex-start; flex-direction: column; } .brand-stack { align-items: flex-start; flex-direction: column; } }

/* v0.5 UI improvements */
.checkbox-list { display: grid; gap: 10px; margin: 6px 0 4px; }
.check-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; font-weight: 650; }
.check-row input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--blue); }
.subtle-check { background: #fbfdff; }
.subtle-check span { display: flex; flex-direction: column; gap: 3px; }
.subtle-check small { color: var(--muted); font-weight: 500; line-height: 1.35; }
.human-result { background: #f8fbff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 12px 0; }
.human-result h3, .rdp-card h3 { margin: 0 0 10px; font-size: 16px; }
.human-result dl { margin: 0; display: grid; grid-template-columns: minmax(170px, 0.35fr) 1fr; gap: 8px 14px; }
.human-result dt { color: var(--muted); font-weight: 700; }
.human-result dd { margin: 0; overflow-wrap: anywhere; }
.rdp-card { border: 1px solid #b7d6c2; background: #f0fff5; border-radius: 14px; padding: 14px; margin: 12px 0; }
.credential-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff8e8; border: 1px solid #f4d48a; color: #513800; font-size: 13px; line-height: 1.45; }
.credential-note code { background: rgba(255,255,255,0.8); border: 1px solid #f4d48a; border-radius: 6px; padding: 1px 5px; }
.raw-result { margin-top: 14px; }
.raw-result summary { cursor: pointer; color: var(--blue-dark); font-weight: 800; margin-bottom: 10px; }
.raw-result[open] summary { margin-bottom: 12px; }
@media (max-width: 640px) { .human-result dl { grid-template-columns: 1fr; } }
