/* Gemeinsamer Farbvertrag nach Server-WPF; alle Paletten setzen dieselben Variablen. */
:root { color-scheme: dark; --background:#101620; --panel:#1f2938; --input:#151e2b; --text:#e9eef6; --muted:#a9b7c9; --accent:#39cdb0; --line:#465873; --button:#2e3d51; --hover:#34465d; --selected:#243e45; --warning:#f1bd75; --danger:#f87171; --success:#00d66f; --on-accent:#071b17; font:13px "Segoe UI",system-ui,sans-serif; background:var(--background); color:var(--text); }
* { box-sizing:border-box; } body { margin:0; min-width:300px; } button,input,select { font:inherit; color:var(--text); }
button { background:var(--button); border:1px solid var(--line); border-radius:6px; padding:9px 12px; cursor:pointer; }
button:hover:enabled { background:var(--hover); } button:disabled,input:disabled,select:disabled { opacity:.45; cursor:default; }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
input,select,textarea { border:1px solid var(--line); border-radius:5px; padding:9px; background:var(--input); min-width:0; width:100%; color:var(--text); font:inherit; }
input[type="checkbox"] { width:auto; accent-color:var(--accent); } label { display:grid; gap:7px; color:var(--muted); }
input[type="radio"] { width:auto; accent-color:var(--accent); }
textarea { resize:vertical; } textarea:disabled { opacity:.45; }
#diagnostics-output { white-space:pre-wrap; overflow-wrap:anywhere; }
#operator-status { margin-top:12px; margin-bottom:16px; overflow-wrap:anywhere; }
#role-grant,#role-revoke { border-color:var(--warning); }
h1 { font-size:20px; margin:0 0 12px; font-weight:600; } h2 { font-size:17px; margin:0 0 16px; font-weight:600; } h3 { font-size:14px; margin:0 0 12px; } p { line-height:1.55; }
.muted,.hint { color:var(--muted); } .hint { font-size:12px; }
.shell { height:100dvh; min-height:480px; padding:8px 16px 12px; display:grid; grid-template-rows:54px minmax(0,1fr) auto; gap:12px; }
.header { display:flex; align-items:center; gap:16px; } .brand { font-size:19px; font-weight:600; white-space:nowrap; display:flex; align-items:center; gap:12px; }
.brand::before { content:""; display:block; width:15px; height:15px; border:3px solid var(--accent); border-radius:50%; }
.eyebrow { font-size:10px; letter-spacing:.12em; color:var(--muted); }
.badge { margin-left:auto; border:1px solid var(--line); border-radius:10px; padding:6px 10px; max-width:45%; overflow-wrap:anywhere; color:var(--warning); }
.badge[data-state="running"] { color:var(--success); } .badge[data-state="failed"] { color:var(--danger); }
.workspace { min-height:0; display:grid; grid-template-columns:210px minmax(0,1fr); gap:16px; }
.sidebar { display:flex; flex-direction:column; gap:12px; min-height:0; } .card { background:var(--panel); border-radius:10px; padding:16px; }
.navigation { padding:20px 12px 12px; flex:1; min-height:0; overflow-y:auto; } .navigation .eyebrow { margin:0 10px 18px; }
.navigation button { display:block; width:100%; text-align:left; border-color:transparent; background:transparent; color:var(--muted); padding:12px; margin-bottom:6px; }
.navigation button[aria-current="page"] { background:var(--selected); color:var(--accent); font-weight:600; } .navigation button:hover { background:var(--hover); }
.lifecycle { display:grid; gap:9px; } .lifecycle .primary { background:var(--accent); color:var(--on-accent); font-weight:600; }
.content { min-width:0; min-height:0; display:flex; flex-direction:column; } .content > .notice { flex:none; margin:0 0 12px; }
.content > section { min-height:0; overflow-y:auto; flex:1; } .section-intro { margin:0 0 20px; color:var(--muted); }
.fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; } .field-wide { grid-column:1/-1; }
.fields-stacked { grid-template-columns:1fr; }
/* Auswahl und Zugangsdaten stehen auf breiten Fenstern nebeneinander; keine schmale Zwischen-Zweierspalte. */
.authentication-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
.authentication-fields > label { min-width:0; }
.row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; } .actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:20px 0; } .metric { border:1px solid var(--line); padding:16px; border-radius:8px; }
.metric strong { display:block; font-size:23px; font-weight:600; margin-top:10px; overflow-wrap:anywhere; }
.table-wrap { max-width:100%; overflow:auto; } table { border-collapse:collapse; width:100%; text-align:left; }
th { color:var(--muted); font-weight:400; font-size:12px; } td,th { padding:12px 10px; border-bottom:1px solid var(--line); } td { overflow-wrap:anywhere; }
.empty { color:var(--muted); padding:24px 0; } .notice { border-left:3px solid var(--warning); background:var(--input); padding:12px 14px; line-height:1.5; margin-bottom:20px; }
.footer { padding:12px 16px; } .footer-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; } .footer-row .hint { margin-left:auto; }
details { margin-top:10px; } summary { cursor:pointer; color:var(--muted); } .error { color:var(--danger); overflow-wrap:anywhere; }
.swatch { display:inline-block; width:18px; height:18px; background:var(--accent); border:1px solid var(--line); border-radius:50%; vertical-align:middle; margin-right:8px; }
[hidden] { display:none!important; } .skip-link { position:absolute; left:16px; top:-80px; padding:10px; background:var(--panel); color:var(--text); z-index:10; } .skip-link:focus { top:8px; }
@media(max-width:760px) { .shell { padding:8px; grid-template-rows:auto 1fr auto; } .header { min-height:54px; flex-wrap:wrap; gap:10px; } .header>.eyebrow { display:none; } .badge { font-size:11px; } .workspace { grid-template-columns:1fr; gap:12px; } .sidebar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; } .navigation { display:flex; flex-wrap:wrap; gap:4px; padding:8px; } .navigation .eyebrow { display:none; } .navigation button { width:auto; margin:0; padding:9px; } .lifecycle { padding:10px; } .fields,.metrics { grid-template-columns:1fr; } .footer-row .hint { margin-left:0; } }
@media(max-width:1000px) { .authentication-fields { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto; } }

/* Aus Client/Themes übernommen: Flächen, Text, Akzent, Rahmen und Interaktionszustände gemeinsam. */
:root[data-theme="anthracite"] { --background:#181a1d; --panel:#25282d; --input:#343941; --text:#edf0f4; --muted:#adb5c1; --accent:#88aed0; --line:#4a515c; --button:#363d47; --hover:#485463; --selected:#2c3d48; --warning:#eac58d; --on-accent:#131b23; }
:root[data-theme="blue"] { --background:#101826; --panel:#202e43; --input:#2a3d59; --text:#edf3ff; --muted:#b0c2dd; --accent:#79b5ff; --line:#405573; --button:#2b4363; --hover:#3c5b82; --selected:#24476b; --on-accent:#101826; }
:root[data-theme="violet"] { --background:#1c1823; --panel:#2a2434; --input:#3b3147; --text:#f2edf8; --muted:#bdb0ce; --accent:#bea5e9; --line:#564963; --button:#3d324b; --hover:#514064; --selected:#3e3153; --warning:#ebc18b; --on-accent:#1c1823; }
:root[data-theme="sand"] { color-scheme:light; --background:#f1eee8; --panel:#faf8f4; --input:#e8e0d5; --text:#302b26; --muted:#6b6258; --accent:#76563a; --line:#b7aa98; --button:#e4d9ca; --hover:#d7c7b3; --selected:#dbe6dc; --warning:#7a3d05; --danger:#a82332; --success:#126c36; --on-accent:#ffffff; }
/* Browser-Systemfarben folgen Hell/Dunkel und Kontrasteinstellungen ohne Windows-API oder Systemänderung. */
:root[data-theme="system"] { color-scheme:light dark; --background:Canvas; --panel:ButtonFace; --input:Field; --text:CanvasText; --muted:CanvasText; --accent:Highlight; --line:ButtonBorder; --button:ButtonFace; --hover:ButtonFace; --selected:Field; --warning:CanvasText; --danger:CanvasText; --success:CanvasText; --on-accent:HighlightText; }
fieldset { min-width:0; padding:16px; border:1px solid var(--line); border-radius:8px; }
legend { color:var(--muted); padding:0 6px; }
/* Reihenfolge und Flächen nach den vorhandenen WPF-Verwaltungscontrols; mobile Anordnung bleibt flexibel. */
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.plain-fields { border:0; border-radius:0; padding:0; margin:0; }
.check-field { display:flex; flex-direction:row; align-items:center; gap:8px; }
.settings-options { margin:16px 0; }
.settings-options > .check-field { margin:14px 0; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:14px 0 8px; flex-wrap:wrap; }
.section-heading h2,.section-heading p { margin:0; }
.section-heading > button { margin-left:auto; }
.status-summary { display:flex; flex-wrap:wrap; gap:8px 24px; margin-bottom:16px; }
.status-summary > strong { color:var(--accent); }
.status-summary > span { color:var(--muted); }
.status-summary strong { color:var(--text); }
.list-panel { padding:12px; border:1px solid var(--line); border-radius:8px; min-height:180px; }
#overview,#accounts,#diagnostics { display:flex; flex-direction:column; }
/* Statuskarten wachsen mit ihrem Inhalt; der Abschnitt scrollt statt Buttons aus Rahmen zu drängen. */
#overview { gap:16px; }
#overview > h1,#overview > .status-summary { margin:0; flex:none; }
#overview .list-panel { flex:none; min-height:0; min-width:0; padding:16px; display:flex; flex-direction:column; gap:12px; }
#overview .list-panel > h2,#overview .list-panel > p { margin:0; }
#overview .list-panel > p { overflow-wrap:anywhere; }
#overview .list-panel > .actions { margin:0; align-items:center; }
#overview .list-panel button { max-width:100%; overflow-wrap:anywhere; }
#overview .list-panel > button { align-self:flex-start; }
#overview .table-wrap { flex:none; }
#storage-state { white-space:pre-line; }
.selectable-table { min-height:140px; max-height:45vh; border:1px solid var(--line); background:var(--input); }
#accounts .selectable-table { flex:1; max-height:none; }
.table-wrap th { position:sticky; top:0; z-index:1; background:var(--panel); }
.selectable-table tr[data-selected="true"] { background:var(--selected); color:var(--accent); }
.selectable-table tbody tr:hover { background:var(--hover); cursor:pointer; }
.selectable-table tbody tr:focus-within { outline:1px solid var(--accent); outline-offset:-2px; }
.selection-column { width:32px; padding:8px; font-size:0; }
.fingerprint { overflow-wrap:anywhere; }
.invitation-fields { display:grid; grid-template-columns:1fr 1fr auto; gap:12px; align-items:end; }
.invitation-fields .check-field { padding-bottom:10px; }
.invitation-primary { margin:12px 0 8px; display:grid; grid-template-columns:1fr 1fr; }
#invite-secret { height:90px; min-height:90px; resize:vertical; }
.danger { color:var(--danger); }
.audio-card { background:var(--input); margin:16px 0 0; padding:16px; }
.audio-card > legend { font-size:17px; font-weight:600; color:var(--text); }
.audio-advanced { margin-top:16px; }
.audio-channel-layout { display:grid; grid-template-columns:180px minmax(0,1fr); gap:16px; }
.audio-channel-list { max-height:300px; min-height:140px; overflow:auto; }
.audio-channel-list .channel-choice { margin-bottom:5px; }
.codec-rate { display:grid; grid-template-columns:minmax(0,1fr) 96px; gap:12px; align-items:center; margin:8px 0 16px; }
.codec-rate input[type="range"] { padding:0; accent-color:var(--accent); }
/* Beide Opus-Auswahlen bleiben kompakt; auf schmalen Flächen höchstens so breit wie ihr Container. */
.audio-complexity { width:140px; max-width:100%; justify-self:start; }
.field-caption { color:var(--muted); margin:0 0 6px; }
.audio-card .check-field { margin:8px 0; }
.diagnostics-list { flex:1; min-height:160px; list-style:none; padding:12px; margin:0; overflow:auto; background:var(--input); border-radius:5px; }
.diagnostics-list li { padding:10px 0; border-bottom:1px solid var(--line); }
.diagnostics-list time { color:var(--muted); font-size:11px; margin-right:10px; }
.diagnostics-list strong { color:var(--warning); font-weight:400; }
.diagnostics-list p { margin:4px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.navigation button > svg { width:17px; height:17px; flex:none; stroke:currentColor; fill:none; stroke-width:1.3; }
.navigation button { display:flex; align-items:center; gap:12px; }
/* Wie ChannelsControl.xaml: neuer Kanal, auswählbare Kanalzeilen mit Nutzern, eigener Umbenennenentwurf. */
.channel-editor { margin:0; }
.channel-editor .actions { margin-top:10px; }
.channel-list { list-style:none; margin:14px 0; padding:4px; height:260px; overflow-y:auto; background:var(--input); border:1px solid var(--line); border-radius:5px; }
.channel-list > li { margin:3px 0; }
.channel-choice { position:relative; display:block; padding:10px; border:1px solid var(--line); border-radius:4px; background:var(--panel); color:var(--text); cursor:pointer; overflow-wrap:anywhere; }
.channel-choice:hover { background:var(--hover); }
.channel-choice[data-selected="true"] { background:var(--selected); border-color:var(--accent); }
.channel-choice:focus-within { outline:2px solid var(--accent); outline-offset:1px; }
.channel-choice input { position:absolute; width:1px; height:1px; padding:0; opacity:0; }
.channel-choice:has(input:disabled) { cursor:default; opacity:.65; }
.channel-title { display:block; font-weight:600; }
.channel-prefix { color:var(--accent); margin-right:8px; }
.channel-participants { display:grid; gap:5px; margin:6px 0 0 22px; color:var(--muted); }
.channel-participant { position:relative; padding-left:19px; }
.channel-participant::before { content:""; position:absolute; left:4px; top:1px; width:6px; height:6px; border:1px solid var(--accent); border-radius:50%; }
.channel-participant::after { content:""; position:absolute; left:1px; top:10px; width:12px; height:5px; border:1px solid var(--accent); border-bottom:0; border-radius:6px 6px 0 0; }
#channel-selection-id { overflow-wrap:anywhere; }
h1 { overflow-wrap:anywhere; }
@media(max-width:480px) {
  .sidebar { grid-template-columns:1fr; }
  .navigation button { overflow-wrap:anywhere; }
  .lifecycle { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lifecycle button { min-width:0; overflow-wrap:anywhere; }
}
@media(max-width:1000px) { .invitation-fields { grid-template-columns:1fr 1fr; } .invitation-fields .check-field { grid-column:1/-1; } }
@media(max-width:760px) {
  .shell { height:auto; min-height:100dvh; grid-template-rows:auto 1fr auto; }
  .content > section { overflow:visible; }
  .navigation { overflow:visible; }
  .audio-channel-layout { grid-template-columns:1fr; }
  .audio-channel-list { min-height:0; max-height:180px; }
  .invitation-fields,.invitation-primary { grid-template-columns:1fr; }
  .invitation-fields .check-field { grid-column:auto; }
  .selectable-table,#accounts .selectable-table { max-height:360px; flex:auto; }
  .diagnostics-list { max-height:420px; }
  .lifecycle > .eyebrow { grid-column:1/-1; }
}
