/* MAITEC Service-Portal. Plain, readable, phone first; colours after OIDA's light theme. */
:root {
   --bg: #f3f5f8; --surface: #fff; --text: #17212b; --muted: #5b6b7a; --border: #d5dde5; --accent: #1d71b8;
   --accent-dark: #155a93; --bad: #b42318; --radius: 10px;
}
@media (prefers-color-scheme: dark) {
   :root { --bg: #0f1720; --surface: #17212b; --text: #e8eef4; --muted: #9fb0c0; --border: #2c3a48; --accent: #4c9be0;
      --accent-dark: #3a86c9; --bad: #f97066; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.top { background: #0f2a44; padding: 14px 16px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .12em; font-size: 20px; }
.brand span { font-weight: 500; letter-spacing: .02em; opacity: .8; margin-left: 6px; }
.page { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 28px; margin: 4px 0 8px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.back { margin: 0; font-size: 14px; }
.choices { display: grid; gap: 12px; }
.choice { display: block; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
   color: var(--text); text-decoration: none; }
.choice:hover, .choice:focus-visible { border-color: var(--accent); }
.choice strong { display: block; font-size: 18px; margin-bottom: 2px; color: var(--accent); }
.choice span { color: var(--muted); font-size: 14px; }
form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; border: 0; padding: 0; margin: 0; min-width: 0; }
.wide { grid-column: 1 / -1; }
.field small { font-weight: 400; color: var(--muted); }
small.inline { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], select, textarea {
   width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
   font: inherit; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; padding: 0; }
.radio, .check { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; font-weight: 400; font-size: 15px; padding: 3px 0; }
.check > span:not(.err) { flex: 1 1 0; min-width: 0; }   /* text + links as one piece that wraps (was 32 px sideways on a phone) */
.check > .err { flex-basis: 100%; padding-left: 26px; }
.check input, .radio input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }
.bad input, .bad select, .bad textarea { border-color: var(--bad); }
.err { color: var(--bad); font-size: 13px; font-weight: 600; }
.err:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.filebtn { display: inline-block; align-self: flex-start; padding: 9px 14px; border: 1px dashed var(--accent); border-radius: 8px;
   color: var(--accent); cursor: pointer; font-weight: 600; }
.filebtn input { display: none; }
.files { list-style: none; margin: 0; padding: 0; font-weight: 400; }
.files li { padding: 2px 0; overflow-wrap: anywhere; }
.files button { border: 0; background: none; color: var(--bad); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
button[type=submit], #pf-print { padding: 12px 22px; border: 0; border-radius: 8px; background: var(--accent); color: #fff;
   font: inherit; font-weight: 700; cursor: pointer; }
button[type=submit]:hover, #pf-print:hover { background: var(--accent-dark); }
button[disabled] { opacity: .6; cursor: wait; }
.msg { color: var(--muted); }
.error { color: var(--bad); font-weight: 600; }
.done { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px; }
.done h2 { margin-top: 0; }
.ref { font-size: 34px; font-weight: 800; letter-spacing: .06em; margin: 4px 0 16px; font-family: ui-monospace, Consolas, monospace; }
.steps { padding-left: 20px; }
address { font-style: normal; font-weight: 600; margin: 4px 0 12px 20px; }
.small { font-size: 14px; color: var(--muted); }
.print-only { display: none; }
.foot { max-width: 760px; margin: 0 auto; padding: 0 16px 32px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
@media print {
   /* paper is always light, whatever the screen's scheme (a dark box came out black on black, 12.11.2026) */
   :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #333; --border: #999; }
   .top, .foot, .back, #pf-print, .lead, .steps, .small, .done > p:first-of-type, .done h2 { display: none; }
   body { background: #fff; color: #000; }
   .done { border: 0; padding: 0; background: #fff; }
   .done::before { content: "Begleitschein – bitte der Ware beilegen"; display: block; font-weight: 700; font-size: 18px; }
   address { margin-left: 0; }
   address::before { content: "An: "; font-weight: 400; }
   .ref { font-size: 44px; }
   .print-only { display: block; margin-top: 0; }
   /* only the two copies on paper (the screen part above is left out) */
   .done > :not(.print-only) { display: none !important; }
   .done::before { content: none !important; }
   .copy { height: 132mm; overflow: hidden; padding: 4mm 0; box-sizing: border-box; }
   .copy + .copy { border-top: 1px dashed #000; }
   .copy-label { font-weight: 700; margin: 0 0 2mm; text-align: right; font-size: 11px; }
   .copy h3 { font-size: 16px; margin: 0 0 3mm; }
   .copy dl { font-size: 11px; }
   .copy-adr { font-size: 11px; margin: 2mm 0 0; }
   .copy-note { font-size: 10px; margin: 3mm 0 0; }
   .copy-sig { font-size: 10px; margin: 6mm 0 0; }
   .copy .barcode { display: block; width: 62mm; height: 12mm; margin: 0 0 3mm; fill: #000; }
   @page { size: A4; margin: 10mm; }
   .print-only dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
   .print-only dt { font-weight: 700; }
   .print-only dd { margin: 0; white-space: pre-line; }
}

/* Pool-Planer (/pool) */
.pp-measures { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.pp-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 12px; }
.pp-out { margin-top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.pp-out h2 { margin: 0 0 12px; font-size: 22px; }
.pp-figures { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 16px; }
.pp-figures dt { color: var(--muted); }
.pp-figures dd { margin: 0; font-weight: 600; }
.pp-notes { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.pp-notes:empty { display: none; }
.pp-block h3 { font-size: 16px; margin: 18px 0 6px; }
.pp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pp-table th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); padding: 4px 6px; }
.pp-table td { border-bottom: 1px solid var(--border); padding: 5px 6px; vertical-align: top; overflow-wrap: anywhere; }
.pp-table .num { text-align: right; white-space: nowrap; }
.pp-table .art { white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.tag { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--border); border-radius: 999px; font-size: 11px; color: var(--muted); }
a.button { display: inline-block; padding: 12px 22px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
a.button:hover { background: var(--accent-dark); }
@media (max-width: 480px) { .pp-figures { grid-template-columns: 1fr; gap: 0; } .pp-figures dd { margin-bottom: 6px; } }
[hidden] { display: none !important; }
