@font-face { font-family: "Schibsted Grotesk"; src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
:root {
  color-scheme: light;
  --paper: #e6ebe6; --sheet: #ffffff; --ink: #14302a; --muted: #566a63; --rule: #cdd6d0;
  --register: #1d5a4c; --register-dark: #123f35; --marker: #ffe75e; --alert: #a32e1c; --warn: #8a5a00;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 "Schibsted Grotesk", system-ui, sans-serif; }
h1 { font-size: 1.9rem; line-height: 1.15; font-weight: 700; letter-spacing: -.015em; margin: 0; }
h2 { font-size: 1.15rem; font-weight: 650; margin: 2rem 0 .6rem; }
a { color: var(--register); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--register); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hint { color: var(--muted); font-size: .875rem; font-weight: 400; }

.top { display: flex; align-items: center; gap: 2rem; padding: .7rem 1.5rem; background: var(--register-dark); color: #fff; flex-wrap: wrap; }
.top a { color: #fff; text-decoration: none; }
.brand { font-weight: 750; font-size: 1.1rem; letter-spacing: -.01em; }
.top nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.top nav a { padding: .15rem 0; border-bottom: 2px solid transparent; }
.top nav a[aria-current] { border-color: var(--marker); }
.who { margin-left: auto; display: flex; gap: 1rem; align-items: center; }
.who form { margin: 0; }
.who .link { color: #fff; }
.top :focus-visible { outline-color: var(--marker); }

button, .button { font: inherit; font-weight: 550; padding: .5rem .95rem; border: 1px solid var(--register); background: #fff; color: var(--register); border-radius: 3px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: #eef3ef; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--register); color: #fff; }
.primary:hover { background: var(--register-dark); }
.link { background: none; border: 0; padding: 0; color: var(--register); text-decoration: underline; font-weight: 400; text-underline-offset: 2px; }
.link:hover { background: none; }
.quiet { color: var(--muted); }
.danger { color: var(--alert); }
input, select { font: inherit; color: inherit; padding: .5rem .6rem; border: 1px solid #93a39b; border-radius: 3px; background: #fff; width: 100%; max-width: 100%; }
input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--register); padding: 0; }
input[type=file] { border: 0; padding: .4rem 0; }

/* Das Ordner-Register: Monate als Reiter, die in das Blatt uebergehen */
.binder { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); max-width: 1320px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem 0; align-items: start; }
.register { display: flex; flex-direction: column; padding-top: 1rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.year { font-weight: 700; padding: 1rem 1rem .3rem 1.5rem; color: var(--muted); }
.tab { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem .8rem .4rem 1.5rem; margin-bottom: 2px; color: var(--ink); text-decoration: none; background: #d3dcd5; border-radius: 5px 0 0 5px; }
.tab:hover { background: #dfe6e0; }
.tab.is-open { background: var(--sheet); font-weight: 650; }
.count { font-size: .8rem; color: var(--muted); }
.count.has-new { background: var(--marker); color: var(--ink); padding: 0 .4rem; font-weight: 650; }
.sheet { background: var(--sheet); padding: 1.75rem 2rem 2rem; min-height: 70vh; border-radius: 0 5px 5px 5px; min-width: 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filters select { width: auto; max-width: 13rem; }
.filters input { width: 16rem; }

.table-wrap { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th { text-align: left; font-weight: 600; font-size: .875rem; color: var(--muted); padding: .5rem .75rem; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.ledger td { padding: .6rem .75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger tfoot td { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 650; }
.ledger .num { text-align: right; white-space: nowrap; }
.c-check { width: 2rem; padding-right: 0 !important; }
.c-actions { white-space: nowrap; text-align: right; }
.c-actions > * { margin-left: .75rem; }
.date { white-space: nowrap; }
.date-mark { padding: 0 .2rem; }
.is-new .date-mark, .hint .date-mark { background: var(--marker); color: var(--ink); }
.actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }
.upload { margin-top: 2.5rem; color: var(--muted); }
.upload summary { cursor: pointer; }
.upload form { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; margin-top: .75rem; color: var(--ink); }
.empty { padding: 3rem 0; max-width: 34rem; }
.empty h2 { margin-top: 0; }

.page { max-width: 1120px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.page.narrow { max-width: 680px; }
.page-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }
.page > h1 { margin-bottom: 1.25rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.portal-list { list-style: none; margin: 0; padding: 0; background: var(--sheet); border-radius: 5px; }
.portal-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem 2.5rem; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--rule); }
.portal-list li:last-child { border-bottom: 0; }
.portal-list form { margin: 0; }
.portal-main h2 { margin: 0 0 .15rem; }
.portal-main p { margin: 0; color: var(--muted); font-size: .9rem; }
.portal-main p.field-error { color: var(--alert); margin-top: .35rem; }
.portal-facts { display: flex; gap: 2.5rem; margin: 0; }
.portal-facts dt { font-size: .8rem; color: var(--muted); }
.portal-facts dd { margin: 0; font-size: .9rem; }
.portal-facts .big { font-size: 1.4rem; font-weight: 650; line-height: 1.2; }
.status { font-weight: 600; }
.status-success { color: var(--register); }
.status-warning, .status-waiting_2fa { color: var(--warn); }
.status-failed, .status-login_failed { color: var(--alert); }
.status-none { color: var(--muted); font-weight: 400; }
.big-status { font-size: 1.1rem; margin: .4rem 0; }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack label, .upload label { display: block; font-weight: 550; font-size: .95rem; }
.stack label > input, .stack label > select { margin-top: .25rem; font-weight: 400; }
.stack label > .hint { display: block; margin-top: .25rem; }
.stack label.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.stack label.check > input { margin: 0; }
fieldset { border: 0; border-top: 2px solid var(--ink); padding: .9rem 0 0; margin: 1rem 0 0; }
legend { font-weight: 650; font-size: 1.1rem; padding: 0 .75rem 0 0; }
fieldset .hint { margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
details summary { cursor: pointer; font-weight: 550; }
.details-body { margin-top: 1rem; }
.danger-zone { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.plain-list { list-style: none; padding: 0; margin: 1rem 0; background: var(--sheet); border-radius: 5px; }
.plain-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); }
.plain-list li:last-child { border: 0; }
.plain-list form { margin: 0; }

.log { background: #fff; padding: 1rem; overflow-x: auto; font: inherit; font-size: .875rem; line-height: 1.6; white-space: pre-wrap; border-left: 3px solid var(--register); }
.shot { max-width: 100%; border: 1px solid var(--rule); }
.code-box { background: var(--marker); padding: 1.25rem; margin: 1.25rem 0; }
.notice { display: block; padding: .6rem 1.5rem; }
.notice-ok { background: #cfe5d8; }
.notice-error { background: #f6d9d3; color: #6d1d10; }
.notice-code { background: var(--marker); color: var(--ink); font-weight: 600; }
.page .notice { padding: .7rem 1rem; margin-bottom: 1rem; }
.field-error { color: var(--alert); }
.login { max-width: 23rem; margin: 12vh auto 0; padding: 2.25rem; background: var(--sheet); border-radius: 5px; }
.login p { margin: .25rem 0 1.25rem; color: var(--muted); }
.login .field-error { color: var(--alert); }

@media (max-width: 800px) {
  .binder { display: block; padding: 0; }
  .register { position: static; flex-direction: row; overflow-x: auto; padding: .75rem 16px 0; max-height: none; gap: 2px; }
  .year { padding: .4rem .5rem; align-self: center; }
  .tab { flex: none; border-radius: 5px 5px 0 0; padding: .4rem .7rem; margin: 0; }
  .sheet { padding: 1.25rem 16px 2rem; border-radius: 0; }
  .top { padding: .6rem 16px; gap: .5rem 1.25rem; }
  .page { padding: 1.5rem 16px 3rem; }
  .notice { padding-left: 16px; padding-right: 16px; }
  .filters, .filters input, .filters select { width: 100%; max-width: none; }
  .filters button { width: 100%; }
  .portal-list li { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tfoot, .ledger tr { display: block; }
  .ledger tbody tr { display: grid; grid-template-columns: 2rem 1fr auto; padding: .7rem 0; border-bottom: 1px solid var(--rule); gap: .1rem .5rem; }
  .ledger tbody td { border: 0; padding: 0; }
  .ledger .c-actions { grid-column: 2 / -1; text-align: left; }
  .ledger .c-actions > * { margin: 0 .9rem 0 0; }
  .ledger .c-check { grid-row: span 4; }
  .ledger tfoot tr { display: flex; justify-content: space-between; }
  .ledger tfoot td:last-child { display: none; }
  .ledger:not(:has(.c-check)) tbody tr { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
