:root{--bg:#f5f7fb;--card:#fff;--text:#172033;--muted:#718096;--line:#e6eaf0;--primary:#4f46e5;--green:#0f9d68;--red:#dc3d4b;--yellow:#d79000;--sidebar:#111827}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}a{text-decoration:none;color:inherit}.sidebar{position:fixed;left:0;top:0;bottom:0;width:245px;background:var(--sidebar);color:#cbd5e1;padding:24px 16px;z-index:5}.brand{font-size:32px;font-weight:900;color:#fff;display:inline}.brand span{color:#818cf8}.brandname{display:inline;font-weight:700;color:#fff;margin-left:8px}.sidebar nav{margin-top:35px;display:flex;flex-direction:column;gap:5px}.sidebar a{padding:12px 14px;border-radius:10px;display:flex;gap:12px;align-items:center}.sidebar a:hover{background:#1f2937;color:#fff}.navlabel{font-size:11px;color:#64748b;margin:22px 14px 5px;font-weight:800;letter-spacing:1px}.sidebarbottom{position:absolute;bottom:20px;left:16px;right:16px}.main{margin-left:245px}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 34px}.eyebrow{font-size:12px;color:var(--muted);margin-bottom:2px}.userchip{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:13px}.userchip span{width:36px;height:36px;border-radius:50%;background:#eef2ff;color:#4f46e5;display:grid;place-items:center;font-weight:800}.content{padding:32px;max-width:1400px;margin:auto}.pagehead{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.pagehead h1{margin:0;font-size:28px}.muted{color:var(--muted)}.grid{display:grid;gap:18px}.grid4{grid-template-columns:repeat(4,1fr)}.grid3{grid-template-columns:repeat(3,1fr)}.grid2{grid-template-columns:repeat(2,1fr)}.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:0 2px 8px rgba(15,23,42,.03)}.stat .label{font-size:13px;color:var(--muted)}.stat .num{font-size:30px;font-weight:800;margin-top:8px}.stat .sub{font-size:12px;color:var(--muted);margin-top:5px}.btn{border:0;border-radius:10px;padding:11px 16px;background:var(--primary);color:#fff;font-weight:700;cursor:pointer;display:inline-block}.btn.secondary{background:#eef2ff;color:#4338ca}.btn.danger{background:#fee2e2;color:#b91c1c}.btn.success{background:#dcfce7;color:#15803d}.btn.small{padding:7px 10px;font-size:12px}.formgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.field{display:flex;flex-direction:column;gap:7px}.field.full{grid-column:1/-1}.field label{font-size:13px;font-weight:700}.field input,.field select,.field textarea{width:100%;padding:11px 12px;border:1px solid #d9dee7;border-radius:10px;background:#fff;font:inherit;outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#818cf8;box-shadow:0 0 0 3px #eef2ff}.tablewrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:13px;border-bottom:1px solid var(--line);font-size:13px;white-space:nowrap}.table th{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.5px}.badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.pending{background:#fff7db;color:#9a6500}.approved{background:#dcfce7;color:#157347}.rejected,.cancelled{background:#fee2e2;color:#b42318}.present{background:#dcfce7;color:#157347}.holiday{background:#ede9fe;color:#6d28d9}.notice{background:#eef2ff;border-radius:12px;padding:14px;color:#4338ca}.flash{padding:13px 16px;border-radius:11px;margin-bottom:18px}.flash.success{background:#dcfce7;color:#166534}.flash.error{background:#fee2e2;color:#991b1b}.loginbody{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eef2ff,#f8fafc)}.login{width:min(430px,calc(100% - 30px));background:#fff;padding:34px;border:1px solid var(--line);border-radius:20px;box-shadow:0 20px 60px rgba(15,23,42,.12)}.login h1{margin:0 0 8px}.login .logo{font-weight:900;font-size:22px;margin-bottom:32px}.calendar{display:grid;grid-template-columns:repeat(7,1fr);border:1px solid var(--line);border-radius:14px;overflow:hidden}.dow{padding:10px;background:#f8fafc;font-size:11px;font-weight:800;color:var(--muted)}.day{min-height:105px;padding:8px;border-right:1px solid var(--line);border-top:1px solid var(--line);background:#fff}.daynum{font-size:12px;font-weight:800}.event{font-size:10px;border-radius:6px;padding:4px;margin-top:6px;background:#ede9fe;color:#5b21b6}.employee{display:flex;justify-content:space-between;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}@media(max-width:900px){.sidebar{width:70px}.sidebar .brandname,.sidebar span,.navlabel{display:none}.sidebar a{justify-content:center}.main{margin-left:70px}.content{padding:20px}.grid4,.grid3{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.grid4,.grid3,.grid2,.formgrid{grid-template-columns:1fr}.topbar{padding:0 18px}.content{padding:14px}.sidebar{width:58px;padding:16px 8px}.main{margin-left:58px}.sidebar a{padding:11px}.pagehead{align-items:flex-start;gap:10px;flex-direction:column}}

/* v2: Bereichsrechte + Team-Kalender */
.userchip small{display:block;font-size:10px;color:var(--primary);font-weight:800;margin-top:2px}.checkline{flex-direction:row!important;align-items:center;gap:9px!important;font-weight:600!important}.checkline input{width:auto!important}.fieldhint{font-size:12px;color:var(--muted);line-height:1.4}.badge.info{background:#e0f2fe;color:#075985}.filterbar{display:flex;gap:8px;flex-wrap:wrap}.calendarhead{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.calendarhead h3{margin:0 0 4px}.calendarcontrols{display:flex;align-items:center;gap:12px}.calendar-scroll{overflow-x:auto}.teamcalendarcard .calendar{min-width:820px}.day.outside{background:#f8fafc}.day.today{box-shadow:inset 0 0 0 2px var(--primary)}.teamcalendarcard .day{min-height:125px}.teamcalendarcard .event{display:flex;flex-direction:column;gap:1px;white-space:normal;line-height:1.25}.teamcalendarcard .event span{font-size:9px;opacity:.8}.approvalform{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.approvalform input[type=text]{padding:7px 9px;border:1px solid #ddd;border-radius:8px;min-width:150px}.soft{border:0;border-top:1px solid var(--line);margin:18px 0}@media(max-width:600px){.calendarhead{align-items:flex-start;flex-direction:column}.calendarcontrols{width:100%;justify-content:space-between}}

/* v3 */
.cancel-form{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.cancel-form input[type=text]{padding:7px 9px;border:1px solid #ddd;border-radius:8px;min-width:160px}.btn:disabled{opacity:.5;cursor:not-allowed}.table code,.card code{background:#f1f5f9;padding:2px 5px;border-radius:5px}.badge.special{background:#fef3c7;color:#92400e}

/* BSG Hadamar Theme v4 */
:root{--bg:#f3f6f3;--card:#fff;--text:#202521;--muted:#6b756e;--line:#dfe7e1;--primary:#07852f;--green:#07852f;--red:#c93c3c;--yellow:#c88a00;--sidebar:#202522}
.sidebar{background:linear-gradient(180deg,#202522,#111412);padding-top:16px}.sidebar a:hover{background:#2b342e}.sidebar a:focus{outline:2px solid #2ab457}.brandbox{background:#fff;border-radius:12px;padding:7px;margin-bottom:22px}.brandbox img{display:block;width:100%;height:auto}.btn{background:var(--primary)}.btn.secondary{background:#e7f4eb;color:#076d29}.userchip span{background:#e4f4e8;color:#087a2d}.field input:focus,.field select:focus,.field textarea:focus{border-color:#2ca653;box-shadow:0 0 0 3px #e5f5e9}.notice{background:#e7f4eb;color:#12642c}.loginbody{background:linear-gradient(135deg,#edf5ef,#f8faf8)}.login{border-top:5px solid #07852f}.loginlogo{display:flex;justify-content:center;margin-bottom:22px}.loginlogo img{width:min(300px,100%);height:auto}.badge.info{background:#e7f4eb;color:#12642c}.event{background:#e3f3e8;color:#086a28}.day.today{box-shadow:none;background:#e5e7eb}.newsgrid,.boardgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.newsitem h2{margin-bottom:5px}.postbody{line-height:1.65;margin:18px 0;white-space:normal}.boardnote{border-top:4px solid #07852f}.boardnote h3{font-size:20px;margin:12px 0 5px}.privacy{font-size:12px;color:var(--muted)}
@media(max-width:900px){.brandbox{padding:3px}.brandbox img{width:54px;max-width:none;transform:translateX(-3px)}.newsgrid,.boardgrid{grid-template-columns:1fr}}

/* V5: Profil, Benutzername, temporäre Passwörter, Composer & Rich Text */
.userchip-link{border-radius:12px;padding:7px 9px;transition:.15s ease}.userchip-link:hover{background:#edf6ef}.userchip-link strong{color:var(--text);font-size:12px}
.profilehero{display:flex;align-items:center;gap:16px;margin-bottom:18px}.profileavatar{width:62px;height:62px;border-radius:50%;background:#e3f3e8;color:#087a2d;display:grid;place-items:center;font-size:20px;font-weight:900}
.fab-inline{width:48px;height:48px;border:0;border-radius:50%;background:var(--primary);color:white;font-size:30px;line-height:1;cursor:pointer;box-shadow:0 8px 24px rgba(7,133,47,.2)}.fab-inline:hover{filter:brightness(.93)}
.composer-card{margin-bottom:18px;border-top:4px solid var(--primary)}.composer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}.composer-head h3{margin:0 0 4px}.iconbtn{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:#fff;color:var(--muted);font-size:24px;cursor:pointer}
.editor-toolbar{display:flex;gap:6px;flex-wrap:wrap;padding:8px;border:1px solid #d9dee7;border-bottom:0;border-radius:10px 10px 0 0;background:#f8faf8}.editor-toolbar button{min-width:38px;border:1px solid var(--line);background:#fff;border-radius:7px;padding:7px 9px;cursor:pointer;color:var(--text)}
.rich-editor{min-height:150px;padding:12px;border:1px solid #d9dee7;border-radius:0 0 10px 10px;background:#fff;outline:none;line-height:1.55}.rich-editor:focus{border-color:#2ca653;box-shadow:0 0 0 3px #e5f5e9}.rich-editor:empty:before{content:attr(data-placeholder);color:#9aa39d;pointer-events:none}.rich-editor.editor-error{border-color:#c93c3c}
.rich-content p{margin:.65em 0}.rich-content ul,.rich-content ol{padding-left:24px}.rich-content blockquote{margin:12px 0;padding:10px 14px;border-left:4px solid var(--primary);background:#f3f8f4}[hidden]{display:none!important}
@media(max-width:600px){.fab-inline{width:44px;height:44px}.profilehero{align-items:flex-start}}

/* V6 */
.employee-link{color:var(--text);text-decoration:none}.employee-link:hover{color:var(--primary);text-decoration:underline}.detailgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.detailgrid>div{padding:12px;border:1px solid var(--line);border-radius:10px;background:#fafcfb}.detailgrid span{display:block;color:var(--muted);font-size:12px;margin-bottom:4px}.detailgrid strong{display:block;word-break:break-word}.grid5{grid-template-columns:repeat(5,minmax(0,1fr))}.departmentchecks{display:flex;gap:14px;flex-wrap:wrap}.pagehead.compact{margin-bottom:0}.sickevent{border-left:3px solid #555}.table tr:hover td{background:#fbfdfb}
@media(max-width:1100px){.grid5{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.detailgrid,.grid5{grid-template-columns:1fr}}

.team-person-link{font-weight:800;color:var(--text);text-decoration:none}.team-person-link:hover{color:var(--primary);text-decoration:underline}
.trashbtn{font-size:16px;width:34px;height:34px;display:grid;place-items:center}
.detailgrid{display:grid;gap:14px}.detailgrid>div{display:flex;justify-content:space-between;gap:16px;padding-bottom:10px;border-bottom:1px solid var(--line)}.detailgrid span{color:var(--muted);font-size:13px}.detailgrid strong{text-align:right}

/* V11 Suche & Organigramm */
.searchbar-card{padding:14px 18px}
.searchbar-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.searchbar-form input[type="search"]{flex:1;min-width:240px;max-width:620px}
.calendar-person-link{color:inherit;text-decoration:none}.calendar-person-link:hover{text-decoration:underline}
.orgchart{max-width:1000px;margin:0 auto;padding:12px 0 30px}
.orglevel{display:flex;justify-content:center}
.orgbox{width:min(820px,100%);background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 6px 22px rgba(0,0,0,.04);overflow:hidden}
.orgbox-lead{border-top:5px solid var(--primary)}
.orgtitle{font-weight:900;font-size:18px;padding:16px 18px;background:#f2f8f4;border-bottom:1px solid var(--line);text-align:center}
.orgpeople{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;padding:14px}
.orgperson{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--text);text-decoration:none;text-align:center}
.orgperson:hover{border-color:#79bc8e;background:#f7fbf8;transform:translateY(-1px)}
.orgperson span{font-size:12px;color:var(--muted)}
.orgline-v{width:3px;height:30px;background:#a6cbb1;margin:0 auto}
@media(max-width:600px){.searchbar-form{align-items:stretch}.searchbar-form input[type="search"]{min-width:100%;max-width:none}.orgpeople{grid-template-columns:1fr}}

/* Organigramm V11.1 - echte Baumdarstellung mit aufklappbaren Bereichen */
.orgtree{max-width:1100px;margin:0 auto;padding:12px 18px 40px}
.orgtree-top{display:flex;justify-content:center}
.orgnode{position:relative;width:250px;min-height:108px;padding:16px 18px;border:2px solid #26332b;border-radius:8px;background:linear-gradient(180deg,#11933f,#087a2d);color:#fff;box-shadow:0 6px 16px rgba(0,0,0,.12);cursor:pointer;text-align:center;transition:.18s ease}
.orgnode:hover,.orgnode.active{transform:translateY(-2px);box-shadow:0 10px 24px rgba(0,0,0,.16);filter:brightness(1.04)}
.orgnode.active{outline:4px solid rgba(16,145,63,.16)}
.orgnode-lead{width:300px;background:linear-gradient(180deg,#333d37,#1e2822)}
.orgnode-kicker{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.13em;opacity:.75;margin-bottom:6px}
.orgnode strong{display:block;font-size:18px;line-height:1.15}
.orgnode small{display:block;margin-top:7px;font-size:12px;opacity:.85}
.orgnode-arrow{position:absolute;right:10px;bottom:7px;font-size:22px;line-height:1;opacity:.8;transition:transform .18s}
.orgnode.active .orgnode-arrow{transform:rotate(180deg)}
.org-connector-main{width:3px;height:36px;background:#26332b;margin:0 auto}
.org-connector-horizontal{height:3px;background:#26332b;margin:0 calc(16.66% - 1px);position:relative}
.orgtree-row{display:grid;grid-template-columns:repeat(3,1fr);gap:28px}
.orgbranch{display:flex;flex-direction:column;align-items:center}
.org-connector-down{width:3px;height:34px;background:#26332b}
.orgpanel{margin-top:34px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.08);padding:20px}
.orgpanel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px}
.orgpanel-head h2{margin:4px 0 0}
.orgemployee-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.orgemployee{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid var(--line);border-radius:12px;color:var(--text);text-decoration:none;background:#fbfcfb;transition:.15s ease}
.orgemployee:hover{border-color:#6fb382;background:#f1f8f3;transform:translateY(-1px)}
.orgemployee-avatar{width:42px;height:42px;flex:0 0 42px;border-radius:50%;display:grid;place-items:center;background:#dff1e4;color:#087a2d;font-weight:900}
.orgemployee-data{min-width:0;display:flex;flex-direction:column;gap:2px}
.orgemployee-data strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.orgemployee-data small{color:var(--muted)}
.orgemployee-data em{font-size:11px;color:#087a2d;font-style:normal;font-weight:700}
.orgemployee-open{margin-left:auto;font-size:28px;color:#8c9990}
.orgempty{grid-column:1/-1;padding:22px;text-align:center;color:var(--muted);background:#f7f9f7;border-radius:12px}

@media(max-width:850px){
  .orgtree-row{gap:10px}
  .orgnode{width:100%;min-height:100px;padding:14px 8px}
  .orgnode strong{font-size:15px}
}
@media(max-width:620px){
  .org-connector-horizontal{display:none}
  .org-connector-main{height:24px}
  .orgtree-row{grid-template-columns:1fr;gap:0}
  .orgbranch{position:relative}
  .org-connector-down{height:22px}
  .orgnode{width:min(300px,100%)}
}

/* Organigramm V11.2 - horizontale Baumstruktur + Modal */
.org-modern{max-width:1180px;margin:10px auto 30px;padding:8px 24px 30px}
.org-top-wrap{display:flex;justify-content:center}
.org-card{appearance:none;border:1px solid #cfd8d1;background:#fff;border-radius:16px;min-width:250px;padding:18px 20px;display:flex;align-items:center;gap:14px;cursor:pointer;box-shadow:0 10px 26px rgba(23,48,30,.08);transition:.18s ease;text-align:left}
.org-card:hover{transform:translateY(-3px);border-color:#67ac7a;box-shadow:0 16px 34px rgba(23,48,30,.13)}
.org-card-lead{min-width:330px;border:2px solid #16873c;background:linear-gradient(180deg,#0f8b3b,#08762f);color:#fff}
.org-card-lead:hover{border-color:#0b6d2d}
.org-icon{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:#e7f4ea;color:#087a2d;font-weight:900;font-size:20px;flex:0 0 46px}
.org-card-lead .org-icon{background:rgba(255,255,255,.16);color:#fff}
.org-card-text{display:flex;flex-direction:column;gap:3px}
.org-card-text small{text-transform:uppercase;letter-spacing:.12em;font-size:10px;color:#7c8b80;font-weight:800}
.org-card-lead .org-card-text small{color:rgba(255,255,255,.7)}
.org-card-text strong{font-size:18px;line-height:1.15}
.org-card-text em{font-style:normal;font-size:12px;color:#728078}
.org-card-lead .org-card-text em{color:rgba(255,255,255,.8)}

.org-main-line{width:3px;height:44px;background:#7fa88a;margin:0 auto}
.org-branch-line{height:3px;background:#7fa88a;width:66.66%;margin:0 auto}
.org-departments{display:grid;grid-template-columns:repeat(3,1fr);gap:28px}
.org-department-wrap{display:flex;flex-direction:column;align-items:center}
.org-drop-line{width:3px;height:34px;background:#7fa88a}
.org-department-wrap .org-card{width:100%;max-width:310px;justify-content:flex-start}

.org-modal-open{overflow:hidden}
.org-modal-backdrop{position:fixed;inset:0;background:rgba(9,18,12,.52);backdrop-filter:blur(3px);z-index:9998}
.org-modal{position:fixed;inset:0;display:grid;place-items:center;padding:24px;z-index:9999}
.org-modal-card{width:min(900px,96vw);max-height:86vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 28px 80px rgba(0,0,0,.28);padding:24px}
.org-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.org-modal-titlewrap{display:flex;align-items:center;gap:14px}
.org-modal-icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:#e7f4ea;color:#087a2d;font-size:20px;font-weight:900}
.org-modal-head h2{margin:2px 0 0;font-size:24px}
.org-modal-close{width:40px;height:40px;border:1px solid var(--line);background:#fff;border-radius:50%;font-size:25px;line-height:1;cursor:pointer;color:#5f6d63}
.org-modal-close:hover{background:#f2f6f3}
.org-modal-count{display:inline-block;margin:16px 0 14px;padding:7px 10px;border-radius:999px;background:#eef7f0;color:#087a2d;font-weight:800;font-size:12px}

.orgemployee-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.orgemployee{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:14px;color:var(--text);text-decoration:none;background:#fbfcfb;transition:.15s ease}
.orgemployee:hover{border-color:#68af7c;background:#f2f9f4;transform:translateY(-1px)}
.orgemployee-avatar{width:46px;height:46px;flex:0 0 46px;border-radius:50%;display:grid;place-items:center;background:#dff1e4;color:#087a2d;font-weight:900}
.orgemployee-data{min-width:0;display:flex;flex-direction:column;gap:3px}
.orgemployee-data strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.orgemployee-data small{color:var(--muted)}
.orgemployee-data em{font-style:normal;color:#087a2d;font-size:11px;font-weight:800}
.orgemployee-open{margin-left:auto;font-size:28px;color:#8b978f}
.orgempty{grid-column:1/-1;text-align:center;padding:28px;border:1px dashed var(--line);border-radius:14px;color:var(--muted);background:#fafbfa}

@media(max-width:900px){
  .org-modern{padding-left:10px;padding-right:10px}
  .org-departments{gap:12px}
  .org-card{min-width:0;padding:14px}
  .org-card-text strong{font-size:15px}
  .orgemployee-grid{grid-template-columns:1fr}
}
@media(max-width:680px){
  .org-branch-line{display:none}
  .org-main-line{height:26px}
  .org-departments{grid-template-columns:1fr;gap:0}
  .org-drop-line{height:20px}
  .org-card-lead{min-width:0;width:100%;max-width:330px}
  .org-department-wrap .org-card{max-width:330px}
  .org-modal{padding:10px}
  .org-modal-card{padding:18px}
}

/* Organigramm V11.3 - aufklappbare Kästen */
.org-tree{
  max-width:1180px;
  margin:20px auto 40px;
  padding:10px 20px 30px;
}
.org-tree-level{
  display:flex;
  justify-content:center;
}
.org-tree-level-top{
  align-items:flex-start;
}
.org-tree-level-departments{
  display:grid;
  grid-template-columns:repeat(3,minmax(240px,1fr));
  gap:28px;
  align-items:start;
}
.org-dept-column{
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:0;
}
.org-vertical-line,
.org-drop-line{
  width:3px;
  background:#6f9d7b;
}
.org-vertical-line{
  height:36px;
  margin:0 auto;
}
.org-horizontal-line{
  height:3px;
  background:#6f9d7b;
  width:66.66%;
  margin:0 auto;
}
.org-drop-line{
  height:30px;
}

.org-branch{
  width:100%;
}
.org-branch-lead{
  max-width:360px;
}
.org-branch summary{
  list-style:none;
}
.org-branch summary::-webkit-details-marker{
  display:none;
}
.org-box{
  width:100%;
  box-sizing:border-box;
  min-height:105px;
  border:2px solid #1f3427;
  border-radius:14px;
  background:#fff;
  padding:17px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(18,45,27,.08);
  transition:.18s ease;
}
.org-box:hover{
  transform:translateY(-2px);
  border-color:#0f8c3d;
  box-shadow:0 12px 28px rgba(18,45,27,.13);
}
.org-box-lead{
  color:#fff;
  background:linear-gradient(180deg,#128d40,#08742f);
  border-color:#075c28;
}
.org-box span{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.org-box small{
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#78867c;
  font-weight:800;
}
.org-box-lead small{
  color:rgba(255,255,255,.7);
}
.org-box strong{
  font-size:19px;
  line-height:1.15;
}
.org-box em{
  font-style:normal;
  font-size:12px;
  color:#6f7c73;
}
.org-box-lead em{
  color:rgba(255,255,255,.82);
}
.org-toggle{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#e7f3ea;
  color:#087a2d;
  font-size:22px;
  line-height:1;
}
.org-box-lead .org-toggle{
  background:rgba(255,255,255,.15);
  color:#fff;
}
.org-branch[open] .org-toggle{
  transform:rotate(45deg);
}
.org-employees{
  margin-top:14px;
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.org-employee-box{
  min-height:78px;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid #d6dfd8;
  border-left:5px solid #159044;
  border-radius:12px;
  background:#fff;
  padding:12px 14px;
  text-decoration:none;
  color:var(--text);
  box-shadow:0 5px 14px rgba(20,45,28,.05);
  transition:.15s ease;
}
.org-employee-box:hover{
  background:#f3f9f5;
  border-color:#74b387;
  transform:translateX(2px);
}
.org-avatar{
  width:44px;
  height:44px;
  border-radius:10px;
  background:#e3f2e7;
  color:#087a2d;
  display:grid;
  place-items:center;
  font-weight:900;
  flex:0 0 44px;
}
.org-employee-text{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:2px;
}
.org-employee-text strong{
  font-size:14px;
}
.org-employee-text small{
  color:var(--muted);
  font-size:12px;
}
.org-employee-text em{
  font-style:normal;
  color:#087a2d;
  font-size:11px;
  font-weight:800;
}
.org-empty{
  padding:14px;
  text-align:center;
  border:1px dashed #cfd9d2;
  border-radius:10px;
  color:var(--muted);
  background:#fafcfa;
}

@media(max-width:900px){
  .org-tree-level-departments{
    gap:12px;
  }
  .org-box{
    padding:14px;
  }
  .org-box strong{
    font-size:16px;
  }
}
@media(max-width:700px){
  .org-horizontal-line{
    display:none;
  }
  .org-tree-level-departments{
    grid-template-columns:1fr;
    gap:0;
  }
  .org-dept-column{
    width:100%;
  }
  .org-drop-line{
    height:20px;
  }
  .org-branch,
  .org-branch-lead{
    max-width:420px;
  }
}

/* V12 classic organigram */
.classic-org{max-width:1100px;margin:28px auto 50px;padding:0 22px}
.classic-node{width:100%;max-width:300px}
.classic-node-top{margin:0 auto}
.classic-node summary{list-style:none;min-height:72px;box-sizing:border-box;border:3px solid #111;background:#fff;display:flex;align-items:center;justify-content:center;gap:12px;padding:14px 18px;cursor:pointer;font-weight:900;text-align:center;letter-spacing:.02em;box-shadow:none}
.classic-node summary::-webkit-details-marker{display:none}
.classic-node summary span{font-size:17px;color:#111}
.classic-node summary small{min-width:24px;height:24px;padding:0 5px;border-radius:999px;background:#0b8738;color:#fff;display:grid;place-items:center;font-size:11px}
.classic-node[open] summary{background:#f2f8f4;border-color:#087a2d}
.classic-vline,.classic-down{width:3px;background:#111}
.classic-vline{height:44px;margin:0 auto}
.classic-hline{height:3px;background:#111;width:66.666%;margin:0 auto}
.classic-row{display:grid;grid-template-columns:repeat(3,1fr);gap:42px}
.classic-col{display:flex;flex-direction:column;align-items:center;min-width:0}
.classic-down{height:42px}
.classic-people{display:grid;gap:9px;margin-top:12px}
.classic-person{display:flex;flex-direction:column;gap:3px;border:2px solid #111;background:#fff;padding:11px 13px;text-decoration:none;color:#111;text-align:center;transition:.12s ease}
.classic-person:hover{background:#edf7f0;border-color:#087a2d;transform:translateY(-1px)}
.classic-person strong{font-size:14px}
.classic-person span{font-size:12px;color:#68736b}
.classic-empty{padding:11px;border:1px dashed #b8c1ba;text-align:center;color:#7a847d;background:#fafbfa}
@media(max-width:760px){
  .classic-hline{display:none}
  .classic-vline{height:24px}
  .classic-row{grid-template-columns:1fr;gap:0}
  .classic-down{height:24px}
  .classic-node{max-width:360px}
}


/* =========================================================
   BSG – MODERNE SUCHFELDER
   ========================================================= */
.searchbar-card {
    padding: 18px 22px !important;
    border-radius: 16px;
}

.searchbar-form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 760px;
}

.searchbar-form input[type="search"] {
    flex: 1;
    width: 100%;
    min-width: 280px;
    height: 46px;
    box-sizing: border-box;
    padding: 0 42px 0 44px;
    border: 1px solid #d8e1da;
    border-radius: 12px;
    background-color: #f8faf8;
    color: #18231c;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23717d74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.searchbar-form input[type="search"]::placeholder {
    color: #8b958e;
    opacity: 1;
}

.searchbar-form input[type="search"]:hover {
    border-color: #b8c8bd;
    background-color: #fff;
}

.searchbar-form input[type="search"]:focus {
    background-color: #fff;
    border-color: #078536;
    box-shadow: 0 0 0 4px rgba(7, 133, 54, .10);
}

.searchbar-form .btn {
    min-width: 100px;
    height: 46px;
    box-sizing: border-box;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.searchbar-form .btn.secondary {
    border: 1px solid #d8e1da;
    background: #fff;
}

.searchbar-form input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
}

@media (max-width: 650px) {
    .searchbar-card {
        padding: 14px !important;
    }

    .searchbar-form {
        flex-direction: column;
        align-items: stretch;
        max-width: none;
    }

    .searchbar-form input[type="search"] {
        min-width: 0;
    }

    .searchbar-form .btn {
        width: 100%;
    }
}


/* =========================================================
   BSG FIX V2 – SUCHFELDER + SCROLLBARE MENÜLEISTE
   ========================================================= */

/* Sidebar vollständig scrollbar machen */
.sidebar{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    height:100vh;
    display:flex;
    flex-direction:column;
    overflow:hidden !important;
}

.sidebar .brandbox{
    flex:0 0 auto;
}

.sidebar nav{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding-bottom:20px;
    scrollbar-width:thin;
    scrollbar-color:#9bb5a2 transparent;
}

.sidebar nav::-webkit-scrollbar{
    width:7px;
}
.sidebar nav::-webkit-scrollbar-track{
    background:transparent;
}
.sidebar nav::-webkit-scrollbar-thumb{
    background:#a9b9ad;
    border-radius:20px;
}
.sidebar nav::-webkit-scrollbar-thumb:hover{
    background:#7f9585;
}

.sidebarbottom{
    flex:0 0 auto;
    position:static !important;
    bottom:auto !important;
    margin-top:auto;
    background:#fff;
    border-top:1px solid var(--line);
}

/* Suchkarten */
.card.searchbar-card,
.searchbar-card{
    padding:18px 20px !important;
    border-radius:16px !important;
}

/* Suchformular */
.card.searchbar-card form.searchbar-form,
.searchbar-card .searchbar-form,
.searchbar-form{
    display:flex !important;
    align-items:center !important;
    gap:12px !important;
    width:100% !important;
    max-width:820px !important;
    margin:0 !important;
}

/* Wirklich ALLE Search Inputs in den Suchleisten überschreiben */
.card.searchbar-card input[type="search"],
.searchbar-card input[type="search"],
.searchbar-form input[type="search"],
.searchbar-form input[name="q"]{
    flex:1 1 auto !important;
    width:100% !important;
    min-width:320px !important;
    height:48px !important;
    padding:0 44px !important;
    box-sizing:border-box !important;

    border:1px solid #d3ddd6 !important;
    border-radius:13px !important;

    background-color:#f7faf8 !important;
    color:#172019 !important;

    font-family:inherit !important;
    font-size:14px !important;
    line-height:48px !important;

    outline:none !important;
    box-shadow:none !important;

    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 24 24' fill='none' stroke='%23738277' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") !important;
    background-repeat:no-repeat !important;
    background-position:15px center !important;

    transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease !important;
}

.searchbar-form input[type="search"]::placeholder,
.searchbar-form input[name="q"]::placeholder{
    color:#879189 !important;
    opacity:1 !important;
}

.searchbar-form input[type="search"]:hover,
.searchbar-form input[name="q"]:hover{
    background-color:#fff !important;
    border-color:#b8c7bd !important;
}

.searchbar-form input[type="search"]:focus,
.searchbar-form input[name="q"]:focus{
    background-color:#fff !important;
    border-color:#078536 !important;
    box-shadow:0 0 0 4px rgba(7,133,54,.10) !important;
}

/* Suchbutton */
.searchbar-form button.btn,
.searchbar-form .btn{
    height:48px !important;
    min-width:110px !important;
    padding:0 22px !important;

    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;

    border-radius:13px !important;
    font-weight:800 !important;
    font-size:14px !important;
    white-space:nowrap !important;
}

/* Reset Button */
.searchbar-form .btn.secondary{
    background:#fff !important;
    border:1px solid #d4ddd6 !important;
}

/* Handy */
@media (max-width:700px){
    .searchbar-form{
        flex-direction:column !important;
        align-items:stretch !important;
        max-width:none !important;
    }

    .searchbar-form input[type="search"],
    .searchbar-form input[name="q"]{
        min-width:0 !important;
        width:100% !important;
    }

    .searchbar-form .btn{
        width:100% !important;
    }
}


/* =========================================================
   BSG – MITARBEITERPROFIL JAHRESZUSAMMENFASSUNG
   ========================================================= */
.employee-summary {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin-top: 24px !important;
}

.employee-summary-row {
    min-height: 78px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 16px 18px !important;
    background: #f8faf8 !important;
    border: 1px solid #dbe4dd !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 7px rgba(20,45,28,.025) !important;
}

.employee-summary-row span {
    display: block !important;
    color: #718077 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
}

.employee-summary-row strong {
    display: block !important;
    color: #172019 !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
}

.employee-summary-row.employee-summary-highlight {
    background: #eaf6ed !important;
    border-color: #b8dcc1 !important;
}

.employee-summary-row.employee-summary-highlight span {
    color: #39804c !important;
    font-weight: 600 !important;
}

.employee-summary-row.employee-summary-highlight strong {
    color: #078536 !important;
}

@media (max-width: 700px) {
    .employee-summary {
        grid-template-columns: 1fr !important;
    }
}



/* =========================================================
   BSG kleines UI-Update
   - schöner Logout oben rechts
   - sauberer Footer im Portal
   - sauberer Footer auf Login
   ========================================================= */

/* ---------- Benutzer + Logout oben rechts ---------- */
.topbar-userarea{
    display:flex !important;
    align-items:center !important;
    gap:12px !important;
    flex:0 0 auto;
}

.topbar-userarea .userchip{
    margin:0 !important;
}

.topbar-logout{
    min-height:40px;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    padding:0 14px !important;
    border:1px solid #d8e2da !important;
    border-radius:11px !important;
    background:#fff !important;
    color:#26342a !important;
    font-size:13px !important;
    font-weight:800 !important;
    line-height:1 !important;
    text-decoration:none !important;
    box-shadow:0 1px 3px rgba(20,45,28,.035);
    transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease;
}

.topbar-logout:hover{
    background:#f0f8f2 !important;
    border-color:#9dc9a8 !important;
    color:#087a2d !important;
    transform:translateY(-1px);
}

.topbar-logout-svg{
    width:18px !important;
    height:18px !important;
    display:block;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

/* ---------- Footer im eingeloggten Portal ---------- */
.app-legal-footer{
    margin:34px 0 2px !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    color:#738078 !important;
    font-size:12px !important;
}

.app-legal-footer-inner{
    min-height:62px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:14px 18px;
    border:1px solid #dfe7e1;
    border-radius:14px;
    background:#fff;
    box-shadow:0 2px 8px rgba(20,45,28,.025);
}

.app-legal-footer-left{
    display:flex;
    align-items:center;
    gap:9px;
    min-width:0;
}

.app-legal-mark{
    display:inline-grid;
    place-items:center;
    height:28px;
    padding:0 10px;
    border-radius:8px;
    background:#e8f4eb;
    color:#087a2d;
    font-weight:900;
    letter-spacing:.03em;
}

.app-legal-footer-links{
    display:flex;
    align-items:center;
    gap:12px;
}

.app-legal-footer-links a{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#506057 !important;
    font-weight:700 !important;
    text-decoration:none !important;
    transition:color .15s ease;
}

.app-legal-footer-links a:hover{
    color:#087a2d !important;
}

.app-legal-footer-links svg{
    width:17px;
    height:17px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.app-legal-divider{
    width:1px;
    height:20px;
    background:#dce4de;
}

/* ---------- Login: Datenschutz / Impressum ---------- */
.public-legal-links{
    margin-top:18px !important;
    padding-top:16px !important;
    border-top:1px solid #e1e8e3 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:12px !important;
    color:#718077 !important;
}

.public-legal-links a{
    display:inline-flex !important;
    align-items:center !important;
    gap:6px !important;
    color:#5d6b62 !important;
    font-size:12px !important;
    font-weight:700 !important;
    text-decoration:none !important;
}

.public-legal-links a:hover{
    color:#087a2d !important;
}

.public-legal-links svg{
    width:15px;
    height:15px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.public-legal-divider{
    width:1px;
    height:17px;
    background:#dce4de;
}

/* ---------- Responsive ---------- */
@media(max-width:700px){
    .topbar{
        gap:12px;
    }

    .topbar-userarea{
        gap:7px !important;
    }

    .topbar-logout{
        width:40px;
        min-width:40px;
        padding:0 !important;
    }

    .topbar-logout-text{
        display:none;
    }

    .app-legal-footer-inner{
        flex-direction:column;
        justify-content:center;
        text-align:center;
        gap:11px;
    }
}


/* ---------- Globales Ladefenster bei Speichern / POST ---------- */
.global-save-overlay{
    position:fixed;
    inset:0;
    z-index:99999;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:rgba(245,248,246,.78);
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
}
.global-save-overlay[hidden]{display:none !important;}
.global-save-box{
    min-width:300px;
    max-width:440px;
    display:flex;
    align-items:center;
    gap:16px;
    padding:22px 26px;
    border:1px solid #d9e3dc;
    border-radius:16px;
    background:#fff;
    box-shadow:0 18px 55px rgba(20,40,28,.16);
}
.global-save-box strong{
    display:block;
    margin-bottom:4px;
    font-size:17px;
}
.global-save-box span:not(.global-save-spinner){
    display:block;
    color:#68756d;
    font-size:14px;
}
.global-save-spinner{
    width:32px;
    height:32px;
    flex:0 0 32px;
    border:4px solid #dce8df;
    border-top-color:#078b3e;
    border-radius:50%;
    animation:global-save-spin .75s linear infinite;
}
body.global-save-active{cursor:progress;}
@keyframes global-save-spin{to{transform:rotate(360deg)}}
[data-theme="dark"] .global-save-overlay{background:rgba(10,14,12,.72);}
[data-theme="dark"] .global-save-box{
    background:#171d19;
    border-color:#334039;
    box-shadow:0 18px 55px rgba(0,0,0,.38);
}
[data-theme="dark"] .global-save-box span:not(.global-save-spinner){color:#aab7af;}
@media(max-width:520px){
    .global-save-box{min-width:0;width:100%;padding:19px 20px;}
}


/* Passwort anzeigen / verbergen */
.password-toggle-wrap{position:relative;width:100%}
.password-toggle-wrap>input{width:100%;padding-right:48px!important}
.password-toggle-btn{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:38px;height:38px;border:0;background:transparent;border-radius:8px;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  color:#607067;padding:0
}
.password-toggle-btn:hover{background:rgba(0,0,0,.055);color:#078c37}
.password-toggle-btn:focus-visible{outline:2px solid #078c37;outline-offset:1px}
.password-toggle-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}


/* Passwort-Auge v2: sauber im Eingabefeld */
.password-toggle-wrap{
  position:relative!important;
  display:block!important;
  width:100%!important;
}
.password-toggle-wrap > input{
  display:block!important;
  width:100%!important;
  box-sizing:border-box!important;
  padding-right:52px!important;
}
.password-toggle-wrap > .password-toggle-btn{
  position:absolute!important;
  right:8px!important;
  top:50%!important;
  bottom:auto!important;
  left:auto!important;
  transform:translateY(-50%)!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:10px!important;
  background:transparent!important;
  box-shadow:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  cursor:pointer!important;
  color:#607067!important;
  line-height:1!important;
  z-index:5!important;
}
.password-toggle-wrap > .password-toggle-btn:hover{
  background:#edf7f0!important;
  color:#078c37!important;
}
.password-toggle-wrap > .password-toggle-btn:focus{
  outline:none!important;
  background:#edf7f0!important;
  color:#078c37!important;
}
.password-toggle-wrap > .password-toggle-btn svg{
  display:block!important;
  width:22px!important;
  height:22px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  pointer-events:none!important;
}

/* Profilbilder & Beitragsbilder */
.profileavatar-img{object-fit:cover;display:block;border:2px solid #dcebe1;background:#e7f4eb}
.profilehero-main{flex:1;min-width:0}.profile-image-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px}.profile-image-form input[type=file]{max-width:360px}.profile-image-remove{display:inline-block;margin-top:8px}
.userchip-avatar{overflow:hidden;padding:0!important;background:#e7f4eb!important}.userchip-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.org-avatar{width:54px;height:54px;border-radius:50%;object-fit:cover;margin:0 auto 5px;border:2px solid #dcebe1;background:#e7f4eb}
.post-images{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.post-images a{display:block;border-radius:12px;overflow:hidden;background:#eef3ef}.post-images img{display:block;width:100%;height:230px;object-fit:cover;transition:transform .15s}.post-images a:hover img{transform:scale(1.015)}.post-images.single{grid-template-columns:1fr}.post-images.single img{height:auto;max-height:520px;object-fit:contain}.upload-hint{font-size:12px;color:var(--muted);margin-top:5px}
@media(max-width:700px){.post-images{grid-template-columns:1fr}.post-images img{height:auto;max-height:420px}.profile-image-form{align-items:stretch}.profile-image-form input[type=file]{max-width:100%}}


/* Bildsystem FIX: feste Avatare, zentriertes Organigramm, Bilder einzeln entfernbar */
.topbar-userarea .userchip .userchip-avatar{width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;min-height:36px!important;max-height:36px!important;flex:0 0 36px!important;display:block!important;overflow:hidden!important;border-radius:50%!important;padding:0!important}
.topbar-userarea .userchip .userchip-avatar img{width:36px!important;height:36px!important;max-width:36px!important;max-height:36px!important;display:block!important;object-fit:cover!important;object-position:center!important;border-radius:50%!important}
.profilehero .profileavatar-img{width:86px!important;height:86px!important;min-width:86px!important;max-width:86px!important;object-fit:cover!important;object-position:center!important;border-radius:50%!important}
.profile-image-form{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}.profile-image-remove{display:inline-block;margin-top:8px}.profile-image-remove .btn{display:inline-flex!important}
.classic-person{align-items:center!important;justify-content:center!important;text-align:center!important;min-height:128px}
.classic-person .org-avatar{width:58px!important;height:58px!important;min-width:58px!important;max-width:58px!important;margin:0 auto 7px!important;display:block!important;object-fit:cover!important;object-position:center!important;border-radius:50%!important}
.classic-person strong,.classic-person span{display:block;width:100%;text-align:center!important}
.post-image-item{position:relative;min-width:0}.post-image-item>a{display:block!important}.post-image-remove-form{position:absolute;top:8px;right:8px;z-index:3;margin:0!important}.post-image-remove{width:32px;height:32px;border:0;border-radius:50%;background:rgba(185,28,28,.94);color:#fff;font-size:23px;font-weight:700;line-height:28px;display:grid;place-items:center;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.25)}.post-image-remove:hover{background:#991b1b;transform:scale(1.05)}
.post-images.single .post-image-item{max-width:100%}.post-images.single .post-image-item img{width:100%;height:auto;max-height:520px;object-fit:contain}

/* Beantragte Abwesenheiten im Teamkalender */
.teamcalendarcard .event.pendingevent{background:#fff7db;color:#8a5a00;border:1px dashed #d7a000}


/* Eigenes Bestätigungs-Popup statt Browser-confirm() */
.portal-confirm-backdrop{position:fixed;inset:0;z-index:10050;background:rgba(15,23,18,.42);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:20px}
.portal-confirm-backdrop[hidden]{display:none!important}
.portal-confirm-box{width:min(460px,100%);background:var(--card,#fff);border:1px solid var(--border,#d9e3dc);border-radius:20px;box-shadow:0 24px 70px rgba(0,0,0,.22);padding:24px;display:flex;gap:16px;align-items:flex-start;animation:portalConfirmIn .16s ease-out}
.portal-confirm-icon{width:44px;height:44px;flex:0 0 44px;border-radius:14px;display:grid;place-items:center;background:#fff1f1;color:#b42318;font-size:24px;font-weight:800}
.portal-confirm-content{min-width:0;flex:1}.portal-confirm-content h3{margin:1px 0 7px;font-size:20px}.portal-confirm-content p{margin:0;color:var(--muted,#66756b);line-height:1.45}
.portal-confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px;flex-wrap:wrap}
.portal-confirm-open{overflow:hidden}
@keyframes portalConfirmIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:560px){.portal-confirm-box{padding:18px;border-radius:16px}.portal-confirm-icon{display:none}.portal-confirm-actions .btn{flex:1}}

/* Teamkalender: Krankheit + Schnellfreigabe */
.teamcalendarcard .event.sickevent{background:#fee2e2;color:#991b1b;border:1px solid #fecaca;border-left:4px solid #dc2626}
.teamcalendarcard .event{position:relative}
.teamcalendarcard .team-event-main{min-width:0;display:flex;flex-direction:column;gap:1px;padding-right:2px}
.teamcalendarcard .event.pendingevent:has(.team-event-actions) .team-event-main{padding-right:48px}
.team-event-actions{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:flex;gap:3px;z-index:2}
.team-event-actions button{width:20px;height:20px;padding:0;border:0;border-radius:5px;display:grid;place-items:center;font-size:12px;font-weight:900;line-height:1;cursor:pointer;box-shadow:0 1px 2px rgba(15,23,42,.12)}
.team-event-approve{background:#16a34a;color:#fff}
.team-event-reject{background:#dc2626;color:#fff}
.team-event-approve:hover{background:#15803d}
.team-event-reject:hover{background:#b91c1c}

/* Teamübersicht: VEDA-artiger Monatsplan */
.team-view-switch{padding:6px;display:flex;gap:6px;width:max-content;max-width:100%}.team-view-tab{padding:10px 18px;border-radius:10px;font-weight:800;font-size:13px;color:var(--muted)}.team-view-tab.active{background:var(--primary);color:#fff}.team-view-tab:not(.active):hover{background:#f3f4f6;color:var(--text)}
.team-monthplan-card{padding:0;overflow:hidden}.monthplan-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 22px 12px}.monthplan-head h3{margin:0 0 4px}.monthplan-legend{display:flex;justify-content:flex-end;gap:16px;flex-wrap:wrap;padding:0 22px 14px;font-size:11px;color:var(--muted)}.monthplan-legend span{display:flex;align-items:center;gap:6px}.mp-swatch{width:16px;height:12px;border-radius:3px;display:inline-block}.mp-swatch.vacation,.mp-block.vacation,.mp-block.half,.mp-block.special,.mp-block.timeoff{background:#bfe6ca}.mp-swatch.sick,.mp-block.sick{background:#ed9296}.mp-swatch.pending,.mp-block.pending{background:#f7ad73}
.monthplan-scroll{overflow:auto;border-top:1px solid var(--line)}.monthplan-grid{display:grid;grid-template-columns:220px repeat(var(--mp-days),minmax(48px,1fr));min-width:calc(220px + var(--mp-days)*48px);background:#fff}.mp-corner{position:sticky;left:0;z-index:5;grid-row:span 1;background:#f5f7fa;border-right:2px solid #dbe1e8;border-bottom:1px solid #dbe1e8;display:flex;align-items:center;padding:10px 14px;font-size:12px;font-weight:800}.mp-corner-sub{grid-column:1}.mp-week{background:#f5f7fa;border-right:2px solid #dbe1e8;border-bottom:1px solid #dbe1e8;text-align:center;padding:7px 4px;font-size:10px;font-weight:800;color:#58677a}.mp-dayhead{background:#f8fafc;border-right:1px solid #c3ccd6;border-bottom:1px solid #c3ccd6;text-align:center;padding:5px 2px;min-height:45px}.mp-dayhead span{display:block;font-size:9px;color:#66758a}.mp-dayhead strong{font-size:13px}.mp-department{position:sticky;left:0;z-index:4;border:0;border-right:2px solid #4b5563;border-bottom:1px solid #4b5563;background:#4b5563;padding:8px 12px;text-align:left;font:inherit;font-size:12px;font-weight:900;color:#fff;cursor:pointer}.mp-department small{font-weight:700;opacity:.7}.mp-department-fill{grid-column:2/-1;background:#4b5563;border-bottom:1px solid #4b5563;min-height:34px}.mp-chevron{display:inline-block;width:18px;transition:transform .15s}.mp-department.collapsed .mp-chevron{transform:rotate(-90deg)}.mp-employee{position:sticky;left:0;z-index:3;background:#fff;border-right:2px solid #dbe1e8;border-bottom:1px solid #e2e7ed;padding:8px 12px;font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:34px}.mp-employee a:hover{text-decoration:underline}.mp-cell{position:relative;border-right:1px solid #c3ccd6;border-bottom:1px solid #d7dee6;min-height:34px;background:#fff}.mp-cell.today{background:#e5e7eb}.mp-dayhead.today{background:#dfe3e8}.mp-block{position:absolute;inset:0;display:block}.mp-block.half{inset:0 0 50% 0}.mp-cell .mp-block+.mp-block{opacity:.78}.mp-hidden{display:none!important}.monthplan-hint{padding:12px 22px;font-size:11px;border-top:1px solid var(--line)}
@media(max-width:800px){.monthplan-head{align-items:flex-start;flex-direction:column}.monthplan-legend{justify-content:flex-start}.monthplan-grid{grid-template-columns:170px repeat(var(--mp-days),48px);min-width:calc(170px + var(--mp-days)*48px)}.team-view-switch{width:100%}.team-view-tab{flex:1;text-align:center}}

/* Monatsplan: Schnellfreigabe beantragter Abwesenheiten */
.mp-pending-actions{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;gap:3px}.mp-pending-actions button{width:20px;height:20px;padding:0;border:0;border-radius:5px;display:grid;place-items:center;font-size:12px;font-weight:900;line-height:1;cursor:pointer;box-shadow:0 1px 3px rgba(15,23,42,.18)}

/* Monatsplan: Wochenenden + deutlichere Tagestrennung */
.mp-dayhead.weekend{background:#f1f3f5}.mp-cell.weekend{background:#f8f9fa}.mp-cell.weekend .mp-block{opacity:.92}
.mp-dayhead.week-start,.mp-cell.week-start{border-left:2px solid #98a6b5}
.mp-dayhead:last-child,.mp-cell:last-child{border-right-color:#98a6b5}

/* Monatsplan 1920x1080: kompletter Monat sichtbar + Kopfzeilen beim Scrollen fixiert */
@media(min-width:1200px){
  .monthplan-grid{
    grid-template-columns:165px repeat(var(--mp-days),minmax(0,1fr));
    min-width:100%;
    width:100%;
  }
  .mp-corner{padding:6px 8px;font-size:11px}
  .mp-week{padding:5px 1px;font-size:9px;line-height:16px;min-height:26px}
  .mp-dayhead{padding:3px 0;min-height:38px}
  .mp-dayhead span{font-size:8px;line-height:13px}
  .mp-dayhead strong{font-size:11px;line-height:15px}
  .mp-department{padding:6px 8px;font-size:11px}
  .mp-department-fill{min-height:30px}
  .mp-employee{padding:6px 8px;font-size:10px;min-height:30px}
  .mp-cell{min-height:30px}
  .mp-pending-actions{gap:2px}
  .mp-pending-actions button{width:17px;height:17px;font-size:10px;border-radius:4px}
}

/* KW + Wochentag/Datum bleiben beim vertikalen Scrollen sichtbar. */
.monthplan-scroll{max-height:calc(100vh - 230px);overflow:auto;position:relative}
.mp-week{position:sticky;top:0;z-index:12}
.mp-corner:not(.mp-corner-sub){top:0;z-index:14}
.mp-corner-sub{top:26px;z-index:14}
.mp-dayhead{position:sticky;top:26px;z-index:11;box-shadow:0 1px 0 #aeb8c3}

/* Linke Namensspalte bleibt ebenfalls sichtbar. */
.mp-corner,.mp-department,.mp-employee{box-shadow:1px 0 0 #aeb8c3}

@media(max-width:1199px){
  .monthplan-scroll{max-height:calc(100vh - 210px)}
}


/* Mitarbeiterseite: Tabellenkopf beim Scrollen sichtbar halten */
.employees-tablewrap{overflow:auto;position:relative}
.employees-table thead th{
  position:sticky;
  top:0;
  z-index:8;
  background:var(--card,#fff);
  box-shadow:0 2px 0 var(--line,#dbe3dd);
}

/* Urlaubskonto direkt in der Antragsverwaltung */
.vacation-account-cell{min-width:135px;white-space:nowrap}
.vacation-after{margin-top:5px;font-size:12px;color:#39754b}
.vacation-after.negative{color:#b42318;font-weight:600}
