/* ===================================================================
   FDISK – klassisches Look-&-Feel (blau, Verdana, Tabellen)
   =================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Verdana, Tahoma, Geneva, sans-serif;
  font-size: 12px;
  color: #1a1a1a;
  background: #eef1f5;
}
a { color: #14508c; }

/* ------------------------------------------------------------------
   Eingabefelder GLOBAL: normal weiß, beim Schreiben (Fokus) gelb
   ------------------------------------------------------------------ */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([readonly]):not([disabled]),
textarea:not([readonly]):not([disabled]),
select:not([disabled]) {
  background-color: #ffffff !important;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([readonly]):not([disabled]):focus,
textarea:not([readonly]):not([disabled]):focus,
select:not([disabled]):focus {
  background-color: #fff3a8 !important;
}

/* ---------------- LOGIN (originalgetreu) ---------------- */
.login-body {
  background: #e7ebef;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-wrap { width: 392px; max-width: 100%; }
.login-box {
  background: #fff;
  border: 1px solid #7f8a99;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
}
/* blaues Banner mit horizontalen Streifen */
.banner {
  display: flex;
  align-items: stretch;
  height: 96px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0, rgba(0, 0, 0, .12) 1px, transparent 1px, transparent 4px),
    linear-gradient(180deg, #5081b5 0%, #2b578c 45%, #123a63 100%);
}
.banner-truck { display: flex; align-items: center; flex-shrink: 0; }
.truck-img { height: 96px; width: auto; display: block; }
.banner-title { color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 4px 12px 4px 2px; }
.fdisk-logo {
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 44px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: .9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .55);
}
.fdisk-sub { font-size: 9px; line-height: 1.3; margin-top: 4px; color: #e3ecf6; }
.banner-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e6e9ee;
  border-top: 1px solid #aeb8c4;
  border-bottom: 1px solid #aeb8c4;
  padding: 2px 8px;
  font-size: 10px;
  color: #5a6b7d;
}
.banner-footer .version { color: #123a63; font-weight: bold; }
.login-form { background: #eceff2; padding: 12px 12px 10px; }
.login-table { width: 100%; border-collapse: collapse; }
.login-table td { padding: 3px 4px; vertical-align: middle; }
.login-table .lbl { text-align: right; color: #1a3c66; white-space: nowrap; width: 92px; font-size: 12px; }
.login-table .right { text-align: right; padding-top: 8px; }
.txt {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #7f9db9;
  padding: 2px 4px;
  font-family: inherit;
  font-size: 12px;
  background: #ffffe1;
}
.txt:focus { outline: none; border-color: #14508c; background: #fffff2; }
.btn {
  font-family: inherit;
  font-size: 12px;
  padding: 2px 12px;
  border: 1px solid #7f9db9;
  background: linear-gradient(#fbfbfb, #dbe1e8);
  cursor: pointer;
}
.btn:hover { background: linear-gradient(#ffffff, #cfe0f2); }
.btn:active { background: #cbd8e6; }
.login-error { color: #b00020; text-align: center; margin-top: 8px; min-height: 14px; font-size: 11px; }

/* ---------------- KOPFBANNER (wie echtes FDISK) ---------------- */
.app-banner {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 86px;
  overflow: hidden;
  border-bottom: 2px solid #12294a;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0, rgba(0, 0, 0, .12) 1px, transparent 1px, transparent 4px),
    linear-gradient(180deg, #5081b5 0%, #2b578c 45%, #123a63 100%);
}
.ban-truck { height: 86px; width: auto; display: block; flex-shrink: 0; }
.ban-spacer { flex: 1; min-width: 10px; }
.ban-fdiskblock { color: #fff; display: flex; flex-direction: column; justify-content: center; text-align: right; padding: 6px 10px 6px 0; }
.ban-fdisk { font-family: Arial, "Helvetica Neue", sans-serif; font-size: 42px; font-weight: bold; letter-spacing: 1px; line-height: .9; text-shadow: 1px 1px 2px rgba(0, 0, 0, .55); }
.ban-sub { font-size: 9px; line-height: 1.3; color: #e3ecf6; margin-top: 3px; }
.ban-acp { font-size: 9px; color: #c7d4e6; margin-top: 4px; }
.ban-logo { height: 56px; width: auto; align-self: center; margin: 0 44px 0 10px; flex-shrink: 0; }
.ban-version { position: absolute; right: 8px; bottom: 2px; color: #d7e2f0; font-size: 10px; font-weight: bold; }

.app-subbar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(#20456f, #12294a);
  color: #dbe6f2;
  padding: 3px 14px;
  font-size: 11px;
  border-bottom: 1px solid #0d2038;
}
.logout-link { color: #ffdd88; cursor: pointer; font-weight: bold; }
.logout-link:hover { text-decoration: underline; }
.sub-user .name { font-weight: bold; color: #fff; }

.app-body { display: flex; min-height: calc(100vh - 110px); }
.sidebar {
  width: 210px;
  background: #dde5ee;
  border-right: 1px solid #b9c6d5;
  padding: 8px 0;
  flex-shrink: 0;
}
.sidebar .group-title {
  background: linear-gradient(#c6d3e2, #aebfd2);
  color: #12294a;
  font-weight: bold;
  padding: 4px 12px;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #9fb2c8;
  font-size: 11px;
}
.nav-item {
  display: block;
  padding: 6px 12px 6px 24px;
  color: #14508c;
  text-decoration: none;
  border-bottom: 1px solid #e6ecf3;
  cursor: pointer;
}
.nav-item:hover { background: #eaf1f9; }
.nav-item.active { background: #fff7d6; font-weight: bold; border-left: 3px solid #d6a200; padding-left: 21px; }

.content { flex: 1; padding: 16px 20px; background: #f6f8fb; overflow-x: auto; }
.page-title {
  font-size: 16px;
  color: #12294a;
  border-bottom: 2px solid #4f7cae;
  padding-bottom: 6px;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-title .actions { font-size: 12px; }

/* ---------------- TABELLEN ---------------- */
table.grid { border-collapse: collapse; width: 100%; background: #fff; }
table.grid th {
  background: linear-gradient(#4f7cae, #35608f);
  color: #fff;
  text-align: left;
  padding: 6px 8px;
  font-size: 11px;
  border: 1px solid #2c4d74;
}
table.grid td { padding: 5px 8px; border: 1px solid #cfd9e4; }
table.grid tr:nth-child(even) td { background: #eef3f9; }
table.grid tr:hover td { background: #fff7d6; }
.empty { padding: 14px; color: #7a8798; font-style: italic; }

/* Status-Punkte */
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.s1 { background: #2e9e3f; } /* frei / einsatzbereit */
.s2 { background: #2e9e3f; }
.s3 { background: #e6a700; }
.s6 { background: #c8102e; } /* nicht einsatzbereit */
.badge { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 10px; color: #fff; }
.badge.admin { background: #c8102e; }
.badge.user { background: #4f7cae; }
.badge.on { background: #2e9e3f; }
.badge.off { background: #8a97a6; }

/* ---------------- BUTTONS / AKTIONEN ---------------- */
.btn-sm {
  font-family: inherit; font-size: 11px; padding: 2px 9px;
  border: 1px solid #7f9db9; background: linear-gradient(#fdfdfd, #d9e2ec); cursor: pointer; border-radius: 2px;
}
.btn-sm:hover { background: linear-gradient(#fff, #cfe0f2); }
.btn-primary { border-color: #2c4d74; background: linear-gradient(#5a86b8, #2c5486); color: #fff; }
.btn-primary:hover { background: linear-gradient(#6a95c6, #35608f); }
.btn-danger { color: #b00020; }
.link { color: #14508c; cursor: pointer; text-decoration: underline; margin-right: 8px; }
.link.danger { color: #b00020; }

/* ---------------- FORMULAR / MODAL ---------------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(20,40,70,.45);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 60px; z-index: 100;
}
.modal {
  background: #fff; border: 1px solid #2c4d74; width: 460px; max-width: 94%;
  box-shadow: 0 8px 26px rgba(0,0,0,.4);
}
.modal-head { background: linear-gradient(#4f7cae, #1b3f6b); color: #fff; padding: 7px 12px; font-weight: bold; display:flex; justify-content:space-between; }
.modal-head .x { cursor: pointer; }
.modal-body { padding: 14px 16px; }
.form-row { display: flex; align-items: center; margin-bottom: 9px; }
.form-row label { width: 130px; color: #14508c; flex-shrink: 0; }
.form-row input, .form-row select {
  flex: 1; border: 1px solid #7f9db9; padding: 4px 6px; font-family: inherit; font-size: 12px; background: #ffffe1;
}
.form-row input:focus, .form-row select:focus { outline: none; border-color: #14508c; background: #fff; }
.modal-foot { padding: 10px 16px; background: #eef3f9; border-top: 1px solid #cfd9e4; text-align: right; }
.form-error { color: #b00020; margin-bottom: 8px; min-height: 14px; }

.toolbar { margin-bottom: 12px; }
.kpi-row { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.kpi {
  background: #fff; border: 1px solid #b9c6d5; border-top: 3px solid #4f7cae;
  padding: 10px 16px; min-width: 130px;
}
.kpi .num { font-size: 26px; font-weight: bold; color: #12294a; }
.kpi .lbl { font-size: 11px; color: #5a6b7d; text-transform: uppercase; letter-spacing: .5px; }

/* ---------------- FILTERLEISTE / TÄTIGKEITSBERICHTE ---------------- */
.filter-bar {
  background: #eef3f9; border: 1px solid #cfd9e4; padding: 10px 12px; margin-bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end;
}
.filter-field { display: flex; flex-direction: column; }
.filter-field label { color: #14508c; font-size: 11px; margin-bottom: 2px; }
.filter-field input, .filter-field select {
  border: 1px solid #7f9db9; padding: 3px 5px; font-family: inherit; font-size: 12px; background: #ffffe1;
}
.filter-field.chk { flex-direction: row; align-items: center; gap: 5px; }
.filter-field.chk label { margin: 0; }
.filter-actions { display: flex; gap: 4px; align-items: center; padding-bottom: 1px; }

.tb-layout { display: flex; gap: 16px; align-items: flex-start; }
.tb-main { flex: 1; min-width: 0; }
.tb-side { width: 215px; flex-shrink: 0; }
.info-box { border: 1px solid #b9c6d5; margin-bottom: 14px; background: #fff; }
.info-box .ib-head {
  background: linear-gradient(#dfe8f2, #c6d3e2); color: #12294a; font-weight: bold;
  padding: 4px 8px; border-bottom: 1px solid #b9c6d5; font-size: 11px;
}
.info-box .ib-body { padding: 6px 8px; }
.info-box ul { margin: 4px 0; padding-left: 18px; }
.info-box li { margin: 4px 0; }
.info-box a { cursor: pointer; }

.list-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 11px; }
.icon-btn {
  border: 1px solid #7f9db9; background: linear-gradient(#fdfdfd, #d9e2ec); cursor: pointer;
  font-size: 11px; line-height: 1; padding: 2px 5px; margin-right: 2px; border-radius: 2px;
}
.icon-btn:hover { background: linear-gradient(#fff, #cfe0f2); }
.icon-btn.del { color: #b00020; }
.pager { text-align: center; padding: 10px; color: #5a6b7d; font-size: 11px; }
.pager button { margin: 0 3px; }

.req { color: #b00020; margin-left: 4px; }
.tb-form { max-width: 760px; background: #fff; border: 1px solid #cfd9e4; padding: 16px 20px; }
.tb-form .form-row label { width: 210px; }
.tb-form textarea {
  flex: 1; border: 1px solid #7f9db9; padding: 5px 6px; font-family: inherit; font-size: 12px;
  background: #ffffe1; min-height: 90px; resize: vertical;
}
.tb-form input[readonly] { background: #e9edf2; color: #555; }
.tb-form .dt input.d { flex: 2; }
.tb-form .dt input.t { flex: 1; margin-left: 6px; }
.tb-form-foot { margin-top: 16px; display: flex; gap: 6px; }

/* ---------------- MITGLIEDER / PERSONAL ---------------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid #b9c6d5; vertical-align: middle; background: #dde5ee; }
.avatar-ph {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 50%; background: #c6d3e2; color: #3a5a80; font-weight: bold; font-size: 12px; border: 1px solid #b9c6d5;
}
.name-link { color: #14508c; cursor: pointer; font-weight: bold; }
.name-link:hover { text-decoration: underline; }

.person-card { background: #fff; border: 1px solid #cfd9e4; max-width: 840px; }
.person-top { display: flex; gap: 18px; padding: 16px 18px; background: linear-gradient(#eef3f9, #dfe8f2); border-bottom: 1px solid #cfd9e4; }
.person-foto { width: 130px; height: 165px; object-fit: cover; border: 1px solid #7f9db9; background: #dde5ee; flex-shrink: 0; }
.person-foto-ph {
  width: 130px; height: 165px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #7f9db9; background: #dde5ee; color: #7a8798; font-size: 46px; flex-shrink: 0;
}
.person-headinfo { flex: 1; min-width: 0; }
.person-name { font-size: 21px; font-weight: bold; color: #12294a; }
.person-rank { color: #14508c; margin: 2px 0 12px; }
.person-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 12px; }
.person-meta .k { color: #5a6b7d; white-space: nowrap; }
.person-body { padding: 16px 18px; }
.person-body h3 { font-size: 13px; color: #12294a; border-bottom: 1px solid #cfd9e4; padding-bottom: 4px; margin: 0 0 9px; }
.funk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.funk-chip { background: #e8eff7; border: 1px solid #aebfd2; color: #14508c; padding: 3px 10px; border-radius: 12px; font-size: 11px; }
.ausb-ul { margin: 0 0 18px; padding-left: 18px; }
.ausb-ul li { margin: 3px 0; }

.foto-box { display: flex; align-items: center; gap: 12px; }
.foto-prev { width: 80px; height: 100px; object-fit: cover; border: 1px solid #7f9db9; background: #dde5ee; }
.foto-prev-ph { width: 80px; height: 100px; display: flex; align-items: center; justify-content: center; border: 1px solid #7f9db9; background: #dde5ee; color: #8a97a6; font-size: 30px; }
.funk-picker { border: 1px solid #7f9db9; background: #fff; max-height: 240px; overflow: auto; padding: 6px 10px; flex: 1; }
.funk-picker .fg { font-weight: bold; color: #12294a; margin: 8px 0 2px; font-size: 11px; border-bottom: 1px solid #e0e6ee; padding-bottom: 2px; }
.funk-picker .fg:first-child { margin-top: 0; }
.funk-picker label { display: block; font-weight: normal; color: #333; padding: 1px 0; cursor: pointer; font-size: 11px; }
.funk-counter { font-size: 11px; color: #5a6b7d; margin-top: 5px; }
.ausb-row { display: flex; gap: 6px; margin-bottom: 5px; }
.ausb-row input.b, .ausb-row select.b { flex: 2; border: 1px solid #7f9db9; padding: 4px 6px; font: inherit; font-size: 12px; background: #ffffe1; }
.ausb-row input.j { width: 74px; border: 1px solid #7f9db9; padding: 4px 6px; font: inherit; font-size: 12px; background: #ffffe1; }
.ws-row { display: flex; gap: 6px; margin-bottom: 5px; max-width: 520px; }
.ws-row select { flex: 1; border: 1px solid #7f9db9; padding: 4px 6px; font: inherit; font-size: 12px; background: #ffffe1; }

/* ---------------- DEZERNATE ---------------- */
.dez-header { display: flex; gap: 16px; align-items: center; background: linear-gradient(#f2f6fb, #e7eef6); padding: 16px 18px; border: 1px solid #cfd9e4; margin-bottom: 14px; }
.dez-badge { width: 60px; height: 60px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: bold; color: #fff; flex-shrink: 0; box-shadow: 0 2px 5px rgba(0, 0, 0, .2); }
.dez-title { font-size: 20px; font-weight: bold; color: #12294a; }
.dez-desc { color: #5a6b7d; margin-top: 5px; max-width: 700px; line-height: 1.45; }
.dez-stats { display: flex; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.dez-sub { font-size: 14px; color: #12294a; border-bottom: 2px solid #4f7cae; padding-bottom: 5px; margin: 20px 0 12px; }
.dez-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.dez-card { border: 1px solid #cfd9e4; background: #fff; }
.dez-card .dc-head { background: linear-gradient(#eef3f9, #dfe8f2); border-bottom: 1px solid #cfd9e4; padding: 7px 10px; font-weight: bold; color: #12294a; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.dc-count { font-weight: normal; opacity: .7; }
.dez-card.leit { border-color: #2c4d74; margin-bottom: 6px; }
.dez-card.leit .dc-head { background: linear-gradient(#5a86b8, #2c5486); color: #fff; font-size: 13px; }
.dc-body { padding: 8px 10px; min-height: 42px; }
.dez-member { display: flex; align-items: center; gap: 8px; padding: 4px 2px; }
.dm-name { font-weight: bold; font-size: 12px; }
.dm-rank { color: #8a97a6; font-size: 11px; }
.dez-empty { color: #a0aab6; font-style: italic; font-size: 11px; padding: 4px 0; }

/* ---------------- REFERATS-ARBEITSBEREICH ---------------- */
.subnav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; border-bottom: 2px solid #4f7cae; padding-bottom: 6px; }
.subnav-btn { font: inherit; font-size: 11px; padding: 4px 10px; border: 1px solid #b9c6d5; background: linear-gradient(#fdfdfd, #e6ecf3); cursor: pointer; border-radius: 3px 3px 0 0; color: #14508c; }
.subnav-btn:hover { background: linear-gradient(#fff, #dbe6f2); }
.subnav-btn.active { background: linear-gradient(#5a86b8, #2c5486); color: #fff; border-color: #2c4d74; font-weight: bold; }

.ref-clickable { cursor: pointer; transition: box-shadow .1s; }
.ref-clickable:hover { box-shadow: 0 2px 8px rgba(20, 60, 110, .18); }
.ref-clickable:hover .dc-head { background: linear-gradient(#dbe6f2, #c6d6e8); }
.ref-open { margin-top: 8px; font-size: 11px; color: #14508c; font-weight: bold; }

.ref-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; background: linear-gradient(#f2f6fb, #e7eef6); border: 1px solid #cfd9e4; padding: 14px 18px; margin-bottom: 14px; flex-wrap: wrap; }
.ref-crumb { color: #5a6b7d; font-size: 11px; }
.ref-title { font-size: 19px; font-weight: bold; color: #12294a; }
.ref-personal { display: flex; gap: 14px; flex-wrap: wrap; }

.ws-cols { display: flex; gap: 16px; align-items: flex-start; }
.ws-main { flex: 2; min-width: 0; }
.ws-side { flex: 1; min-width: 230px; }
.ws-sec-head { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(#4f7cae, #35608f); color: #fff; padding: 6px 10px; font-weight: bold; font-size: 12px; }
.ws-sec-head .btn-sm { padding: 1px 8px; }
.aufgabe-add { display: flex; gap: 5px; margin: 8px 0; }
.aufgabe-add input { flex: 1; border: 1px solid #7f9db9; padding: 4px 6px; font: inherit; font-size: 12px; background: #ffffe1; }
.aufgabe-list { border: 1px solid #cfd9e4; }
.aufgabe { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid #eef2f7; }
.aufgabe:last-child { border-bottom: none; }
.aufgabe .au-text { flex: 1; font-size: 12px; }
.aufgabe.done .au-text { text-decoration: line-through; color: #9aa6b2; }

.bericht-view { background: #fff; border: 1px solid #cfd9e4; padding: 16px 20px; max-width: 840px; }
.bericht-meta { color: #5a6b7d; font-size: 11px; border-bottom: 1px solid #e0e6ee; padding-bottom: 8px; margin-bottom: 12px; }
.bericht-text { font-size: 13px; line-height: 1.65; color: #222; }

@media (max-width: 820px) { .ws-cols { flex-direction: column; } .ws-side { width: 100%; } }

/* Rechte-Matrix */
.perm-table { border-collapse: collapse; width: 100%; max-width: 480px; }
.perm-table th { background: linear-gradient(#4f7cae, #35608f); color: #fff; text-align: left; padding: 5px 8px; font-size: 11px; border: 1px solid #2c4d74; }
.perm-table td { padding: 4px 8px; border: 1px solid #cfd9e4; }
.perm-table tr:nth-child(even) td { background: #eef3f9; }
.perm-table select { width: 100%; border: 1px solid #7f9db9; padding: 3px 5px; font: inherit; font-size: 12px; background: #ffffe1; }
.perm-note { background: #eaf4ea; border: 1px solid #b6d7b6; color: #2e6b2e; padding: 8px 10px; margin: 14px 0; font-size: 12px; }
.perm-table tr.perm-sub td { background: #dbe6f2; font-weight: bold; color: #12294a; }
.perm-quick { border: 1px solid #7f9db9; padding: 1px 4px; font: inherit; font-size: 11px; background: #ffffe1; margin-left: 6px; }

@media (max-width: 900px) { .tb-layout { flex-direction: column; } .tb-side { width: 100%; } .person-top { flex-direction: column; } }
@media (max-width: 640px) {
  .app-body { flex-direction: column; }
  .sidebar { width: 100%; display: flex; flex-wrap: wrap; }
  .sidebar .group-title { width: 100%; }
  .nav-item { flex: 1 1 auto; text-align: center; padding-left: 12px; }
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row label { width: auto; margin-bottom: 3px; }
}

/* ---------------- DIENSTANWEISUNGEN ---------------- */
.da-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.da-card { border: 1px solid #cfd9e4; background: #fff; display: flex; flex-direction: column; }
.da-thumb { width: 100%; height: 170px; object-fit: cover; background: #eef3f9; border-bottom: 1px solid #cfd9e4; cursor: pointer; display: block; }
.da-thumb-ph { display: flex; align-items: center; justify-content: center; font-size: 46px; color: #9aa6b2; }
.da-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.da-title { font-size: 14px; font-weight: bold; color: #12294a; }
.da-meta { font-size: 11px; color: #8a97a6; }
.da-desc { font-size: 12px; color: #445; line-height: 1.4; }
.da-actions { margin-top: 6px; }
.da-detail { background: #fff; border: 1px solid #cfd9e4; padding: 16px 20px; max-width: 900px; }
.da-detail-meta { color: #8a97a6; font-size: 11px; margin-bottom: 10px; }
.da-detail-text { font-size: 13px; line-height: 1.6; color: #222; margin-bottom: 14px; white-space: normal; }
.da-detail-img { max-width: 100%; height: auto; border: 1px solid #cfd9e4; display: block; }
.da-form-prev { width: 150px; height: 190px; object-fit: cover; border: 1px solid #7f9db9; background: #eef3f9; }
.da-form-prev.da-thumb-ph { display: flex; align-items: center; justify-content: center; font-size: 40px; }

/* ---------------- NEWS ---------------- */
.bilder-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.bild-thumb { position: relative; width: 90px; height: 90px; }
.bild-thumb img { width: 90px; height: 90px; object-fit: cover; border: 1px solid #7f9db9; border-radius: 3px; }
.bild-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #b00020; background: #fff; color: #b00020; cursor: pointer; font-size: 11px; line-height: 1; padding: 0; }
.share-box { background: #eef3f9; border: 1px solid #cfd9e4; border-radius: 4px; padding: 10px 12px; margin-bottom: 14px; font-size: 12px; }
.share-row { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.share-row input { flex: 1; border: 1px solid #7f9db9; padding: 4px 6px; font: inherit; font-size: 12px; background: #fff; }
.share-row a.btn-sm { text-decoration: none; display: inline-block; }
.teil-list { margin: 6px 0 0; padding-left: 20px; }
.teil-list li { margin: 3px 0; font-size: 13px; }
.ausb-picker-head { font-weight: bold; color: #12294a; margin: 12px 0 6px; font-size: 12px; }
:root[data-theme="dark"] .ausb-picker-head { color: #dbe6f4; }
.verbindung-box { background: #fff6e6; border: 1px solid #e0c48a; border-radius: 4px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
:root[data-theme="dark"] .verbindung-box { background: #2c2718; border-color: #5a4a24; color: #e8dcc0; }
.zert-layout { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-top: 6px; }
.zert-form { flex: 1; min-width: 300px; }
.zert-preview { width: 300px; flex-shrink: 0; }
.zert-canvas { width: 100%; height: auto; border: 1px solid #cfd9e4; box-shadow: 0 2px 8px rgba(20,40,70,.12); background: #fff; }
.disz-canvas { width: 100%; max-width: 780px; height: auto; border: 1px solid #cfd9e4; box-shadow: 0 2px 10px rgba(20,40,70,.15); background: #fff; }
.sig-pad { width: 100%; max-width: 460px; height: auto; background: #fff; border: 1px dashed #7f9db9; border-radius: 4px; cursor: crosshair; touch-action: none; display: block; }
:root[data-theme="dark"] .sig-pad { background: #f4f6f9; border-color: #4a5666; }
:root[data-theme="dark"] .disz-canvas { border-color: #33404f; }
.zf-row { display: flex; flex-direction: column; margin-top: 8px; }
.zf-row label { font-size: 11px; color: #14508c; margin-bottom: 2px; }
.zf-row input, .zf-row textarea { border: 1px solid #7f9db9; padding: 5px 7px; font: inherit; font-size: 12px; background: #ffffe1; }
.zf-row textarea { min-height: 60px; resize: vertical; }
:root[data-theme="dark"] .zert-canvas { border-color: #33404f; }
:root[data-theme="dark"] .zf-row label { color: #9cc2ea; }
:root[data-theme="dark"] .zf-row input, :root[data-theme="dark"] .zf-row textarea { background: #2a3341; color: #e6ebf1; border-color: #3d4a5c; }
.zf-2col { display: flex; gap: 12px; }
.zf-2col > div { flex: 1; min-width: 0; }
@media (max-width: 720px) { .zert-preview { width: 100%; } .zf-2col { flex-direction: column; } }

/* ---------------- DOKUMENTE-VERWALTUNG ---------------- */
.dok-ordner { padding: 0; }
.dok-ordner-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.dok-folder { font-size: 36px; line-height: 1; }
.dok-badge { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 10px; background: #e8eff7; color: #14508c; border: 1px solid #cfd9e4; }
.dok-badge.lock { background: #fdeaea; color: #b00020; border-color: #eabcbc; }
.dok-upload { background: #eef3f9; border: 1px solid #cfd9e4; border-radius: 4px; padding: 10px 12px; margin-bottom: 14px; }
.dok-dateien { display: flex; flex-direction: column; gap: 8px; }
.dok-file { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #cfd9e4; border-radius: 4px; padding: 8px 10px; }
.dok-thumb { width: 54px; height: 54px; object-fit: cover; border: 1px solid #cfd9e4; border-radius: 3px; background: #eef3f9; cursor: pointer; flex-shrink: 0; }
.dok-thumb-ph { display: flex; align-items: center; justify-content: center; font-size: 28px; }
.dok-file-info { flex: 1; min-width: 0; }
.dok-file-name { font-weight: bold; color: #12294a; word-break: break-word; }
:root[data-theme="dark"] .dok-badge { background: #26313f; color: #9cc2ea; border-color: #3d4a5c; }
:root[data-theme="dark"] .dok-badge.lock { background: #3a2222; color: #ff8a8a; border-color: #5a3030; }
:root[data-theme="dark"] .dok-upload { background: #212a36; border-color: #33404f; }
:root[data-theme="dark"] .dok-file { background: #1e2530; border-color: #33404f; }
:root[data-theme="dark"] .dok-thumb { background: #262f3a; border-color: #33404f; }
:root[data-theme="dark"] .dok-file-name { color: #dbe6f4; }

/* Umschalter im Subbar */
.theme-toggle { margin-left: auto; color: #ffdd88; cursor: pointer; font-weight: bold; white-space: nowrap; }
.theme-toggle:hover { text-decoration: underline; }

/* ===================================================================
   DARK MODE  – Überschreibungen (aktiv bei <html data-theme="dark">)
   Das blaue Kopfbanner bleibt bewusst blau (Wiedererkennung).
   =================================================================== */
:root[data-theme="dark"] body { background: #12171f; color: #d5dbe4; }
:root[data-theme="dark"] a { color: #7db4e6; }

/* Eingabefelder global (überschreibt die !important-Regeln oben) */
:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([readonly]):not([disabled]),
:root[data-theme="dark"] textarea:not([readonly]):not([disabled]),
:root[data-theme="dark"] select:not([disabled]) { background-color: #2a3341 !important; color: #e6ebf1; border-color: #3d4a5c; }
:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([readonly]):not([disabled]):focus,
:root[data-theme="dark"] textarea:not([readonly]):not([disabled]):focus,
:root[data-theme="dark"] select:not([disabled]):focus { background-color: #4a4526 !important; color: #fff; }

/* Login */
:root[data-theme="dark"] .login-body { background: #12171f; }
:root[data-theme="dark"] .login-box { background: #1b222c; border-color: #33404f; }
:root[data-theme="dark"] .login-form { background: #1b222c; }
:root[data-theme="dark"] .banner-footer { background: #232c38; border-color: #33404f; color: #a9b4c2; }
:root[data-theme="dark"] .banner-footer .version { color: #9cc2ea; }
:root[data-theme="dark"] .login-table .lbl { color: #9cc2ea; }
:root[data-theme="dark"] .txt { background: #2a3341; color: #e6ebf1; border-color: #3d4a5c; }
:root[data-theme="dark"] .txt:focus { background: #4a4526; border-color: #6f9fd0; }

/* Layout / Sidebar */
:root[data-theme="dark"] .content { background: #161c25; }
:root[data-theme="dark"] .sidebar { background: #1b222c; border-right-color: #33404f; }
:root[data-theme="dark"] .sidebar .group-title { background: linear-gradient(#2a3646, #222c39); color: #cfe0f4; border-top-color: #3d4a5c; border-bottom-color: #2a3441; }
:root[data-theme="dark"] .nav-item { color: #8fbdea; border-bottom-color: #232c38; }
:root[data-theme="dark"] .nav-item:hover { background: #232f3e; }
:root[data-theme="dark"] .nav-item.active { background: #3a3416; color: #ffe08a; border-left-color: #d6a200; }
:root[data-theme="dark"] .page-title { color: #dbe6f4; border-bottom-color: #3f6597; }

/* Tabellen */
:root[data-theme="dark"] table.grid { background: #1b222c; }
:root[data-theme="dark"] table.grid td { border-color: #313d4c; color: #d5dbe4; }
:root[data-theme="dark"] table.grid tr:nth-child(even) td { background: #212a36; }
:root[data-theme="dark"] table.grid tr:hover td { background: #3a3416; }
:root[data-theme="dark"] .empty { color: #8894a3; }

/* Buttons */
:root[data-theme="dark"] .btn-sm, :root[data-theme="dark"] .icon-btn { background: linear-gradient(#39434f, #2a323d); color: #dfe6ef; border-color: #4a5666; }
:root[data-theme="dark"] .btn-sm:hover, :root[data-theme="dark"] .icon-btn:hover { background: linear-gradient(#454f5c, #333c48); }
:root[data-theme="dark"] .btn-danger, :root[data-theme="dark"] .icon-btn.del, :root[data-theme="dark"] .link.danger, :root[data-theme="dark"] .form-error, :root[data-theme="dark"] .login-error, :root[data-theme="dark"] .req { color: #ff6b7f; }

/* Formulare / Karten / Modal */
:root[data-theme="dark"] .tb-form, :root[data-theme="dark"] .modal, :root[data-theme="dark"] .modal-body,
:root[data-theme="dark"] .bericht-view, :root[data-theme="dark"] .person-card, :root[data-theme="dark"] .kpi,
:root[data-theme="dark"] .info-box, :root[data-theme="dark"] .dez-card, :root[data-theme="dark"] .aufgabe-list,
:root[data-theme="dark"] .funk-picker { background: #1e2530; border-color: #33404f; color: #d5dbe4; }
:root[data-theme="dark"] .tb-form input[readonly] { background: #262f3a !important; color: #9aa6b4; }
:root[data-theme="dark"] .modal-foot, :root[data-theme="dark"] .filter-bar { background: #212a36; border-color: #33404f; }
:root[data-theme="dark"] .form-row label, :root[data-theme="dark"] .filter-field label { color: #9cc2ea; }
:root[data-theme="dark"] .kpi .num, :root[data-theme="dark"] .kpi .lbl { color: #cfe0f4; }
:root[data-theme="dark"] .kpi { border-top-color: #4f7cae; }

/* Info-Box / Köpfe (helle Verläufe abdunkeln) */
:root[data-theme="dark"] .info-box .ib-head, :root[data-theme="dark"] .dez-card .dc-head,
:root[data-theme="dark"] .person-top, :root[data-theme="dark"] .dez-header, :root[data-theme="dark"] .ref-header,
:root[data-theme="dark"] .perm-table tr.perm-sub td { background: linear-gradient(#2a3646, #222c39); color: #cfe0f4; border-color: #33404f; }
:root[data-theme="dark"] .person-name, :root[data-theme="dark"] .dez-title, :root[data-theme="dark"] .ref-title,
:root[data-theme="dark"] .person-body h3 { color: #dbe6f4; }
:root[data-theme="dark"] .person-rank { color: #8fbdea; }
:root[data-theme="dark"] .person-meta .k, :root[data-theme="dark"] .dez-desc, :root[data-theme="dark"] .ref-crumb,
:root[data-theme="dark"] .dm-rank, :root[data-theme="dark"] .bericht-meta, :root[data-theme="dark"] .pager,
:root[data-theme="dark"] .funk-counter { color: #94a1b2; }
:root[data-theme="dark"] .bericht-text { color: #d5dbe4; }
:root[data-theme="dark"] .person-body h3 { border-bottom-color: #33404f; }

/* Chips / Picker / Aufgaben */
:root[data-theme="dark"] .funk-chip { background: #26313f; border-color: #3d4a5c; color: #9cc2ea; }
:root[data-theme="dark"] .funk-picker .fg { color: #cfe0f4; border-bottom-color: #313d4c; }
:root[data-theme="dark"] .funk-picker label { color: #c4ccd6; }
:root[data-theme="dark"] .aufgabe { border-bottom-color: #2a3441; }
:root[data-theme="dark"] .aufgabe.done .au-text { color: #6f7b89; }

/* Subnav / Referate */
:root[data-theme="dark"] .subnav { border-bottom-color: #3f6597; }
:root[data-theme="dark"] .subnav-btn { background: linear-gradient(#39434f, #2a323d); color: #8fbdea; border-color: #4a5666; }
:root[data-theme="dark"] .subnav-btn:hover { background: linear-gradient(#454f5c, #333c48); }

/* Foto-Platzhalter / Avatare */
:root[data-theme="dark"] .person-foto-ph, :root[data-theme="dark"] .foto-prev-ph, :root[data-theme="dark"] .avatar-ph { background: #2a3341; color: #8894a3; border-color: #3d4a5c; }

/* Rechte-Matrix / Hinweise */
:root[data-theme="dark"] .perm-table td { border-color: #313d4c; }
:root[data-theme="dark"] .perm-table tr:nth-child(even) td { background: #212a36; }
:root[data-theme="dark"] .perm-note { background: #1f2e1f; border-color: #3a5a3a; color: #a7d6a7; }

/* Dienstanweisungen */
:root[data-theme="dark"] .da-card, :root[data-theme="dark"] .da-detail { background: #1e2530; border-color: #33404f; }
:root[data-theme="dark"] .da-thumb { background: #262f3a; border-bottom-color: #33404f; }
:root[data-theme="dark"] .da-thumb-ph { color: #6f7b89; }
:root[data-theme="dark"] .da-title { color: #dbe6f4; }
:root[data-theme="dark"] .da-desc { color: #c4ccd6; }
:root[data-theme="dark"] .da-detail-text { color: #d5dbe4; }
:root[data-theme="dark"] .da-detail-img { border-color: #33404f; }
:root[data-theme="dark"] .da-form-prev { background: #262f3a; border-color: #3d4a5c; }

/* News */
:root[data-theme="dark"] .share-box { background: #212a36; border-color: #33404f; }
:root[data-theme="dark"] .share-row input { background: #2a3341; color: #e6ebf1; border-color: #3d4a5c; }
:root[data-theme="dark"] .bild-thumb img { border-color: #3d4a5c; }
:root[data-theme="dark"] .bild-x { background: #2a3341; }

/* ===================== PERSONALAKTE ===================== */
.ak-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.ak-card { background: #fff; border: 1px solid #cfd9e4; border-radius: 8px; padding: 14px 10px; text-align: center; cursor: pointer; transition: box-shadow .15s, transform .1s; }
.ak-card:hover { box-shadow: 0 4px 14px rgba(20,40,70,.16); transform: translateY(-2px); border-color: #35608f; }
.ak-card-foto { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center top; border: 2px solid #35608f; display: block; margin: 0 auto 8px; background: #dde5ee; }
.ak-card-foto.ph { display: flex; align-items: center; justify-content: center; font-size: 34px; color: #9aa6b2; }
.ak-card-name { font-weight: bold; color: #12294a; font-size: 14px; }
.ak-card-rank { color: #35608f; font-size: 12px; margin-top: 2px; }
.ak-card-funk { color: #6a7787; font-size: 11px; margin-top: 3px; }

.ak-head { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid #cfd9e4; border-left: 6px solid #35608f; border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.ak-head-foto { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: center top; border: 2px solid #35608f; background: #dde5ee; }
.ak-head-foto.ph { display: flex; align-items: center; justify-content: center; font-size: 40px; color: #9aa6b2; }
.ak-head-name { font-size: 22px; font-weight: bold; color: #12294a; }
.ak-head-sub { color: #35608f; font-size: 13px; margin-top: 2px; }
.ak-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.ak-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid #cfd9e4; margin-bottom: 16px; }
.ak-tab { padding: 8px 12px; cursor: pointer; border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; font-size: 13px; color: #35608f; white-space: nowrap; }
.ak-tab:hover { background: #eef3f8; }
.ak-tab.active { background: #35608f; color: #fff; font-weight: bold; }
.ak-panel { animation: akFade .2s; }
@keyframes akFade { from { opacity: 0; } to { opacity: 1; } }
.ak-sec { background: #fff; border: 1px solid #cfd9e4; border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.ak-sec h3 { margin: 0 0 10px; color: #12294a; font-size: 15px; border-bottom: 1px solid #eef1f5; padding-bottom: 6px; }
.ak-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; }
.ak-field label { display: block; font-size: 12px; color: #6a7787; margin-bottom: 3px; }
.ak-field input, .ak-field select, .ak-field textarea { width: 100%; padding: 7px 9px; border: 1px solid #cfd9e4; border-radius: 5px; font-family: inherit; font-size: 13px; }
.ak-saved { color: #2e7d32; font-size: 12px; opacity: 0; transition: opacity .2s; }
.ak-saved.show { opacity: 1; }

.ak-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ak-kpi { background: #fff; border: 1px solid #cfd9e4; border-top: 3px solid #35608f; border-radius: 8px; padding: 12px; text-align: center; }
.ak-kpi .n { font-size: 26px; font-weight: bold; color: #12294a; }
.ak-kpi .l { font-size: 11px; color: #6a7787; margin-top: 3px; }

.ak-bars { display: flex; align-items: flex-end; gap: 14px; height: 180px; padding: 10px 6px 0; }
.ak-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.ak-bar { width: 100%; max-width: 54px; background: linear-gradient(180deg, #4f7cae, #35608f); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .4s; }
.ak-bar-val { font-size: 12px; font-weight: bold; color: #12294a; margin-bottom: 3px; }
.ak-bar-lbl { font-size: 11px; color: #6a7787; margin-top: 6px; text-align: center; }

.ak-prog { margin-bottom: 12px; }
.ak-prog-top { display: flex; justify-content: space-between; font-size: 12px; color: #35608f; margin-bottom: 3px; }
.ak-prog-bar { height: 12px; background: #e7eef6; border-radius: 6px; overflow: hidden; }
.ak-prog-fill { height: 100%; background: linear-gradient(90deg, #4f7cae, #2e7d32); border-radius: 6px; transition: width .4s; }

.ak-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ak-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 16px; font-size: 13px; border: 1px solid #cfd9e4; background: #f3f7fb; color: #6a7787; cursor: pointer; }
.ak-badge.on { background: #35608f; color: #fff; border-color: #35608f; }
.ak-verlauf { max-height: 240px; overflow: auto; font-size: 12px; }
.ak-verlauf div { padding: 4px 0; border-bottom: 1px solid #eef1f5; color: #4a5766; }

:root[data-theme="dark"] .ak-card, :root[data-theme="dark"] .ak-head, :root[data-theme="dark"] .ak-sec, :root[data-theme="dark"] .ak-kpi { background: #1b222c; border-color: #33404f; }
:root[data-theme="dark"] .ak-card-name, :root[data-theme="dark"] .ak-head-name, :root[data-theme="dark"] .ak-sec h3, :root[data-theme="dark"] .ak-kpi .n, :root[data-theme="dark"] .ak-bar-val { color: #dbe6f4; }
:root[data-theme="dark"] .ak-field input, :root[data-theme="dark"] .ak-field select, :root[data-theme="dark"] .ak-field textarea { background: #2a3341; color: #e6ebf1; border-color: #3d4a5c; }
:root[data-theme="dark"] .ak-tabs { border-color: #33404f; }
:root[data-theme="dark"] .ak-badge { background: #2a3341; border-color: #3d4a5c; color: #9cb0c6; }
:root[data-theme="dark"] .ak-prog-bar { background: #2a3341; }

@media (max-width: 640px) {
  .ak-head-actions { margin-left: 0; width: 100%; }
  .ak-bars { height: 150px; }
}
@media print {
  .sidebar, .app-banner, .app-subbar, .ak-tabs, .ak-head-actions, .icon-btn, .btn-sm, .link { display: none !important; }
  .ak-panel { display: block !important; }
  .content, .app-body { display: block !important; margin: 0 !important; }
  .ak-sec, .ak-kpi, .ak-head { break-inside: avoid; }
}

.ak-auto { font-size: 11px; color: #2e7d32; background: #eaf6ec; border: 1px solid #b9e0c1; border-radius: 10px; padding: 1px 7px; white-space: nowrap; }
:root[data-theme="dark"] .ak-auto { background: #1e3524; border-color: #2f6b3c; color: #7fd694; }

/* ===================== KALENDER (Verwaltung) ===================== */
.kal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kal-head { text-align: center; font-weight: bold; color: #35608f; font-size: 12px; padding: 4px 0; }
.kal-cell { min-height: 92px; border: 1px solid #cfd9e4; border-radius: 5px; padding: 3px 3px 4px; background: #fff; overflow: hidden; }
.kal-empty { background: transparent; border: none; }
.kal-today { border-color: #c8102e; box-shadow: inset 0 0 0 1px #c8102e; }
.kal-num { font-size: 12px; color: #8a97a6; font-weight: bold; margin-bottom: 2px; }
.kal-today .kal-num { color: #c8102e; }
.kal-ev { font-size: 10px; line-height: 1.35; color: #fff; border-radius: 3px; padding: 1px 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-more { font-size: 10px; color: #8a97a6; margin-top: 2px; }
.kal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: #5a6b7d; }
.kal-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
:root[data-theme="dark"] .kal-cell { background: #1b222c; border-color: #33404f; }
:root[data-theme="dark"] .kal-head { color: #9cc2ea; }
:root[data-theme="dark"] .kal-num { color: #6f7b89; }
:root[data-theme="dark"] .kal-legend { color: #94a1b2; }
@media (max-width: 640px) {
  .kal-cell { min-height: 62px; }
  .kal-ev { font-size: 9px; padding: 1px 3px; }
  .kal-head { font-size: 11px; }
}

/* ===== Organigramm (liest Kommando-Team-Daten) ===== */
.orgc-baum { padding: 8px 4px 30px; overflow-x: auto; }
.orgc-level { position: relative; margin-top: 38px; }
.orgc-level.erste { margin-top: 10px; }
.orgc-level:not(.erste)::before { content: ""; position: absolute; top: -38px; left: 50%; width: 2px; height: 38px; background: linear-gradient(#8fa6c0, #b9c8da); transform: translateX(-1px); }
.orgc-label { text-align: center; margin: 0 auto 0; width: fit-content; background: #12294a; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; padding: 4px 14px; border-radius: 12px; position: relative; z-index: 2; box-shadow: 0 2px 6px rgba(20,40,70,.25); }
.orgc-rail { position: relative; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; padding-top: 26px; }
.orgc-rail.multi::before { content: ""; position: absolute; top: 12px; left: 12%; right: 12%; height: 2px; background: #b9c8da; border-radius: 2px; }
.orgc-card { position: relative; width: 188px; background: #fff; border: 1px solid #dde5ee; border-radius: 15px; padding: 14px 12px 13px; text-align: center; box-shadow: 0 3px 10px rgba(20,40,70,.08); transition: transform .16s ease, box-shadow .16s ease; }
.orgc-card::before { content: ""; position: absolute; top: -14px; left: 50%; width: 2px; height: 14px; background: #b9c8da; transform: translateX(-1px); }
.orgc-card.klickbar { cursor: pointer; }
.orgc-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(20,40,70,.18); border-color: #9cb8d6; }
.orgc-card.ehren { background: linear-gradient(170deg, #fffaf0, #ffffff); border-color: #e8d9a8; }
.orgc-foto { position: relative; width: 92px; height: 92px; margin: 0 auto 9px; border-radius: 50%; overflow: visible; cursor: zoom-in; }
.orgc-foto img:first-child, .orgc-foto-ph { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; object-position: center top; border: 3px solid #2b578c; background: #e7eef6; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #9aa6b2; }
.orgc-card.ehren .orgc-foto img:first-child, .orgc-card.ehren .orgc-foto-ph { border-color: #c9a94e; }
.orgc-abz { position: absolute; right: -6px; bottom: -4px; width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.orgc-name { font-weight: 800; color: #12294a; font-size: 14px; line-height: 1.25; }
.orgc-grad { color: #5a6b7d; font-size: 11.5px; margin-top: 2px; }
.orgc-funk { display: inline-block; margin-top: 6px; background: #eef3f9; border: 1px solid #d6e0ec; color: #2b578c; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 11px; }
.orgc-status { margin-top: 5px; font-size: 11px; color: #8a6d00; font-weight: 700; }
.orgc-tools { position: absolute; top: 8px; right: 10px; opacity: 0; transition: opacity .15s; }
.orgc-card:hover .orgc-tools { opacity: 1; }
.orgc-tools span { cursor: pointer; font-size: 14px; color: #2b578c; }
@media (max-width: 760px) { .orgc-card { width: 150px; } .orgc-foto, .orgc-foto img:first-child, .orgc-foto-ph { width: 74px; height: 74px; } }
.orgc-card.edit { padding-bottom: 10px; }
.orgc-edit { margin-top: 8px; border-top: 1px dashed #cfd9e4; padding-top: 8px; }
/* Verbindungslinien lückenlos: jede Ebene zeichnet zusätzlich nach unten weiter */
.orgc-level { z-index: 0; }
.orgc-level:not(:last-child)::after { content: ""; position: absolute; bottom: -40px; left: 50%; width: 2px; height: 40px; background: linear-gradient(#b9c8da, #8fa6c0); transform: translateX(-1px); z-index: 0; }
.orgc-level:not(.erste)::before { height: 40px; top: -40px; }
/* Durchgehende Wirbelsäule hinter dem gesamten Organigramm – kann nie Lücken haben */
.orgc-baum { position: relative; }
.orgc-baum::before { content: ""; position: absolute; top: 14px; bottom: 30px; left: 50%; width: 2px; background: #a7bcd3; transform: translateX(-1px); z-index: 0; }
.orgc-level, .orgc-card, .orgc-label { position: relative; z-index: 1; }
.orgc-card { background: #fff; }
/* Organigramm: Mittellinie entfernt – stattdessen horizontale Trennlinien an jeder Ebenen-Überschrift */
.orgc-baum::before { display: none; }
.orgc-level::before, .orgc-level::after { display: none !important; }
.orgc-label-wrap { display: flex; align-items: center; gap: 16px; margin: 0 8px; }
.orgc-label-wrap::before, .orgc-label-wrap::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, #a7bcd3); border-radius: 2px; }
.orgc-label-wrap::after { background: linear-gradient(270deg, transparent, #a7bcd3); }
.orgc-label-wrap .orgc-label { margin: 0; }
.orgc-rail.multi::before { display: none; }
