:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #17212b;
    --muted: #64748b;
    --line: #dbe2ea;
    --primary: #194f90;
    --primary-dark: #123b6d;
    --success: #177245;
    --danger: #b42318;
    --warning: #9a6700;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header { min-height: 64px; padding: 12px max(20px, calc((100vw - 1240px) / 2)); background: #102f52; color: white; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: white; font-size: 21px; font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.header-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 16px; }
.header-nav a, .header-nav button { color: #e6eff8; }
.header-nav form { margin: 0; }
.user-name { color: #c6d6e6; }
.container { max-width: 1240px; margin: 0 auto; padding: 30px 20px 60px; }
h1 { margin: 0 0 12px; font-size: 30px; line-height: 1.25; }
h2 { margin: 0 0 16px; font-size: 22px; }
h3 { margin: 0 0 12px; font-size: 18px; }
p { margin: 8px 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.panel, .login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 5px rgb(15 23 42 / 3%); }
.login-card { max-width: 430px; margin: 8vh auto 0; }
.narrow-panel { max-width: 680px; }
.stack-form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-weight: 600; }
input, textarea, select { width: 100%; border: 1px solid #b9c4d0; border-radius: 7px; padding: 10px 12px; background: white; color: var(--text); font: inherit; font-weight: 400; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgb(25 79 144 / 15%); border-color: var(--primary); }
input[type="checkbox"], input[type="radio"] { width: auto; }
textarea { min-height: 110px; resize: vertical; }
.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #b9c4d0; border-radius: 7px; background: white; color: var(--text); padding: 9px 15px; min-height: 42px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.button:hover { background: #f1f5f9; text-decoration: none; }
.button-primary { background: var(--primary); border-color: var(--primary); color: white; }
.button-primary:hover { background: var(--primary-dark); }
.button-danger { color: var(--danger); border-color: #e7b5b0; }
.button-small { min-height: 34px; padding: 5px 10px; font-size: 14px; }
.button:disabled { opacity: .55; cursor: wait; }
.link-button { border: 0; background: transparent; padding: 0; font: inherit; cursor: pointer; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; }
.flash { border-radius: 8px; padding: 12px 16px; margin-bottom: 18px; background: #e7f5ed; color: #12623b; border: 1px solid #b9dfc9; }
.flash-error { background: #fff0ee; color: var(--danger); border-color: #f0c2bd; }
.flash-warning { background: #fff7df; color: var(--warning); border-color: #ead69a; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: 14px; color: #475569; background: #f8fafc; }
tr:last-child td { border-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.stat-value { display: block; font-size: 30px; font-weight: 750; }
.stat-label { color: var(--muted); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; background: #e9eef4; color: #475569; font-size: 13px; font-weight: 650; white-space: nowrap; }
.badge-success { background: #dcf3e6; color: var(--success); }
.badge-warning { background: #fff0c7; color: var(--warning); }
.badge-danger { background: #fee4e2; color: var(--danger); }
.progress { height: 8px; border-radius: 10px; background: #e2e8f0; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--primary); }
.cards { display: grid; gap: 16px; }
.nomination-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nomination-card h2 { margin-bottom: 6px; }
.nomination-meta { color: var(--muted); }
.checkbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.concept-list { padding-left: 22px; }
details.concepts { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
details.concepts summary { cursor: pointer; font-weight: 650; }
.score-row { display: grid; grid-template-columns: minmax(200px, 1fr) auto; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.criterion-text { display: flex; gap: 12px; }
.criterion-number { color: var(--muted); flex: 0 0 auto; }
.score-options { display: grid; grid-template-columns: repeat(10, 42px); gap: 5px; }
.score-option { position: relative; }
.score-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.score-option span { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid #b9c4d0; border-radius: 7px; background: white; cursor: pointer; font-weight: 650; }
.score-option input:checked + span { background: var(--primary); border-color: var(--primary); color: white; }
.score-option input:focus-visible + span { outline: 3px solid rgb(25 79 144 / 25%); }
.score-option input:disabled + span { opacity: .65; cursor: default; }
.autosave-status { min-height: 24px; color: var(--muted); font-size: 14px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.locked { padding: 16px; border-radius: 8px; background: #eef2f6; color: #475569; }
.audit-value { max-width: 300px; overflow-wrap: anywhere; white-space: pre-wrap; }

@media (max-width: 900px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .score-row { grid-template-columns: 1fr; }
    .score-options { grid-template-columns: repeat(10, minmax(30px, 1fr)); }
    .score-option span { width: 100%; }
}

@media (max-width: 620px) {
    .site-header { align-items: flex-start; padding: 14px 16px; gap: 10px; }
    .header-nav { gap: 10px; font-size: 14px; }
    .user-name { display: none; }
    .container { padding: 22px 12px 40px; }
    h1 { font-size: 25px; }
    .panel, .login-card { padding: 18px; border-radius: 9px; }
    .page-heading, .nomination-card { display: grid; }
    .form-grid, .checkbox-list { grid-template-columns: 1fr; }
    .stats { gap: 10px; }
    .stat { padding: 14px; }
    .stat-value { font-size: 25px; }
    .score-options { gap: 3px; }
    .score-option span { height: 40px; font-size: 14px; }
    th, td { padding: 9px; }
}
