/* Bit & Bytes Ticketsystem – ein Stylesheet, keine externen Abhängigkeiten */
:root {
  --bg: #f2f2f2; --surface: #fff; --surface-2: #f6f7f7; --line: #e3e5e6; --line-2: #cfd3d5;
  --text: #2c3236; --muted: #666666; --head: #3d5b63;
  --brand: #1f7a46; --brand-2: #175c35; --brand-soft: #e3f6ea;
  --ok: #2f7d4f; --ok-soft: #e5f4ea; --warn: #b8690a; --warn-soft: #fdf1df; --err: #b83228; --err-soft: #fbe8e6; --info-soft: #e7f0fb;
  --radius: 4px; --shadow: 0 1px 2px rgba(45, 65, 70, .06), 0 2px 8px rgba(45, 65, 70, .05);
  --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: 'Barlow Condensed', var(--font);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: 14px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--font-head); font-size: 1.95rem; font-weight: 600; margin: 0 0 .4rem; color: var(--head); letter-spacing: .01em; }
h3 { font-size: 1rem; margin: 0 0 .7rem; color: var(--head); }
.sub { color: var(--muted); margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.nowrap { white-space: nowrap; }
.hint { color: var(--muted); font-size: .9em; margin: .2rem 0 .6rem; }
.empty { color: var(--muted); text-align: center; padding: 1.6rem; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- Kopfleiste ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: 0 1.2rem; height: 54px;
  background: var(--head); color: #dfe8ef; }
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 650; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand span { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; line-height: 1.1; }
.brand small { display: block; font-family: var(--font); font-weight: 400; font-size: .66rem; color: #9fb3c2; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.nav { display: flex; list-style: none; margin: 0; padding: 0; height: 54px; }
.nav-item { position: relative; }
.nav-item > a { display: flex; align-items: center; gap: .35rem; height: 54px; padding: 0 .8rem; color: #c9d6e0; border-bottom: 3px solid transparent;
  text-transform: uppercase; font-size: .8rem; font-weight: 600; letter-spacing: .04em; }
.nav-item > a:hover, .nav-item:hover > a { color: #fff; text-decoration: none; background: rgba(255,255,255,.04); }
.nav-item.active > a { color: #fff; border-bottom-color: #4fc77c; }
.caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; opacity: .7; }
.dropdown { display: none; position: absolute; top: 54px; left: 0; min-width: 250px; list-style: none; margin: 0; padding: .35rem 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 8px 24px rgba(16,33,50,.14); }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { display: block; }
.dropdown a { display: block; padding: .5rem 1rem; color: var(--text); }
.dropdown a:hover { background: var(--brand-soft); text-decoration: none; }
.search { margin-left: auto; }
.search input { width: 230px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; }
.search input::placeholder { color: #8ea3b3; }
.user { position: relative; display: flex; align-items: center; gap: .7rem; white-space: nowrap; }
.user-toggle { background: none; border: 0; cursor: pointer; font: inherit; color: #fff; font-weight: 600; display: flex; align-items: center; gap: .55rem; padding: .3rem .2rem; border-radius: 999px; }
.user-toggle:hover { background: rgba(255,255,255,.08); }
.user.open .user-toggle .caret { transform: rotate(180deg); }
.user-avatar { display: flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.16); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .85rem; letter-spacing: 0; }
.user-dropdown { display: block; top: calc(100% + 10px); left: auto; right: 0; min-width: 220px; padding: .4rem 0; border-radius: var(--radius);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease; }
.user.open .user-dropdown { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.user-dropdown-head { display: flex; align-items: center; gap: .6rem; padding: .3rem 1rem .7rem; margin-bottom: .3rem; border-bottom: 1px solid var(--line); }
.user-dropdown-head .user-avatar { width: 34px; height: 34px; font-size: 1rem; background: var(--brand); }
.user-dropdown-head strong { display: block; font-size: .92rem; color: var(--head); }
.user-dropdown-head small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.user-dropdown a, .user-dropdown .link { display: block; width: 100%; text-align: left; padding: .55rem 1rem; color: var(--text); font-weight: 400; background: none; border: 0; font: inherit; cursor: pointer; }
.user-dropdown a:hover { background: var(--brand-soft); text-decoration: none; }
.user-dropdown form { margin: 0; }
.user-dropdown .link { color: var(--err); }
.user-dropdown .link:hover { background: var(--err-soft); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }

main { max-width: 1180px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
main.wide { max-width: 1480px; }
footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 1.2rem; border-top: 1px solid var(--line); }

/* ---------- Elemente ---------- */
input, select, textarea { font: inherit; color: inherit; padding: .48rem .6rem; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; }
input[type=color] { padding: 2px; height: 34px; width: 56px; }
textarea { resize: vertical; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .85rem; color: #33424f; }
label > input, label > select, label > textarea, label > .with-side { margin-top: .3rem; font-weight: 400; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 400; }
label.inline input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 650; padding: 0 .3rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .5rem .95rem; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: .82rem; cursor: pointer; white-space: nowrap; line-height: 1.25; }
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: #b9c4cc; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-success:hover { background: #276a43; }
.btn-danger { background: var(--surface); border-color: #e3b4b0; color: var(--err); }
.btn-danger:hover { background: var(--err-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); border-color: transparent; }
.btn-sm { padding: .3rem .6rem; font-size: .72rem; letter-spacing: .02em; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.danger, .danger { color: var(--err); }
.chip { display: inline-block; padding: .22rem .6rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.btn-row form, form.inline { display: inline; margin: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card.narrow { max-width: 560px; }
.flash { padding: .7rem .95rem; border-radius: var(--radius); margin: 0 0 1rem; border: 1px solid; }
.flash-ok { background: var(--ok-soft); border-color: #bfe0cb; color: #1f5a37; }
.flash-error { background: var(--err-soft); border-color: #efc2bd; color: #8a241c; }
.flash-info { background: var(--warn-soft); border-color: #f0d3a5; color: #7a4708; }

.badge { display: inline-block; padding: .14rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.st-open { background: var(--info-soft); color: #1e4f8a; }
.st-progress { background: var(--ok-soft); color: #1f5a37; }
.st-wait { background: var(--warn-soft); color: #87500a; }
.st-closed { background: #eceff2; color: #59656f; }
.prio { font-weight: 650; color: var(--c); white-space: nowrap; }
.prio::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 5px; vertical-align: 1px; }
.tag { display: inline-block; padding: .05rem .45rem; border-radius: 4px; font-size: .76rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-2); white-space: nowrap; }
.tag-warn { background: var(--warn-soft); color: #87500a; }
.tag-plan { background: #eef0fb; color: #3a4a9a; }
.warn-text { color: var(--warn); font-weight: 600; }

/* ---------- Tabellen ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.table th, .table td { padding: .58rem .7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafcfd; }
.table tfoot td { background: var(--surface-2); font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { white-space: nowrap; width: 1%; }
.table tr[data-href] { cursor: pointer; }
.table tr.unassigned td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.table tr.overdue td { background: var(--err-soft); }
.table tr.today td { background: var(--warn-soft); }
.table tr.consult td { background: #fffaf0; }
.table tr.cancelled td { color: var(--muted); text-decoration: line-through; }
.sortable th { cursor: pointer; user-select: none; }
.sortable th.asc::after { content: " ▲"; font-size: .7em; } .sortable th.desc::after { content: " ▼"; font-size: .7em; }
.icon { display: inline-block; padding: 2px 5px; border-radius: 4px; }
.icon:hover { background: var(--brand-soft); text-decoration: none; }
.edit-table td { padding: .35rem .45rem; vertical-align: middle; }
.edit-table input, .edit-table select, .edit-table textarea { padding: .35rem .5rem; }
.edit-table form { display: inline; }
.new-row td { background: var(--surface-2); }
.w-num { max-width: 110px; }
.scroll-x { overflow-x: auto; }
.matrix th, .matrix td { padding: .35rem .3rem; text-align: center; font-size: .82rem; }
.matrix td a { color: var(--text); display: block; }
.matrix td.ok { background: var(--ok-soft); }
.matrix td.open { background: var(--warn-soft); }
.matrix th.we { background: #eef1f4; }

/* ---------- Layout-Bausteine ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin-bottom: .15rem; }
.page-head .sub { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 .9rem; }
.toolbar input, .toolbar select { width: auto; }
.toolbar .grow { flex: 1; min-width: 220px; }
.toolbar .spacer { flex: 1; }
.table-filter { width: 240px !important; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.inline-form input, .inline-form select { width: auto; flex: 0 1 auto; }
.inline-form input[name=text] { flex: 1; min-width: 200px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4rem; }
.grid2.tight { gap: 0 .8rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-side { display: grid; grid-template-columns: 1fr 290px; gap: 1rem; align-items: start; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.danger-zone { margin-top: 1rem; text-align: right; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 .8rem; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; text-align: right; }

/* Dashboard */
.dash { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) 2fr 1.4fr; gap: .8rem; margin-bottom: 1.2rem; }
.tile { display: flex; flex-direction: column; justify-content: space-between; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); min-height: 96px; }
.tile:hover { border-color: var(--brand); text-decoration: none; }
.tile span { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.tile strong { font-family: var(--font-head); font-size: 2.3rem; font-weight: 600; color: var(--head); font-variant-numeric: tabular-nums; }
.tile.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.tile.warn strong { color: var(--warn); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; box-shadow: var(--shadow); max-height: 150px; overflow: auto; }
.panel h3 { font-size: .85rem; margin-bottom: .35rem; }
.panel ul { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.panel li { padding: .15rem 0; border-bottom: 1px dashed var(--line); }
.panel li:last-child { border: 0; }
.panel time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Tabs */
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 0; flex-wrap: wrap; }
.tabs a { padding: .6rem .95rem; color: var(--muted); border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; font-weight: 700; margin-bottom: -1px;
  text-transform: uppercase; font-size: .8rem; letter-spacing: .03em; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { background: var(--surface); color: var(--head); border-color: var(--line); }
.tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); font-size: .75rem; text-align: center; }
.tab-panel { border-top-left-radius: 0; }

.meta-row { display: flex; flex-wrap: wrap; gap: .4rem 2rem; padding: .7rem .9rem; background: var(--surface-2); border-radius: var(--radius); margin-bottom: 1rem; }
.meta-row span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.phone { display: inline-block; margin-right: .5rem; font-variant-numeric: tabular-nums; }
.customer-note { background: var(--warn-soft); border: 1px solid #f0d3a5; color: #6b3f07; padding: .55rem .75rem; border-radius: 6px; margin: -.3rem 0 .9rem; font-size: .9rem; }
.customer-note.popup { border-width: 2px; font-weight: 600; }

.timeline { margin-top: 1rem; }
.tl-item { border-left: 3px solid var(--brand-soft); padding: .3rem 0 .8rem .9rem; }
.tl-head { color: var(--muted); font-size: .85rem; margin-bottom: .2rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.checklist li span { flex: 1; }
.checklist li.done span { text-decoration: line-through; color: var(--muted); }
.checklist form { margin: 0; }
.check { background: none; border: 0; font-size: 1.25rem; cursor: pointer; line-height: 1; padding: 0; color: var(--brand); }

/* Zeiterfassung */
.with-side { display: grid; grid-template-columns: 1fr 230px; gap: .8rem; }
.side { display: flex; flex-direction: column; gap: .4rem; }
.quick-dur { display: flex; flex-wrap: wrap; gap: .3rem; margin: -.5rem 0 .9rem; }
.toggles { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin: .4rem 0 1rem; }
.switch { display: inline-flex; align-items: center; gap: .55rem; font-weight: 500; margin: 0 0 .5rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slider { width: 38px; height: 22px; border-radius: 999px; background: #c9d2d9; position: relative; transition: background .15s; flex: none; }
.slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::after { transform: translateX(16px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--brand); outline-offset: 2px; }
.sigpad { display: block; width: 100%; max-width: 560px; height: 170px; border: 1px dashed var(--line-2); border-radius: 6px; background: #fff; touch-action: none; margin-bottom: .5rem; }
.sig-img { max-height: 70px; border: 1px solid var(--line); border-radius: 4px; vertical-align: middle; background: #fff; }
.article-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .45rem; }
.article-row select { flex: 1; }
.article-row .qty { width: 80px; }
.week { display: flex; gap: .4rem; align-items: stretch; margin-bottom: 1rem; overflow-x: auto; }
.week .day { flex: 1; min-width: 86px; padding: .45rem .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--text); text-align: center; }
.week .day span { display: block; font-size: .78rem; color: var(--muted); }
.week .day.on { border-color: var(--brand); background: var(--brand-soft); }
.week .day.closed strong::after { content: " ✔"; color: var(--ok); }
.week .day:hover { text-decoration: none; border-color: var(--brand); }
.week .btn { align-self: center; }
.summary .btn-block { margin-top: .4rem; }

/* Auswertungen */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow); }
.kpi span { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kpi strong { font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; color: var(--head); font-variant-numeric: tabular-nums; }
.kpi small { display: block; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: .45rem; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 32%) 1fr 64px; gap: .6rem; align-items: center; font-size: .88rem; }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bar { height: 12px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 0 3px 3px 0; }

/* Kombobox-Filter */
.filter-wrap { position: relative; margin-top: .3rem; }
.filter-wrap .filter-input { margin-bottom: .3rem; }
.filter-wrap select { margin-top: 0; }

/* ---------- Login ---------- */
body.bare { background: linear-gradient(160deg, #1c2a2d 0%, #3d5b63 55%, #1f7a46 140%); min-height: 100vh; }
.login { max-width: 380px; margin: 0 auto; padding: 12vh 1rem 2rem; }
.login-brand { display: flex; align-items: center; gap: .8rem; color: #fff; margin-bottom: 1.2rem; }
.login-brand strong { display: block; font-family: var(--font-head); font-size: 1.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.login-brand span { color: #a9e2bf; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.login .card { padding: 1.5rem; }
.login h1 { font-size: 1.25rem; margin-bottom: 1rem; }

/* ---------- Leistungsnachweis (Druck) ---------- */
.print-doc { max-width: 820px; margin: 1.5rem auto; background: #fff; padding: 2.4rem 2.6rem; box-shadow: 0 6px 30px rgba(0,0,0,.25); font-size: 13px; color: #111; }
body.bare:has(.print-doc) { background: #5d6a75; }
.print-actions { text-align: right; margin: -1rem -1rem 1rem 0; }
.pd-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--brand); padding-bottom: .8rem; margin-bottom: 1.6rem; }
.pd-company strong { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--brand-2); }
.pd-meta { display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 1.8rem; }
.pd-address small { color: #666; font-size: .72rem; text-decoration: underline; }
.pd-info td { padding: .1rem 0 .1rem 1rem; } .pd-info td:first-child { color: #666; padding-left: 0; }
.print-doc h1 { font-size: 1.35rem; margin: 0 0 .8rem; }
.pd-table { width: 100%; border-collapse: collapse; margin: .6rem 0 1.4rem; }
.pd-table th { text-align: left; border-bottom: 1.5px solid #333; padding: .35rem .4rem; font-size: .8rem; }
.pd-table td { border-bottom: 1px solid #ddd; padding: .45rem .4rem; vertical-align: top; }
.pd-table tfoot td { border-top: 1.5px solid #333; border-bottom: 0; font-weight: 600; }
.pd-table .num { text-align: right; white-space: nowrap; }
.pd-sigs { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1rem 0; }
.pd-sigs figure { margin: 0; } .pd-sigs img { height: 70px; border-bottom: 1px solid #333; display: block; }
.pd-sigs figcaption { font-size: .8rem; color: #555; }
.pd-foot { margin-top: 2rem; border-top: 1px solid #ccc; padding-top: .6rem; font-size: .82rem; }

@media print {
  @page { size: A4; margin: 14mm; }
  body, body.bare, body.bare:has(.print-doc) { background: #fff !important; }
  .no-print, .topbar, footer { display: none !important; }
  .print-doc { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .pd-table tr { break-inside: avoid; }
}

/* ---------- Responsiv ---------- */
@media (max-width: 1250px) {
  .dash { grid-template-columns: repeat(4, 1fr); }
  .panel { grid-column: span 2; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .search input { width: 170px; }
}
@media (max-width: 980px) {
  .nav-toggle { display: block; margin-left: auto; }
  .topbar nav { display: none; position: absolute; top: 54px; left: 0; right: 0; background: var(--head); max-height: calc(100vh - 54px); overflow: auto; }
  body.nav-open .topbar nav { display: block; }
  .nav { flex-direction: column; height: auto; }
  .nav-item > a { height: 46px; }
  .nav-item .dropdown { display: block; position: static; background: transparent; border: 0; box-shadow: none; padding: 0 0 .4rem 1rem; }
  .nav-item .dropdown a { color: #b9c9d5; padding: .35rem .8rem; }
  .nav-item .dropdown a:hover { background: rgba(255,255,255,.06); }
  .search { display: none; }
  .grid3, .grid-side { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  html { font-size: 15px; }
  main { padding: 1rem .9rem 2rem; }
  .grid2, .with-side { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr 1fr; }
  .panel { grid-column: span 2; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .table { display: block; overflow-x: auto; }
  .table-filter { width: 100% !important; }
  .print-doc { padding: 1.2rem; margin: 0; }
  .pd-meta { flex-direction: column; }
}
