:root {
    --ink: #1d2327;
    --muted: #5f6b73;
    --line: #d9dee2;
    --accent: #1f5fbf;
    --error: #b3261e;
    --ok: #1b6e3c;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #f4f6f8;
}

body { margin: 0; }

/* The hidden attribute wins over every display rule below (input is block). */
[hidden] { display: none !important; }
main { max-width: 34rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1 { font-size: 1.6rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }

.top {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.75rem 1rem; background: #fff; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; color: var(--ink); text-decoration: none; margin-right: auto; }
.who { color: var(--muted); font-size: 0.9rem; }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: 0.5rem;
    padding: 1.25rem; margin-bottom: 1rem;
}
label { display: block; margin-bottom: 0.9rem; font-weight: 500; }
input, select {
    display: block; width: 100%; box-sizing: border-box; margin-top: 0.3rem;
    padding: 0.55rem 0.65rem; font: inherit; border: 1px solid var(--line); border-radius: 0.35rem;
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
button {
    font: inherit; padding: 0.55rem 1rem; border-radius: 0.35rem; cursor: pointer;
    border: 1px solid var(--accent); background: var(--accent); color: #fff;
}
button:disabled { opacity: 0.6; cursor: progress; }
button.secondary { background: #fff; color: var(--accent); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; }
button.danger { border-color: var(--error); background: var(--error); }
a.button {
    display: inline-block; padding: 0.55rem 1rem; border-radius: 0.35rem;
    border: 1px solid var(--accent); background: var(--accent); color: #fff; text-decoration: none;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* The eye inside a password field (app.js). */
.password-field { position: relative; display: block; margin-top: 0.3rem; }
.password-field input { margin-top: 0; padding-right: 2.75rem; }
button.reveal {
    position: absolute; top: 50%; right: 0.3rem; transform: translateY(-50%);
    display: flex; padding: 0.35rem; border: 0; border-radius: 0.3rem;
    background: none; color: var(--muted);
}
button.reveal:hover { color: var(--ink); }
.reveal svg {
    width: 1.25rem; height: 1.25rem;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
form.inline { display: inline; }

.or { color: var(--muted); margin: 1rem 0 0.75rem; }
.hint { color: var(--muted); font-size: 0.9rem; }
.error { color: var(--error); }
.links { display: flex; gap: 1rem; }

.flash { padding: 0.75rem 1rem; border-radius: 0.35rem; background: #e8f1fb; border: 1px solid #c3d8f1; }
.notice { border-color: #c3d8f1; background: #f5f9fe; }
.flash-error { background: #fbeaea; border-color: #f0c4c1; color: var(--error); }

.qr { display: block; width: 12rem; height: 12rem; margin: 0.5rem 0; }
.codes pre {
    margin: 0 0 1rem; padding: 0.75rem 1rem; line-height: 1.7;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    background: #f4f6f8; border-radius: 0.35rem; overflow-x: auto;
}
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.4rem 0.5rem 0.4rem 0; border-bottom: 1px solid var(--line); }
