*{box-sizing:border-box}

body{
margin:0;
height:100vh;
display:grid;
place-items:center;
background:#000000;
color:#ececec;
font-family:'IBM Plex Mono',monospace;
overflow:hidden;
}

.screen{
position:fixed;
inset:0;
pointer-events:none;
background:repeating-linear-gradient(
0deg,
rgba(255,255,255,.018),
rgba(255,255,255,.018) 1px,
transparent 1px,
transparent 4px
);
}

.terminal{
width:min(1180px,92vw);
height:min(760px,86vh);
display:grid;
grid-template-columns:340px 1fr;
border:1px solid #555;
background:#000000;
}

.terminal.dashboard-mode{
width:calc(100vw - 36px);
height:calc(100vh - 36px);
grid-template-columns:280px 1fr;
}

.left{
padding:48px;
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
border-right:1px solid #555;
}

.dashboard-mode .left{
display:none;
}

.logo{width:240px}

.tag{
margin-top:28px;
font-size:12px;
letter-spacing:.2em;
text-align:center;
color:#a1a1a1;
}

.right{
padding:60px;
display:flex;
flex-direction:column;
justify-content:center;
min-width:0;
}

.dashboard-mode .right{
padding:0;
justify-content:stretch;
}

.top{
border-bottom:1px solid #444;
padding-bottom:20px;
color:#aaa;
display:flex;
justify-content:space-between;
gap:24px;
font-size:14px;
}

.dashboard-mode .top{
display:none;
}

.boot{
margin-top:60px;
white-space:pre-line;
line-height:1.9;
}

.login{
width:520px;
margin:60px auto 0;
border:1px solid #555;
padding:34px;
}

.title{
margin-bottom:24px;
font-size:24px;
}

.menu{
display:flex;
gap:12px;
margin-bottom:28px;
}

.menu-item{
padding:8px 10px;
color:#888;
}

.selected{
color:#fff;
border-left:4px solid #173f63;
padding-left:14px;
font-weight:500;
}

input,button{
width:100%;
padding:14px;
margin-top:14px;
background:#000;
border:1px solid #444;
color:white;
font:inherit;
}

button{cursor:pointer}

.hidden{display:none}

.help{
margin-top:20px;
color:#888;
font-size:12px;
}

/* FULL DASHBOARD */

.app-view{
height:100%;
min-height:0;
}

.dashboard-shell{
height:100%;
display:grid;
grid-template-columns:300px 1fr;
background:#000000;
}

.side-nav{
border-right:1px solid #444;
padding:22px 18px;
display:flex;
flex-direction:column;
min-height:0;
}

.side-brand{
display:flex;
align-items:center;
gap:14px;
padding-bottom:22px;
border-bottom:1px solid #333;
}

.side-brand img{
width:34px;
height:auto;
}

.side-brand-text{
font-size:14px;
letter-spacing:.14em;
font-weight:500;
}

.operator-box{
padding:22px 0;
border-bottom:1px solid #333;
font-size:13px;
line-height:1.9;
color:#aaa;
}

.operator-box strong{
color:#fff;
font-weight:500;
}

.nav-list{
padding-top:22px;
display:flex;
flex-direction:column;
gap:8px;
}

.nav-item{
border:1px solid #2f2f2f;
padding:13px 14px;
color:#999;
font-size:13px;
letter-spacing:.08em;
}

.nav-item.active{
color:#fff;
border-color:#173f63;
border-left:4px solid #173f63;
padding-left:18px;
background:linear-gradient(90deg,rgba(23,63,99,.22),rgba(255,255,255,.02));
font-weight:500;
}

.nav-footer{
margin-top:auto;
border-top:1px solid #333;
padding-top:18px;
color:#777;
font-size:12px;
line-height:1.8;
}

.workspace{
padding:22px;
min-width:0;
display:grid;
grid-template-rows:auto 1fr;
gap:18px;
}

.workspace-top{
border:1px solid #444;
padding:16px 20px;
display:flex;
justify-content:space-between;
align-items:center;
gap:20px;
}

.workspace-title{
font-size:16px;
letter-spacing:.14em;
font-weight:500;
}

.workspace-meta{
color:#aaa;
font-size:13px;
display:flex;
gap:22px;
}

.workspace-main{
border:1px solid #444;
padding:22px;
min-height:0;
overflow:hidden;
}

.dashboard-grid{
height:100%;
display:grid;
grid-template-columns:1.1fr .9fr;
grid-template-rows:auto 1fr;
gap:18px;
}

.card{
border:1px solid #333;
padding:20px;
background:rgba(255,255,255,.015);
}

.card-title{
color:#aaa;
font-size:13px;
letter-spacing:.14em;
margin-bottom:16px;
}

.facility-state{
font-size:30px;
letter-spacing:.12em;
}

.bar{
height:8px;
border:1px solid #333;
margin:18px 0;
}

.bar-fill{
height:100%;
width:72%;
background:#173f63;
}

.notice{
color:#bbb;
font-size:13px;
line-height:1.8;
}

.news-box{
border:1px dashed #333;
padding:20px;
color:#aaa;
letter-spacing:.08em;
}

.telemetry{
height:100%;
overflow:auto;
font-size:13px;
line-height:1.9;
}

.telemetry-row{
display:grid;
grid-template-columns:58px 64px 1fr;
gap:12px;
border-bottom:1px solid rgba(255,255,255,.04);
padding:4px 0;
}

.code-red{color:#3f78a5}
.code-ok{color:#fff}
.code-dim{color:#888}

@media(max-width:900px){
body{
overflow:auto;
display:block;
}

.terminal,
.terminal.dashboard-mode{
width:calc(100vw - 32px);
height:auto;
min-height:calc(100vh - 32px);
margin:16px auto;
grid-template-columns:1fr;
}

.left{
border-right:none;
border-bottom:1px solid #555;
}

.right{padding:32px}

.login{width:100%}

.dashboard-shell{
grid-template-columns:1fr;
}

.side-nav{
border-right:none;
border-bottom:1px solid #444;
}

.dashboard-grid{
grid-template-columns:1fr;
}

.workspace{
padding:16px;
}
}


/* DASHBOARD LAYOUT FIX V2 */

.terminal.dashboard-mode{
  width:calc(100vw - 36px);
  height:calc(100vh - 36px);
  grid-template-columns:1fr;
}

.dashboard-mode .left{
  display:none;
}

.dashboard-mode .right{
  grid-column:1 / -1;
  width:100%;
  height:100%;
  min-width:0;
  padding:0;
  display:block;
}

.dashboard-mode .app-view{
  display:block;
  width:100%;
  height:100%;
  min-width:0;
}

.dashboard-shell{
  width:100%;
  height:100%;
  min-width:0;
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
}

.workspace{
  width:100%;
  min-width:0;
  height:100%;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
}

.workspace-top{
  width:100%;
  min-width:0;
}

.workspace-main{
  width:100%;
  min-width:0;
  min-height:0;
  overflow:auto;
}

.dashboard-grid{
  width:100%;
  min-width:0;
  min-height:100%;
  grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);
}

.card{
  min-width:0;
}

.telemetry-row{
  min-width:0;
}

.telemetry-row span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media(max-width:900px){
  .terminal.dashboard-mode{
    width:calc(100vw - 32px);
    height:auto;
    min-height:calc(100vh - 32px);
  }

  .dashboard-shell{
    grid-template-columns:1fr;
  }
}


/* DASHBOARD FONT UPDATE */

.dashboard-shell,
.dashboard-shell *{
font-family:'Inter',sans-serif;
}

.workspace-title,
.module-title,
.facility-state{
font-weight:500;
letter-spacing:.08em;
}

.card-title,
.workspace-meta,
.operator-box,
.nav-item,
.notice,
.telemetry,
.news-box,
.nav-footer{
font-family:'Inter',sans-serif;
letter-spacing:.04em;
}

.side-brand-text{
font-weight:600;
letter-spacing:.16em;
}

.dashboard-shell .workspace-main{
line-height:1.45;
}

/* keep login mono */
.login,
.login *,
.boot,
.boot *,
.top{
font-family:'IBM Plex Mono',monospace !important;
}


/* DASHBOARD SIDEBAR LOGO UPDATE */

.side-logo-block{
  display:flex;
  justify-content:center;
  align-items:center;
  padding:10px 0 28px;
  border-bottom:1px solid #333;
}

.side-logo-block img{
  width:170px;
  max-width:82%;
  height:auto;
  display:block;
}

.side-brand{
  display:none;
}

.operator-box{
  padding-top:22px;
}


/* CHAT DRAWER V1 */

.chat-toggle{
  position:fixed;
  right:28px;
  bottom:26px;
  z-index:40;
  width:auto;
  margin:0;
  padding:12px 18px;
  border:1px solid #173f63;
  background:#111;
  color:#fff;
  font-family:'Inter',sans-serif;
  font-size:12px;
  letter-spacing:.12em;
}

.chat-toggle:hover{
  background:rgba(23,63,99,.22);
}

.chat-drawer{
  position:fixed;
  top:18px;
  right:18px;
  bottom:18px;
  width:min(560px, 38vw);
  z-index:50;
  border:1px solid #555;
  background:#000000;
  display:flex;
  flex-direction:column;
  transform:translateX(calc(100% + 28px));
  transition:transform .18s ease;
  box-shadow:-24px 0 80px rgba(0,0,0,.55);
}

.chat-drawer.open{
  transform:translateX(0);
}

.chat-head{
  border-bottom:1px solid #444;
  padding:16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-family:'Inter',sans-serif;
  letter-spacing:.12em;
  font-size:13px;
}

.chat-head button{
  width:auto;
  margin:0;
  padding:4px 10px;
  border:1px solid #444;
  background:#090909;
  color:#fff;
  font-size:18px;
  line-height:1;
}

.chat-log{
  flex:1;
  padding:16px;
  overflow:auto;
  font-family:'Inter',sans-serif;
  font-size:13px;
}

.chat-line{
  display:grid;
  grid-template-columns:48px 72px 1fr;
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.05);
}

.chat-line span{
  color:#999;
}

.chat-line b{
  color:#3f78a5;
  font-weight:600;
}

.chat-line em{
  color:#ddd;
  font-style:normal;
  min-width:0;
  overflow-wrap:anywhere;
}

.chat-input-row{
  border-top:1px solid #444;
  padding:14px;
  display:grid;
  grid-template-columns:1fr 86px;
  gap:10px;
}

.chat-input-row input,
.chat-input-row button{
  margin:0;
  font-family:'Inter',sans-serif;
}

.chat-input-row button{
  border-color:#173f63;
}

@media(max-width:700px){
  .chat-drawer{
    width:auto;
    left:18px;
  }

  .chat-toggle{
    right:18px;
    bottom:18px;
  }
}


/* CHAT TOP BAR */

.chat-toggle{
display:none !important;
}

.workspace-meta{
display:flex;
align-items:center;
gap:16px;
}

.chat-top-button{
width:auto;
margin:0;
padding:8px 14px;
background:#000000;
border:1px solid #173f63;
color:#fff;
font-family:'Inter',sans-serif;
font-size:12px;
letter-spacing:.14em;
}

.chat-top-button:hover{
background:rgba(23,63,99,.18);
}

.chat-top-button::before{
content:'◻ ';
color:#3f78a5;
}


/* CHAT HANDLE V1 */

.chat-top-button{
  display:none !important;
}

.chat-drawer{
  overflow:visible;
}

.chat-drawer.hidden{
  display:none !important;
}

.chat-handle{
  position:absolute;
  left:-46px;
  top:18px;
  width:46px;
  height:112px;
  margin:0;
  padding:0;
  border:1px solid #555;
  border-right:none;
  background:#000000;
  color:#fff;
  font-family:'Inter',sans-serif;
  font-size:11px;
  letter-spacing:.12em;
  writing-mode:vertical-rl;
  text-orientation:mixed;
  cursor:pointer;
}

.chat-handle:hover{
  border-color:#173f63;
  color:#fff;
  background:rgba(23,63,99,.18);
}

.chat-drawer.open .chat-handle{
  border-color:#173f63;
}

.chat-toggle{
  display:none !important;
}

@media(max-width:700px){
  .chat-handle{
    left:auto;
    right:12px;
    top:-44px;
    width:92px;
    height:44px;
    writing-mode:horizontal-tb;
    border:1px solid #555;
  }
}


/* CHAT HEADER CLEANUP */

.chat-head{
justify-content:flex-start !important;
padding-right:18px;
}


/* CHAT DATE SEPARATORS */

.chat-day{
display:grid;
grid-template-columns:1fr auto 1fr;
align-items:center;
gap:14px;
padding:18px 0 12px;
}

.chat-day span{
height:1px;
background:rgba(255,255,255,.08);
}

.chat-day label{
font-family:'Inter',sans-serif;
font-size:11px;
letter-spacing:.24em;
color:#777;
}

.chat-line{
padding-top:10px;
}


/* STRONG MODULE SCROLL FIX */

.dashboard-mode .right,
.dashboard-mode .app-view,
.dashboard-shell,
.workspace,
.workspace-main,
.module-mount{
  min-height:0 !important;
}

.workspace-main{
  overflow:hidden !important;
}

.module-mount{
  height:100% !important;
  overflow:hidden !important;
}


/* OLED BLACK */

html,
body{
  background:#000 !important;
}

body{
  color:#e6e6e6;
}

.dashboard-shell,
.workspace,
.workspace-main,
.side-nav,
.card,
.chat-drawer,
.module-mount{
  background:#000 !important;
}

.card{
  border-color:rgba(255,255,255,.08) !important;
}

input,
textarea,
select,
button{
  background:#000 !important;
}



/* CHAT ADMIN CONTROLS */

.chat-head{
  gap:10px;
}

.chat-clear{
  width:auto;
  margin:0 0 0 auto;
  padding:6px 10px;
  border:1px solid #333;
  background:#000;
  color:#888;
  font-family:'Inter',sans-serif;
  font-size:10px;
  letter-spacing:.12em;
}

.chat-clear:hover{
  color:#3f78a5;
  border-color:#173f63;
}

.chat-line{
  position:relative;
  padding-right:30px;
}

.chat-delete{
  position:absolute;
  top:50%;
  right:0;
  transform:translateY(-50%);
  width:20px;
  height:20px;
  margin:0;
  padding:0;
  border:1px solid #333;
  background:#000;
  color:#777;
  font-size:14px;
  line-height:1;
  opacity:0;
  pointer-events:none;
}

.chat-line:hover .chat-delete{
  opacity:1;
  pointer-events:auto;
}

.chat-delete:hover{
  color:#3f78a5;
  border-color:#173f63;
}

/* UMBRA MINIMAL SCROLLBARS */

*{
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}

*::-webkit-scrollbar{
  width:4px;
  height:4px;
}

*::-webkit-scrollbar-track{
  background:transparent;
}

*::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.12);
}

*::-webkit-scrollbar-thumb:hover{
  background:rgba(63,120,165,.45);
}

/* REHMANN: KADERSTELLE + WOCHENABGABE */
.rehmann-module{display:grid;gap:18px;min-height:100%;align-content:start}
.rehmann-summary-card,.dues-command{display:flex;align-items:center;justify-content:space-between;gap:22px}
.rehmann-member-form{display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,.65fr) auto;gap:12px;margin-bottom:20px}
.rehmann-member-form input,.rehmann-member-form button{margin:0}
.rehmann-member-form button{width:auto;border-color:#173f63;white-space:nowrap}
.rehmann-table-wrap{overflow:auto;border:1px solid #292929}
.rehmann-table{width:100%;border-collapse:collapse;font-size:13px;min-width:760px}
.rehmann-table th{padding:12px 14px;text-align:left;color:#888;font-size:11px;letter-spacing:.12em;border-bottom:1px solid #444;background:#080808;position:sticky;top:0}
.rehmann-table td{padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.06);color:#bbb}
.rehmann-table tr:last-child td{border-bottom:0}
.rehmann-table strong{color:#fff;font-weight:500}
.status-switch,.danger-action{width:auto;margin:0;padding:7px 10px;font-size:11px;letter-spacing:.08em}
.status-switch{border-color:#555;color:#fff}.status-switch.inactive{color:#888;border-color:#333}
.danger-action{border-color:#214d73;color:#6f9fc6}
.empty-cell{text-align:center!important;color:#777!important;padding:34px!important;letter-spacing:.08em}
.dues-command{padding:18px 20px}.week-controls{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.week-controls button{width:auto;margin:0;padding:9px 12px;font-size:11px}
.dues-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.dues-stat{font-size:25px;letter-spacing:.06em;color:#fff}.target-card label{display:block;color:#888;font-size:11px;letter-spacing:.1em;margin-bottom:10px}.target-row{display:grid;grid-template-columns:1fr auto;gap:8px}.target-row input,.target-row button{margin:0}.target-row button{width:auto;border-color:#173f63}
.dues-input{margin:0!important;padding:8px 10px!important;min-width:130px}
.dues-status{display:inline-block;padding:6px 9px;border:1px solid #444;font-size:10px;letter-spacing:.12em}.dues-status.complete{border-color:#546b56;color:#b8d1b9;background:rgba(70,100,72,.14)}.dues-status.open{border-color:#173f63;color:#8ab4d6;background:rgba(23,63,99,.14)}
.negative-value{color:#6f9fc6!important}.positive-value{color:#b8d1b9!important}
@media(max-width:1100px){.dues-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rehmann-member-form{grid-template-columns:1fr 1fr}.rehmann-member-form button{grid-column:1/-1}}
@media(max-width:700px){.rehmann-summary-card,.dues-command{align-items:flex-start;flex-direction:column}.week-controls{justify-content:flex-start}.dues-stat-grid,.rehmann-member-form{grid-template-columns:1fr}.rehmann-member-form button{grid-column:auto}}

/* WOCHENABGABE – INDIVIDUELLE VORGABEN */
.dues-stat-grid-compact{min-width:min(560px,52%)}
.weekly-defaults{display:grid;gap:10px;min-width:min(680px,100%)}
.weekly-defaults>label{color:#888;font-size:11px;letter-spacing:.1em}
.weekly-defaults-row{display:grid;grid-template-columns:minmax(220px,1fr) minmax(120px,.35fr) auto;gap:8px}
.weekly-defaults-row input,.weekly-defaults-row button{margin:0}
.weekly-defaults-row button{width:auto;border-color:#173f63;white-space:nowrap}
.dues-table-extended{min-width:1120px}
.dues-field-stack{display:grid;gap:5px;min-width:170px}
.dues-item-input{min-width:210px}
.dues-reset{width:auto!important;margin:0!important;padding:4px 7px!important;border:0!important;color:#9c9c9c!important;background:transparent!important;text-align:left;font-size:9px!important;letter-spacing:.08em}
.dues-reset:not(:disabled):hover{color:#fff!important}
.dues-reset.is-default{opacity:.55}
.dues-table tfoot td{border-top:1px solid #555;background:#080808}
@media(max-width:1100px){.dues-stat-grid-compact{min-width:0;width:100%}.weekly-defaults{min-width:0}.weekly-defaults-row{grid-template-columns:1fr 150px}.weekly-defaults-row button{grid-column:1/-1}}
@media(max-width:700px){.weekly-defaults-row{grid-template-columns:1fr}.weekly-defaults-row button{grid-column:auto}}

/* KADERSTELLE – BEARBEITUNG UND RANGAUSWAHL */
.member-form select,
.kader-edit-input,
.kader-rank-select{
  width:100%;
  padding:10px 11px;
  margin:0;
  border:1px solid #444;
  background:#000;
  color:#fff;
  font:inherit;
}
.member-form select{margin-top:14px;padding:14px}
.kader-edit-table{min-width:1050px}
.kader-edit-table .row-actions{display:flex;gap:7px;flex-wrap:wrap;min-width:265px}
.kader-edit-table .row-actions button{width:auto;margin:0}

/* WOCHENABGABE – ERFÜLLT / ÜBERERFÜLLT */
.dues-complete-row td{background:rgba(70,100,72,.055)}
.dues-overfulfilled-row td{
  background:rgba(36,145,61,.18);
  border-bottom-color:rgba(80,210,104,.28);
}
.dues-overfulfilled-row:hover td{background:rgba(36,165,67,.25)}
.dues-status.overfulfilled{
  border-color:#35b957;
  color:#d9ffe0;
  background:rgba(29,171,59,.34);
  box-shadow:0 0 14px rgba(39,190,70,.22);
}
.dues-overfulfilled-row .positive-value{color:#82f29a!important;font-weight:600}
.member-form{display:grid;grid-template-columns:minmax(220px,1fr) minmax(190px,.7fr) auto;gap:12px;align-items:end}
.member-form>div{min-width:0}
.member-form label{display:block;color:#888;font-size:11px;letter-spacing:.1em}
.member-form input,.member-form button{margin-top:14px}
.member-form button{width:auto;white-space:nowrap;border-color:#173f63}
.rehmann-head-card{display:flex;justify-content:space-between;align-items:center;gap:24px}
.rehmann-stat-block{text-align:right;min-width:150px}
.rehmann-stat-block strong{display:block;font-size:30px;font-weight:500;color:#fff}
.rehmann-stat-block span{font-size:10px;letter-spacing:.12em;color:#888}
.member-status{display:inline-block;padding:6px 9px;border:1px solid #444;font-size:10px;letter-spacing:.1em}
.member-status.active{border-color:#546b56;color:#b8d1b9;background:rgba(70,100,72,.14)}
.member-status.inactive{border-color:#214d73;color:#6f9fc6;background:rgba(23,63,99,.12)}
.member-inactive{opacity:.62}
@media(max-width:900px){.member-form{grid-template-columns:1fr}.member-form button{width:100%}.rehmann-head-card{align-items:flex-start;flex-direction:column}.rehmann-stat-block{text-align:left}}

/* REHMANN – SCROLL-, AUSRICHTUNGS- UND STATUSKORREKTUR */
.module-mount:has(.rehmann-module){
  height:100%;
  min-height:0;
  overflow:hidden;
}

.rehmann-module{
  height:100%;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  align-content:start;
  padding-right:4px;
}

.rehmann-table-card{
  min-height:0;
}

.table-scroll{
  width:100%;
  max-width:100%;
  overflow:auto;
}

.rehmann-table th,
.rehmann-table td{
  vertical-align:middle;
}

.dues-table-extended{
  table-layout:fixed;
  min-width:1180px;
}

.dues-table-extended th:nth-child(1),
.dues-table-extended td:nth-child(1){width:145px}
.dues-table-extended th:nth-child(2),
.dues-table-extended td:nth-child(2){width:175px}
.dues-table-extended th:nth-child(3),
.dues-table-extended td:nth-child(3){width:250px}
.dues-table-extended th:nth-child(4),
.dues-table-extended td:nth-child(4){width:230px}
.dues-table-extended th:nth-child(5),
.dues-table-extended td:nth-child(5){width:210px}
.dues-table-extended th:nth-child(6),
.dues-table-extended td:nth-child(6){width:105px}
.dues-table-extended th:nth-child(7),
.dues-table-extended td:nth-child(7){width:135px}

.dues-field-stack{
  grid-template-rows:38px 18px;
  align-content:center;
  min-height:61px;
}

.dues-field-stack .dues-input,
.dues-table-extended td > .dues-input{
  height:38px;
}

.dues-reset{
  min-height:18px;
  line-height:1.15;
  white-space:nowrap;
}

.week-period{
  margin-top:8px;
  color:#c8c8c8;
  font-size:11px;
  line-height:1.5;
  letter-spacing:.08em;
}

.dues-stat-grid-compact{
  grid-template-columns:minmax(120px,.65fr) minmax(210px,1fr) minmax(210px,1fr);
  min-width:min(720px,58%);
}

.dues-item-total-card{
  min-width:0;
}

.dues-item-totals,
.dues-footer-totals{
  display:grid;
  gap:5px;
}

.dues-total-line{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:baseline;
  font-size:12px;
}

.dues-total-line span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#9d9d9d;
}

.dues-total-line strong{
  color:#fff;
  font-size:15px;
  font-weight:500;
}

.dues-footer-totals .dues-total-line{
  font-size:10px;
  gap:8px;
}

.dues-footer-totals .dues-total-line strong{
  font-size:12px;
}

/* Erfüllt: helleres Grün. Ab 110 %: dunkleres, intensiveres Grün. */
.dues-complete-row td{
  background:rgba(66,190,103,.18);
  border-bottom-color:rgba(108,225,139,.32);
}

.dues-complete-row:hover td{
  background:rgba(75,205,113,.24);
}

.dues-status.complete{
  border-color:#65d487;
  color:#e5ffed;
  background:rgba(65,190,98,.28);
  box-shadow:0 0 12px rgba(73,202,108,.15);
}

.dues-overfulfilled-row td{
  background:rgba(17,86,38,.42);
  border-bottom-color:rgba(64,179,88,.44);
}

.dues-overfulfilled-row:hover td{
  background:rgba(20,105,45,.5);
}

.dues-status.overfulfilled{
  border-color:#36b95a;
  color:#d9ffe2;
  background:rgba(15,105,38,.62);
  box-shadow:0 0 15px rgba(32,156,62,.24);
}

@media(max-width:1100px){
  .dues-stat-grid-compact{
    grid-template-columns:1fr;
    min-width:0;
    width:100%;
  }
}

/* WOCHENABGABE – FELDAUSRICHTUNG SOLL / IST */
.dues-table-extended tbody td{vertical-align:top;}
.dues-table-extended tbody td > .dues-input{margin-top:0!important;}


/* WOCHENABGABE – KORREKTE 8-SPALTEN-AUFTEILUNG */
.dues-table-extended{
  table-layout:fixed !important;
  min-width:1500px !important;
}
.dues-table-extended th:nth-child(1),
.dues-table-extended td:nth-child(1){width:145px}
.dues-table-extended th:nth-child(2),
.dues-table-extended td:nth-child(2){width:175px}
.dues-table-extended th:nth-child(3),
.dues-table-extended td:nth-child(3){width:250px}
.dues-table-extended th:nth-child(4),
.dues-table-extended td:nth-child(4){width:210px}
.dues-table-extended th:nth-child(5),
.dues-table-extended td:nth-child(5){width:210px}
.dues-table-extended th:nth-child(6),
.dues-table-extended td:nth-child(6){width:250px}
.dues-table-extended th:nth-child(7),
.dues-table-extended td:nth-child(7){width:115px}
.dues-table-extended th:nth-child(8),
.dues-table-extended td:nth-child(8){width:135px}

/* WOCHENABGABE – ENTGEGENGENOMMEN VON */
.dues-table-extended th{
  white-space:nowrap;
}

.dues-table-extended th:nth-child(6){
  white-space:normal;
  line-height:1.35;
}

.dues-table-extended td:nth-child(6) .dues-input{
  width:100%;
  min-width:0;
}


/* WOCHENABGABE – ROUTENKOSTEN */
.weekly-defaults-row{
  grid-template-columns:minmax(220px,1fr) minmax(120px,.35fr) minmax(150px,.42fr) auto;
}

.dues-stat-grid-compact{
  grid-template-columns:minmax(120px,.55fr) repeat(3,minmax(190px,1fr));
  min-width:min(960px,78%);
}

.dues-route-summary{
  display:grid;
  gap:5px;
}

@media(max-width:1250px){
  .weekly-defaults-row{
    grid-template-columns:1fr 150px 170px;
  }

  .weekly-defaults-row button{
    grid-column:1/-1;
  }

  .dues-stat-grid-compact{
    grid-template-columns:repeat(2,minmax(0,1fr));
    min-width:0;
    width:100%;
  }
}

@media(max-width:700px){
  .weekly-defaults-row,
  .dues-stat-grid-compact{
    grid-template-columns:1fr;
  }

  .weekly-defaults-row button{
    grid-column:auto;
  }
}

/* WOCHENABGABE – ZUSAMMENFASSUNG UND VORGABENABSTAND */
.dues-stat-grid-compact{
  display:grid;
  grid-template-columns:
    minmax(120px,.55fr)
    minmax(220px,1fr)
    minmax(220px,1fr)
    minmax(260px,1.15fr);
  gap:14px;
  align-items:stretch;
  min-width:min(1050px,82%);
}

.dues-stat-grid-compact > div{
  min-width:0;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.015);
}

.dues-stat-grid-compact > div:first-child{
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.dues-stat-grid-compact .dues-item-totals,
.dues-stat-grid-compact .dues-route-summary{
  min-height:46px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:7px;
}

.dues-stat-grid-compact .dues-total-line{
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
}

.dues-stat-grid-compact .notice{
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid rgba(255,255,255,.06);
  font-size:10px;
  line-height:1.35;
}

.weekly-defaults{
  margin-top:16px;
}

.weekly-defaults > label{
  display:block;
  margin-bottom:12px;
}

.weekly-defaults-row{
  margin-top:0;
}

@media(max-width:1350px){
  .dues-stat-grid-compact{
    grid-template-columns:repeat(2,minmax(0,1fr));
    min-width:0;
    width:100%;
  }
}

@media(max-width:760px){
  .dues-stat-grid-compact{
    grid-template-columns:1fr;
  }
}


/* WOCHENABGABE – MEHRERE PRODUKTE */
.weekly-products-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin:18px 0 14px;
}

.weekly-products-head label{
  display:block;
  color:#888;
  font-size:11px;
  letter-spacing:.1em;
  margin-bottom:7px;
}

.weekly-products-head .notice{
  font-size:11px;
}

.product-add{
  width:auto;
  margin:0;
  white-space:nowrap;
  border-color:#173f63;
}

.weekly-products-list{
  display:grid;
  gap:9px;
}

.weekly-product-row{
  display:grid;
  grid-template-columns:110px minmax(260px,1fr) minmax(140px,.35fr) minmax(170px,.42fr) auto;
  gap:9px;
  align-items:center;
}

.weekly-product-row input,
.weekly-product-row button{
  margin:0;
}

.product-default-marker{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 10px;
  border:1px solid #333;
  color:#888;
  font-size:10px;
  letter-spacing:.09em;
  cursor:pointer;
}

.product-default-marker input{
  width:auto;
  margin:0;
  accent-color:#173f63;
}

.product-default-marker:has(input:checked){
  border-color:#173f63;
  color:#fff;
  background:rgba(23,63,99,.14);
}

.product-remove{
  white-space:nowrap;
}

.weekly-products-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
}

.weekly-products-actions button{
  width:auto;
  margin:0;
  border-color:#173f63;
}

.dues-product-select{
  width:100%;
  min-width:0;
  height:38px;
  margin:0!important;
  padding:8px 10px!important;
  border:1px solid #444;
  background:#000;
  color:#fff;
  font:inherit;
}

.dues-product-result{
  padding:3px 0;
}

.dues-product-result + .dues-product-result{
  border-top:1px solid rgba(255,255,255,.06);
  margin-top:5px;
  padding-top:8px;
}

.dues-route-detail{
  margin-top:3px;
  color:#777;
  font-size:9px;
  letter-spacing:.06em;
}

@media(max-width:1200px){
  .weekly-product-row{
    grid-template-columns:110px 1fr 150px 170px;
  }
  .weekly-product-row .product-remove{
    grid-column:1/-1;
    justify-self:end;
  }
}

@media(max-width:760px){
  .weekly-products-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .weekly-product-row{
    grid-template-columns:1fr;
  }
  .weekly-product-row .product-remove{
    grid-column:auto;
    justify-self:stretch;
  }
  .product-add,
  .weekly-products-actions button{
    width:100%;
  }
}


/* ROUTENVERWALTUNG */
.routes-editor-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px;
  margin-bottom:18px;
}
.routes-editor-head button,.routes-actions button{width:auto;margin:0;border-color:#173f63}
.routes-list{display:grid;gap:12px}
.route-editor-row{
  display:grid;
  grid-template-columns:110px minmax(180px,1fr) minmax(145px,.55fr) minmax(145px,.55fr) minmax(160px,.6fr) minmax(210px,.8fr) auto;
  gap:10px;align-items:end;padding:14px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.012)
}
.route-field{min-width:0}
.route-field label,.route-profit span{display:block;margin-bottom:7px;color:#777;font-size:9px;letter-spacing:.1em}
.route-field input{width:100%;margin:0}
.route-profit{min-width:0;padding:8px 10px;border-left:1px solid rgba(255,255,255,.08)}
.route-profit strong{display:block;font-size:18px;font-weight:500}
.route-profit small{display:block;margin-top:5px;color:#666;font-size:9px}
.route-remove{margin:0;white-space:nowrap}
.routes-actions{display:flex;justify-content:flex-end;margin-top:16px}
.dues-toolbar-compact{display:flex;align-items:center;justify-content:space-between;gap:20px}
.routes-reference{text-align:right;font-size:10px}
.dues-profit-line{display:flex;justify-content:space-between;gap:12px;margin-top:5px;padding-top:5px;border-top:1px solid rgba(255,255,255,.05);color:#777;font-size:9px;letter-spacing:.05em}
.dues-profit-line strong{font-size:10px}
@media(max-width:1450px){
  .route-editor-row{grid-template-columns:110px repeat(2,minmax(160px,1fr)) repeat(2,minmax(145px,.7fr))}
  .route-profit{grid-column:2/5}.route-remove{grid-column:5}
}
@media(max-width:900px){
  .routes-editor-head,.dues-toolbar-compact{align-items:flex-start;flex-direction:column}
  .route-editor-row{grid-template-columns:1fr}
  .route-profit,.route-remove{grid-column:auto}
  .route-remove,.routes-editor-head button,.routes-actions button{width:100%}
  .routes-reference{text-align:left}
}


/* WOCHENABGABE – GESCHÄTZTER GESAMTGEWINN */
.dues-grand-profit{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.16);
  font-size:10px;
  letter-spacing:.08em;
}

.dues-grand-profit strong{
  font-size:14px;
  white-space:nowrap;
}


/* WOCHENABGABE – LETZTE BEARBEITUNG */
.dues-last-edit{
  margin-top:5px;
  min-height:10px;
  color:#6f7478;
  font-size:8px;
  line-height:1.3;
  letter-spacing:.07em;
  white-space:normal;
}


/* REHMANN – PERSONALAKTEN / AKTENREGISTRATUR */
.module-mount:has(.dossier-module){
  height:100%;
  min-height:0;
  overflow:hidden;
}

.dossier-module{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:290px minmax(0,1fr);
  gap:18px;
}

.dossier-index{
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:18px;
}

.dossier-index-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:16px;
  border-bottom:1px solid #333;
}

.dossier-index-title{
  font-size:18px;
  letter-spacing:.12em;
}

.dossier-new{
  width:auto;
  margin:0;
  padding:8px 10px;
  white-space:nowrap;
  border-color:#173f63;
}

.dossier-search{
  margin:16px 0 12px!important;
  padding:10px 11px!important;
  font-size:11px!important;
}

.dossier-list{
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.dossier-list-item{
  width:100%;
  margin:0;
  padding:11px 12px;
  display:grid;
  gap:4px;
  text-align:left;
  border:1px solid #292929;
  background:#020202!important;
}

.dossier-list-item:hover,
.dossier-list-item.active{
  border-color:#173f63;
  background:linear-gradient(90deg,rgba(23,63,99,.17),transparent)!important;
}

.dossier-list-code{
  color:#777;
  font-size:9px;
  letter-spacing:.1em;
}

.dossier-list-item strong{
  color:#fff;
  font-size:13px;
  font-weight:500;
}

.dossier-list-item em{
  color:#8d8d8d;
  font-size:10px;
  font-style:normal;
}

.dossier-empty-list{
  padding:24px 8px;
  color:#777;
  font-size:11px;
  line-height:1.6;
}

.dossier-workspace{
  min-height:0;
  overflow:auto;
  padding-right:4px;
}

.dossier-empty{
  min-height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
}

.dossier-paper{
  position:relative;
  min-height:100%;
  padding:30px;
  color:#d5d1c7;
  border:1px solid #3c3a34;
  background:
    linear-gradient(rgba(0,0,0,.83),rgba(0,0,0,.83)),
    repeating-linear-gradient(0deg,#191914 0,#191914 1px,#11110f 1px,#11110f 4px);
  box-shadow:inset 0 0 80px rgba(151,130,82,.055);
}

.dossier-paper::before{
  content:'';
  position:absolute;
  inset:10px;
  pointer-events:none;
  border:1px solid rgba(190,174,130,.08);
}

.dossier-paper-head{
  position:relative;
  display:flex;
  justify-content:space-between;
  gap:24px;
  padding-bottom:22px;
  border-bottom:2px solid rgba(193,183,151,.25);
}

.dossier-classification,
.dossier-file-number{
  color:#9c9583;
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  letter-spacing:.13em;
}

.dossier-paper h1{
  margin:8px 0;
  font-family:'IBM Plex Mono',monospace;
  font-size:30px;
  letter-spacing:.14em;
  font-weight:500;
}

.dossier-stamp{
  width:max-content;
  height:max-content;
  padding:9px 13px;
  border:2px solid rgba(38,83,122,.72);
  color:#5f8fb8;
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  letter-spacing:.14em;
  transform:rotate(-2deg);
}

.dossier-identity{
  display:grid;
  grid-template-columns:190px minmax(0,1fr);
  gap:28px;
  padding:28px 0;
  border-bottom:1px solid rgba(193,183,151,.18);
}

.dossier-photo-frame{
  min-height:230px;
  padding:8px;
  border:1px solid rgba(193,183,151,.3);
  background:#060606;
}

.dossier-photo-frame img{
  display:block;
  width:100%;
  height:230px;
  object-fit:cover;
  filter:grayscale(1) contrast(1.08);
}

.dossier-photo-placeholder{
  height:230px;
  display:grid;
  place-items:center;
  text-align:center;
  color:#67645b;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  line-height:1.8;
}

.dossier-name{
  margin-bottom:22px;
  font-family:'IBM Plex Mono',monospace;
  font-size:25px;
  letter-spacing:.08em;
  border-bottom:1px solid rgba(193,183,151,.18);
  padding-bottom:12px;
}

.dossier-fact-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 24px;
}

.dossier-fact{
  display:grid;
  gap:5px;
}

.dossier-fact span{
  color:#817d70;
  font-size:9px;
  letter-spacing:.13em;
}

.dossier-fact strong{
  color:#ddd8ca;
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  font-weight:400;
}

.dossier-section{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:16px;
  padding:24px 0;
  border-bottom:1px solid rgba(193,183,151,.15);
}

.dossier-section-number{
  color:#173f63;
  font-family:'IBM Plex Mono',monospace;
  font-size:18px;
}

.dossier-section h2{
  margin:0 0 9px;
  font-family:'IBM Plex Mono',monospace;
  font-size:16px;
  letter-spacing:.1em;
  font-weight:500;
}

.dossier-section-date{
  margin-bottom:12px;
  color:#817d70;
  font-size:10px;
  letter-spacing:.1em;
}

.dossier-text{
  color:#c3bfb3;
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  line-height:1.85;
}

.dossier-evidence{
  width:min(620px,100%);
  margin:20px 0 0;
  padding:9px;
  border:1px solid rgba(193,183,151,.22);
  background:#050505;
}

.dossier-evidence img{
  display:block;
  max-width:100%;
  max-height:520px;
  margin:auto;
  filter:grayscale(.7);
}

.dossier-evidence figcaption{
  padding:9px 3px 2px;
  color:#817d70;
  font-family:'IBM Plex Mono',monospace;
  font-size:9px;
  line-height:1.5;
}

.dossier-no-sections{
  padding:30px 0;
  color:#777267;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
}

.dossier-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding-top:24px;
}

.dossier-actions > div:last-child{
  display:flex;
  gap:8px;
}

.dossier-actions button{
  width:auto;
  margin:0;
}

.dossier-updated{
  color:#6f6c63;
  font-family:'IBM Plex Mono',monospace;
  font-size:9px;
  letter-spacing:.08em;
}

.dossier-editor{
  min-height:100%;
  overflow:visible;
  padding:24px;
}

.dossier-editor-head,
.dossier-editor-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
}

.dossier-editor-grid,
.dossier-section-editor-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:24px 0;
}

.dossier-field,
.dossier-editor-label{
  display:grid;
  gap:7px;
  color:#888;
  font-size:10px;
  letter-spacing:.1em;
}

.dossier-field input,
.dossier-editor textarea,
.dossier-editor > input{
  margin:0;
}

.dossier-field input[readonly]{
  color:#8d8d8d;
  background:#080808!important;
}

.dossier-editor textarea{
  width:100%;
  resize:vertical;
  padding:12px;
  border:1px solid #444;
  background:#000;
  color:#fff;
  font:inherit;
}

.dossier-image-editor{
  margin:22px 0;
  padding:16px;
  display:grid;
  grid-template-columns:minmax(220px,1fr) 180px auto;
  align-items:center;
  gap:16px;
  border:1px dashed #333;
}

.dossier-image-editor.compact{
  grid-template-columns:minmax(220px,1fr) 180px auto;
  margin-bottom:0;
}

.dossier-image-editor input{
  margin:0;
}

.dossier-image-editor button{
  width:auto;
  margin:0;
}

.dossier-image-preview{
  min-height:100px;
  display:grid;
  place-items:center;
  border:1px solid #292929;
  color:#666;
  font-size:9px;
  text-align:center;
}

.dossier-image-preview img{
  display:block;
  width:100%;
  height:120px;
  object-fit:cover;
  filter:grayscale(.75);
}

.dossier-editor-section-head{
  margin-top:26px;
  padding-top:22px;
  border-top:1px solid #333;
}

.dossier-editor-section-head button{
  width:auto;
  margin:0;
}

.dossier-section-editors{
  display:grid;
  gap:16px;
  margin-top:16px;
}

.dossier-section-editor{
  padding:18px;
  border:1px solid #333;
  background:rgba(255,255,255,.012);
}

.dossier-section-editor-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#a7a7a7;
  font-size:11px;
  letter-spacing:.1em;
}

.dossier-section-editor-head button{
  width:auto;
  margin:0;
}

.dossier-editor-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:22px;
}

.dossier-editor-actions button{
  width:auto;
  margin:0;
  border-color:#173f63;
}

@media(max-width:1050px){
  .dossier-module{
    grid-template-columns:1fr;
    height:auto;
  }

  .dossier-index{
    max-height:360px;
  }

  .dossier-identity{
    grid-template-columns:150px minmax(0,1fr);
  }
}

@media(max-width:700px){
  .dossier-paper{
    padding:20px;
  }

  .dossier-paper-head,
  .dossier-actions,
  .dossier-editor-head,
  .dossier-editor-section-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .dossier-identity{
    grid-template-columns:1fr;
  }

  .dossier-photo-frame{
    width:190px;
  }

  .dossier-fact-grid,
  .dossier-editor-grid,
  .dossier-section-editor-grid{
    grid-template-columns:1fr;
  }

  .dossier-image-editor,
  .dossier-image-editor.compact{
    grid-template-columns:1fr;
  }
}


/* PERSONALAKTEN – REGISTRATUR-LAYOUT KORREKTUR */
.dossier-module{
  grid-template-columns:360px minmax(0,1fr);
}

.dossier-index{
  padding:22px;
  overflow:hidden;
}

.dossier-index-head{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  padding-bottom:20px;
}

.dossier-index-head > div{
  min-width:0;
}

.dossier-index-title{
  margin-top:10px;
  font-size:20px;
  line-height:1.25;
  white-space:normal;
}

.dossier-new{
  width:100%;
  min-width:0;
  padding:11px 14px;
  text-align:center;
  overflow:visible;
  white-space:normal;
}

.dossier-search{
  width:100%;
  box-sizing:border-box;
  margin:18px 0 14px!important;
}

.dossier-empty-list{
  padding:20px 8px;
}

.dossier-empty{
  min-height:520px;
  padding:40px;
}

.dossier-empty .dossier-stamp{
  margin-bottom:18px;
}

.dossier-empty .facility-state{
  max-width:760px;
  text-align:center;
}

.dossier-empty .notice{
  max-width:680px;
  margin-top:8px;
  text-align:center;
}

@media(max-width:1200px){
  .dossier-module{
    grid-template-columns:320px minmax(0,1fr);
  }
}

@media(max-width:1050px){
  .dossier-module{
    grid-template-columns:1fr;
  }
}


/* KADERSTELLE – DIENSTNUMMER */
.member-form{
  grid-template-columns:minmax(220px,1fr) minmax(130px,.38fr) minmax(190px,.7fr) auto;
}

.kader-edit-table{
  min-width:1220px;
}

.kader-service-number{
  min-width:90px;
}

.kader-display-name{
  margin-top:5px;
  color:#70777e;
  font-size:9px;
  letter-spacing:.07em;
}

/* AN- / ABWESENHEIT */
.module-mount:has(.attendance-module){
  height:100%;
  min-height:0;
  overflow:hidden;
}

.attendance-module{
  height:100%;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  display:grid;
  gap:18px;
  align-content:start;
  padding-right:4px;
}

.attendance-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:26px;
}

.attendance-date-control{
  display:grid;
  grid-template-columns:minmax(170px,1fr) auto;
  gap:8px;
  align-items:end;
  min-width:310px;
}

.attendance-date-control label{
  grid-column:1/-1;
  color:#858b91;
  font-size:10px;
  letter-spacing:.11em;
}

.attendance-date-control input,
.attendance-date-control button{
  margin:0;
}

.attendance-date-control button{
  width:auto;
  border-color:#173f63;
}

.attendance-summary{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}

.attendance-summary-card{
  padding:15px 17px;
  display:grid;
  gap:5px;
  border-left:3px solid #333;
}

.attendance-summary-card strong{
  font-size:26px;
  font-weight:500;
}

.attendance-summary-card span{
  color:#858b91;
  font-size:9px;
  letter-spacing:.1em;
}

.attendance-summary-card.status-present{
  border-left-color:#4b9d68;
  background:rgba(49,118,72,.12)!important;
}

.attendance-summary-card.status-signed_off{
  border-left-color:#3f78a5;
  background:rgba(35,75,111,.14)!important;
}

.attendance-summary-card.status-vacation{
  border-left-color:#b69a4b;
  background:rgba(139,112,38,.13)!important;
}

.attendance-summary-card.status-unexcused{
  border-left-color:#a94850;
  background:rgba(126,37,44,.14)!important;
}

.attendance-summary-card.status-unset{
  border-left-color:#555;
}

.attendance-table-card{
  min-height:0;
}

.attendance-table-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px;
  margin-bottom:16px;
}

.attendance-legend{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:7px 12px;
  color:#747b81;
  font-size:9px;
  letter-spacing:.07em;
}

.attendance-dot{
  width:8px;
  height:8px;
  display:inline-block;
  border-radius:50%;
  background:#555;
}

.attendance-dot.present{background:#4b9d68}
.attendance-dot.signed_off{background:#3f78a5}
.attendance-dot.vacation{background:#b69a4b}
.attendance-dot.unexcused{background:#a94850}

.attendance-table{
  min-width:1080px;
}

.attendance-table th:nth-child(1){width:230px}
.attendance-table th:nth-child(2){width:190px}
.attendance-table th:nth-child(3){width:210px}
.attendance-table th:nth-child(4){width:auto}
.attendance-table th:nth-child(5){width:170px}

.attendance-row td:first-child{
  border-left:3px solid transparent;
}

.attendance-row.status-present td{
  background:rgba(49,118,72,.075);
}

.attendance-row.status-present td:first-child{
  border-left-color:#4b9d68;
}

.attendance-row.status-signed_off td{
  background:rgba(35,75,111,.085);
}

.attendance-row.status-signed_off td:first-child{
  border-left-color:#3f78a5;
}

.attendance-row.status-vacation td{
  background:rgba(139,112,38,.075);
}

.attendance-row.status-vacation td:first-child{
  border-left-color:#b69a4b;
}

.attendance-row.status-unexcused td{
  background:rgba(126,37,44,.09);
}

.attendance-row.status-unexcused td:first-child{
  border-left-color:#a94850;
}

.attendance-status-select,
.attendance-note{
  width:100%;
  margin:0!important;
  padding:9px 10px!important;
  border:1px solid #3d4247;
  background:#000!important;
  color:#fff;
  font:inherit;
}

.attendance-status-select.status-present{border-color:#4b9d68;color:#bde3c7}
.attendance-status-select.status-signed_off{border-color:#3f78a5;color:#b9d5ea}
.attendance-status-select.status-vacation{border-color:#9d8441;color:#e7d697}
.attendance-status-select.status-unexcused{border-color:#93434a;color:#efb4b9}

.attendance-audit{
  color:#7b8186!important;
  font-size:10px;
  line-height:1.45;
}

.attendance-audit span{
  color:#5e6469;
  font-size:9px;
}

@media(max-width:1150px){
  .attendance-summary{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .member-form{
    grid-template-columns:1fr 1fr;
  }

  .member-form button{
    grid-column:1/-1;
  }
}

@media(max-width:760px){
  .attendance-head,
  .attendance-table-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .attendance-date-control{
    width:100%;
    min-width:0;
  }

  .attendance-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .attendance-legend{
    justify-content:flex-start;
  }

  .member-form{
    grid-template-columns:1fr;
  }
}

/* ANWESENHEITSKALENDER */
.module-mount:has(.calendar-attendance){height:100%;min-height:0;overflow:hidden}.calendar-attendance{height:100%;min-height:0;overflow:auto;display:grid;gap:16px;align-content:start}.attendance-calendar-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.calendar-nav{display:flex;gap:8px}.calendar-nav button{width:auto;margin:0;border-color:#173f63}.attendance-month-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.attendance-month-summary .card{padding:12px 15px;border-left:3px solid #444}.attendance-month-summary strong{display:block;font-size:23px}.attendance-month-summary span{font-size:9px;color:#858b91;letter-spacing:.09em}.attendance-month-summary .status-present{border-left-color:#4b9d68}.attendance-month-summary .status-signed_off{border-left-color:#3f78a5}.attendance-month-summary .status-vacation{border-left-color:#b69a4b}.attendance-month-summary .status-unexcused{border-left-color:#a94850}.attendance-sheet-wrap{min-height:0;padding:14px}.attendance-sheet-scroll{overflow:auto;max-height:calc(100vh - 360px);border:1px solid #292929}.attendance-sheet{border-collapse:separate;border-spacing:0;min-width:max-content;width:100%;font-size:10px}.attendance-sheet th,.attendance-sheet td{height:39px;min-width:42px;padding:0;border-right:1px solid #292929;border-bottom:1px solid #292929;text-align:center;background:#050505}.attendance-sheet th{position:sticky;top:0;z-index:4;height:48px;background:#0a0a0a;color:#89939c;font-weight:400}.attendance-sheet th span,.attendance-sheet th strong{display:block}.attendance-sheet th strong{margin-top:4px;color:#fff}.attendance-sheet .sticky-name{position:sticky;left:0;z-index:3;min-width:210px;padding:0 13px;text-align:left;background:#080808}.attendance-sheet .sticky-rank{position:sticky;left:210px;z-index:3;min-width:165px;padding:0 12px;text-align:left;background:#080808;color:#aeb5bb}.attendance-sheet thead .sticky-name,.attendance-sheet thead .sticky-rank{z-index:6}.attendance-sheet .weekend{background:#0d1115}.attendance-cell{width:100%;height:100%;margin:0;padding:0;border:0!important;background:#050505!important;color:#555;font-size:10px}.attendance-cell:hover{outline:1px solid #5f8fb8;outline-offset:-2px}.attendance-cell.present{background:#2e7d45!important;color:#fff}.attendance-cell.signed_off{background:#24557c!important;color:#fff}.attendance-cell.vacation{background:#a88a2d!important;color:#080808}.attendance-cell.unexcused{background:#8c3038!important;color:#fff}.attendance-cell.today{box-shadow:inset 0 0 0 2px #8ab4d6}.attendance-sheet-legend{display:flex;flex-wrap:wrap;gap:18px;padding:13px 3px 0;color:#777;font-size:9px;letter-spacing:.07em}.attendance-sheet-legend span{display:flex;align-items:center;gap:6px}.attendance-sheet-legend i{width:9px;height:9px}.attendance-sheet-legend i.present{background:#2e7d45}.attendance-sheet-legend i.signed_off{background:#24557c}.attendance-sheet-legend i.vacation{background:#a88a2d}.attendance-sheet-legend i.unexcused{background:#8c3038}@media(max-width:900px){.attendance-calendar-head{align-items:flex-start;flex-direction:column}.attendance-month-summary{grid-template-columns:repeat(2,1fr)}.calendar-nav{flex-wrap:wrap}}
