:root {
  --ink: #18181a; --ink-2: #4a4a50; --muted: #7b7b82; --line: #e7e4dd; --bg: #f5f3ee; --card: #fff;
  --side: #121213; --side-2: #1d1d1f; --side-ink: #cfcfd2;
  --gold: #c9a44c; --gold-d: #a8832d; --gold-bg: #f6efdc;
  --ft: #c9a44c; --sonne: #e2832b; --sonne-bg: #fcebd9; --grp: #5b6170; --grp-bg: #eceef2;
  --danger: #b4372f; --ok: #2f7a4a;
  --r: 12px; --shadow: 0 1px 2px rgba(20,20,20,.05), 0 2px 8px rgba(20,20,20,.04);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; color: var(--ink); line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: inherit; text-decoration: none; }
h1 { font-size: 1.6rem; margin: 0 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0; }
h2.sub { margin: 1.8rem 0 .7rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
small { display: block; font-size: .82rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ic { width: 18px; height: 18px; flex: none; }

/* Sidebar */
.side { position: fixed; top: 76px; bottom: 0; left: 0; width: 248px; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 14px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.mark { width: 38px; height: 38px; border-radius: 9px; background: #000; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-weight: 800; letter-spacing: .02em; }
.brand-t b { color: #fff; font-size: 1.05rem; display: block; }
.brand-t small { color: #8d8d93; font-size: .74rem; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.side nav a:hover { background: var(--side-2); color: #fff; }
.side nav a.on { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.side nav a.on .ic { color: var(--gold); }
.nav-sep { margin: 18px 12px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #6f6f75; }
.side-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid #2a2a2d; padding-top: 12px; }
.me { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; min-width: 0; color: #fff; font-size: .9rem; }
.me:hover, .me.on { background: var(--side-2); }
.me small { color: #8d8d93; font-size: .74rem; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #141414; display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.av.lg { width: 44px; height: 44px; font-size: .95rem; background: var(--gold-bg); color: var(--gold-d); }
.side .iconbtn { color: #9a9aa0; } .side .iconbtn:hover { background: var(--side-2); color: #fff; }

/* Main */
.main { margin-left: 248px; min-height: 100vh; }
.search { flex: 1; max-width: 460px; margin-left: auto; position: relative; display: flex; align-items: center; }
.search .ic { position: absolute; left: 12px; color: var(--muted); }
.search input { width: 100%; padding: 9px 12px 9px 38px; border-radius: 10px; border: 1px solid #2f2f33; background: #1d1d1f; color: #fff; }
.search input::placeholder { color: #8d8d93; }
.topbar .burger { display: none; color: #cfcfd2; }
.content { padding: 28px 32px 60px; max-width: 1240px; }

/* Bausteine */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.list .row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.list .row:first-child { border-top: 0; }
.list a.row:hover, .list .row a.grow:hover b { color: var(--gold-d); }
.list a.row:hover { background: #fcfbf8; }
.row b { display: block; }
.grow { flex: 1; min-width: 0; }
.empty { color: var(--muted); padding: 22px 18px; margin: 0; text-align: center; }
.empty.big { padding: 80px 20px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.b-ft { background: var(--gold-bg); color: var(--gold-d); }
.b-sonne { background: var(--sonne-bg); color: #b25d14; }
.b-gruppe { background: var(--grp-bg); color: var(--grp); }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: #cfcabe; background: #faf9f6; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--side); color: #fff; border-color: var(--side); }
.btn.primary:hover { background: #000; }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.wide { width: 100%; justify-content: center; padding: 11px; }
.iconbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.iconbtn:hover { background: var(--bg); color: var(--ink); }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.flash.ok { background: #e6f2ea; color: var(--ok); }
.flash.error { background: #f8e5e3; color: var(--danger); }
.page-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.page-h h1 { margin: 0; }
.back { display: inline-block; color: var(--muted); margin-bottom: 14px; font-size: .9rem; }
.back:hover { color: var(--ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 6px 13px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: .87rem; font-weight: 500; }
.chip.on { background: var(--side); color: #fff; border-color: var(--side); }

/* Formulare */
input, select, textarea { font: inherit; color: inherit; padding: 9px 11px; border: 1px solid #dcd8cf; border-radius: 8px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold); }
textarea { resize: vertical; }
.form { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; }
.form label small { font-weight: 400; }
label.check { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; margin-top: 14px; }
.span2 { grid-column: span 2; } .span4 { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions.end { justify-content: flex-end; }
.narrow { max-width: 520px; }
details.add { margin-bottom: 18px; padding: 0; }
details.add summary { padding: 14px 18px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
details.add summary::-webkit-details-marker { display: none; }
details.add[open] summary { border-bottom: 1px solid var(--line); }
details.add > form, details.add > p { padding: 0 18px 18px; }
.filterbar { display: flex; gap: 10px; margin-bottom: 14px; }
.filterbar input { flex: 1; } .filterbar select { width: auto; }

/* Startseite */
.hello { margin-bottom: 20px; }
.hello h1 { font-size: 1.9rem; margin: 0; }
.eyebrow { margin: 0 0 2px; color: var(--gold-d); font-weight: 600; font-size: .85rem; }
.block { margin-bottom: 28px; }
.block-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.more { font-size: .87rem; color: var(--gold-d); font-weight: 600; }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--gold); transform: translateY(-1px); }
.tile-i { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; flex: none; }
.t-ft { background: var(--side); color: var(--gold); }
.t-sonne { background: var(--sonne); color: #fff; }
.t-gruppe { background: var(--grp-bg); color: var(--ink); }
.tile-t { min-width: 0; padding-right: 14px; }
.tile-t small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-ext { position: absolute; top: 10px; right: 10px; width: 14px; height: 14px; color: #bdb8ad; }
.news-row { flex-direction: column; align-items: stretch !important; gap: 4px !important; }
.row-meta { display: flex; align-items: center; gap: 8px; font-size: .82rem; flex-wrap: wrap; }
.pinned { display: inline-flex; align-items: center; gap: 3px; color: var(--gold-d); font-weight: 600; }
.pinned .ic { width: 14px; height: 14px; }
.clamp { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; }
.cal { width: 46px; flex: none; text-align: center; border-radius: 9px; background: var(--gold-bg); color: var(--gold-d); padding: 4px 0; line-height: 1.1; }
.cal b { font-size: 1.15rem; } .cal small { font-size: .7rem; text-transform: uppercase; font-weight: 600; }
.ext { width: 40px; height: 40px; flex: none; border-radius: 8px; background: var(--grp-bg); color: var(--ink-2); display: grid; place-items: center; font-size: .66rem; font-weight: 800; text-transform: uppercase; }

/* Artikel */
.article { padding: 28px 32px; max-width: 780px; }
.article h1 { margin: 10px 0 14px; }
.prose p { margin: 0 0 1em; } .prose a { color: var(--gold-d); text-decoration: underline; }
.article .actions { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 10px; }

/* Dokumente */
.docs-layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
.cats { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.cats a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 7px; font-weight: 500; flex: 1; }
.cats a:hover { background: var(--bg); }
.cats a.on { background: var(--side); color: #fff; } .cats a.on .muted { color: #aaa; }
.cat-item { display: flex; align-items: center; }
.x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: 0 6px; }
.newcat { display: flex; gap: 4px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.newcat input { padding: 6px 9px; font-size: .88rem; }

/* Mitarbeiter */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.person { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.p-head { display: flex; gap: 12px; align-items: center; }
.contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: .9rem; }
.contact li { display: flex; align-items: center; gap: 8px; }
.contact .ic { width: 15px; height: 15px; color: var(--muted); }
.contact a:hover { color: var(--gold-d); }
.contact small { display: inline; }
.resp { margin: 0; font-size: .88rem; }
.p-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; }
.p-foot a.small { color: var(--gold-d); font-weight: 600; }

/* Tabellen-Formulare */
.toolrow { display: grid !important; grid-template-columns: 1fr 1.3fr 1.5fr 150px 64px 90px auto 34px; }
.feat { font-size: .85rem; }
.toolrow.new { background: #fcfbf8; }
.num { text-align: center; }
.userrow { display: grid !important; grid-template-columns: 2fr 1.2fr 160px 50px 50px 110px 190px; }
.userrow.head { padding-top: 10px; padding-bottom: 10px; }
.userrow.inactive { opacity: .55; }

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 20% 0%, #2a2618 0%, #121213 60%); padding: 20px; }
.login { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login .brand { padding: 0 0 6px; }
.login .brand-t b { color: var(--ink); }
.login h1 { margin: 0; font-size: 1.3rem; }
.login label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; }
.login p { margin: 0; text-align: center; }

/* Mobil / Tablet */
@media (max-width: 1050px) { .cols { grid-template-columns: 1fr; } .toolrow { grid-template-columns: 1fr 1fr; } .toolrow .num { width: 100%; } }
@media (max-width: 860px) {
  .side { top: 0; z-index: 40; padding-top: 20px; transform: translateX(-100%); transition: transform .2s; }


  #navtoggle:checked ~ .side { transform: none; }
  #navtoggle:checked ~ .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .main { margin-left: 0; }
  .topbar .burger { display: inline-grid; }
  .content { padding: 20px 16px 50px; }
  .docs-layout, .grid2, .grid4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .userrow { grid-template-columns: 1fr 1fr; }
  .article { padding: 20px; }
}
.person .badge { align-self: flex-start; }
.tile-i { text-transform: capitalize; }


/* Kopfleiste mit Logos */
.topbar { position: sticky; top: 0; z-index: 30; height: 76px; background: var(--side); border-bottom: 1px solid #2a2a2d; display: flex; align-items: center; gap: 16px; padding: 0 28px 0 24px; }
.topbar .brand { display: flex; align-items: center; gap: 20px; padding: 0; }
.logo-ft { height: 46px; width: auto; display: block; }
.logo-sonne { height: 28px; width: auto; display: block; }
.brand-div { width: 1px; height: 38px; background: #3a3a3d; }
.brand-label { margin-left: 4px; padding: 4px 10px; border: 1px solid #4a3f22; border-radius: 99px; font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); font-weight: 700; }
.side nav { padding-top: 6px; }

/* Zugänge */
.access { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 14px; }
.acc { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 20px 22px; border-radius: 14px; background: var(--side); color: #fff; border: 1px solid #2a2a2d; transition: transform .15s, border-color .15s, box-shadow .15s; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.acc:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.acc-logo { display: flex; align-items: center; justify-content: center; width: 150px; height: 56px; padding-right: 18px; border-right: 1px solid #2f2f33; }
.acc-logo img { max-width: 100%; max-height: 100%; }
.acc-sonne .acc-logo img { max-height: 30px; }
.acc-t b { font-size: 1.05rem; display: block; }
.acc-t small { color: #9a9aa0; }
.acc-go { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.acc-go .ic { width: 15px; height: 15px; }
@media (max-width: 520px) { .acc { grid-template-columns: 1fr auto; } .acc-logo { grid-column: 1 / -1; justify-content: flex-start; border-right: 0; height: 40px; width: auto; } }

/* Login-Logos */
.login-wrap { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 26px; align-items: center; }
.login-logos { display: flex; align-items: center; gap: 22px; }
.l-ft { width: 150px; height: auto; }
.l-sonne { height: 64px; width: auto; }
.l-div { width: 1px; height: 54px; background: #3a3a3d; }
@media (max-width: 860px) {
  .logo-ft { height: 34px; } .logo-sonne { height: 20px; } .brand-div { height: 28px; } .brand-label { display: none; }
  .topbar { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 12px; }
  .topbar .brand { gap: 14px; }
  .topbar .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .access { grid-template-columns: 1fr; }
}

/* F&T Wohnen */
.logo-wohnen { height: 46px; width: auto; display: block; }
.l-wohnen { height: 64px; width: auto; }
.login-wrap .login { max-width: 380px; }
.b-wohnen { background: #efe7e3; color: #6b3a2d; }
.t-wohnen { background: #572f25; color: #fff; }
@media (max-width: 860px) { .logo-wohnen { height: 32px; } }
@media (max-width: 420px) { .logo-ft { height: 28px; } .logo-sonne { height: 16px; } .logo-wohnen { height: 28px; } .topbar .brand { gap: 10px; } .login-logos { gap: 14px; } .l-ft { width: 110px; } .l-sonne, .l-wohnen { height: 48px; } }

/* ---------- Rechnungen ---------- */
.subnav { display: flex; gap: 4px; margin: -4px 0 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; font-weight: 600; font-size: .9rem; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); border-bottom-color: var(--gold); }
.subnav .ic { width: 16px; height: 16px; }
.st { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.st .ic { width: 13px; height: 13px; }
.st-draft { background: #eceef2; color: #5b6170; }
.st-final { background: var(--gold-bg); color: var(--gold-d); }
.st-sent { background: #e5eefb; color: #2d5aa0; }
.st-paid, .st-ok { background: #e6f2ea; color: var(--ok); }
.st-cancelled { background: #f1eeee; color: #8a7070; text-decoration: line-through; }
.st-overdue, .st-err { background: #f8e5e3; color: var(--danger); }
.warn { color: var(--danger) !important; font-weight: 600; }
.r { text-align: right; }
.tiny { font-size: .72rem; word-break: break-all; }

.ansage { padding: 18px 20px; margin-bottom: 18px; border-color: #e6d9b4; background: linear-gradient(180deg, #fffdf7, #fff); }
.ansage-h { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ansage-h > div { flex: 1; }
.ansage-h select { width: auto; }
.spark { width: 38px; height: 38px; border-radius: 10px; background: var(--side); color: var(--gold); display: grid; place-items: center; flex: none; }
.ansage textarea { font-size: .95rem; }
.ansage-f { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ansage-f #ansageBtn { margin-left: auto; }
#micBtn.rec { background: var(--danger); color: #fff; border-color: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .75; } }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 1.35rem; letter-spacing: -.01em; }
.kpi:hover { border-color: var(--gold); }
.invrow { display: grid !important; grid-template-columns: 1.3fr 1.6fr 1fr 120px 150px; }
.invrow.head, .artrow.head { padding-top: 10px !important; padding-bottom: 10px !important; }
.custrow { display: grid !important; grid-template-columns: 1.4fr 1.6fr 1.2fr 80px; }
.custrow.inactive, .artrow.inactive { opacity: .5; }
.artrow { display: grid !important; grid-template-columns: 80px 2.4fr 110px 100px 70px 40px 40px 96px; gap: 8px !important; }
.artrow.new { background: #fcfbf8; }
.artrow input[type=checkbox] { width: 18px; height: 18px; justify-self: center; }

.inv-form .card { margin-bottom: 16px; }
.notes { padding: 14px 18px; margin-bottom: 16px; background: #fffaf0; border-color: #ecdcb0; }
.notes b { display: flex; align-items: center; gap: 7px; } .notes ul { margin: 8px 0 0; padding-left: 20px; } .notes li { margin: 3px 0; }
.newcust { padding: 14px; background: #fcfbf8; border-radius: 10px; border: 1px dashed #dcd8cf; }
.hint { align-self: center; }
.lines-card { padding: 18px; }
.lines-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.artpick { position: relative; flex: 1; max-width: 420px; display: flex; align-items: center; }
.artpick .ic { position: absolute; left: 11px; color: var(--muted); }
.artpick input { padding-left: 36px; }
.ltable { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.lrow { display: grid; grid-template-columns: 1fr 80px 100px 120px 70px 44px 110px 64px; gap: 8px; align-items: start; padding: 10px 12px; border-top: 1px solid var(--line); }
.lrow.lhead { border-top: 0; background: #f7f5f0; padding: 8px 12px; }
.lrow .num { text-align: right; }
.lname { display: flex; flex-direction: column; gap: 5px; }
.ldesc { font-size: .85rem; padding: 6px 10px; color: var(--ink-2); }
.lrow input[type=checkbox] { width: 18px; height: 18px; margin-top: 10px; justify-self: center; }
.ltotal { font-weight: 700; padding-top: 9px; }
.lact { display: flex; gap: 2px; padding-top: 2px; }
.totals { margin-left: auto; max-width: 340px; display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.totals div { display: flex; justify-content: space-between; gap: 20px; }
.totals .grand { border-top: 2px solid var(--ink); padding-top: 7px; font-weight: 800; font-size: 1.1rem; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(245,243,238,.94); backdrop-filter: blur(6px); padding: 12px 0; border-top: 1px solid var(--line); z-index: 5; }

.show-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.pdfbox { overflow: hidden; height: calc(100vh - 230px); min-height: 640px; }
.pdfbox iframe { width: 100%; height: 100%; border: 0; display: block; }
.side-col { display: flex; flex-direction: column; gap: 14px; }
.pad { padding: 18px; }
.pad h2 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
details.pad summary { list-style: none; cursor: pointer; } details.pad summary::-webkit-details-marker { display: none; }
details.pad summary h2 { margin: 0; } details.pad[open] summary h2 { margin-bottom: 12px; }
.checks { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; padding: 8px 10px; border-radius: 8px; }
.checks .ic { width: 16px; height: 16px; margin-top: 2px; }
.checks .err { background: #f8e5e3; color: var(--danger); }
.checks .wrn { background: #fff4dc; color: #8a5a00; }
.checks .ok { background: #e6f2ea; color: var(--ok); }
.release { display: flex; flex-direction: column; gap: 12px; }
.release .check { align-items: flex-start !important; font-size: .88rem; }
.release .check input { margin-top: 3px; }
.form.tight { padding: 0; gap: 10px; }
.facts { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; margin: 0 0 14px; font-size: .9rem; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.inline-form { display: flex; gap: 8px; } .inline-form input { flex: 1; }
.danger-zone summary { cursor: pointer; color: var(--danger); }
.danger-zone form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.log li { border-left: 2px solid var(--line); padding-left: 10px; }
.log b { display: block; font-size: .9rem; }
.related { padding: 10px 14px; margin-bottom: 14px; } .related a { color: var(--gold-d); font-weight: 600; }
.logo-prev { padding: 14px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; width: fit-content; }
.logo-prev img { max-height: 70px; display: block; }
.form h2 { font-size: 1rem; }
@media (max-width: 1100px) { .show-grid { grid-template-columns: 1fr; } .pdfbox { height: 70vh; } }
@media (max-width: 860px) {
  .invrow { grid-template-columns: 1fr 1fr; } .custrow { grid-template-columns: 1fr; }
  .lrow { grid-template-columns: 1fr 1fr 1fr; } .lname { grid-column: 1 / -1; } .lrow.lhead { display: none; }
  .artrow { grid-template-columns: 1fr 1fr; }
  .ansage-h { flex-wrap: wrap; }
}
