/* CSE-Vorlagen – Taskpane-Gestaltung (angelehnt an CSE Outlook Center) */

:root {
  --cse-blau: #0f6cbd;
  --cse-blau-dunkel: #0b5394;
  --text: #242424;
  --text-leise: #616161;
  --flaeche: #f5f5f5;
  --karte: #ffffff;
  --rand: #e0e0e0;
  --hover: #f0f6fb;
  --ok: #107c10;
  --fehler: #c50f1f;
}

body[data-thema="dunkel"] {
  --text: #f3f3f3;
  --text-leise: #b5b5b5;
  --flaeche: #1f1f1f;
  --karte: #2b2b2b;
  --rand: #454545;
  --hover: #333c44;
  --ok: #6ccb5f;
  --fehler: #ff8389;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--flaeche);
}

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--cse-blau);
  color: #fff;
}

.kopf-titel { display: flex; align-items: baseline; gap: 8px; }
.kopf h1 { margin: 0; font-size: 16px; font-weight: 600; }
.version { font-size: 11px; opacity: 0.8; }

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
}
.badge-outlook { background: #106ebe; }
.badge-word { background: #185abd; }
.badge-excel { background: #107c41; }
.badge-browser { background: #616161; }

main { padding: 12px; display: flex; flex-direction: column; gap: 12px; }

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 6px;
  padding: 12px 14px;
}

.karte h2 { margin: 0 0 8px; font-size: 13px; color: var(--cse-blau-dunkel); }
body[data-thema="dunkel"] .karte h2 { color: #6cb8f6; }

.konto { margin: 0 0 10px; color: var(--text-leise); }

.knopfleiste { display: flex; gap: 8px; flex-wrap: wrap; }

.knopf {
  padding: 6px 14px;
  border: 1px solid var(--rand);
  border-radius: 4px;
  background: var(--karte);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.knopf:hover:not(:disabled) { background: var(--hover); }
.knopf:disabled { opacity: 0.5; cursor: default; }
.knopf.primaer {
  background: var(--cse-blau);
  border-color: var(--cse-blau);
  color: #fff;
}
.knopf.primaer:hover:not(:disabled) { background: var(--cse-blau-dunkel); }
.knopf.klein { padding: 2px 8px; font-size: 13px; line-height: 1.4; }

.status { margin: 10px 0 0; min-height: 1.2em; color: var(--text-leise); }
.status.ok { color: var(--ok); }
.status.fehler { color: var(--fehler); }

.hinweis { margin: 0; color: var(--text-leise); }

/* ---------- Werkzeugleiste / Breadcrumb ---------- */

.werkzeugleiste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.brotkrumen {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  min-width: 0;
}

.krume {
  border: none;
  background: none;
  color: var(--cse-blau);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 3px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-thema="dunkel"] .krume { color: #6cb8f6; }
.krume:hover { background: var(--hover); }
.krume.aktiv { color: var(--text); font-weight: 600; cursor: default; }
.krume.aktiv:hover { background: none; }
.trenner { color: var(--text-leise); font-size: 12px; }

/* ---------- Filter-Chips ---------- */

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

.chip {
  padding: 3px 12px;
  border: 1px solid var(--rand);
  border-radius: 12px;
  background: var(--karte);
  color: var(--text-leise);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.chip:hover { background: var(--hover); }
.chip.aktiv {
  background: var(--cse-blau);
  border-color: var(--cse-blau);
  color: #fff;
}

.werkzeugknoepfe { display: flex; gap: 4px; flex: 0 0 auto; }

.einschub {
  border: 1px solid var(--cse-blau);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--flaeche);
}
.einschub h3 { margin: 0 0 8px; font-size: 13px; color: var(--cse-blau-dunkel); }
body[data-thema="dunkel"] .einschub h3 { color: #6cb8f6; }

.feld { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.feld label { font-size: 12px; color: var(--text-leise); }
.feld input, .feld select {
  padding: 5px 8px;
  border: 1px solid var(--rand);
  border-radius: 4px;
  background: var(--karte);
  color: var(--text);
  font: inherit;
}
.feld input:focus, .feld select:focus { outline: 2px solid var(--cse-blau); outline-offset: -1px; }

.hilfe-absatz { margin: 0 0 8px; font-size: 12px; color: var(--text-leise); }

.hilfe-tabelle { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 8px; }
.hilfe-tabelle th {
  text-align: left;
  padding: 6px 4px 3px;
  color: var(--cse-blau-dunkel);
  border-bottom: 1px solid var(--rand);
}
body[data-thema="dunkel"] .hilfe-tabelle th { color: #6cb8f6; }
.hilfe-tabelle td { padding: 3px 4px; vertical-align: top; border-bottom: 1px solid var(--rand); }
.hilfe-tabelle code {
  font-family: Consolas, monospace;
  font-size: 11px;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 3px;
  padding: 0 3px;
  white-space: nowrap;
}

.haken {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -4px 0 10px;
  font-size: 12px;
  color: var(--text-leise);
  cursor: pointer;
  user-select: none;
}
.haken input { margin: 0; }

/* ---------- Liste ---------- */

.liste { display: flex; flex-direction: column; gap: 2px; }

.zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.zeile:hover { background: var(--hover); }

.abzeichen {
  flex: 0 0 auto;
  min-width: 38px;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  letter-spacing: 0.3px;
}
.abzeichen.emoji { background: none; font-size: 18px; min-width: 38px; padding: 0; }

.typ-word { background: #185abd; }
.typ-excel { background: #107c41; }
.typ-pdf { background: #c50f1f; }
.typ-baustein { background: #5c6bc0; }
.typ-bild { background: #b46000; }
.typ-datei { background: #757575; }
.typ-mail { background: #0f6cbd; }
.typ-termin { background: #8764b8; }

.zeilentext { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.zeilenaktion {
  flex: 0 0 auto;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 15px;
  padding: 4px 6px;
  border-radius: 4px;
  opacity: 0.7;
}
.zeilenaktion:hover { background: var(--rand); opacity: 1; }
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { font-size: 11px; color: var(--text-leise); }

/* ---------- Protokoll ---------- */

.protokoll-titel {
  font-size: 13px;
  font-weight: 600;
  color: var(--cse-blau-dunkel);
  cursor: pointer;
}
body[data-thema="dunkel"] .protokoll-titel { color: #6cb8f6; }

.protokoll {
  margin-top: 8px;
  font-family: Consolas, monospace;
  font-size: 12px;
  color: var(--text-leise);
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
