:root { --aq-navy: #081E2E; --aq-yellow: #FFE600; --aq-yellow-soft: #FFF9C2; --aq-ground: #F4F6F8; --aq-line: #E1E6EA; --aq-muted: #5B6B77; }
body { margin: 0; background: var(--aq-ground); color: var(--aq-navy); font-family: Roboto, "Segoe UI", Helvetica, Arial, sans-serif; }

.portal-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; padding: 0 20px; min-height: 56px; background: var(--aq-navy); color: #fff; }
.portal-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: "Barlow", Roboto, sans-serif; font-size: 20px; }
.portal-brand b { color: var(--aq-yellow); font-weight: 600; }
.portal-top nav { display: flex; align-items: stretch; gap: 4px; align-self: stretch; }
.portal-top nav a, .portal-top nav button { display: flex; align-items: center; padding: 0 12px; min-height: 52px; color: #D7E0E6; background: none; border: 0; border-bottom: 3px solid transparent; border-top: 3px solid transparent; font: inherit; font-size: 15px; text-decoration: none; cursor: pointer; }
.portal-top nav a:hover, .portal-top nav button:hover { color: #fff; }
.portal-top nav a.active { color: #fff; border-bottom-color: var(--aq-yellow); }
.portal-top :focus-visible, .portal-main :focus-visible { outline: 3px solid var(--aq-yellow); outline-offset: 1px; }
/* Die Überschrift erhält nach jedem Seitenwechsel den Fokus (für Vorleseprogramme), ohne Rahmen. */
.portal-main h1:focus, .portal-main h1:focus-visible { outline: none; }
.portal-user { margin-left: auto; }
.portal-user form { display: flex; margin: 0; }
.portal-main { padding: 20px; min-height: calc(100vh - 56px - 40px - 53px); }
.portal-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; padding: 16px 20px; border-top: 1px solid var(--aq-line); color: var(--aq-muted); font-size: 13px; }
.portal-foot a, .portal-card a { color: var(--aq-navy); }
.portal-card address { font-style: normal; line-height: 1.6; }
.portal-meta { color: var(--aq-muted); font-size: 13px; }
.portal-container { max-width: 1280px; margin: 0 auto; }

.portal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.portal-head h1 { margin: 0; font-size: 24px; font-weight: 600; }
.portal-head .portal-spacer { flex: 1; }
.portal-sub { color: var(--aq-muted); margin: -8px 0 16px; }
.portal-card { background: #fff; border: 1px solid var(--aq-line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.portal-card h2 { margin: 0 0 10px; font-size: 17px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid #C3CDD4; background: #fff; color: var(--aq-navy); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--aq-navy); }
.btn-primary { background: var(--aq-yellow); border-color: var(--aq-yellow); font-weight: 600; }
.btn-primary:hover { background: #F2DA00; border-color: #F2DA00; }
.btn-dark { background: var(--aq-navy); border-color: var(--aq-navy); color: #fff; }
.btn-danger { color: #B3261E; border-color: #E3B3AF; }
.btn-small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--aq-muted); }
.field input, .field select, .search input { min-height: 36px; padding: 0 10px; border: 1px solid #C3CDD4; border-radius: 6px; font: inherit; font-size: 14px; color: var(--aq-navy); background: #fff; }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.search { display: flex; gap: 6px; margin: 0; }
.search input { width: 220px; }

details.portal-new > summary { list-style: none; }
details.portal-new > summary::-webkit-details-marker { display: none; }
details.portal-new[open] { flex-basis: 100%; order: 10; }
details.portal-new[open] > summary { margin-bottom: 10px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.tile { background: #fff; border: 1px solid var(--aq-line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.tile:hover { border-color: var(--aq-navy); }
.preview { position: relative; display: flex; align-items: center; justify-content: center; height: 169px; overflow: hidden; background: var(--aq-navy); }
.preview a.cover { position: absolute; inset: 0; z-index: 2000; }
.preview .empty { color: #9FB0BC; font-size: 14px; }
.tile-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.tile-title { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-meta { color: var(--aq-muted); font-size: 13px; }
.tile-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tile-actions form { margin: 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; padding: 0; margin: 0 0 16px; list-style: none; counter-reset: step; }
.steps li { background: #fff; border: 1px solid var(--aq-line); border-radius: 10px; padding: 14px; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-flex; width: 28px; height: 28px; margin-bottom: 8px; align-items: center; justify-content: center; border-radius: 50%; background: var(--aq-yellow); font-weight: 700; }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--aq-line); border-radius: 10px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--aq-line); font-size: 14px; }
.table th { color: var(--aq-muted); font-weight: 500; }
.table form { margin: 0; }
.table-wrap { overflow-x: auto; }

.auth-card { max-width: 460px; margin: 24px auto; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--aq-line); box-shadow: 0 8px 30px rgba(8, 30, 46, .10); }
.auth-brand { display: flex; align-items: center; gap: 12px; padding: 18px 24px; background: var(--aq-navy); color: #fff; font-family: "Barlow", Roboto, sans-serif; font-size: 22px; }
.auth-brand b { color: var(--aq-yellow); font-weight: 600; }
.auth-body { padding: 22px 24px; }
.auth-body h1 { margin: 0 0 16px; font-size: 21px; }
.subnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
/* Innerhalb der Kontoeinstellungen steht die Marke schon in der Kopfzeile. */
.subnav ~ .auth-card .auth-brand { display: none; }

.validation-message { color: var(--mud-palette-error); font-size: 0.8rem; }
.recovery-code { display: block; font-size: 1.05rem; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; width: 100%; padding: 0.6rem 1rem; background: var(--aq-yellow-soft); }

@media (max-width: 640px) {
    .portal-main { padding: 12px; }
    .portal-top { padding: 0 12px; gap: 0 8px; }
    .portal-brand { font-size: 17px; gap: 8px; min-height: 52px; }
    .portal-top nav { order: 2; width: 100%; }
    .portal-top nav.portal-user { order: 1; width: auto; }
    .portal-top nav a, .portal-top nav button { min-height: 42px; padding: 0 8px; }
    .search input { width: 150px; }
}

.portal-language { display: flex; gap: 12px; }
