/* Finanzi – ein Stylesheet für die Anmeldeseite und die geschützten Seiten.
   Kundenmarke DK (abgeleitet von dk-projekt.de: Schwarz, Akzentgelb #FFC700, Hellgrau #F4F4F2) im Produktrahmen
   PAQ8 mind (Anthrazit #20303A, Teal hell #E8F2F2) – wie DK Monti. Freigabe des Designs durch DK offen. */
:root {
  --ink: #111111; --accent: #FFC700; --bg: #F4F4F2; --card: #FFFFFF; --muted: #6B6B6B; --line: #E3E3DE;
  --error: #B42318; --error-bg: #FEF3F2; --ok: #1A7F37; --ok-bg: #EDF7EF; --warn: #8A5A00; --warn-bg: #FFF6DB;
  --pf-anthracite: #20303A; --pf-teal-light: #E8F2F2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Produktrahmen PAQ8 mind */
.platform-bar { background: var(--pf-anthracite); color: #fff; font-size: 13px; line-height: 1.2; }
.platform-bar .wrap { min-height: 34px; padding-top: 8px; padding-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.platform-mark { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; font-size: 17px; line-height: 1; }
.platform-mark img { display: block; height: 18px; width: auto; filter: brightness(0) invert(1); }
.platform-mark span { font-weight: 500; color: var(--pf-teal-light); }
.platform-claim { color: rgba(255, 255, 255, .78); letter-spacing: .04em; }

/* Kopfzeile mit Kundenmarke */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 14px; padding-bottom: 14px; }
.wordmark { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; padding-bottom: 3px; border-bottom: 3px solid var(--accent); font-size: 16px; white-space: nowrap; }
.product { font-weight: 700; font-size: 18px; }
.user { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--muted); }
a.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.mainnav { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 18px; }
.mainnav a { font-weight: 800; font-size: 16px; color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 8px; border: 2px solid transparent; }
.mainnav a:hover { border-color: var(--accent); }
.mainnav a[aria-current="page"] { background: var(--accent); }
main.wide { max-width: 1240px; }
.gear { display: inline-flex; padding: 6px; border-radius: 8px; color: var(--ink); }
.gear svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.gear:hover, .gear[aria-current="page"] { background: var(--bg); box-shadow: inset 0 -3px 0 var(--accent); }

main.wrap { flex: 1; padding-top: 28px; padding-bottom: 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin: 0 0 18px; }
.narrow { max-width: 460px; }
.card h1 { font-size: 24px; margin: 0 0 8px; }
.card h2 { font-size: 19px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card > .small { margin: 12px 0 0; }
p { margin: 0 0 14px; }
ol.steps { margin: 0 0 16px; padding-left: 22px; }
ol.steps li { margin-bottom: 10px; }
dl.key { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0 0; }
dl.key dt { color: var(--muted); font-size: 13px; padding-top: 2px; }
dl.key dd { margin: 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.secret { font-size: 17px; letter-spacing: .04em; word-break: break-word; }
ul.codes { list-style: none; margin: 0 0 14px; padding: 12px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 14px; background: var(--bg); border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], select { font: inherit; padding: 10px 12px; border: 1px solid #CFCFC8; border-radius: 8px; background: #fff; width: 100%; }
table input[type="text"], table input[type="number"], table select { padding: 6px 8px; min-width: 70px; }
td.num, th.num { text-align: right; white-space: nowrap; }
input[type="number"] { text-align: right; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tabs a { padding: 8px 14px; border-radius: 8px; border: 1px solid #CFCFC8; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.back { display: inline-block; margin: 0 0 14px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 12px; }
.toolbar .field { margin-bottom: 0; min-width: 170px; }
.ok { color: var(--ok); background: var(--ok-bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.icon { padding: 4px 9px; font-size: 15px; line-height: 1; }
.tag.archiviert { background: #EAEAE5; color: var(--muted); }
input.code { max-width: 180px; font-size: 20px; letter-spacing: .2em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.check { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row .field { flex: 1; min-width: 220px; margin-bottom: 0; }

button, .button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid transparent; padding: 9px 16px; font-weight: 600; text-decoration: none; display: inline-block; text-align: center; }
.primary { background: var(--ink); color: #fff; }
.primary:hover { background: #000; box-shadow: inset 0 -3px 0 var(--accent); }
.secondary { background: #fff; color: var(--ink); border-color: #CFCFC8; }
.secondary:hover { border-color: var(--ink); }
.tiny { padding: 5px 10px; font-size: 13px; }
.block { display: block; width: 100%; }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-weight: 400; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.error { color: var(--error); background: var(--error-bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.notice { color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }

.scroll { overflow-x: auto; margin: 0 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
td.actions-cell { white-space: nowrap; text-align: right; }
td.actions-cell button { margin-left: 6px; }
td.order-cell { white-space: nowrap; width: 1%; }
td.order-cell button + button { margin-left: 4px; }
.tag { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; background: #EAEAE5; color: var(--muted); }
.tag.aktiv, .tag.yes { background: var(--ok-bg); color: var(--ok); }
.tag.gesperrt { background: var(--error-bg); color: var(--error); }

footer { background: #fff; border-top: 1px solid var(--line); }
footer .wrap { padding-top: 18px; padding-bottom: 22px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--muted); }
/* Belegupload */
#messages .ok, #messages .error { font-size: 16px; padding: 14px 18px; margin: 0 0 16px; border-left: 5px solid currentColor; }
#messages .ok { font-weight: 700; }
#messages .error ul { margin: 6px 0 0; padding-left: 20px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center;
  min-height: 340px; padding: 40px 24px; border: 3px dashed #CFCFC8; border-radius: 16px; background: #fff; transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--accent); background: #FFF9E0; }
.dropzone svg { width: 64px; height: 64px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dropzone h2 { font-size: 26px; margin: 0; }
.dropzone .rules { color: var(--muted); margin: 0; }
.dropzone .button { font-size: 17px; padding: 12px 22px; }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 16px; }
.kind { display: block; border: 2px solid #CFCFC8; border-radius: 12px; padding: 16px; cursor: pointer; background: #fff; }
.kind input { margin-right: 8px; }
.kind strong { font-size: 17px; }
.kind span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.kind:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 -4px 0 var(--accent); }
.projects-pick td { vertical-align: middle; }
.projects-pick input.percent, #file-table input.amount { max-width: 160px; text-align: right; }
#file-table td.num, .projects-pick td.num { width: 1%; }
.sum { font-weight: 700; }
progress { width: 140px; }
@media (max-width: 760px) { .mainnav { margin-left: 0; width: 100%; order: 3; } }
@media (max-width: 560px) { .user span { display: none; } .platform-claim { display: none; } }
