:root {
    --bg: #f4f6f8;
    --fg: #1b2733;
    --muted: #5c6b7a;
    --line: #d4dae0;
    --accent: #0b5d8a;
    --error: #9b1c1c;
    --notice: #0f5132;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--fg);
    background: var(--bg);
}

body.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

main {
    max-width: 60rem;
    margin: 0 auto;
    padding: 1.5rem;
}

.card {
    width: 100%;
    max-width: 26rem;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
}

h1 { margin-top: 0; font-size: 1.4rem; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.inline { display: inline; margin: 0; }

label {
    display: block;
    margin: 1rem 0 0.25rem;
    font-weight: 600;
}

label.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.5rem;
    font: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
}

textarea { font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; }

button,
.button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.1rem;
    font: inherit;
    color: #fff;
    text-decoration: none;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
}

button:hover, .button:hover { background: #094a6e; }

button.link {
    margin: 0;
    padding: 0;
    color: var(--accent);
    background: none;
    border: none;
    text-decoration: underline;
}

.buttons { display: flex; gap: 0.75rem; align-items: center; }

a { color: var(--accent); }

.muted { color: var(--muted); font-size: 0.9rem; }

.error, .notice, .warning {
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
}

.error { color: var(--error); background: #fdeaea; border: 1px solid #f2c0c0; }
.notice { color: var(--notice); background: #e6f4ec; border: 1px solid #b9dfc9; }
.warning { color: #663c00; background: #fff3cd; border: 1px solid #ffe08a; }

.qr {
    display: block;
    margin: 1rem auto;
    background: #fff;
}

.codes {
    margin: 1rem 0;
    padding: 1rem;
    list-style: none;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    background: #f0f3f6;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.codes li { padding: 0.15rem 0; }

code {
    font-family: ui-monospace, Consolas, monospace;
    word-break: break-all;
}

button.danger { background: var(--error); border-color: var(--error); }
button.danger:hover { background: #7a1616; }

.narrow { max-width: 26rem; }

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
}

th, td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}
