:root { --blue: #1f1a4b; --ink: #242235; --muted: #666477; --line: #dedde5; --ground: #f3f3f6; }
.account-editor { max-width:1000px; margin-bottom:16px; }
.mail-test { max-width:800px; overflow-wrap:anywhere; }
.mail-test .facts { margin-bottom:0; }
.mail-test .facts > div { display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; }
.mail-test .facts dt { font-weight:600; }
.mail-test .facts dd { margin:0; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 1rem/1.55 system-ui, sans-serif; overflow-wrap: anywhere; }
a { color: var(--blue); text-underline-offset: 3px; }
h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.1rem); line-height: 1.2; letter-spacing: -.6px; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 12px; }
.label { font-size: .75rem; letter-spacing: 1px; margin: 0; color: var(--muted); }
.hint { color: var(--muted); font-size: .875rem; }
.intro { color: var(--muted); max-width: 75ch; }
.logo-filter { position: absolute; }
.app-header { background: var(--blue); color: white; padding: 16px clamp(16px, 3vw, 52px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: white; text-decoration: none; display: flex; align-items: center; gap: 13px; font-weight: 650; font-size: 1.1rem; }
.festival-logo { width: 50px; height: 50px; background: white; border-radius: 50%; filter: url(#dorffest-blau); }
.account { display: flex; gap: 20px; align-items: center; font-size: .875rem; }
.account small { display: block; font-size: .75rem; color: #e2e0ec; }
.account form { margin: 0; }
.app-nav { background: white; display: flex; gap: 0 30px; padding: 0 clamp(16px, 3vw, 52px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.app-nav a { padding: 16px 0 13px; text-decoration: none; border-bottom: 3px solid transparent; font-size: .875rem; }
.app-nav a[aria-current] { border-bottom-color: var(--blue); font-weight: 650; }
.app-main { padding: 20px clamp(16px, 3vw, 52px); max-width: 1920px; margin: auto; }
.page-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.page-heading h1 { min-width:0; }
.page-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; min-width:0; }
.app-footer { display: flex; align-items: center; gap: 10px; margin: 0 auto; max-width: 1920px; padding: 8px clamp(16px, 3vw, 52px) 26px; font-size: .75rem; color: var(--muted); }
.app-footer img { width: 36px; height: 36px; border-radius: 50%; background: white; }
.guest-main { max-width: 720px; margin: 32px auto; background: white; border: 1px solid var(--line); border-radius: 10px; padding: clamp(20px, 4vw, 36px); }
.guest .app-footer { justify-content: center; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 10; background: white; padding: 10px; }
.skip-link:focus { top: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 20px; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 24px; align-items: start; }
.group-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 460px); }
.card, .panel { background: white; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.card, .editor, .content-panel { padding: 20px; }
.content-panel { margin-bottom: 20px; }
.panel-heading { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.panel-heading h2 { margin: 0; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading p { margin: 0; }
.empty { padding: 16px 18px; color: var(--muted); margin: 0; }
label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: .875rem; }
input, select, textarea { width: 100%; border: 1px solid #aaa7b9; border-radius: 6px; padding: 11px; font: inherit; background: white; color: var(--ink); min-width: 0; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.check { display: flex; gap: 12px; align-items: start; min-height: 44px; margin: 6px 0; padding: 10px 0; font-weight: 400; }
.check input { margin: 2px 0 0; }
fieldset { margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
legend { font-weight: 650; padding: 0 7px; }
.rights { padding: 8px 16px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--blue); border-radius: 6px; padding: 10px 16px; font: inherit; font-size: .875rem; font-weight: 600; background: var(--blue); color: white; cursor: pointer; text-decoration: none; min-height: 44px; }
.secondary { background: white; color: var(--blue); border-color: var(--line); }
.logout { background: transparent; color: white; border-color: #ffffff65; }
button:hover, .button:hover { filter: brightness(1.15); }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 0 14px; }
.club-name-fields { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.club-color { display:inline-block; vertical-align:middle; margin-right:6px; flex:none; }
.club-color-inputs { display:grid; grid-template-columns:64px minmax(0, 220px); gap:10px; }
.club-color-inputs input[type=color] { height:49px; padding:5px; }
@media (max-width: 600px) { .club-name-fields { grid-template-columns: 1fr; } }
.year-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
.year-toolbar p { margin: 0; }
.year-picker { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.year-picker label { margin: 0; }
.year-picker select { width: auto; }
.allergen-fields { padding: 12px 16px; }
.allergen-hint { margin: 0 0 12px; font-size: .75rem; }
input:disabled, select:disabled, textarea:disabled { color: var(--ink); opacity: 1; background: #f7f7f9; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.app-header :focus-visible { outline-color: white; }
.error, .success { border: 1px solid #bcb8cf; border-left: 4px solid var(--blue); background: #eeedf4; color: var(--blue); padding: 16px; border-radius: 6px; }
.error::before { content: 'Hinweis: '; font-weight: 700; }
details { margin: 18px 0 0; }
summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
li { margin: 7px 0; }
.facts { margin: 20px 0; }
.facts dt { font-size: .75rem; color: var(--muted); }
.facts dd { margin: 0 0 13px; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid #eeedf2; vertical-align: middle; }
th { background: #f9f9fb; color: var(--muted); font-weight: 400; font-size: .75rem; }
tbody tr:last-child td { border-bottom: 0; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.selected { background: #efedf6; }
.article-link { font-weight: 650; }
.table { overflow-x: auto; }
@media (min-width: 1440px) { .work-grid { grid-template-columns: minmax(0, 1fr) 400px; } .group-grid { grid-template-columns: minmax(0, 1fr) 480px; } }
@media (max-width: 1000px) { .work-grid, .group-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
 .app-header { flex-wrap: wrap; gap: 14px; }
 .account { justify-content: space-between; width: 100%; gap: 12px; }
 .app-nav { gap: 0 23px; }
 .guest-main { margin: 20px 12px; }
 .section-heading { flex-direction: column; gap: 15px; }
 .card, .editor, .content-panel { padding: 18px; }
 .responsive-table thead { display: none; }
 .responsive-table, .responsive-table tbody { display: block; }
 .responsive-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
 .responsive-table td { display: block; padding: 0; border: 0; text-align: left; }
 .responsive-table td:first-child { grid-column: 1 / -1; }
 .responsive-table td::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
 .responsive-table td:first-child::before { display: none; }
 .responsive-table td a { display: inline-block; padding: 7px 0; min-height: 44px; }
}
@media (pointer: coarse) { td a { min-height: 44px !important; } }

.price-grid { grid-template-columns: minmax(0, 1fr) 360px; }
.offer-action { margin-top: 8px; }
.offer-action button { white-space: normal; }
@media (max-width: 1200px) { .price-grid { grid-template-columns: 1fr; } }

/* Article lists and properties are separate views. */
.app-header { flex-wrap: wrap; }
.header-year { display:flex; align-items:center; gap:10px; margin:0; }
.header-year label { margin:0; color:white; }
.header-year select { width:auto; min-width:92px; padding:8px; }
.article-editor { margin-bottom:16px; }
.article-fields, .offer-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
.article-fields > .field-grid, .article-fields > .note-field { grid-column:1 / -1; }
.article-form > .hint { margin-bottom:8px; }
.article-fields label, .offer-fields label { margin-top:12px; }
.allergen-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 16px; }
.allergen-item { display:flex; align-items:center; gap:6px; min-width:0; position:relative; }
.allergen-item .check { flex:1; align-items:center; margin:0; gap:8px; padding:6px 0; font-size:.875rem; }
.allergen-group { grid-column:1 / -1; padding:10px 0 4px; font-size:.875rem; }
.info-tip { margin:0; flex:none; }
.info-tip summary { list-style:none; width:30px; min-height:44px; padding:10px 0; text-align:center; color:var(--blue); }
.info-tip summary::-webkit-details-marker { display:none; }
.tip-content { position:absolute; z-index:5; top:100%; right:0; width:min(360px,100%); padding:12px; border:1px solid var(--line); background:white; box-shadow:0 4px 16px #1f1a4b26; border-radius:6px; font-size:.8rem; }
.info-tip:not([open]):hover .tip-content, .info-tip:not([open]):focus-within .tip-content { display:block; }
.price-section { display:grid; gap:16px; }
.price-editor { grid-row:1; }
@media (min-width:1200px) { .article-fields, .offer-fields { grid-template-columns:repeat(3,minmax(0,1fr)); } .article-fields > .note-field { grid-column:auto; } .allergen-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:700px) { .allergen-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .header-year { flex-wrap:wrap; } }
@media (max-width:450px) { .article-fields, .offer-fields { grid-template-columns:1fr; } .allergen-item .check { font-size:.8rem; } .article-editor .field-grid { grid-template-columns:1fr 1fr; } .header-year { width:100%; } }
.article-basics { margin:0 0 16px; }
.article-basics > summary { padding:12px 0; }
.allergen-sections { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.allergen-sections .allergen-grid { grid-template-columns:1fr; }
@media (min-width:1200px) {
 .article-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .article-fields > .field-grid { grid-column:auto; }
 .allergen-sections .allergen-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) { .allergen-sections { grid-template-columns:1fr; gap:8px; } .allergen-sections .allergen-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.supplier-history { padding:20px; border-top:1px solid var(--line); }
.supplier-history-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.supplier-history-heading h3 { margin:0 0 4px; }
.supplier-history-heading p { margin:0; }
.price-chart { margin:0; width:280px; max-width:100%; flex:none; }
.price-chart svg { display:block; width:100%; height:110px; }
.chart-axis { stroke:var(--line); }
.price-chart text { fill:var(--muted); font:12px system-ui,sans-serif; }
.price-chart figcaption { color:var(--muted); font-size:.7rem; }
.price-change { font-weight:600; }
.price-change small { display:block; font-weight:400; color:var(--muted); }
.chart-line { fill:none; stroke:var(--blue); stroke-width:2; }
.chart-point { fill:#a09cad; stroke:white; stroke-width:1.5; }
.chart-point.current { fill:var(--blue); }
.history-table-scroll { overflow-x:auto; width:100%; }
.history-table { min-width:650px; font-size:.8rem; }
.history-table th, .history-table td { padding:10px 12px; text-align:left; }
.history-table tbody th { font-weight:600; border-bottom:1px solid var(--line); }
.history-table small { display:block; font-size:.7rem; font-weight:400; }
.history-price.current, .history-price.current th { background:#efedf6; }
.history-amount { white-space:nowrap; font-variant-numeric:tabular-nums; }
.history-price.current .history-amount { font-size:1.05rem; color:var(--blue); }
@media (max-width:600px) { .supplier-history-heading { flex-direction:column; align-items:start; gap:8px; } .supplier-history { padding:16px; } .price-chart { width:100%; } }

[hidden] { display:none !important; }
.sort-toolbar { padding:12px 20px; border-top:1px solid var(--line); }
.sort-toolbar form { display:flex; flex-wrap:wrap; gap:8px; }
.sort-toolbar p { margin:8px 0 0; }
.sort-controls { display:inline-flex; gap:4px; vertical-align:middle; margin-right:10px; }
.sort-controls button { padding:6px 10px; min-width:44px; }
.sorting-active .sort-handle { touch-action:none; cursor:grab; user-select:none; }
.sorting-dragged { background:#efedf6; outline:2px solid var(--blue); outline-offset:-2px; }
.standard-supplier-form { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.standard-supplier-form label { margin:0; }
.standard-supplier-form select { width:auto; flex:1 1 180px; max-width:400px; }
@media (max-width:600px) { .sort-controls { display:flex; width:100%; margin-bottom:8px; } }

.article-group-heading th { background: #f0eff5; color: #1F1A4B; padding: .6rem 1rem; text-align: left; border-top: 1px solid #d7d5df; }
.article-group-heading small { font-weight: normal; margin-left: .75rem; white-space: nowrap; }
@media (max-width: 600px) { .responsive-table .article-group-heading tr { display: block; padding: .6rem 1rem; } .responsive-table .article-group-heading th { display: block; padding: 0; border: 0; } }

.article-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex: 1; min-width: 0; width: 100%; }
.article-neighbour { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--line, #dedde6); border-radius: 8px; background: #fff; color: #1F1A4B; text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.article-neighbour small { font-size: .8rem; font-weight: normal; }
.article-neighbour[rel="next"] { text-align: right; }
.article-neighbour:hover { border-color: #1F1A4B; }
.article-neighbour:focus-visible { outline: 2px solid #1F1A4B; outline-offset: 3px; }
.article-neighbour.unavailable { background: transparent; color: #6a687c; }
@media (max-width: 420px) { .article-navigation { gap: 8px; } .article-neighbour { padding: 10px; } }

.unsaved-dialog { border: 1px solid #dedde6; border-radius: 12px; padding: 24px; color: #1F1A4B; width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; }
.unsaved-dialog::backdrop { background: rgb(31 26 75 / 45%); }
.unsaved-dialog h2 { margin-top: 0; }

.allergen-details { margin-top: 18px; border: 1px solid #dedde6; border-radius: 8px; padding: 12px 16px; }
.allergen-details > summary { cursor: pointer; }
.allergen-details > summary [data-allergen-summary] { display: block; font-size: .9rem; margin-top: 6px; overflow-wrap: anywhere; }
.allergen-error { color: #b42318; font-weight: 600; }

/* Zusammensetzung und Jahreskalkulation */
.calculation-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1rem 0}
.calculation-facts>div{display:flex;flex-direction:column;gap:.4rem;min-width:0}
.calculation-facts strong{font-size:1.6rem;overflow-wrap:anywhere}
.composition-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto;gap:1rem;align-items:end;margin:0 0 1rem}
.composition-row>div{min-width:0}.composition-row input,.composition-row select{width:100%}
.sale-calculation h3{margin-top:0}.sale-calculation .error{overflow-wrap:anywhere}
@media(max-width:700px){.composition-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);border-bottom:1px solid #ddd;padding-bottom:1rem}.composition-row>div:first-child{grid-column:1/-1}.composition-row button{grid-column:1/-1}.calculation-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.calculation-facts>div:last-child{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center}.calculation-facts>div:last-child small{grid-column:1/-1}.calculation-facts strong{font-size:1.35rem}}

.sale-article-table .sale-number{font-variant-numeric:tabular-nums}
@media(min-width:601px){.sale-article-table th,.sale-article-table td{padding-left:12px;padding-right:12px}.sale-article-table .sale-number{text-align:right}}

.sale-article-table .sale-incomplete{display:block;color:#a32121;font-size:.8rem;line-height:1.4}

.sale-club-details { margin:0; }
.sale-club-details > summary { padding:8px 0; min-height:44px; font-size:.8rem; }
.sale-club-details > summary > span:first-child { white-space:nowrap; }
.sale-club-days { display:block; color:var(--muted); font-size:.7rem; line-height:1.4; font-weight:400; }
.sale-club-list { list-style:none; padding:0; margin:4px 0 0; }
.sale-club-list li { margin:0; padding:5px 0; font-size:.8rem; }
.sale-club-list li + li { border-top:1px solid var(--line); }
@media(min-width:601px) { .sale-clubs { width:160px; max-width:220px; } }
@media(max-width:600px) { .sale-club-details > summary { padding:0; } .sale-club-list li a { padding:3px 0; } }

.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.club-offers-table .offer-check { margin:0; padding:10px; min-height:44px; width:44px; align-items:center; cursor:pointer; }
.club-offers-table .offer-check input { margin:0; }
.club-offers-table .offer-quantity { display:block; }
.club-offers-table .offered { background:#f7f6fb; }
.club-offers-table .offer-invalid { background:#fff1f1; outline:2px solid #a32121; outline-offset:-2px; }
.offer-save { padding:0 20px 20px; }
.offer-day-error { color:#a32121; margin:18px 0 0; }
@media (max-width:600px) {
 .club-offers-table tr[data-offer-row] { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
 .club-offers-table td[data-label="Im Angebot"] { grid-column:1 / -1; display:flex; align-items:center; gap:12px; }
 .club-offers-table td[data-label="Im Angebot"]::before { margin:0; }
}

/* Compact headings: one title per view, actions alongside it. */
.header-year { flex-direction:column; align-items:flex-start; gap:2px; }
.header-year small { font-size:.75rem; color:#e2e0ec; }
.article-navigation { margin-bottom:16px; }
.navigation-card { display:block; text-decoration:none; min-height:44px; }
.navigation-card h2 { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.navigation-card p { margin:0; }
.navigation-card:hover { border-color:var(--blue); }
.current-year-settings { margin-bottom:16px; }
.reference-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; margin-bottom:12px; }
.reference-group { margin:0; border-bottom:1px solid var(--line); min-width:0; }
.reference-group > summary { min-height:44px; font-size:.875rem; }
.reference-group ul { margin-top:0; }
.allergen-fields { margin:12px 0 0; }
@media(max-width:600px) {
 .page-heading { align-items:flex-start; }
 .page-heading h1 { flex:1 1 100%; }
 .reference-groups { grid-template-columns:1fr; }
 .allergen-details { padding:8px 12px; }
}

/* Gemeinsame Preis- und Fehleranzeigen der Jahresübersicht. */
.overview-note { display:block; color:var(--muted); font-size:.7rem; font-weight:400; }
.overview-uncertainties { display:block; color:#a32121; font-size:.8rem; font-weight:400; line-height:1.4; white-space:pre-line; overflow-wrap:anywhere; }
.overview-controls > .overview-uncertainty-control { flex:0 1 auto; max-width:none; grid-column:1 / -1; }
.overview-uncertainty-toggle { display:inline-flex; align-items:center; gap:8px; white-space:nowrap; }
.overview-switch-track { display:inline-block; position:relative; width:30px; height:18px; border-radius:10px; background:#777585; flex-shrink:0; }
.overview-switch-track::after { content:''; position:absolute; width:12px; height:12px; border-radius:50%; background:white; top:3px; left:3px; }
.overview-uncertainty-toggle[aria-checked="true"] .overview-switch-track { background:#1F1A4B; }
.overview-uncertainty-toggle[aria-checked="true"] .overview-switch-track::after { left:15px; }
.calculation-issues { margin:0; max-width:28ch; text-align:left; color:#a32121; font-size:.8rem; }
.calculation-issues > summary { min-height:44px; padding:8px 0; }
.calculation-issues ul { padding-left:16px; margin:4px 0; }
.calculation-issues li { margin:4px 0; }
@media(max-width:900px) {
 .price-overview-table thead { display:none; }
 .price-overview-table, .price-overview-table tbody { display:block; }
 .price-overview-table tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 16px; padding:12px 16px; border-bottom:1px solid var(--line); }
 .price-overview-table td, .price-overview-table .sale-number { display:block; padding:0; border:0; text-align:left; min-width:0; }
 .price-overview-table td:first-child { grid-column:1 / -1; }
 .price-overview-table td::before { content:attr(data-label); display:block; font-size:.75rem; color:var(--muted); margin-bottom:4px; }
 .price-overview-table td:first-child::before { display:none; }
 .price-overview-table td a { display:inline-block; padding:7px 0; min-height:44px; }
 .price-overview-table .article-group-heading tr { display:block; padding:.6rem 1rem; }
 .price-overview-table .article-group-heading th { display:block; padding:0; border:0; }
 .price-overview-table .sale-clubs { width:auto; max-width:none; }
}
@media(max-width:600px) {
 .price-overview-table tr { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .price-overview-table .sale-clubs { grid-column:1 / -1; }
 .calculation-issues > summary { padding:0; }
}

.price-overview-table .overview-vk { background:#eeedf5; }
.price-overview-table th.overview-vk { color:var(--blue); font-weight:650; }
.overview-price { color:var(--blue); font-size:1.05rem; font-weight:750; }
@media(max-width:900px) {
 .price-overview-table td.overview-vk { padding:8px 10px; border-radius:6px; }
 .price-overview-table td.overview-vk::before { color:var(--blue); font-weight:650; }
}

.overview-controls { display:flex; align-items:flex-end; flex-wrap:wrap; gap:12px; margin:0 0 16px; }
.overview-controls > div { flex:1 1 160px; min-width:0; max-width:320px; }
.overview-controls label { margin:0 0 6px; }
.overview-controls .overview-filter-actions { display:flex; flex-wrap:wrap; gap:8px; flex:0 1 auto; max-width:none; }
.overview-sort-link { display:inline-flex; align-items:center; gap:6px; min-height:44px; color:inherit; text-decoration:none; }
.overview-sort-link:hover { text-decoration:underline; }
.price-overview-table th[aria-sort]:not([aria-sort="none"]) .overview-sort-link { color:var(--blue); font-weight:650; }
@media(max-width:600px) {
 .overview-controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 .overview-controls > div { max-width:none; }
 .overview-club-filter, .overview-filter-actions { grid-column:1 / -1; }
}

.festival-copy-preview { max-width:1000px; }
.copy-counts .number { width:90px; }
.copy-note { margin-top:12px; }

.price-review, .price-review-status { margin:0; font-size:.75rem; }
.price-review-status { display:block; color:var(--muted); }
.price-review > summary { color:#a32121; padding:4px 0; min-height:44px; }
.price-review-list { padding:0; margin:0 0 4px; list-style:none; max-width:360px; }
.price-review-list li { margin:0; padding:4px 0; }
.price-review-list li + li { border-top:1px solid var(--line); }
.price-review-list span { display:block; color:var(--muted); font-variant-numeric:tabular-nums; }
.price-review-missing { color:#a32121; }

/* Annual sale history remains collapsed until requested. */
.sale-history-chart { margin:16px 18px; max-width:920px; }
.sale-chart-scroll { overflow-x:auto; max-width:100%; }
.sale-history-chart svg { display:block; max-width:none; }
.sale-history-chart text { fill:var(--muted); font:12px system-ui,sans-serif; }
.sale-chart-line { fill:none; stroke:var(--blue); stroke-width:2; }
.sale-chart-line.sale-chart-vk { stroke-width:3; }
.sale-chart-line.sale-chart-ek { stroke-dasharray:7 4; }
.sale-chart-line.sale-chart-marge { stroke-dasharray:2 4; }
.sale-chart-point { fill:white; stroke:var(--blue); stroke-width:1.5; }
.sale-chart-point.sale-chart-vk { fill:var(--blue); }
.sale-chart-point.sale-chart-marge { fill:#aaa7b9; }
.sale-history-chart figcaption { display:flex; gap:8px 16px; flex-wrap:wrap; font-size:.75rem; color:var(--muted); margin-top:8px; }
.sale-history-chart figcaption small { flex-basis:100%; }
.sale-chart-key::before { content:''; display:inline-block; width:22px; margin-right:6px; border-top:3px solid var(--blue); vertical-align:middle; }
.sale-chart-key.sale-chart-ek::before { border-top:2px dashed var(--blue); }
.sale-chart-key.sale-chart-marge::before { border-top:2px dotted var(--blue); }
.sale-history-table { min-width:850px; }
.sale-history-table td { font-variant-numeric:tabular-nums; }
.sale-history-table td:not(:last-child) { white-space:nowrap; }
.sale-history-vk { background:#f1eff7; }
.sale-history-table th a { display:inline-flex; align-items:center; min-height:44px; font-weight:600; }
.sale-history-warning { display:block; color:#a32121; font-size:.75rem; }
.sale-history-table .price-review { min-width:170px; }
.sale-article-table .sale-number { white-space:nowrap; }
.sale-article-table .sale-incomplete { white-space:normal; }
@media(min-width:601px) and (max-width:900px) {
 .sale-article-table thead { display:none; }
 .sale-article-table, .sale-article-table tbody { display:block; }
 .sale-article-table tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 16px; padding:12px 16px; border-bottom:1px solid var(--line); }
 .sale-article-table td, .sale-article-table .sale-number { display:block; padding:0; border:0; text-align:left; min-width:0; }
 .sale-article-table td:first-child { grid-column:1 / -1; }
 .sale-article-table td::before { content:attr(data-label); display:block; font-size:.75rem; color:var(--muted); margin-bottom:4px; }
 .sale-article-table td:first-child::before { display:none; }
 .sale-article-table td a { display:inline-block; padding:7px 0; min-height:44px; }
 .sale-article-table .article-group-heading tr { display:block; padding:.6rem 1rem; }
 .sale-article-table .article-group-heading th { display:block; padding:0; border:0; }
 .sale-article-table .sale-clubs { width:auto; max-width:none; }
}

/* Kompakte Rechte-Matrix, auch auf kleinen Touchscreens bedienbar. */
.readonly-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.permission-table-wrap { overflow-x: auto; }
.permission-table { width: 100%; border-collapse: collapse; }
.permission-table th, .permission-table td { padding: .3rem .5rem; border-bottom: 1px solid var(--line, #dedde7); }
.permission-table th:first-child { text-align: left; }
.permission-table th:not(:first-child), .permission-table td { text-align: center; }
.permission-table td label { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; margin: 0; }
.permission-table input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: #1F1A4B; }
@media (max-width: 600px) {
    .permission-table { font-size: .8rem; }
    .permission-table th, .permission-table td { padding: .2rem; }
    .permission-table th:first-child { width: 100%; }
}

.delete-link { color: #a52532; font-size: .9rem; display: inline-flex; align-items: center; min-height: 44px; }
button.danger { background: #a52532; border-color: #a52532; }
.price-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }

/* Jahresübersicht: Vereinsmatrix mit festem Kopf und fester Artikelspalte. */
.overview-table-scroll { position:relative; overflow:auto; max-height:72vh; max-height:72dvh; border-radius:8px; isolation:isolate; }
.overview-matrix-table.price-overview-table { display:table; width:100%; border-collapse:separate; border-spacing:0; }
.overview-matrix-table.price-overview-table thead { display:table-header-group; }
.overview-matrix-table.price-overview-table tbody { display:table-row-group; }
.overview-matrix-table.price-overview-table tr { display:table-row; }
.overview-matrix-table.price-overview-table th,
.overview-matrix-table.price-overview-table td { display:table-cell; padding:6px 10px; border-radius:0; border-bottom:1px solid var(--line); }
.overview-matrix-table.price-overview-table td::before { content:none; }
.overview-matrix-table.price-overview-table thead th { position:sticky; top:0; z-index:3; background:#f9f9fb; box-shadow:0 1px var(--line); white-space:nowrap; }
.overview-matrix-table.price-overview-table .sale-number { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.overview-matrix-table.price-overview-table .overview-vk { background:#eeedf5; }
.overview-matrix-table.price-overview-table td:first-child { position:sticky; left:0; z-index:1; background:white; min-width:150px; max-width:240px; box-shadow:1px 0 var(--line); }
.overview-matrix-table.price-overview-table thead th:first-child { left:0; z-index:4; }
.overview-matrix-table.price-overview-table .article-group-heading th { padding:8px 10px; }
.overview-matrix-table.price-overview-table td a { padding:0; }
.overview-matrix-table.price-overview-table .overview-club-column { text-align:center; min-width:52px; padding:4px; border-left:1px solid #eeedf2; }
.overview-club-column abbr { display:block; max-width:110px; overflow:hidden; text-overflow:ellipsis; text-decoration:none; font-weight:650; }
.overview-matrix-table.price-overview-table .overview-club-check { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:44px; min-width:44px; text-decoration:none; }
.overview-club-check small { font-size:.65rem; line-height:1.3; white-space:nowrap; color:var(--muted); }
@media(max-width:600px) {
 .overview-matrix-table.price-overview-table td:first-child { min-width:120px; max-width:150px; }
 .overview-matrix-table.price-overview-table th, .overview-matrix-table.price-overview-table td { padding:5px 8px; }
}
@media print {
 .overview-table-scroll { overflow:visible; max-height:none; }
 .overview-matrix-table.price-overview-table thead th, .overview-matrix-table.price-overview-table td:first-child { position:static; }
}

/* Einheitliche Abschnittskarten für Einkaufs- und Verkaufsartikeleigenschaften. */
.article-details { display:grid; gap:12px; }
.article-section { margin:0; min-width:0; background:white; border:1px solid var(--line); border-radius:9px; padding:0; }
.article-section > summary { display:grid; grid-template-columns:16px minmax(0,1fr); align-items:center; gap:0 8px; padding:14px 18px; min-height:52px; list-style:none; color:var(--blue); }
.article-section > summary::-webkit-details-marker { display:none; }
.article-section > summary::before { content:'›'; font-size:1.35rem; line-height:1; text-align:center; }
.article-section[open] > summary::before { transform:rotate(90deg); }
.article-section[open] > summary { border-bottom:1px solid var(--line); }
.article-section > summary h2 { margin:0; font-size:1.05rem; line-height:1.4; }
.article-section > summary h2 small { font-size:.8rem; color:var(--muted); font-weight:400; }
.article-section > summary [data-allergen-summary] { grid-column:2; margin-top:3px; font-size:.8rem; font-weight:400; }
.article-section > .panel, .article-section-body > .panel, .article-section-body form > .panel { border:0; border-radius:0; background:transparent; margin:0; }
.article-section > .editor, .article-section-body { padding:16px 18px; }
.article-details .article-editor { margin:0; }
.article-details .article-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.article-details .article-name-field, .article-details .article-fields > .note-field { grid-column:1 / -1; }
.article-details .article-fields > .field-grid { grid-column:auto; }
.article-details .price-list-info-field textarea { display:block; height:47px; min-height:47px; resize:none; overflow:auto; white-space:pre; }
.article-details .article-fields label:first-child, .article-details .field-grid label { margin-top:0; }
.article-details .article-fields { gap:12px 18px; }
.uncertainty-editor label, .uncertainty-editor textarea, .article-uncertainties { color:#b42318; }
.article-uncertainties { margin-top:4px; font-size:.8rem; overflow-wrap:anywhere; }
.article-uncertainties > summary { cursor:pointer; font-weight:600; }
.article-uncertainties > div { margin-top:6px; font-weight:400; }
.article-details .sale-calculation { display:grid; gap:12px; }
.article-details .price-section { gap:12px; }
.article-section .allergen-fields { margin:0; padding:0; border:0; }
.article-details .form-actions { gap:8px; }
.article-details .article-delete { padding-top:12px; border-top:1px solid var(--line); }
.article-details .delete-link { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 12px; border:1px solid #d9b7b7; border-radius:6px; color:#942d2d; background:white; font-size:.8rem; font-weight:600; text-decoration:none; }
.article-details .price-actions { display:flex; gap:8px; flex-wrap:wrap; }
.article-details .price-actions .button { font-size:.8rem; padding:8px 12px; }
.article-details .price-value { font-size:1.3rem; font-weight:650; }
.article-details .section-actions { display:flex; justify-content:flex-end; margin-bottom:12px; }
.article-details .price-history .empty { padding:0 0 12px; }
.article-details .supplier-history { padding:16px 0; }
.article-details .supplier-history:last-child { padding-bottom:0; }
.article-details .supplier-history-heading h3 { font-size:.95rem; }
.article-details .sale-history > .panel { padding:12px 0; }
@media(max-width:600px) {
 .article-section > summary { padding:12px 14px; }
 .article-section > .editor, .article-section-body { padding:14px; }
 .article-details .article-fields { grid-template-columns:1fr; }
 .article-details .article-fields > .field-grid { grid-column:1; }
 .article-details .section-actions { justify-content:flex-start; }
 .article-details .responsive-table td a.button, .article-details .responsive-table td a.delete-link { display:inline-flex; padding:8px 12px; }
}

.article-details .form-actions:empty { display:none; }
.help-page { max-width:960px; }
.help-page .article-section-body p:first-child { margin-top:0; }
.help-page .article-section-body p { line-height:1.6; }
.welcome-dialog[open] { position:fixed; inset:0; margin:auto; width:min(720px, calc(100% - 32px)); max-height:calc(100% - 32px); }
.welcome-dialog p { line-height:1.5; }
.variant-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; gap:12px; align-items:end; }
.variant-fields button { margin-bottom:12px; }
.variant-form + .variant-form, .variant-price + .variant-price { border-top:1px solid var(--line); padding-top:12px; margin-top:12px; }
.variant-price h3 { margin:0 0 12px; font-size:1rem; }
.variant-price h3 small { color:var(--muted); font-weight:400; }
.variant-add { margin-top:12px; }
.variant-add summary { cursor:pointer; min-height:44px; display:flex; align-items:center; font-weight:600; }
.variant-list-value { display:flex; justify-content:space-between; gap:12px; align-items:baseline; white-space:nowrap; }
.variant-list-value small { color:var(--muted); font-weight:400; }
@media(max-width:700px) { .variant-fields { grid-template-columns:1fr 1fr; } .variant-fields > div:first-child { grid-column:1/-1; } .variant-fields button { grid-column:1/-1; margin-bottom:0; } }
