/* Eigene Marke – Einstellungen → Marke & Erscheinungsbild (brand-settings.js) */
.brand-form .panel + .panel { margin-top: 16px; }
.brand-panel-note, .brand-status-note { margin: 0; padding: 10px 15px 14px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.brand-status-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand-status-on { border-color: #b9d3c3; background: linear-gradient(180deg, #f3f9f5, #fff 60%); }
.brand-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.brand-switch-track { position: relative; flex: 0 0 44px; width: 44px; height: 24px; border-radius: 12px; background: #cfd6d9; transition: background .2s; }
.brand-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.brand-switch input:checked + .brand-switch-track { background: #3f7654; }
.brand-switch input:checked + .brand-switch-track::after { transform: translateX(20px); }
.brand-switch input:focus-visible + .brand-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-switch strong { display: block; font-size: 15px; }
.brand-switch small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.brand-grid { display: grid; gap: 14px 18px; }
.brand-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brand-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.brand-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.brand-field > span { font-size: 12.5px; font-weight: 600; color: #3b4348; }
.brand-field small { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.brand-field input[type="text"], .brand-field input[type="email"], .brand-field select, .brand-field textarea { width: 100%; box-sizing: border-box; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; font-size: 14px; }
.brand-field textarea { min-height: 170px; resize: vertical; font-family: Consolas, "Segoe UI", monospace; font-size: 13px; line-height: 1.5; }
.brand-field code { padding: 1px 5px; border-radius: 4px; background: #f0eef1; font-size: 11px; }
.brand-field-static { padding-top: 2px; }
.brand-color-row { display: flex; align-items: center; gap: 8px; }
.brand-color-row input[type="color"] { flex: 0 0 44px; width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.brand-color-row input[type="text"] { font-family: Consolas, monospace; text-transform: lowercase; }

/* Dateien */
.brand-assets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.brand-asset { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.brand-asset-preview { display: flex; align-items: center; justify-content: center; height: 120px; padding: 12px; background:
  repeating-conic-gradient(#f3f1f4 0 25%, #fff 0 50%) 0 0 / 18px 18px; border-bottom: 1px solid var(--line); }
.brand-asset-dark .brand-asset-preview { background: #2b2230; }
.brand-asset-paper .brand-asset-preview { background: #fbfaf7; }
.brand-asset-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-asset-preview img.missing { visibility: hidden; }
.brand-asset-text { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 6px; }
.brand-asset-text strong { font-size: 14px; }
.brand-asset-text small { color: var(--muted); font-size: 11.5px; line-height: 1.4; min-height: 32px; }
.brand-asset-text .status { align-self: flex-start; margin-top: 2px; }
.brand-asset-actions { display: flex; gap: 8px; padding: 8px 12px 12px; }
.brand-asset-actions .button { cursor: pointer; }

/* Farbvorschau und Kontrast */
.brand-colors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.brand-preview { display: flex; flex-direction: column; gap: 14px; }
.brand-preview-shell { display: grid; grid-template-columns: 132px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-height: 210px; background: var(--bp-surface); }
.brand-preview-side { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; background: var(--bp-dark); color: #fff; font-size: 12.5px; }
.brand-preview-side strong { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 14px; margin-bottom: 8px; line-height: 1.3; }
.brand-preview-side span { padding: 6px 8px; border-radius: 5px; opacity: .8; }
.brand-preview-side span.active { background: var(--bp-primary); opacity: 1; box-shadow: inset 3px 0 var(--bp-accent); }
.brand-preview-main { display: flex; flex-direction: column; }
.brand-preview-main header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--bp-line, #e5e1e7); }
.brand-preview-title { color: var(--bp-primary); font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.brand-preview-main header small { color: var(--muted); font-size: 11.5px; }
.brand-preview-card { margin: 14px 16px; padding: 12px 14px; border: 1px solid rgba(0,0,0,.06); border-left: 4px solid var(--bp-primary); border-radius: 6px; background: #fff; font-size: 13px; }
.brand-preview-eyebrow { display: block; color: var(--bp-accent); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.brand-preview-card p { margin: 0 0 10px; color: #1f2933; line-height: 1.5; }
.brand-preview-card a { color: var(--bp-primary); text-decoration: underline; }
.brand-preview-actions { display: flex; gap: 8px; }
.brand-preview-button { min-height: 32px; padding: 0 12px; border-radius: 5px; border: 1px solid var(--bp-primary); background: var(--bp-primary); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: default; }
.brand-preview-button.secondary { background: var(--bp-soft); color: var(--bp-primary); }
.brand-contrast { border: 1px solid #c9dccf; border-radius: 10px; padding: 12px 14px; background: #f4faf6; }
.brand-contrast-warn { border-color: #ecc7c1; background: #fdf4f2; }
.brand-contrast h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 14px; }
.brand-contrast h3 svg { width: 16px; height: 16px; }
.brand-contrast ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.brand-contrast li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 12.5px; }
.brand-contrast-sample { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 30px; border-radius: 5px; border: 1px solid rgba(0,0,0,.08); font-weight: 700; }
.brand-contrast-text { display: flex; flex-direction: column; min-width: 0; }
.brand-contrast-text small { color: var(--muted); font-size: 11px; }
.brand-contrast-ratio { padding: 2px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.brand-contrast-ok { background: #e2f1e7; color: #21683f; }
.brand-contrast-warn .brand-contrast-ratio.brand-contrast-warn, .brand-contrast-ratio.brand-contrast-warn { background: #fff1db; color: #8c520b; }
.brand-contrast-bad { background: #fbe9e7; color: #9a2c22; }
.brand-contrast p.muted { margin: 10px 0 0; font-size: 11.5px; }

/* Geschäftspapier-Vorschau */
.brand-paper { margin-top: 16px; }
.brand-paper-sheet { position: relative; max-width: 560px; aspect-ratio: 210 / 148; margin: 0 auto; padding: 18px 22px 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: 0 6px 20px rgba(31,25,33,.08); display: flex; flex-direction: column; font-size: 9px; color: #444; }
.brand-paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.brand-paper-head img { max-width: 40%; max-height: 42px; object-fit: contain; object-position: left top; }
.brand-paper-contact { display: flex; flex-direction: column; gap: 2px; min-width: 130px; }
.brand-paper-contact strong { color: var(--bp-primary); font-size: 7.5px; letter-spacing: .06em; }
.brand-paper-rule { margin: 10px 0 8px; height: 0; border-top: 1.2px solid var(--bp-primary); box-shadow: 0 2px 0 var(--bp-line); }
.brand-paper-body { flex: 1; display: flex; flex-direction: column; gap: 10px; color: #777; }
.brand-paper-body em { font-style: normal; color: #333; }
.brand-paper-foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; padding-top: 6px; border-top: 1px solid var(--bp-line); font-size: 7.5px; color: #666; }
.brand-paper-foot div { display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow: hidden; }
.brand-paper-foot strong { color: var(--bp-primary); }

/* Schrift und Signatur */
.brand-font-preview { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; min-height: 110px; }
.brand-font-sample { font-size: 30px; line-height: 1.15; color: var(--accent); }
.brand-font-preview small { color: var(--muted); font-size: 13px; }
.brand-signature-preview { display: flex; flex-direction: column; gap: 5px; }
.brand-signature-preview > span { font-size: 12.5px; font-weight: 600; color: #3b4348; }
.brand-signature-preview pre { margin: 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; font: 13px/1.5 "Segoe UI", system-ui, sans-serif; white-space: pre-wrap; min-height: 170px; }
.brand-save-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 0; position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%); }

/* Gesperrt */
.brand-locked .panel-body { display: flex; gap: 16px; align-items: flex-start; }
.brand-locked-icon { display: inline-flex; flex: 0 0 44px; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: #f2e8f3; color: var(--accent); }
.brand-locked-icon svg { width: 22px; height: 22px; }
.brand-locked h2 { margin: 0 0 6px; font-size: 17px; }
.brand-locked p { margin: 0 0 8px; color: #3b4348; line-height: 1.55; max-width: 72ch; }

@media (max-width: 1100px) {
  .brand-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-colors { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .brand-grid-2, .brand-grid-3, .brand-assets { grid-template-columns: 1fr; }
  .brand-preview-shell { grid-template-columns: 1fr; }
  .brand-preview-side { flex-direction: row; flex-wrap: wrap; }
}
