:root {
    color-scheme: dark;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #061225;
    color: #eef5ff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background-image: radial-gradient(ellipse at 80% 0, #12365f, transparent 55%); }
a { color: #a9d0ff; }
a:hover { color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #93c5fd; outline-offset: 3px; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
    padding: .65rem clamp(.8rem, 5vw, 4rem);
    background: #071325;
    border-bottom: 1px solid #294463;
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 750; color: #eef5ff; text-decoration: none; }
.brand img { object-fit: contain; }
.access, .document, .workspace { width: min(calc(100% - 2rem), 75rem); margin: clamp(1rem, 5vw, 3.5rem) auto; }
.access { max-width: 29rem; }
.document { max-width: 49rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.panel {
    background: #0c1d34;
    border: 1px solid #294463;
    border-radius: 1rem;
    padding: clamp(1rem, 3vw, 2rem);
}
.document .panel { margin-bottom: 1rem; }
h1, h2 { margin: 0 0 .75rem; line-height: 1.15; }
h1 { font-size: clamp(1.65rem, 4vw, 2.5rem); }
p { color: #c0d4eb; line-height: 1.5; }
label { display: block; font-weight: 600; }
label + label, fieldset + label, .access form button { margin-top: 1rem; }
input:not([type=checkbox]), select {
    display: block;
    width: 100%;
    margin-top: .4rem;
    padding: .65rem;
    border: 1px solid #486282;
    border-radius: .45rem;
    background: #081629;
    color: inherit;
    font: inherit;
}
input[type=checkbox] { accent-color: #1379f2; }
button {
    border: 1px solid transparent;
    border-radius: .5rem;
    padding: .65rem .95rem;
    background: #0862cf;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
button:hover { background: #0d51ac; }
button.secondary { background: #152e4b; border-color: #486282; }
button.secondary:hover { background: #22446a; }
.links, .periods, .actions { display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; margin-top: 1.25rem; }
.periods { margin-bottom: 1rem; gap: .45rem; }
.periods a { display: block; padding: .45rem .65rem; border-radius: .4rem; }
.periods a[aria-current=page] { background: #193b65; color: #fff; text-decoration: none; font-weight: bold; }
.notice { background: #162e4b; border-left: 3px solid #81b6ff; padding: .75rem; overflow-wrap: anywhere; }
.hint { font-size: .9rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; overflow-wrap: anywhere; }
.fields label + label, .module label + label { margin-top: 0; }
fieldset { border: 1px solid #294463; border-radius: .65rem; min-width: 0; margin: 0; padding: .8rem; }
.module { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 11rem); align-items: center; gap: .65rem; padding: .6rem 0; }
.module + .module, .history li + li { border-top: 1px solid #294463; }
.module label span { color: #c0d4eb; font-size: .85rem; }
.totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem .65rem; }
.totals dd { margin: 0; font-weight: bold; text-align: right; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; gap: .25rem; padding: .7rem 0; overflow-wrap: anywhere; }
.history li span { color: #c0d4eb; font-size: .85rem; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #294463; padding: .6rem 0; text-align: left; }
@media (max-width: 760px) {
    .workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 460px) {
    .fields { grid-template-columns: minmax(0, 1fr); }
    .module { grid-template-columns: minmax(0, 1fr) minmax(0, 8rem); }
}
@media print {
    :root, body { background: #fff; color: #111; }
    .topbar, .no-print { display: none; }
    .document { margin: 0; width: 100%; max-width: none; }
    .document .panel { background: none; border: 0; padding: 0; }
    .brand { color: #111; }
    tr { break-inside: avoid; }
}

.registration { max-width: 52rem; }
.registration-profile { margin: 1rem 0; }
.registration-profile .fields { margin-bottom: 0; }
.periods button { background: transparent; color: #a9d0ff; padding: .42rem .65rem; font-weight: 600; }
.periods button:hover { background: #152e4b; color: #fff; }
.periods button[aria-current=true] { background: #193b65; color: #fff; }
.quote-sidebar { min-width: 0; }
.quote-logo { display: block; width: min(72%, 18rem); height: auto; margin: 2rem auto 0; }
.amounts { margin-top: 1.1rem; overflow-x: auto; }
.amounts caption { text-align: left; font-weight: 700; padding: .3rem 0 .6rem; }
.amounts th, .amounts td { padding: .6rem .45rem; }
.amounts :is(th, td):not(:first-child) { text-align: right; white-space: nowrap; }
.amounts tbody tr:last-child { background: #193b65; font-weight: 700; }
