/* Ergänzungen zu Pico.css - App-spezifisches Styling hier */
/* gleiche Spezifität wie Pico (hell + dunkel), steht später -> gewinnt */
:root:not([data-theme]), :root:not([data-theme=dark]), [data-theme=light], [data-theme=dark] {
  --pico-primary: #e8590c;
  --pico-primary-background: #e8590c;
  --pico-primary-border: #e8590c;
  --pico-primary-hover: #c2410c;
  --pico-primary-hover-background: #c2410c;
  --pico-primary-focus: rgba(232, 89, 12, .35);
  --pico-font-size: 106%;
}
[x-cloak] { display: none !important; }
main.container { max-width: 1200px; padding-top: max(1rem, env(safe-area-inset-top)); padding-bottom: 3rem; }

.login { max-width: 360px; margin: 18vh auto 0; text-align: center; }
.login h1 { margin-bottom: 1.5rem; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.bar h1 { margin: 0; font-size: 1.5rem; }
button.small { padding: .35rem .7rem; font-size: .85rem; width: auto; margin: 0; }

.bar h1 a, .bar h2 { text-decoration: none; color: inherit; }
.bar h2 { margin: .2rem 0; }
.actions { display: flex; gap: .4rem; }
h3 { font-size: 1.1rem; margin: 1.2rem 0 .5rem; }
.muted { color: var(--pico-muted-color); }
.error { color: var(--pico-del-color); }
label.inline { display: inline-flex; gap: .35rem; align-items: center; margin-right: 1rem; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem;
  background: var(--pico-primary-background); color: var(--pico-primary-inverse); }
.badge.outline { background: transparent; color: var(--pico-muted-color); border: 1px solid var(--pico-muted-border-color); }
.create { margin-bottom: 1.5rem; }
.results { list-style: none; padding: 0; margin: -.5rem 0 1rem; border: 1px solid var(--pico-muted-border-color); border-radius: .4rem; }
.results li { list-style: none; padding: .5rem .75rem; border-bottom: 1px solid var(--pico-muted-border-color); }
.results li:last-child { border-bottom: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; gap: .3rem; padding: 1rem; border-radius: .6rem; text-decoration: none; color: inherit;
  border: 1px solid var(--pico-muted-border-color); background: var(--pico-card-background-color); }
.card:hover { border-color: var(--pico-primary); }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row b { margin-left: auto; }
article.total { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
article.total .big { font-size: 2rem; font-weight: 700; color: var(--pico-primary); }
article.total .right { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.tabs { --tab-color: var(--pico-color); display: flex; gap: .3rem; overflow-x: auto; margin: 1rem 0; border-bottom: 1px solid var(--pico-muted-border-color); }
.tabs button { width: auto; margin: 0; border-radius: .4rem .4rem 0 0; background: transparent; color: var(--tab-color);
  border: 0; border-bottom: 3px solid transparent; padding: .55rem 1rem; min-height: 44px; white-space: nowrap; }
.tabs button.active { border-bottom-color: var(--pico-primary); color: var(--pico-primary); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2rem; }
.grid2 > * { min-width: 0; }
@media (min-width: 900px) { .grid2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } .grid2 .full { grid-column: 1 / -1; } }
.notes { padding-left: 1.1rem; }
.notes li { margin-bottom: .35rem; }
.notes li.danger, .notes.danger li { color: var(--pico-del-color); }
.notes li.warn, .notes.warn li { color: #b45309; }
.missing li { margin-bottom: .5rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; }
.facts dt { color: var(--pico-muted-color); }
.facts dd { margin: 0; }
.ortho { width: 100%; border-radius: .5rem; margin: .75rem 0; }
.links { display: flex; flex-wrap: wrap; gap: .75rem; }
.table-wrap { overflow-x: auto; }
table input.cell { margin: 0; padding: .3rem .45rem; height: auto; min-width: 5rem; }
table input.num, td.num, th.num { text-align: right; }
td.anteil { min-width: 9rem; }
td.anteil input { margin: 0; }
tr.muted td { opacity: .55; }
button.danger { color: var(--pico-del-color); border-color: var(--pico-del-color); }
button.icon { background: transparent; border: 0; color: var(--pico-muted-color); width: auto; padding: .2rem .5rem; margin: 0; }
.info { cursor: help; color: var(--pico-primary); margin-left: .25rem; }
.ok { color: #15803d; }
.warn { color: #b45309; }
table input.wide { min-width: 16rem; }
table input.short { min-width: 4rem; width: 5rem; }
table input.narrow { min-width: 4.5rem; width: 5.5rem; }
table select.cell { margin: 0; padding: .3rem 2rem .3rem .45rem; height: auto; }
table.summary { max-width: 34rem; margin-left: auto; margin-top: 1rem; }
table.summary tr.sub td { font-weight: 600; border-top: 1px solid var(--pico-muted-border-color); }
table.summary tr.grand td { font-weight: 700; color: var(--pico-primary); font-size: 1.1rem; }
.facts.sum { max-width: 24rem; margin: 1rem 0 0 auto; }
.filters { align-items: end; }
.filters button { margin-bottom: var(--pico-spacing); }
td.error input { color: var(--pico-del-color); border-color: var(--pico-del-color); }
table.qty td:first-child { min-width: 15rem; }
table.qty .details { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.view3d { width: 100%; height: min(62vh, 560px); border-radius: .6rem; overflow: hidden; background: #eef2f6; touch-action: none; }
.view3d canvas { display: block; width: 100% !important; height: 100% !important; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .6rem 0 .2rem; font-size: .85rem; }
.legend i, .b3d i { display: inline-block; width: .8rem; height: .8rem; border-radius: .2rem; margin-right: .35rem; vertical-align: -1px; }
.b3d { list-style: none; padding: 0; margin: .8rem 0 0; }
.b3d li { list-style: none; padding: .45rem .6rem; border-radius: .4rem; cursor: pointer; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.b3d li.selected, tr.selected td { background: color-mix(in srgb, var(--pico-primary) 12%, transparent); }
.k-normal { background: #e8590c; } .k-teil { background: #facc15; } .k-schadstoff { background: #dc2626; } .k-keiner { background: #9ca3af; }
