/* BildDoku App – Designwerte aus dem Handoff (Modernist): Radius 0, Akzent #C6A97F.
   Schrift: Archivo, falls auf dem Gerät vorhanden; sonst Systemschrift.
   (Google Fonts bewusst nicht eingebunden – Datenschutz; Archivo bei Bedarf lokal bündeln.) */
.bd-app {
	--bd-bg: #fff;
	--bd-surface: #f1f0f0;
	--bd-text: #201e1d;
	--bd-divider: rgba(32, 30, 29, .55);
	--bd-accent: #C6A97F;
	--bd-accent-text: color-mix(in oklch, #C6A97F, black 50%);
	--bd-danger: #a4291f;
	font-family: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 17px;
	color: var(--bd-text);
	background: var(--bd-bg);
	max-width: 640px;
	margin: 0 auto;
	padding: 0 16px 96px;
	box-sizing: border-box;
}
.bd-app *, .bd-app *::before, .bd-app *::after { box-sizing: border-box; border-radius: 0; }
.bd-app h1, .bd-app h2 { font-weight: 800; letter-spacing: -.015em; margin: 0; }
/* Themes färben Überschriften oft hell oder in Großbuchstaben; in der App immer dunkel auf weiß. */
.bd-app.bd-app h1, .bd-app.bd-app h2, .bd-app.bd-app h3 { color: var(--bd-text) !important; text-transform: none; font-family: inherit; }
.bd-brand { font-size: 44px; margin: 24px 0 8px; }
.bd-hint { color: #605d5d; }
.bd-kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--bd-accent-text); letter-spacing: .04em; }

.bd-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 2px solid var(--bd-text); }
.bd-top .bd-user { font-size: 14px; color: #605d5d; }
.bd-top a { color: var(--bd-text); font-size: 14px; }
.bd-title { font-size: 32px; margin: 24px 0 16px; }

.bd-btn { display: flex; align-items: center; gap: 12px; min-height: 56px; width: 100%; padding: 0 16px; border: 2px solid var(--bd-text); background: var(--bd-text); color: var(--bd-bg); font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
a.bd-btn { text-decoration: none; }
.bd-btn.bd-accent { background: var(--bd-accent); color: var(--bd-text); border-color: var(--bd-accent); }
.bd-btn.bd-ghost { background: transparent; color: var(--bd-text); }
.bd-btn.bd-danger { background: transparent; color: var(--bd-danger); border-color: var(--bd-danger); }
.bd-btn[disabled] { opacity: .45; cursor: not-allowed; }
.bd-back { width: 48px; min-height: 48px; justify-content: center; padding: 0; }

.bd-seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--bd-text); margin-bottom: 16px; }
.bd-seg button { min-height: 44px; border: 0; background: transparent; color: var(--bd-text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.bd-seg button[aria-pressed="true"] { background: var(--bd-text); color: var(--bd-bg); }

.bd-list { list-style: none; margin: 0; padding: 0; }
.bd-item { display: flex; border-top: 1px solid var(--bd-divider); }
.bd-item:last-child { border-bottom: 1px solid var(--bd-divider); }
.bd-item-main { flex: 1; text-align: left; background: none; border: 0; padding: 16px 0; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.bd-item-main strong { display: block; font-size: 19px; font-weight: 800; }
.bd-item-main span { display: block; font-size: 15px; color: #605d5d; overflow-wrap: anywhere; }
.bd-more { width: 48px; min-height: 56px; border: 0; background: none; font-size: 24px; cursor: pointer; color: var(--bd-text); }
.bd-tag { display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase; padding: 2px 8px; background: var(--bd-surface); margin-left: 8px; }
.bd-tag.s-in_arbeit { background: var(--bd-accent); }
.bd-tag.s-abgenommen { background: var(--bd-text); color: var(--bd-bg); }

.bd-field { display: block; margin-bottom: 16px; }
.bd-field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.bd-field input, .bd-field select { width: 100%; min-height: 52px; padding: 0 12px; font: inherit; border: 2px solid var(--bd-text); background: var(--bd-bg); color: var(--bd-text); }
.bd-field input[readonly] { background: var(--bd-surface); border-color: transparent; }
.bd-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.bd-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; background: var(--bd-surface); font-weight: 600; }
.bd-chip button { border: 0; background: none; font-size: 20px; cursor: pointer; min-width: 32px; min-height: 44px; }
.bd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.bd-tile { min-height: 56px; padding: 8px 12px; border: 2px solid var(--bd-text); background: transparent; color: var(--bd-text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.bd-tile[aria-pressed="true"] { background: var(--bd-text); color: var(--bd-bg); }
.bd-tile[aria-pressed="true"]::after { content: " ✓"; }
.bd-readonly-note { background: var(--bd-surface); padding: 12px; font-weight: 600; margin: 16px 0; }
.bd-error { background: #fbe9e7; border-left: 4px solid var(--bd-danger); padding: 12px; margin-bottom: 16px; }

.bd-footbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px; background: var(--bd-bg); border-top: 2px solid var(--bd-text); }
.bd-footbar .bd-btn { max-width: 608px; margin: 0 auto; min-height: 60px; }

.bd-overlay { position: fixed; inset: 0; background: rgba(32, 30, 29, .5); display: flex; align-items: flex-end; justify-content: center; z-index: 99999; }
.bd-sheet { background: var(--bd-bg); width: 100%; max-width: 640px; padding: 16px; box-shadow: 0 -8px 32px rgba(0, 0, 0, .25); }
.bd-sheet .bd-btn { margin-top: 8px; }
.bd-sheet p { margin: 0 0 8px; }
.bd-toast { position: fixed; left: 16px; right: 16px; bottom: 88px; max-width: 608px; margin: 0 auto; background: var(--bd-text); color: var(--bd-bg); padding: 12px 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; z-index: 99999; font-family: Archivo, system-ui, sans-serif; }
.bd-toast button { background: none; border: 0; color: var(--bd-accent); font: inherit; font-weight: 800; cursor: pointer; min-height: 44px; }

.bd-sections { display: flex; overflow-x: auto; border-bottom: 1px solid var(--bd-divider); margin: 0 -16px; padding: 0 16px; }
.bd-sections button { flex: none; min-height: 48px; padding: 0 16px; border: 0; border-bottom: 4px solid transparent; background: none; font: inherit; font-weight: 600; color: var(--bd-text); cursor: pointer; }
.bd-sections button[aria-current="page"] { border-bottom-color: var(--bd-accent); font-weight: 800; }
.bd-seg3 { grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.bd-seg2 { grid-template-columns: repeat(2, 1fr); }
.bd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.bd-photo { position: relative; padding: 0; border: 2px solid transparent; background: var(--bd-surface); aspect-ratio: 4 / 3; cursor: pointer; overflow: hidden; }
.bd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-photo.bd-selected { border-color: var(--bd-accent); }
.bd-badge { position: absolute; left: 0; bottom: 0; background: var(--bd-text); color: var(--bd-bg); font-size: 12px; font-weight: 800; padding: 2px 8px; }
.bd-badge.bd-warn { left: auto; right: 0; top: 0; bottom: auto; background: var(--bd-danger); }
.bd-photo-big { width: 100%; max-height: 60vh; object-fit: contain; background: var(--bd-surface); display: block; margin: 16px 0; }
.bd-mark-wrap { position: relative; width: fit-content; max-width: 100%; margin: 16px auto; background: var(--bd-surface); }
.bd-mark-img { display: block; max-width: 100%; max-height: 60vh; width: auto; height: auto; }
.bd-mark-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.bd-card { border-top: 2px solid var(--bd-text); padding: 16px 0; }
.bd-sub { font-size: 22px; margin: 24px 0 8px; }
.bd-field textarea { width: 100%; padding: 12px; font: inherit; border: 2px solid var(--bd-text); background: var(--bd-bg); color: var(--bd-text); }
.bd-field textarea[readonly] { background: var(--bd-surface); border-color: transparent; }
.bd-subtabs { margin-top: 8px; }
.bd-progress { height: 8px; background: var(--bd-surface); margin: 4px 0 16px; }
.bd-progress div { height: 100%; background: var(--bd-accent); }
.bd-checkrow { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--bd-divider); padding: 8px 0; }
.bd-check { flex: none; width: 52px; height: 52px; border: 2px solid var(--bd-text); background: var(--bd-bg); font-size: 28px; font-weight: 800; color: var(--bd-text); cursor: pointer; }
.bd-check[aria-checked="true"] { background: var(--bd-accent); }
.bd-checktext { flex: 1; min-width: 0; }
.bd-checktext strong, .bd-checktext span { display: block; }
.bd-checktext span { font-size: 14px; color: #605d5d; }
.bd-cam { flex: none; width: 56px; height: 52px; border: 2px solid var(--bd-text); background: var(--bd-bg); font: inherit; font-weight: 800; font-size: 14px; color: var(--bd-text); cursor: pointer; }
.bd-daynav { display: flex; justify-content: space-between; align-items: center; margin: 16px 0; }
.bd-daynav button { width: 56px; height: 52px; border: 2px solid var(--bd-text); background: var(--bd-bg); font-size: 28px; color: var(--bd-text); cursor: pointer; }
.bd-row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bd-row4 .bd-field input { padding: 0 6px; }
.bd-sums { display: flex; justify-content: space-between; font-weight: 800; }
.bd-row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.bd-tiles1 { grid-template-columns: 1fr; }
.bd-grid3 { grid-template-columns: repeat(3, 1fr); }
.bd-photo-add { aspect-ratio: 1; border: 2px dashed var(--bd-divider); background: none; font: inherit; font-weight: 600; color: var(--bd-text); }
.bd-sig { width: 100%; height: auto; aspect-ratio: 640 / 220; border: 2px solid var(--bd-text); background: var(--bd-bg); touch-action: none; display: block; margin-bottom: 8px; }
.bd-sig-saved { width: 100%; max-height: 120px; object-fit: contain; border: 1px solid var(--bd-divider); margin-bottom: 8px; background: var(--bd-bg); }
.bd-chip-btn { border: 0; font: inherit; cursor: pointer; color: var(--bd-text); }
.bd-field > .bd-chips { margin-bottom: 8px; }

.bd-login form { display: grid; gap: 12px; }
.bd-login input[type=text], .bd-login input[type=password] { width: 100%; min-height: 52px; padding: 0 12px; font: inherit; border: 2px solid var(--bd-text); }
.bd-login input[type=submit] { min-height: 60px; border: 2px solid var(--bd-text); background: var(--bd-text); color: var(--bd-bg); font: inherit; font-weight: 800; cursor: pointer; }
