/* Examples in empty fields (placeholder, written as „z. B. …“) are light and italic, so they never look like an entry. */
input::placeholder, textarea::placeholder { color: var(--faint); -webkit-text-fill-color: var(--faint); font-style: italic; opacity: 1; }
/* Marks of invalid entries (frontend/forms.js): red frame at the field and the exact message right below it. */
.field-error > input, .field-error > select, .field-error > textarea, input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--err) !important; box-shadow: 0 0 0 2px #c0392b22; }
.field-error { color: var(--err-text); }
.field-message { display: block; font-size: 12px; font-weight: 500; color: var(--err-text); line-height: 1.45; margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
.field-message::before { content: "⚠ "; }
.form-status:empty { display: none; }
.form-status { font-size: 12px; line-height: 1.6; color: var(--err-text); }
.form-status.ok { color: var(--ok-text); }
/* Change log of a record (frontend/changes.js); height in dvh, the visible height of a phone (frontend/styles.css, package K12c). */
.change-log { width: min(860px, calc(100% - 32px)); max-height: 88dvh; padding: 0; }
.change-log-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.change-log-head h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.change-log-body { padding: 16px 22px 22px; display: grid; gap: 14px; }
.change-entry { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.change-entry header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 13px; }
.change-entry header span { color: var(--muted); }
.change-reason { margin: 8px 0 0; font-size: 13px; }
.change-table { overflow-x: auto; margin-top: 8px; }
.change-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.change-table th, .change-table td { text-align: left; vertical-align: top; padding: 5px 8px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.change-table thead th { color: var(--muted); font-weight: 600; border-top: 0; }
.change-table tbody th { font-weight: 600; width: 28%; }
@media (max-width: 600px) { .change-table tbody th { width: auto; } .change-log-head { padding: 14px 16px; } .change-log-body { padding: 12px 16px 16px; } }
/* ---------- Cards over the whole app area (docs/Projektregeln/editor-dialog-layout.md, docs/APP_CONTRACT.md „Gestaltung“) ----------
   The card of a record (Kunde, Artikel, Beleg, Ticket …) is a modal <dialog class="page-dialog"> over the whole area of the app at every
   size, not a window in front of the list. It stays a dialog: Esc, the focus inside, smaller dialogs in front of it and the question about
   unsaved entries work as before, and the back button of the browser closes it like Esc (frontend/forms.js, frontend/app.js). Head and
   footer stay in place, only the body (class page-dialog-body) scrolls. Every part of the card has the same left and right edge: the
   content is at most 1450 px wide and centred like the lists of the apps (the width of the dialog is the width of its container, 100cqi);
   an element with the class page-wide (e.g. the positions of a Beleg) uses the whole width. page-dialog-full: the whole width for every
   part (a Beleg of the Buchhaltung beside its file, the site card of the Baustelle with its tables and plans, an inventory count).
   Smaller dialogs (questions, searches, forms opened from a card) stay windows in front of the page. */
/* The rules hold for the open card ([open]), so they win over the general rules of an app for its dialogs (dialog{…}, dialog.wide{…},
   dialog.editor{…}) whichever stylesheet the page loads first; rules of an app with the ID of a card win and are not used for its size. */
dialog.page-dialog { --page-pad: 26px; --page-gutter: max(var(--page-pad), calc((100cqi - 1450px) / 2)); }
dialog.page-dialog.page-dialog-full { --page-gutter: var(--page-pad); }
dialog.page-dialog[open] { container-type: inline-size; display: flex; flex-direction: column; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--surface); color: var(--ink); overflow: hidden; overscroll-behavior: contain; }
/* The page below keeps its place, but not its scroll bar beside the card. */
html:has(dialog.page-dialog[open]) { overflow: hidden; }
dialog.page-dialog[open] > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-height: none; margin: 0; padding: 0; }
:is(dialog.page-dialog[open], dialog.page-dialog[open] > form) > :not(form) { flex: none; padding-left: var(--page-gutter); padding-right: var(--page-gutter); }
:is(dialog.page-dialog[open], dialog.page-dialog[open] > form) > .page-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
:is(dialog.page-dialog[open], dialog.page-dialog[open] > form) > .dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 18px; margin: 0; padding-top: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
dialog.page-dialog[open] .dialog-head > div { min-width: 0; }
dialog.page-dialog[open] .dialog-head h2 { margin: 2px 0; overflow-wrap: anywhere; }
dialog.page-dialog[open] .dialog-head p { margin: 2px 0 0; }
:is(dialog.page-dialog[open], dialog.page-dialog[open] > form) > footer { position: static; margin: 0; padding-top: 10px; padding-bottom: 12px; box-shadow: 0 -8px 16px -12px #32323240; }
dialog.page-dialog[open] .page-wide { margin-left: calc(var(--page-pad) - var(--page-gutter)); margin-right: calc(var(--page-pad) - var(--page-gutter)); }
@media (max-width: 1000px) { dialog.page-dialog { --page-pad: 18px; } }
@media (max-width: 560px) { dialog.page-dialog { --page-pad: 12px; } :is(dialog.page-dialog[open], dialog.page-dialog[open] > form) > .dialog-head { padding-top: 10px; padding-bottom: 8px; } }
