/* Kundenportal (SU40): einfach, gut lesbar, am Handy bedienbar. Kontraste ≥ 4.5:1, Fokus sichtbar,
   Ziele ≥ 44 px, 16 px in Eingabefeldern (kein Zoom auf iOS), helles und dunkles Schema. */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #4a5160;
  --border: #b8bfcc;
  --accent: #1d4ed8;
  --accent-text: #ffffff;
  --accent-hover: #1e40af;
  --error: #b42318;
  --error-bg: #fef3f2;
  --ok-bg: #ecfdf3;
  --ok-border: #1a7f45;
  --team-bg: #eef2ff;
  --focus: #f59e0b;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1b1e25;
    --text: #eceef2;
    --muted: #b3b9c6;
    --border: #4b5263;
    --accent: #8fb0ff;
    --accent-text: #0b1020;
    --accent-hover: #b4cbff;
    --error: #ffb4a8;
    --error-bg: #3a1a17;
    --ok-bg: #12301f;
    --ok-border: #5fd08e;
    --team-bg: #1f2640;
    --focus: #fbbf24;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: 0.5rem 1rem; }
header.site, main, footer.site { max-width: 42rem; margin: 0 auto; padding: 0 1rem; }
header.site { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { font-weight: 700; font-size: 1.125rem; text-decoration: none; color: var(--text); }
.lang-switch { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.5rem; }
main { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem 1rem 1.5rem; }
main:focus { outline: none; }
@media (min-width: 40rem) { main { padding: 2rem; } }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
footer.site { color: var(--muted); font-size: 0.95rem; padding-top: 1rem; padding-bottom: 2rem; }
.field { margin: 1.25rem 0; }
label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.req { font-weight: 400; color: var(--muted); }
.hint { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.95rem; }
input[type="text"], input[type="email"], select, textarea {
  display: block; width: 100%; min-height: 44px; padding: 0.6rem 0.7rem;
  font: inherit; font-size: 1rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
textarea { resize: vertical; min-height: 8rem; }
input[type="file"] { display: block; width: 100%; min-height: 44px; padding: 0.5rem 0; font: inherit; }
[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-error { color: var(--error); font-weight: 600; margin: 0.35rem 0 0; }
.error-summary, .error-box { border: 2px solid var(--error); background: var(--error-bg); border-radius: 8px; padding: 0.75rem 1rem; margin: 1rem 0; }
.error-summary h2 { margin-top: 0; font-size: 1.05rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a { color: var(--error); font-weight: 600; }
.privacy { font-size: 0.95rem; color: var(--muted); }
.actions { margin: 1.25rem 0 0.5rem; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.6rem 1.25rem;
  font: inherit; font-weight: 600; color: var(--accent-text); background: var(--accent);
  border: 2px solid var(--accent); border-radius: 8px; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
button[disabled] { opacity: 0.6; cursor: progress; }
.secondary-button { color: var(--accent); background: transparent; min-height: 44px; }
.secondary-button:hover { color: var(--accent-text); }
@media (max-width: 30rem) { .actions button, .actions .button { width: 100%; } }
.progress progress { width: 100%; height: 0.75rem; }
.progress p { margin: 0.25rem 0 0; }
.secondary { margin: 1.25rem 0 0; }
.secret-link { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.95rem; }
.save-link { border: 2px solid var(--ok-border); background: var(--ok-bg); border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1.25rem; }
.save-link h2 { margin-top: 0; }
.ticket-key { margin: 0; color: var(--muted); font-weight: 600; }
.ticket-meta { color: var(--muted); }
.status-badge { display: inline-block; padding: 0.15rem 0.6rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-weight: 600; }
.messages { list-style: none; margin: 0; padding: 0; }
.messages > li { border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1rem; margin: 0 0 0.75rem; }
.messages > li.team { background: var(--team-bg); }
.message-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; font-size: 0.95rem; color: var(--muted); margin: 0 0 0.35rem; }
.message-head strong { color: var(--text); }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.message-files { margin: 0.5rem 0 0; padding: 0; list-style: none; }
.message-files button { min-height: 44px; margin-top: 0.25rem; text-align: left; }
.notice { border-left: 4px solid var(--border); padding-left: 0.75rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
