/* Ladenausbau Oeder Weg 43 – gemeinsames Aussehen */
:root { --bg:#f4f5f7; --panel:#ffffff; --ink:#16181d; --mute:#5b6470; --line:#d9dce1; --acc:#0b4fd6; --warn:#b0128f; --ok:#0f7b3f; --rot:#a00000; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; }
a { color: var(--acc); }
h1 { font-size: 20px; margin: 0 0 6px; } h2 { font-size: 15px; margin: 18px 0 8px; } h3 { font-size: 14px; margin: 14px 0 6px; }
p { line-height: 1.45; } .small { color: var(--mute); font-size: 12px; line-height: 1.35; margin: 4px 0; }
button, .knopf { font: inherit; padding: 6px 10px; border: 1px solid #b9bec5; background: #fff; border-radius: 5px; cursor: pointer; color: var(--ink); text-decoration: none; display: inline-block; }
button:hover, .knopf:hover { background: #eef2f7; } button.on, button.haupt { background: var(--acc); color: #fff; border-color: var(--acc); }
button.danger { color: var(--rot); } button:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=number], input[type=password], input[type=url], input[type=date], select, textarea { font: inherit; padding: 5px 7px; border: 1px solid #b9bec5; border-radius: 4px; width: 100%; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
table { border-collapse: collapse; width: 100%; font-size: 13px; } th, td { border-bottom: 1px solid var(--line); padding: 5px 4px; text-align: left; vertical-align: top; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fehler { color: var(--rot); font-weight: bold; } .gut { color: var(--ok); font-weight: bold; } .warnc { color: var(--warn); } .empty { color: var(--mute); font-style: italic; padding: 8px 0; }
.karte { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.row { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; margin: 6px 0; } .row > label { flex: 1 1 90px; font-size: 12px; color: var(--mute); }
.row > label input, .row > label select, .row > label textarea { margin-top: 2px; }
.chip { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.35); }

/* Kopfzeile */
.kopf { display: flex; align-items: center; gap: 18px; padding: 0 16px; height: 46px; background: #16181d; color: #fff; position: sticky; top: 0; z-index: 20; }
.kopf .marke { color: #fff; font-weight: bold; text-decoration: none; font-size: 15px; white-space: nowrap; } .kopf .marke span { font-weight: normal; opacity: .7; }
.kopf nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; } .kopf nav a { color: #d6dae0; text-decoration: none; padding: 6px 10px; border-radius: 5px; white-space: nowrap; }
.kopf nav a:hover { background: #2a2e36; } .kopf nav a.aktiv { background: #fff; color: #16181d; font-weight: bold; } .kopf nav a.leise { margin-left: auto; opacity: .7; }
main { padding: 18px 20px 40px; max-width: 1180px; margin: 0 auto; } main.schmal { max-width: 440px; padding-top: 8vh; }
main.schmal form { display: grid; gap: 12px; } main.schmal label { font-size: 12px; color: var(--mute); display: grid; gap: 3px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 14px 0; }
.kachel { display: block; text-decoration: none; color: var(--ink); } .kachel:hover { border-color: var(--acc); } .kachel b { font-size: 16px; display: block; margin-bottom: 4px; } .kachel .zahl { font-size: 26px; font-weight: bold; color: var(--acc); }
.hinweis { background: #fff8e1; border: 1px solid #e6c453; border-radius: 6px; padding: 9px 12px; margin: 10px 0; }
.status { min-height: 1.4em; font-size: 12px; color: var(--ok); font-weight: bold; }

/* Planer */
main.seite-planer { padding: 0; max-width: none; height: calc(100% - 46px); }
#app { display: grid; grid-template-columns: minmax(0, 1fr) 390px; height: 100%; }
#stage { position: relative; overflow: hidden; background: #fff; border-right: 1px solid var(--line); }
#stage svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; }
#stage svg.tool { cursor: crosshair; }
#hud { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; font-variant-numeric: tabular-nums; }
#banner { position: absolute; left: 10px; top: 10px; background: #fde8e8; border: 1px solid #c00000; color: #8a0000; border-radius: 6px; padding: 5px 9px; font-weight: bold; max-width: 70%; font-size: 12px; }
#side { overflow: auto; background: var(--panel); padding: 12px 14px 30px; }
#side h1 { font-size: 17px; margin: 0 0 2px; } #side h2 { font-size: 14px; margin: 16px 0 6px; border-top: 1px solid var(--line); padding-top: 10px; }
#side table { font-size: 12.5px; } #side th, #side td { padding: 4px 3px; }
tr.sel td { background: #e8f1ff; } tr.sum td { font-weight: bold; border-top: 2px solid #111; }
.layers label { display: block; font-size: 12.5px; padding: 1px 0; }
#dirty { color: var(--warn); font-weight: bold; }
@media (max-width: 900px) { #app { grid-template-columns: 1fr; grid-template-rows: 58vh auto; height: auto; } #stage { border-right: 0; border-bottom: 1px solid var(--line); } }
@media print { @page { size: A3 landscape; margin: 6mm; } .kopf, #side, #banner, #hud { display: none !important; } main.seite-planer, #app, #stage { height: auto; display: block; } #stage svg { height: auto; aspect-ratio: 420 / 297; } html, body { background: #fff; } }

/* Maße */
.masse td input[type=text], .masse td input[type=date] { padding: 4px 6px; } .masse td.wert { width: 110px; } .masse td.datum { width: 150px; } .masse td.nr { width: 54px; font-weight: bold; white-space: nowrap; }
.masse .prio1 td.nr { color: var(--ok); } .masse tr.erledigt td { background: #f0faf3; }
.pille { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; border: 1px solid var(--line); background: #fff; color: var(--mute); }

/* Moodboard */
#ablage { border: 2px dashed #b9bec5; border-radius: 10px; padding: 22px; text-align: center; background: #fff; color: var(--mute); margin: 12px 0; }
#ablage.ueber, body.zieht #ablage { border-color: var(--acc); background: #e8f1ff; color: var(--ink); }
.filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; } .filter button.on { background: #16181d; border-color: #16181d; }
#wand { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mkarte { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.mkarte .bild { display: block; aspect-ratio: 4 / 3; background: #e9ebef center / cover no-repeat; cursor: zoom-in; border: 0; border-radius: 0; padding: 0; width: 100%; }
.mkarte .link { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #eef2f7; padding: 12px; text-align: center; word-break: break-all; font-size: 12px; }
.mkarte .unten { padding: 8px; display: grid; gap: 5px; } .mkarte .unten .row { margin: 0; }
#lupe { position: fixed; inset: 0; background: rgba(0,0,0,.86); z-index: 50; display: none; align-items: center; justify-content: center; cursor: zoom-out; } #lupe.auf { display: flex; } #lupe img { max-width: 94vw; max-height: 92vh; }

/* Druck: feste nutzbare A3-Höhe verhindert eine leere Folgeseite. */
@media print {
  html, body { height: auto !important; }
  main.seite-planer, #app, #stage { height: 284mm !important; overflow: hidden; }
  #stage svg { width: 100%; height: 282mm; aspect-ratio: auto; }
}

@media (max-width: 600px) {
  .seite-masse .karte, .seite-dokumente .karte { max-width: 100%; overflow-x: auto; }
  input[type=file] { max-width: 100%; }
  .row > label { min-width: 0; }
}
