/* Design 1: Hell, Dark und Night nach der freigegebenen Referenz. */
/* Eigenständige Designreferenz: alle Ansichten und Stile bleiben in dieser Datei. */
:root {
  --page: #eeeeee;
  --surface: #ffffff;
  --ink: #111111;
  --ink-soft: #333333;
  --muted: #606060;
  --line: #d2d2d2;
  --soft: #f7f7f4;
  --gold: #dece64;
  --gold-bright: #ffff00;
  --gold-wash: #f8f2d2;
  --success: #e9f6ec;
  --success-line: #2b7e40;
  --error: #fff0f0;
  --error-line: #a92323;
  --header: #111111;
  --header-text: #ffffff;
  --radius: 20px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--success-line); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h1 { margin-bottom: 12px; font-size: clamp(2.4rem, 5vw, 4.4rem); }
h2 { margin-bottom: 12px; font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { margin-bottom: 9px; font-size: 1.2rem; }
p { margin-bottom: 16px; }
.wrap { width: min(100% - 40px, 1120px); margin-inline: auto; }
.eyebrow { display: inline-block; margin-bottom: 14px; color: var(--gold); font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }

.site-header { background: var(--header); color: var(--header-text); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--header-text); font-size: .95rem; font-weight: 800; letter-spacing: .04em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--gold); color: var(--header); font-size: 1.1rem; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav-links a { padding: 9px 14px; border-radius: 100px; color: var(--header-text); font-size: .9rem; font-weight: 650; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: #333333; color: var(--gold); }
.nav-links .nav-accent { margin-left: 8px; border: 1px solid var(--gold); color: var(--gold); }
.nav-logout-form { display:flex; margin:0; }
.nav-logout { padding:9px 10px; border:1px solid var(--gold); border-radius:100px; background:transparent; color:var(--gold); font-size:.9rem; font-weight:650; cursor:pointer; }
.nav-logout:hover { background:#333333; color:var(--gold-bright); }

.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 78px) 0; background: var(--header); color: var(--header-text); }
.hero::before { content: ""; position: absolute; width: 620px; aspect-ratio: 1; right: -220px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(222,206,100,.19), transparent 68%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
.hero p { max-width: 60ch; margin-bottom: 0; color: #d2d2d2; font-size: 1.08rem; }

main { padding: 14px 0 70px; }
[hidden] { display: none !important; }
.section { margin-top: 24px; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 30px rgba(17,17,17,.045); scroll-margin-top: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.section-head p { max-width: 46ch; margin: 0; color: var(--muted); }
.centered-section { max-width: 620px; margin-inline: auto; }
.centered-section .field + .field { margin-top: 18px; }
.section-num { color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { padding: 25px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.panel-dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.panel-dark p { color: var(--line); }
.panel-dark a { color: var(--gold); }
.sample-title { margin: 6px 0 15px; font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.15; }
.tag { display: inline-block; padding: 5px 10px; border-radius: 100px; background: var(--gold-wash); color: var(--ink); font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 7px; font-size: .9rem; font-weight: 750; }
.field small { display: block; margin-top: 6px; color: var(--muted); }
input[type="text"], input[type="password"], select, textarea { display: block; width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); }
input[type="text"]:hover, input[type="password"]:hover, select:hover, textarea:hover { border-color: var(--muted); }
input[type="text"]:focus, input[type="password"]:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 3px solid var(--gold-wash); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:disabled { background: var(--page); color: var(--muted); cursor: not-allowed; }
.password-field { position: relative; }
.password-field input { padding-right: 52px; min-height: 48px; }
.password-toggle { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover { color: var(--ink); }
.password-toggle:focus-visible { outline: 3px solid var(--success-line); outline-offset: 0; }
.password-toggle .eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .eye-slash { display: inline; }
textarea { min-height: 112px; resize: vertical; }
fieldset { min-width: 0; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; }
legend { padding: 0 5px; font-size: .9rem; font-weight: 750; }
.choice { display: inline-flex; align-items: center; gap: 8px; margin: 6px 18px 6px 0; cursor: pointer; }
.choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--ink); }

.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field + .button-row { margin-top: 20px; }
.button, button.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 18px; border: 1px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--gold); font-weight: 750; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--gold-bright); }
.button.secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button.secondary:hover { background: var(--soft); border-color: var(--ink); color: var(--ink); }
.button:disabled, .button:disabled:hover { opacity: .45; background: var(--ink); border-color: var(--ink); color: var(--gold); cursor: not-allowed; }
.messages { display: grid; gap: 10px; margin-top: 10px; }
.message { display: flex; gap: 12px; align-items: baseline; padding: 14px 17px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; background: var(--gold-wash); }
.message p { margin: 0; }
.message.success { border-left-color: var(--success-line); background: var(--success); }
.message.error { border-left-color: var(--error-line); background: var(--error); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; min-width: 540px; border-collapse: collapse; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--soft); font-size: .77rem; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--soft); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 650; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success-line); }
.status.quiet::before { background: var(--muted); }

.palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.swatch { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.swatch-color { height: 55px; background: var(--sample); }
.swatch-info { padding: 10px 12px; font-size: .82rem; }
.swatch-info strong, .swatch-info code { display: block; }
.swatch-info code { color: var(--muted); }
footer { padding: 30px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

@media (max-width: 760px) {
  .nav { min-height: 66px; flex-wrap: wrap; padding-block: 12px; }
  .nav-links { flex-basis: 100%; padding-top: 8px; }
  .nav-links a { padding: 11px 13px; }
  .nav-links .nav-accent { margin-left: 0; }
  .two-col, .fields { grid-template-columns: 1fr; }
  .section-head { align-items: start; }
}
@media (max-width: 480px) {
  .wrap { width: min(100% - 28px, 1120px); }
  .hero { padding: 50px 0 62px; }
  .section { margin-top: 14px; }
  .section-head { display: block; }
  .section-num { display: block; margin-top: 8px; }
  .button-row .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:is(html[data-theme="dark"], html[data-theme="night"]) {
  --page: #121519; --surface: #1c2228; --ink: #edf1f4;
  --ink-soft: #d1dce4; --muted: #aebbc5; --line: #3b4650;
  --soft: #273039; --gold-wash: #514a2d;
  --success: #193526; --success-line: #73bf88;
  --error: #3b2427; --error-line: #ee8585;
  --header: #111111; --header-text: #ffffff;
  color-scheme: dark;
}
:is(html[data-theme="dark"], html[data-theme="night"]) .site-header { background: var(--header); color: var(--header-text); }
:is(html[data-theme="dark"], html[data-theme="night"]) .brand, :is(html[data-theme="dark"], html[data-theme="night"]) .nav-links a { color: var(--header-text); }
:is(html[data-theme="dark"], html[data-theme="night"]) .brand-mark { color: var(--header); }
:is(html[data-theme="dark"], html[data-theme="night"]) .nav-links a:hover,
:is(html[data-theme="dark"], html[data-theme="night"]) .nav-links a[aria-current="page"] { background: #333333; color: var(--gold); }
:is(html[data-theme="dark"], html[data-theme="night"]) .hero { background: var(--header); color: var(--header-text); }
:is(html[data-theme="dark"], html[data-theme="night"]) .hero p, :is(html[data-theme="dark"], html[data-theme="night"]) .panel-dark p { color: #d2d2d2; }
:is(html[data-theme="dark"], html[data-theme="night"]) .panel-dark { background: #111111; border-color: #111111; color: #ffffff; }
:is(html[data-theme="dark"], html[data-theme="night"]) .button:not(.secondary) { background: var(--gold); border-color: var(--gold); color: var(--header); }
:is(html[data-theme="dark"], html[data-theme="night"]) .button:not(.secondary):hover { background: #f0e183; border-color: #f0e183; color: var(--header); }
:is(html[data-theme="dark"], html[data-theme="night"]) .button:disabled, :is(html[data-theme="dark"], html[data-theme="night"]) .button:disabled:hover { background: var(--gold); border-color: var(--gold); color: var(--header); }

html[data-theme="night"] {
  --page: #050505; --surface: #0d0c09; --ink: #f5f0d9;
  --ink-soft: #e9dfb5; --muted: #bdb69b; --line: #50472c;
  --soft: #1c1910; --gold: #e7d477; --gold-wash: #544922;
  --header: #050505; --header-text: #fff9df;
}
html[data-theme="night"] body {
  background-image: radial-gradient(circle 480px at 88% 22%, rgba(231,212,119,.16), transparent 75%),
    radial-gradient(circle 440px at 5% 88%, rgba(231,212,119,.08), transparent 75%);
  background-attachment: fixed;
}
html[data-theme="night"] .hero::before { background: radial-gradient(circle, rgba(231,212,119,.29), transparent 68%); }
html[data-theme="night"] .section {
  background: radial-gradient(circle 260px at 100% 0, rgba(231,212,119,.07), transparent 80%), var(--surface);
  box-shadow: 0 12px 36px rgba(0,0,0,.45);
}
html[data-theme="night"] .panel-dark { background: #050505; border-color: var(--line); }
html[data-theme="night"] input:disabled { background: #262626; }

.theme-picker { margin: 0; padding: 0; border: 0; }
.theme-picker legend { margin-bottom: 12px; color: var(--muted); font-size: .9rem; font-weight: 750; }
.theme-options { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; border: 1px solid rgba(222,206,100,.55); border-radius: 16px; background: rgba(222,206,100,.08); box-shadow: 0 0 25px rgba(222,206,100,.20); }
.theme-option { position: relative; cursor: pointer; }
.theme-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.theme-option span { display: block; min-width: 0; padding: 20px 12px; border-radius: 11px; color: var(--ink); font-size: 1.08rem; font-weight: 750; text-align: center; white-space: nowrap; }
.theme-option:hover span { background: var(--gold-wash); }
.theme-option input:checked + span { background: var(--gold); box-shadow: 0 0 19px rgba(222,206,100,.38); color: var(--header); }
.theme-option input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 3px; }


/* Bestehende Anwendungskomponenten im Farbsystem der Vorlage. */
html.js main > .section:not(.is-active) { display:none; }
.grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 22px; }
input[type="date"], input[type="time"], input[type="number"], input[type="file"] { display:block; width:100%; min-width:0; padding:13px 14px; border:1px solid var(--line); border-radius:11px; background:var(--surface); color:var(--ink); }
input[type="date"]:focus, input[type="time"]:focus, input[type="number"]:focus { border-color:var(--ink); outline:3px solid var(--gold-wash); }
.actions { display:flex; flex-wrap:wrap; gap:10px; margin:18px 0; }
.entry-time-shortcuts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; }
.entry-time-shortcuts .button { min-width:0; padding:8px; }
.check { display:inline-flex; align-items:center; gap:8px; margin:16px 0 0; }
.check input { accent-color:var(--gold); }
.message { margin:18px 0; display:block; }
.message.success { background:var(--success); border-left-color:var(--success-line); }
.message ul { margin-bottom:0; }
.write-fields { border:0; padding:0; margin:0; min-width:0; }
.write-fields:disabled { opacity:.45; }
button:disabled { cursor:not-allowed; }
.code-swatch { display:inline-block; width:14px; height:14px; margin-right:6px; border:1px solid var(--line); border-radius:3px; }
input[type="color"] { display:block; width:100%; height:52px; padding:6px; border:1px solid var(--line); border-radius:11px; background:var(--surface); cursor:pointer; }
.entry-remark { white-space:pre-wrap; overflow-wrap:anywhere; min-width:180px; }
.entry-confirmation dt { font-weight:750; }
.issue-actions { display:flex; flex-wrap:wrap; gap:8px; }
.medication-mode { margin-bottom:10px; padding:10px 14px; }
.medication-mode .choice { display:inline-flex; font-size:.9rem; margin-block:4px; }
.medication-name-search { margin-top:10px; }
.overview-medications { margin-top:20px; display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:4px 18px; }
.overview-medications .choice { margin:6px 0; align-items:flex-start; }
.overview-medications input, .overview-medications .code-swatch { flex-shrink:0; margin-top:5px; }
.table-column-controls { display:grid; gap:10px; margin:20px 0 10px; }
.table-column-controls summary { cursor:pointer; font-weight:650; }
.table-column-controls fieldset { margin-top:10px; }
.table-column-controls .choice { font-size:.9rem; }
.table-column-controls .button[aria-pressed="true"] { border-color:var(--ink); background:var(--gold-wash); }
table.compact-table { min-width:0; table-layout:fixed; }
.compact-table th, .compact-table td { padding:8px 6px; font-size:.85rem; letter-spacing:normal; overflow-wrap:anywhere; }
.compact-table td:first-child { white-space:normal; }
.compact-table .entry-remark { min-width:0; }
.compact-table .button { min-width:0; max-width:100%; min-height:38px; padding:6px; font-size:.8rem; white-space:normal; }
table[data-column-key="issues"] { table-layout:auto; }
table[data-column-key="issues"] th:not(:nth-child(4)) { width:1%; }
table[data-column-key="issues"] td:nth-child(-n+3) { white-space:nowrap; }
table[data-column-key="issues"] .issue-actions { min-width:88px; }
.entry-confirmation dd { margin:0 0 12px; overflow-wrap:anywhere; }
.button.danger, :is(html[data-theme="dark"], html[data-theme="night"]) .button.danger { background:var(--error); border-color:var(--error-line); color:var(--ink); }
.button.danger:hover, :is(html[data-theme="dark"], html[data-theme="night"]) .button.danger:hover { background:var(--error); border-color:var(--ink); color:var(--ink); }
.chart-wrap { position:relative; height:350px; margin:20px 0; }
.chart-wrap canvas { width:100%; height:100%; }
td:first-child { white-space:nowrap; }
#zugang details { margin-top:20px; }
#zugang details form { margin-top:18px; }
.demo-status { margin:24px 0 0; }
.amount-fractions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-top:8px; }
.amount-fractions .button { min-height:32px; min-width:0; padding:4px 8px; font-size:.82rem; }
.analysis-dates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 22px; }
.analysis-periods { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; margin-top:8px; }
.analysis-periods .button { min-height:32px; min-width:0; padding:4px 6px; font-size:.82rem; }
.analysis-options { margin-top:20px; }
.analysis-options .check { display:inline-flex; font-weight:400; margin-bottom:0; }
.hero p { max-width:65ch; }
.nav { flex-wrap:wrap; padding-block:12px; }
.nav-links { gap:2px; }
.nav-links a { padding:9px 10px; }
@media(max-width:760px) { .grid { grid-template-columns:1fr; } .nav-links a { padding:11px 13px; } }
@media(max-width:480px) { .actions .button { width:100%; } }

/* Unabhängige Schalter für Menü und Kopfbereich wie in der Herohide-Vorlage. */
.layout-bar { background: var(--header); color: var(--header-text); border-bottom: 1px solid rgba(222,206,100,.2); }
.layout-controls { display: flex; align-items: center; gap: 8px; min-height: 42px; padding-block: 5px; }
.layout-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 3px 10px; border: 1px solid rgba(222,206,100,.55); border-radius: 8px; background: transparent; color: var(--gold); font-size: .78rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.layout-toggle:hover { background: #333333; }
.layout-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.layout-toggle svg { width: 12px; height: 12px; flex: none; }
.layout-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
html[data-menu-collapsed="true"] #site-menu,
html[data-hero-collapsed="true"] #start { display: none; }
@media (max-width: 760px) {
  .nav-links { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
  .nav-links a { font-size: .85rem; padding: 8px 11px; }
  .nav-logout { font-size:.85rem; padding:8px 11px; }
}
