:root {
    --navy: #13325e;
    --ugle-blue: #004080;
    --pale-blue: #809cba;
    --grey: #aeb0b3;
    --coral: #c44c3a;
    --sgc-red: #af2d24;
    --blue-15: #ecf0f5;
    --blue-30: #d9e1ea;
    --grey-15: #f3f3f4;
    --muted: #4b5f77;
    font-family: system-ui, sans-serif;
    color: var(--navy);
    background: var(--blue-15);
    font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: var(--navy); color: white; padding: 26px 5%; display: flex; align-items: center; gap: 18px; border-bottom: 4px solid var(--pale-blue); }
h1 { font-family: Georgia, serif; font-size: 28px; font-weight: normal; margin: 5px 0; }
h2 { font-size: 19px; margin: 0 0 18px; }
small { letter-spacing: 2px; font-size: 11px; }
.seal { border: 1px solid var(--pale-blue); border-radius: 50%; padding: 14px 20px; font: 26px Georgia; color: white; }
header button { margin-left: auto; background: transparent; border-color: var(--pale-blue); color: white; }
header button:hover { background: var(--ugle-blue); }
main { max-width: 1440px; margin: auto; padding: 20px 4%; }
section, #login { background: white; border: 1px solid var(--blue-30); border-radius: 10px; padding: 25px; margin-bottom: 22px; }
.toolbar { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; border-top: 3px solid var(--ugle-blue); }
.toolbar > div { margin-right: auto; }
label { display: inline-flex; flex-direction: column; gap: 8px; font-size: 13px; margin: 0 15px 12px 0; }
input, select, button { font: inherit; border: 1px solid var(--pale-blue); border-radius: 5px; padding: 10px; background: white; color: var(--navy); }
button { background: var(--ugle-blue); color: white; cursor: pointer; }
button:hover { background: var(--navy); }
button:disabled { opacity: .5; cursor: wait; }
:focus-visible { outline: 3px solid var(--ugle-blue); outline-offset: 3px; }
header :focus-visible { outline-color: white; }
.note, footer { color: var(--muted); font-size: 13px; line-height: 1.6; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 15px; margin: 24px 0; }
.card { padding: 23px; border: 1px solid var(--blue-30); border-top: 3px solid var(--pale-blue); background: white; border-radius: 7px; }
.card:first-child { border-top-color: var(--ugle-blue); }
.card:nth-last-child(-n+2) { border-top-color: var(--coral); }
.card strong { display: block; font: 34px Georgia; margin: 10px 0; }
.charts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.charts section { min-width: 0; }
.barrow { display: grid; grid-template-columns: 85px 1fr 45px; gap: 12px; align-items: center; margin: 16px 0; font-size: 13px; }
progress { width: 100%; height: 22px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 4px; overflow: hidden; background: var(--blue-15); accent-color: var(--ugle-blue); }
progress::-webkit-progress-bar { background: var(--blue-15); border-radius: 4px; }
progress::-webkit-progress-value { background: var(--ugle-blue); border-radius: 4px; }
progress::-moz-progress-bar { background: var(--ugle-blue); border-radius: 4px; }
#ages progress { accent-color: var(--pale-blue); }
#ages progress::-webkit-progress-value { background: var(--pale-blue); }
#ages progress::-moz-progress-bar { background: var(--pale-blue); }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px; }
th { font-size: 12px; color: var(--navy); background: var(--blue-15); }
td, th { padding: 13px; border-bottom: 1px solid var(--blue-30); }
tbody tr:hover { background: var(--grey-15); }
.scroll { overflow: auto; max-height: 480px; }
#followupSection { border-top: 3px solid var(--coral); }
#followupSection h2 { color: var(--sgc-red); }
footer { text-align: center; padding: 25px; border-top: 1px solid var(--grey); }
#message:not(:empty) { padding: 16px; background: var(--blue-30); border-left: 4px solid var(--ugle-blue); border-radius: 4px; white-space: pre-wrap; }
#login { max-width: 550px; margin: 50px auto; border-top: 3px solid var(--ugle-blue); }
#login label { display: flex; }
#import { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
#account { text-align: right; }
[hidden] { display: none !important; }
@media (max-width: 800px) { .charts { grid-template-columns: 1fr; } h1 { font-size: 22px; } section { padding: 18px; } .cards { grid-template-columns: 1fr 1fr; } }

.danger { background: var(--sgc-red); }
.danger:hover { background: var(--navy); }
#unchangedLabel { max-width: 480px; padding: 14px; background: var(--blue-15); border-left: 3px solid var(--coral); }
#removeForm,.restoreForm { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#removeForm { align-items: end; margin-bottom: 25px; }
#removeForm button { margin-bottom: 12px; }
#manageSection { border-top: 3px solid var(--coral); }
a { color: var(--ugle-blue); }
a:hover { color: var(--navy); }
.card-detail { display: inline-block; padding: 7px 0; font-size: 13px; font-weight: 600; }
#memberMessage:not(:empty) { padding: 16px; border-left: 4px solid var(--ugle-blue); background: var(--blue-30); white-space: pre-wrap; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; }
dl { display: grid; grid-template-columns: minmax(110px,1fr) 2fr; gap: 12px 18px; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#profileName { font: 30px Georgia,serif; margin-top: 15px; }
@media(max-width:800px) { .profile-grid { grid-template-columns:1fr; } }
