:root {
    --ink: #1f2933;
    --muted: #52606d;
    --line: #d9e2ec;
    --bg: #f5f7fa;
    --card: #ffffff;
    --brand: #0b5c8a;
    --brand-dark: #08466a;
    --ok: #2f8f5b;
    --warn-bg: #fff6e0;
    --warn-line: #e8b339;
    --err-bg: #fdecec;
    --err-line: #d64545;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.topbar { background: var(--brand); color: #fff; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 56px; }
.brand { font-size: 18px; letter-spacing: .2px; }
.who { font-size: 14px; opacity: .9; }

main.wrap {
    padding: 32px 16px 16px;
}

button, input {
    font-family: inherit;
}

h1 { font-size: 26px; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 0 0 12px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 28px;
}
.narrow { max-width: 440px; margin: 0 auto; }
.lead { color: var(--muted); margin: 0 0 20px; }

label { display: block; font-weight: 600; margin: 16px 0 6px; }
input {
    width: 100%;
    padding: 11px 12px;
    font-size: 16px;
    border: 1px solid #9aa5b1;
    border-radius: 6px;
}
input:focus { outline: 3px solid #9fcbe6; border-color: var(--brand); }
input.code { font-size: 26px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }

button, .btn {
    display: inline-block;
    margin-top: 20px;
    padding: 11px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
button:hover, .btn:hover { background: var(--brand-dark); }
form > button[type=submit]:not(.link) { width: 100%; }
.btn.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.secondary:hover { background: #eef5fa; }
button.link {
    background: none; color: var(--brand); padding: 0; margin: 0;
    font-weight: 600; text-decoration: underline; width: auto;
}

.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.inline { margin-top: 18px; }
.inline .hint { margin-right: 4px; }

.alert { background: var(--err-bg); border-left: 4px solid var(--err-line); padding: 10px 14px; border-radius: 4px; margin-bottom: 8px; }
.note { background: #eef5fa; border-left: 4px solid var(--brand); padding: 10px 14px; border-radius: 4px; margin-bottom: 8px; }

.status { margin-bottom: 24px; }
.open { margin: 0; }
.dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
    background: var(--ok); margin-right: 6px; vertical-align: 1px;
}

.banner {
    background: var(--warn-bg);
    border: 1px solid var(--warn-line);
    border-left-width: 6px;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 24px;
}
.banner p { margin: 6px 0 0; }

.apps ul { list-style: none; margin: 0; padding: 0; }
.tile {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: var(--card); border: 1px solid var(--line); border-radius: 8px;
    padding: 14px 18px; margin-bottom: 10px;
}
.tile.attention { border-color: var(--warn-line); box-shadow: inset 4px 0 0 var(--warn-line); }
.tile .btn { margin-top: 0; }
.tile-main { display: flex; flex-direction: column; min-width: 0; }
.tile-title { font-weight: 600; font-size: 17px; }
.tile-status { color: var(--muted); font-size: 14px; }
.tile.attention .tile-status { color: #8a5a00; font-weight: 600; }

.help { margin-top: 32px; }
.help ol { padding-left: 20px; margin: 0; }
.help li { margin-bottom: 6px; }

.end { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.end .hint { margin-left: 8px; }

.foot {
    color: var(--muted);
    font-size: 13px;
    padding-top: 24px;
    padding-bottom: 32px;
    text-align: center;
}

@media (max-width: 520px) {
    .card { padding: 20px; }
    .tile { flex-direction: column; align-items: stretch; }
    .tile .btn { text-align: center; }
}

.choices { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.choices button.choice {
    margin-top: 0; text-align: left; font-weight: 600;
    background: #fff; color: var(--ink); border: 1px solid #9aa5b1;
}
.choices button.choice:hover { background: #eef5fa; border-color: var(--brand); }
