:root{
  --gold:#B79B59;
  --gold-dark:#8F773D;
  --anth:#20201E;
  --beige:#EEE7D8;
  --bg:#F5F4F1;
  --white:#FFFFFF;
  --line:#D8D4CB;
  --muted:#6F6B63;
  --danger:#A53A32;
  --warn:#B66B18;
  --ok:#496B4D;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--anth)}
button,input,select{font:inherit}
.topbar{background:var(--anth);color:white;padding:18px 28px;display:flex;justify-content:space-between;align-items:center;gap:20px}
.topbar h1{margin:2px 0 0;font-size:22px}
.eyebrow,.section-label{color:var(--gold);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
main{max-width:1280px;margin:0 auto;padding:24px}
.badge{display:inline-flex;align-items:center;border:1px solid var(--gold);border-radius:999px;padding:6px 10px;font-size:12px;color:var(--gold)}
.badge.subtle{border-color:#555;color:#ddd}
.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.tab,.btn{border:1px solid var(--line);background:var(--white);color:var(--anth);border-radius:9px;padding:10px 15px;cursor:pointer}
.tab.active,.btn.primary{background:var(--gold);border-color:var(--gold);color:white;font-weight:700}
.btn.ghost{background:transparent;color:inherit}
.topbar .btn.ghost{border-color:#555;color:white}
.panel{display:none}.panel.active{display:block}
.monitor-head,.queue-head,.card-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.monitor-head h2,.queue-head h2,.card-head h2,.card-head h3{margin:4px 0}
.muted{color:var(--muted)}
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}
.kpi{background:var(--white);border:1px solid var(--line);border-radius:12px;padding:18px}
.kpi span{font-size:13px;color:var(--muted)}.kpi strong{display:block;font-size:28px;margin-top:6px}
.card{background:var(--white);border:1px solid var(--line);border-radius:12px;margin:14px 0;box-shadow:0 4px 18px rgba(32,32,30,.04);overflow:hidden}
.card-head,.queue-head{padding:18px;border-bottom:1px solid var(--line)}
.focus-row,.queue-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;padding:16px 20px;border-top:1px solid var(--line);align-items:center}
.focus-row:first-child,.queue-row:first-child{border-top:0}
.title{font-weight:700}.meta{font-size:13px;color:var(--muted);margin-top:6px;line-height:1.45}
.tags{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.tag{font-size:11px;border:1px solid var(--line);border-radius:999px;padding:5px 8px}
.tag.urgent{background:#F7DFDC;color:#8A2720}.tag.important{background:#FBE6CF;color:#955714}.tag.medium{background:#FFF2CC;color:#765C12}.tag.low{background:#E0EBDD;color:#35523A}
.bars{padding:20px}.bar-row{display:grid;grid-template-columns:minmax(110px,150px) 1fr 36px;gap:12px;align-items:center;margin:12px 0}.bar-name{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.track{height:9px;background:#E8E5DE;border-radius:999px;overflow:hidden}.fill{height:100%;background:var(--gold);border-radius:999px}
.form-card{overflow:visible}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;padding:18px}
label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}
input,select{width:100%;border:1px solid var(--line);background:white;border-radius:8px;padding:11px 12px;min-height:44px;color:var(--anth)}
.wide{grid-column:1/-1}
.prefix-input{display:flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:white}
.prefix-input span{display:flex;align-items:center;padding:0 11px;color:var(--muted);border-right:1px solid var(--line)}
.prefix-input input{border:0;border-radius:0}
.preview{background:var(--beige);border-radius:9px;padding:12px}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.message{min-height:18px;margin:0}
.queue-person{min-width:220px}
.check-wrap{display:flex;align-items:flex-start;gap:12px}
.task-check{width:22px;height:22px;accent-color:var(--gold);cursor:pointer;margin-top:2px}
.empty{padding:28px;color:var(--muted);text-align:center}
.auth-card{max-width:460px;margin:60px auto;background:white;border:1px solid var(--line);border-radius:12px;padding:24px}
.auth-card form,.stack{display:grid;gap:13px}.divider{height:1px;background:var(--line);margin:20px 0}
.hidden{display:none!important}

.employee-summary{display:grid;grid-template-columns:minmax(300px,380px) 1fr;gap:22px;padding:20px;align-items:start}
.employee-summary .bars{padding:0}
.pie-panel{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;border:1px solid var(--line);border-radius:14px;padding:22px 24px;background:#FBFAF7;position:relative;min-height:340px;overflow:hidden}
.pie-visual{position:relative;width:220px;height:220px;display:grid;place-items:center;flex:0 0 auto;margin:0 auto}
.pie-chart{position:absolute;inset:0;width:220px;height:220px;border-radius:50%;background:conic-gradient(#E8E5DE 0 100%);box-shadow:inset 0 0 0 1px rgba(0,0,0,.04)}
.pie-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin-top:0;width:92px;height:92px;border-radius:50%;background:var(--white);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;border:1px solid var(--line);box-shadow:0 2px 6px rgba(0,0,0,.05);z-index:1}
.pie-center strong{font-size:28px;line-height:1}
.pie-center span{font-size:11px;color:var(--muted);margin-top:4px;text-transform:uppercase;letter-spacing:.05em}
.pie-legend{display:grid;grid-template-columns:1fr;gap:8px;width:100%;margin-top:22px;align-self:stretch}
.pie-legend-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:10px;align-items:center;font-size:13px;padding:6px 0;border-top:1px solid rgba(0,0,0,.04)}
.legend-color{width:12px;height:12px;border-radius:50%;box-shadow:0 0 0 3px rgba(183,155,89,.08)}
.legend-name{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:8px;font-weight:600}.legend-meta{font-size:12px;color:var(--muted);min-width:42px;text-align:right}
.legend-count{font-weight:700;min-width:20px;text-align:right}
@media(max-width:760px){
  main{padding:14px}.topbar{padding:14px 16px;align-items:flex-start}.kpi-grid{grid-template-columns:repeat(2,1fr)}
  .form-grid{grid-template-columns:1fr}.wide{grid-column:auto}.queue-head,.monitor-head{flex-direction:column}.queue-person{width:100%}
  .employee-summary{grid-template-columns:1fr}.pie-panel{min-height:unset}.focus-row,.queue-row{grid-template-columns:1fr}.tags{justify-content:flex-start}.bar-row{grid-template-columns:90px 1fr 30px}
  .employee-summary{grid-template-columns:1fr;padding:14px}
  .pie-panel{min-height:auto}
  .pie-visual{width:190px;height:190px}
  .pie-chart{width:190px;height:190px}
  .pie-center{width:82px;height:82px}
}
@media(min-width:1100px){
  body.monitor-mode main{max-width:1680px;padding:28px}
  body.monitor-mode .tabs{display:none}
  body.monitor-mode #overview{display:block!important}
  body.monitor-mode .topbar{padding:22px 30px}
  body.monitor-mode .topbar h1{font-size:28px}
  body.monitor-mode .badge{font-size:13px;padding:7px 12px}
  body.monitor-mode .card-head h2{font-size:28px}
  body.monitor-mode .card-head p{font-size:16px}
  body.monitor-mode .kpi{padding:22px}
  body.monitor-mode .kpi strong{font-size:42px}
  body.monitor-mode .title{font-size:20px}
  body.monitor-mode .meta{font-size:15px}
  body.monitor-mode .focus-row{font-size:17px;padding:20px 24px}
  body.monitor-mode .employee-summary{grid-template-columns:minmax(360px,450px) 1fr;gap:26px}
  body.monitor-mode .pie-visual{width:260px;height:260px}
  body.monitor-mode .pie-chart{width:260px;height:260px}
  body.monitor-mode .pie-center{width:108px;height:108px}
  body.monitor-mode .pie-center strong{font-size:34px}
  body.monitor-mode .bar-row{margin:16px 0}
}

/* Lokale Benutzer-Simulation: nur im Testmodus sichtbar. */
.demo-switch{display:flex;align-items:center;flex-direction:row;gap:8px;color:#EEE7D8;font-size:12px;font-weight:700}
.demo-switch select{width:auto;min-width:114px;min-height:34px;padding:6px 8px;background:#343430;color:white;border-color:#666}
.demo-switch select:focus-visible{outline:2px solid var(--gold)}
.task-check:disabled{cursor:not-allowed;opacity:.35}
.queue-row.read-only{opacity:.82}
.queue-info{margin:0;padding:10px 18px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);background:#F8F6F1}
@media(max-width:760px){.demo-switch{flex-direction:column;align-items:flex-start}}

/* Version 4 – Bearbeiten & Verlauf */
.queue-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.btn.small{padding:8px 12px;font-size:13px;min-height:36px}
.btn:disabled{opacity:.5;cursor:wait}
.task-dialog{border:1px solid var(--line);border-radius:16px;padding:0;width:min(720px,calc(100% - 28px));max-height:min(90vh,850px);background:var(--white);color:var(--anth);box-shadow:0 20px 70px #0005}
.task-dialog::backdrop{background:rgba(17,19,19,.66)}
.editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 22px;background:var(--anth);color:white}
.editor-head h2{font-size:19px;margin:6px 0}.editor-head .muted{color:#D1CCC3}.icon-btn{min-width:42px;min-height:42px;padding:8px;line-height:1}
.editor-body{padding:18px 22px;max-height:calc(90vh - 135px);overflow-y:auto}
.editor-section{margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid var(--line)}.editor-section:last-child{border-bottom:0;margin-bottom:0}
.editor-section h3{font-size:16px;margin:0 0 5px}.mini{font-size:13px}.editor-form{display:grid;gap:10px;margin-top:13px}.editor-form.two-col{grid-template-columns:1fr 1fr;gap:12px}.editor-form.two-col .full{grid-column:1 / -1}
textarea{border:1px solid var(--line);padding:11px 12px;border-radius:8px;resize:vertical;font:inherit;min-height:72px;width:100%;color:var(--anth)}
.block-alert{border-left:4px solid var(--warn);background:#FFF4E7;padding:12px 14px;margin-bottom:16px;border-radius:6px}
.history-list{display:grid;gap:9px;margin-top:13px}.history-entry{padding:11px 14px;background:#F7F6F3;border:1px solid var(--line);border-radius:9px}.history-entry .history-meta{font-size:12px;color:var(--muted);margin-bottom:4px}.history-entry .history-text{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.request-row{padding:14px 18px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.request-row .actions{display:flex;gap:7px}.request-badge{background:var(--anth)}
#openRequestInfo{margin-top:10px}
@media(max-width:760px){.editor-body{padding:14px}.editor-head{padding:14px}.editor-form.two-col{grid-template-columns:1fr}.editor-form.two-col .full{grid-column:auto}}

/* Version 8: persönliches Passwort nach Mitarbeiter-Einladung */
#passwordSetupView{margin-top:38px}
#passwordSetupView .stack{display:grid;gap:14px}
#passwordSetupView .btn.primary{width:100%}
#cancelPasswordSetup{margin-top:10px}
#passwordSetupMessage{padding-top:8px}

/* Version 9: geschützter Konto-Dialog für angemeldete Cloud-Benutzer */
.account-dialog{width:min(530px,calc(100% - 24px))}
.account-dialog .editor-head .eyebrow{color:var(--gold)}
.account-dialog .editor-body h3{margin-top:0}
.account-dialog .message{line-height:1.5;overflow-wrap:anywhere}
.account-dialog .editor-form{gap:13px}
.account-dialog input{width:100%}
@media(max-width:760px){.top-actions{justify-content:flex-end}.account-dialog .editor-body{max-height:calc(90vh - 125px)}}


/* Version 13 – Mitarbeiteraufgaben für Manager */
.employee-name-link{
  font:inherit;color:inherit;font-weight:600;display:inline-block;text-align:left;
  border:0;background:none;padding:3px 0;cursor:pointer;
  text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;
  transition:color .15s,text-decoration-color .15s;
}
.employee-name-link:hover{color:var(--gold-dark);text-decoration-color:currentColor}
.employee-name-link:focus-visible{outline:2px solid var(--gold-dark);outline-offset:3px;border-radius:3px}
.employee-name-link.bar-name{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.employee-name-text{font-weight:600}
.employee-tasks-dialog{width:min(880px,calc(100% - 28px));max-height:90vh}
.employee-tasks-content{padding:0 22px 22px;max-height:calc(90vh - 110px);overflow-y:auto}
.employee-tasks-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0 16px}
.employee-tasks-metrics>div{background:#F8F6F1;border:1px solid var(--line);border-radius:10px;padding:13px 14px;display:flex;flex-direction:column;gap:4px}
.employee-tasks-metrics strong{font-size:25px;line-height:1.1}
.employee-tasks-metrics span{font-size:12px;color:var(--muted)}
.employee-tasks-toolbar{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:12px;margin-bottom:12px}
.employee-tasks-filters{display:flex;flex-wrap:wrap;gap:6px}
.employee-filter{padding:9px 12px;font-size:13px;min-height:40px}
.employee-filter.active{background:var(--anth);color:var(--white);border-color:var(--anth)}
.employee-tasks-search{flex:1;max-width:280px;min-width:180px;font-size:12px}
.employee-tasks-search input{min-height:40px;padding:8px 12px}
.employee-tasks-list{border:1px solid var(--line);border-radius:12px;overflow:hidden}
.employee-task-row{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--line);padding:15px 16px;background:white}
.employee-task-row:first-child{border-top:0}
.employee-task-main{flex:1;min-width:0;overflow-wrap:anywhere}
.employee-task-row .title{line-height:1.4}
.employee-task-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.employee-task-row .tag.done{background:#E4E9E1;color:#3D6744;border-color:#CBD7CA}
.employee-blocked{display:block;font-size:12px;color:#895010;margin-top:6px}
body.monitor-mode .employee-tasks-dialog{font-size:16px}
@media(max-width:760px){
  .employee-tasks-content{padding:0 14px 14px}
  .employee-tasks-metrics{gap:8px}
  .employee-tasks-metrics>div{padding:10px}
  .employee-tasks-metrics strong{font-size:22px}
  .employee-tasks-search{max-width:none;min-width:100%}
  .employee-task-row{flex-direction:column;align-items:flex-start}
  .employee-task-actions{justify-content:flex-start}
}


/* V16: ein einziges Fällig-am-Feld mit Vorschlägen und Kalender */
.due-field{position:relative;display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;min-width:0}
.due-single-control{display:flex;align-items:stretch;width:100%;min-height:44px;background:var(--white);border:1px solid var(--line);border-radius:9px;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.due-single-control:focus-within{border-color:var(--gold);box-shadow:0 0 0 3px rgba(183,155,89,.13)}
.due-single-control #dueDateText{flex:1;min-width:0;width:100%;border:0;border-radius:0;outline:0!important;box-shadow:none!important;background:transparent;padding:11px 12px;font-variant-numeric:tabular-nums}
.due-single-control #dueDateText[aria-invalid="true"]{color:var(--danger)}
.due-calendar-area{position:relative;display:grid;place-items:center;flex:0 0 44px;width:44px;min-height:44px;border-left:1px solid var(--line);color:var(--muted);background:#FBFAF8}
.due-calendar-area:focus-within{background:var(--beige);color:var(--anth)}
.due-native-picker{position:absolute;inset:0;width:100%;height:100%;opacity:0;z-index:2;cursor:pointer;border:0;padding:0;min-height:0}
.due-native-picker::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer}
.due-dropdown-btn{display:grid;place-items:center;flex:0 0 44px;width:44px;min-height:44px;border:0;border-left:1px solid var(--line);border-radius:0;background:#FBFAF8;color:var(--muted);cursor:pointer;padding:0}
.due-dropdown-btn:hover,.due-dropdown-btn[aria-expanded="true"]{background:var(--beige);color:var(--anth)}
.due-dropdown-btn[aria-expanded="true"] svg{transform:rotate(180deg)}
.due-suggestions{position:absolute;left:0;right:0;top:100%;z-index:50;display:grid;gap:2px;margin-top:5px;padding:6px;background:var(--white);border:1px solid var(--line);border-radius:11px;box-shadow:0 12px 32px rgba(30,29,27,.17);max-height:min(350px,55vh);overflow-y:auto}
.due-suggestions[hidden]{display:none!important}
.due-preset-option{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;border:0;border-radius:7px;background:transparent;padding:11px 12px;cursor:pointer;color:var(--anth);font-size:13px;font-weight:600}
.due-preset-option:hover,.due-preset-option:focus-visible{background:var(--beige)}
.due-preset-date{font-size:12px;font-weight:400;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:390px){.due-calendar-area,.due-dropdown-btn{flex-basis:40px;width:40px}}

/* V18 – Info-Center */
.notification-bell{position:relative;display:grid;place-items:center;width:43px;height:43px;color:#F5F2EB;background:transparent;border:1px solid #666158;border-radius:10px;cursor:pointer;flex:0 0 43px}
.notification-bell:hover,.notification-bell:focus-visible{background:#383630;border-color:var(--gold)}
.notification-count{position:absolute;right:-7px;top:-8px;min-width:21px;height:21px;display:grid;place-items:center;padding:0 5px;background:#B1493F;color:#fff;border:2px solid var(--anth);border-radius:999px;font-size:10px;font-weight:800;line-height:1}
.notification-dialog{width:min(550px,calc(100% - 24px));max-height:min(83vh,790px);padding:0;border:1px solid var(--line);border-radius:17px;background:#fff;color:var(--anth);box-shadow:0 22px 70px rgba(0,0,0,.26);overflow:hidden}
.notification-dialog::backdrop{background:rgba(20,20,19,.55)}
.notification-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:21px 21px 12px}
.notification-header h2{font-size:22px;margin:4px 0 6px}
.notification-header p{margin:0}
.notification-header .btn{font-size:17px;color:var(--anth);flex:0 0 40px;width:40px;height:40px;padding:8px}
.notification-toolbar{display:flex;justify-content:space-between;align-items:center;gap:9px;flex-wrap:wrap;padding:12px 20px;border-bottom:1px solid var(--line);background:#FBFAF7}
.notification-filters{display:flex;gap:5px}
.notification-filter{padding:8px 11px;font-size:12px;font-weight:600}
.notification-filter.active{background:var(--anth);border-color:var(--anth);color:white}
.notification-toolbar #markAllNotificationsRead{padding:8px 9px;font-size:12px}
.notification-toolbar button:disabled{opacity:.45;cursor:default}
.notification-list{max-height:min(60vh,570px);overflow-y:auto;overscroll-behavior:contain}
.notification-item{display:grid;grid-template-columns:35px minmax(0,1fr) 9px;gap:11px;align-items:start;cursor:pointer;width:100%;padding:15px 20px;text-align:left;border:0;border-bottom:1px solid #ECE8DF;background:white;color:var(--anth)}
.notification-item:hover,.notification-item:focus-visible{background:#F5F0E5}
.notification-item.is-unread{background:#FFFCF3}
.notification-item.is-unread:hover{background:#F5F0E5}
.notification-item-icon{display:grid;place-items:center;width:34px;height:34px;background:var(--beige);color:var(--gold-dark);border-radius:10px;font-size:18px;font-weight:800}
.notification-item-body{display:flex;flex-direction:column;gap:5px;line-height:1.45;min-width:0}
.notification-item-body strong{font-size:13px;font-weight:700;overflow-wrap:anywhere}
.notification-item-body>span{font-size:12px;color:var(--muted);white-space:normal;overflow-wrap:anywhere}
.notification-item-body small{font-size:11px;color:#8F8B83}
.notification-unread-dot{width:8px;height:8px;background:var(--gold-dark);border-radius:50%;margin-top:8px}
.notification-message{color:var(--danger);font-size:12px;margin:0 20px 12px;line-height:1.5}
.notification-message:empty{display:none}
@media(max-width:600px){
  .notification-dialog{width:calc(100% - 14px);max-height:calc(100dvh - 28px)}
  .notification-header{padding:17px 15px 12px}
  .notification-toolbar{padding:10px 12px}
  .notification-item{padding:14px 13px;gap:9px}
  .top-actions{gap:6px}
  .notification-bell{width:40px;height:40px;flex-basis:40px}
}

/* Version 19 – ruhige Kopfzeile ohne technische Statusanzeigen. */
.topbar #userBadge{border:0;border-radius:0;padding:3px 4px;color:#EEE7D8;font-size:13px;font-weight:600;background:none}
@media(max-width:600px){
  .topbar{gap:10px}
  .topbar h1{font-size:19px}
  .topbar #userBadge{font-size:12px;padding:2px}
}

/* Version 20 – kompakter Desktop-Überblick mit eigener Scrollregion */
#focusCard .card-head{align-items:center;gap:12px}
.focus-count{font-size:12px;color:var(--muted);background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:6px 10px;white-space:nowrap;font-weight:700}
.focus-scroll{overflow-y:auto;overscroll-behavior:contain;max-height:360px;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#B79B59 #F4F2ED}
.focus-scroll:focus-visible{outline:2px solid var(--gold);outline-offset:-2px}
.focus-row{padding:11px 14px;gap:10px;grid-template-columns:minmax(0,1fr) auto;align-items:center}
.focus-row .title{font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.focus-activity{font-weight:500}
.focus-row .meta{margin-top:3px;font-size:11.5px;line-height:1.35}
.focus-row .tags{gap:4px}
.focus-row .tag{font-size:10px;padding:4px 7px}
.focus-row .btn.small{font-size:11px;padding:6px 9px;min-height:29px}
@media(min-width:1100px){
  main{max-width:1560px;padding:14px 20px}
  .tabs{margin-bottom:10px}
  #overview.panel.active{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);grid-template-areas:"head head" "kpi kpi" "focus staff" "requests staff";column-gap:12px;row-gap:10px;align-items:start}
  #overview>.monitor-head{grid-area:head;align-items:center}
  #overview>.kpi-grid{grid-area:kpi;margin:0}
  #overview>#focusCard{grid-area:focus}
  #overview>#dueRequestsCard{grid-area:requests}
  #overview>#employeeOverviewCard{grid-area:staff}
  #overview>.card{margin:0}
  #overview .kpi{padding:11px 15px}
  #overview .kpi strong{font-size:23px;margin-top:2px}
  #overview .card-head{padding:10px 14px}
  #overview .card-head h3{font-size:15px}
  #overview .card-head p{font-size:11.5px;margin:2px 0 0}
  #focusList{max-height:clamp(220px,calc(100dvh - 495px),350px)}
  #overview .employee-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;padding:10px;align-items:start}
  #overview .pie-panel{padding:12px 10px;min-height:unset;border-radius:10px}
  #overview .pie-visual{width:150px;height:150px}
  #overview .pie-chart{width:150px;height:150px}
  #overview .pie-center{width:64px;height:64px}
  #overview .pie-center strong{font-size:20px}
  #overview .pie-legend{margin-top:10px;gap:2px}
  #overview .pie-legend-item{gap:5px;padding:3px 0;font-size:11px}
  #overview .legend-meta{font-size:10px;min-width:28px}
  #overview .legend-color{width:9px;height:9px}
  #overview .bars{padding:2px}
  #overview .bar-row{grid-template-columns:minmax(65px,100px) 1fr 24px;gap:7px;margin:10px 0;font-size:12px}
  #overview .request-row{padding:10px 14px}
  #overview #dueRequestsCard .empty{padding:9px}
  body.monitor-mode #overview.panel.active{display:grid!important}
  body.monitor-mode #overview .kpi{padding:12px 15px}
  body.monitor-mode #overview .kpi strong{font-size:26px}
  body.monitor-mode #overview .card-head h3{font-size:16px}
  body.monitor-mode #overview .card-head p{font-size:12px}
  body.monitor-mode #overview .employee-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
  body.monitor-mode #overview .pie-visual,body.monitor-mode #overview .pie-chart{width:165px;height:165px}
  body.monitor-mode #overview .pie-center{width:70px;height:70px}
  body.monitor-mode #overview .pie-center strong{font-size:22px}
  body.monitor-mode #overview .focus-row{font-size:12px;padding:10px 14px}
  body.monitor-mode #overview .title{font-size:14px}
  body.monitor-mode #overview .meta{font-size:12px}
  body.monitor-mode #overview .bar-row{margin:10px 0}
}
@media(max-width:1099px){
  #focusList{max-height:min(46vh,480px)}
}

@media(max-width:760px){
  .focus-row{grid-template-columns:minmax(0,1fr)}
  .focus-row .tags{justify-content:flex-start}
}


/* Version 22 – Ein-Klick-Abschluss mit bewusstem Erledigt-Button. */
.queue-task-main{min-width:0;overflow-wrap:anywhere}
.queue-actions .complete-action{border-color:var(--gold);color:var(--anth);background:#EEE7D8;font-weight:700;white-space:nowrap}
.queue-actions .complete-action:hover{background:#DFD0A8}
.queue-actions .complete-action:disabled{opacity:.55;cursor:wait}
.completion-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:1400;width:min(520px,calc(100% - 24px));padding:12px 14px;display:flex;align-items:center;gap:12px;background:var(--anth);color:#fff;border:1px solid #504A40;border-radius:12px;box-shadow:0 12px 32px #0004}
.completion-toast span{flex:1;min-width:0;font-size:13px;font-weight:600}
.completion-toast .btn{flex:0 0 auto;border-color:var(--gold);color:var(--anth);background:var(--beige)}
.completion-toast-close{border:0;color:inherit;background:none;cursor:pointer;font-size:22px;line-height:1;padding:3px}
.completed-section{border-top:1px solid var(--line);background:#FCFBF8}
.completed-section summary{font-size:14px;font-weight:700;cursor:pointer;padding:15px 20px;color:#514B42}
.completed-section summary:hover{background:#F5F1E9}
.completed-section summary::marker{color:var(--gold-dark)}
.completed-section summary span{font-weight:400;color:var(--muted)}
.completed-list{max-height:300px;overflow-y:auto;border-top:1px solid var(--line)}
.completed-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 20px;border-top:1px solid #E9E5DE}
.completed-row:first-child{border-top:0}
.completed-row-main{min-width:0;overflow-wrap:anywhere}
.completed-row-main strong{font-size:14px}
.completed-row-main .meta{font-size:12px;margin-top:4px}
.reopen-action{white-space:nowrap}
@media(max-width:600px){
  .completion-toast{bottom:12px;flex-wrap:wrap}
  .completed-row{align-items:flex-start;flex-direction:column}
}

@media(max-width:600px){
  .queue-actions{justify-content:flex-start}
  .queue-actions .complete-action{min-height:40px}
}


/* V23 – Einfache Reiter für offene / erledigte Aufgaben. */
.queue-status-tabs{display:flex;gap:8px;padding:14px 18px;border-bottom:1px solid var(--line);background:#FBFAF7}
.queue-status-tab{border:1px solid var(--line);border-radius:9px;background:white;color:var(--anth);font:inherit;font-size:14px;font-weight:650;cursor:pointer;min-height:44px;padding:10px 17px;transition:background .15s,color .15s}
.queue-status-tab span{font-size:12px;opacity:.75;font-variant-numeric:tabular-nums}
.queue-status-tab.active{background:var(--anth);border-color:var(--anth);color:#fff}
.queue-status-tab:not(.active):hover{background:var(--beige)}
.queue-status-tab:focus-visible{outline:2px solid var(--gold-dark);outline-offset:2px}
#queueDonePanel .completed-list{max-height:none;border-top:0;background:#fff}
#queueDonePanel .completed-row:first-child{border-top:0}
@media(max-width:480px){.queue-status-tabs{padding:10px 12px}.queue-status-tab{flex:1;padding:10px 8px;font-size:13px}}


/* V24 – Responsive Desktop-/iPhone-Oberfläche, ohne getrennte App-Versionen. */
.nav-icon{display:none}
.account-actions{display:contents}
.mobile-menu-toggle{display:none}

@media(max-width:760px){
  html{min-width:320px;-webkit-text-size-adjust:100%}
  body{min-width:320px;overflow-x:hidden}
  body:not(.monitor-mode) main{padding:12px 12px calc(92px + env(safe-area-inset-bottom, 0px));max-width:100%}
  .topbar{padding:calc(11px + env(safe-area-inset-top, 0px)) 12px 11px;gap:10px;align-items:center;min-height:66px;position:relative;z-index:100}
  .topbar>div:first-child{min-width:0}
  .topbar .eyebrow{font-size:10px;letter-spacing:.13em}
  .topbar h1{font-size:17px;line-height:1.2;white-space:nowrap}
  .top-actions{flex:0 0 auto;justify-content:flex-end;flex-wrap:nowrap;gap:8px}
  .topbar #userBadge{display:none}
  .notification-bell{width:42px;height:42px;flex:0 0 42px;border-color:#6A6257}
  .mobile-menu-toggle{display:grid;place-items:center;color:#F5F2EB;background:transparent;border:1px solid #6A6257;border-radius:10px;width:42px;height:42px;padding:0;cursor:pointer}
  .mobile-menu-toggle.hidden{display:none}
  .account-actions{display:none;position:absolute;right:12px;top:calc(100% - 2px);min-width:190px;padding:8px;background:#2A2A27;border:1px solid #59554D;border-radius:12px;box-shadow:0 12px 30px #0004;z-index:220}
  .account-actions.open{display:flex;flex-direction:column;gap:5px}
  .topbar .account-actions .btn.ghost{display:block;width:100%;text-align:left;color:#fff;padding:12px;font-size:14px;border-color:transparent;background:transparent;min-height:44px}
  .topbar .account-actions .btn.ghost.hidden{display:none}
  .topbar .account-actions .btn.ghost:hover{background:#444039}

  /* Feste Bottom-Navigation: drei unmittelbare Touch-Ziele. */
  #appView>.tabs{position:fixed;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:2px;margin:0;padding:7px 7px calc(7px + env(safe-area-inset-bottom, 0px));background:#fff;border-top:1px solid var(--line);box-shadow:0 -5px 16px #00000010;z-index:950}
  #appView>.tabs .tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:58px;padding:6px 2px;border:0;border-radius:10px;background:transparent;color:#6C675E;font-size:11px;font-weight:650;line-height:1.2;text-align:center}
  #appView>.tabs .tab .nav-icon{display:block;flex:0 0 auto}
  #appView>.tabs .tab.active{background:#F4EBDD;color:#644D22}
  #appView>.tabs .tab:focus-visible{outline:2px solid var(--gold-dark);outline-offset:-2px}
  #appView>.tabs .tab span{white-space:nowrap;font-size:11px}

  /* Übersicht: gute Lesbarkeit auf schmalen Displays. */
  .monitor-head{flex-direction:row;align-items:center;flex-wrap:wrap;gap:6px}
  .monitor-head h2{font-size:20px;margin:2px 0}
  #todayLabel{font-size:12px}
  /* Mobile KPI-Kacheln: circa 21 % weniger Hoehe und weniger Leerraum. */
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:10px 0}

  /* Mittig ausgerichtete Kennzahlen bleiben auf dem iPhone gut lesbar. */
  .kpi{padding:9px 12px;min-width:0;min-height:88px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}
  .kpi span,.kpi strong{text-align:center;width:100%}
  .kpi span{font-size:12px}
  .kpi strong{font-size:26px;margin-top:3px;line-height:1.15}
  .card{margin:10px 0;border-radius:12px;min-width:0}
  .card-head,.queue-head{padding:13px 14px;gap:8px}
  .card-head h2,.queue-head h2{font-size:19px}
  #overview .card-head{flex-wrap:wrap}
  #overview .card-head p{margin:3px 0 0;font-size:12px;line-height:1.35}
  #focusList{max-height:min(320px,43dvh);scrollbar-gutter:auto;overscroll-behavior:contain}
  .focus-row{padding:12px 13px;gap:9px}
  .focus-row .title{font-size:13px}
  .focus-row .meta{font-size:12px}
  .focus-row .btn.small{min-height:40px;padding:9px 11px;font-size:12px}
  .employee-summary{grid-template-columns:1fr;padding:12px;gap:14px}
  .pie-panel{padding:13px;min-height:0}
  .pie-visual,.pie-chart{width:180px;height:180px}
  .pie-center{width:79px;height:79px}
  .pie-legend-item{min-height:39px}
  .bar-row{grid-template-columns:minmax(80px,105px) 1fr 24px;gap:8px;font-size:12px}
  .bar-name,.legend-name{white-space:normal;overflow-wrap:anywhere}
  .employee-name-link{min-height:36px;display:flex;align-items:center}

  /* Schnelle Aufgabenanlage ohne iOS-Tastatur-Zoom. */
  .form-card .card-head{padding:13px 14px}
  .form-card .card-head p{font-size:12px;line-height:1.5}
  .form-grid{grid-template-columns:minmax(0,1fr);padding:12px 14px 16px;gap:13px}
  .form-grid>.wide{grid-column:auto}
  input,select,textarea{font-size:16px;min-height:46px;max-width:100%}
  .due-single-control{min-height:46px}
  .due-single-control #dueDateText{font-size:16px}
  .due-calendar-area,.due-dropdown-btn{min-height:46px}
  .form-grid .actions .btn{min-height:46px;flex:1}
  .form-grid .actions .btn.primary{flex:2}
  .due-suggestions{max-height:min(290px,42dvh)}
  .due-preset-option{min-height:44px}

  /* Meine Aufgaben: lesbare Karten, klarer Abschluss, volle Touch-Flächen. */
  .queue-head{flex-direction:column}
  .queue-person{min-width:0;width:100%}
  .queue-create-btn{min-height:44px;margin-top:10px}
  .queue-status-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:11px 12px}
  .queue-status-tab{font-size:14px;min-height:46px}
  .queue-row{grid-template-columns:1fr;padding:14px 13px;gap:12px}
  .queue-actions{justify-content:flex-start;gap:8px}
  .queue-actions .btn{min-height:44px}
  .queue-actions .complete-action{min-height:44px;padding:10px 15px}
  .completed-row{padding:13px 14px;gap:12px}
  .reopen-action{min-height:44px}
  .completion-toast{bottom:calc(83px + env(safe-area-inset-bottom, 0px));width:calc(100% - 24px);padding:10px 12px;gap:8px}
  .completion-toast .btn{min-height:42px}
  .completion-toast span{font-size:12px}

  /* Info-Center und Detaildialoge nutzen möglichst viel Bildschirmfläche. */
  .notification-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 28px - env(safe-area-inset-top, 0px));border-radius:14px}
  .notification-list{max-height:calc(100dvh - 225px);-webkit-overflow-scrolling:touch}
  .notification-toolbar{gap:6px}
  .notification-toolbar #markAllNotificationsRead{font-size:11px}
  .task-dialog,.employee-tasks-dialog,.account-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 20px);border-radius:14px}
  .editor-body{max-height:calc(100dvh - 145px);overflow-y:auto;-webkit-overflow-scrolling:touch}
  .employee-tasks-content{max-height:calc(100dvh - 115px);padding:0 12px 12px}
  .employee-tasks-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .employee-tasks-metrics>div{padding:10px 8px}
  .employee-tasks-metrics strong{font-size:20px}
  .employee-tasks-toolbar{flex-direction:column;align-items:stretch}
  .employee-tasks-search{max-width:none;width:100%}
  .employee-task-row{padding:12px;gap:9px}
  .employee-task-actions .btn{min-height:42px}
  .auth-card{margin:18px auto;padding:20px 17px}
  .auth-card .btn.primary{min-height:46px}
}
@media(max-width:370px){
  .topbar h1{font-size:15px}
  .topbar .eyebrow{font-size:9px}
  #appView>.tabs .tab span{font-size:10px}
  .due-calendar-area,.due-dropdown-btn{flex:0 0 42px;width:42px}
}
@media(min-width:761px){
  .mobile-menu-toggle{display:none!important}
}
@media(display-mode:standalone){
  /* Eine auf dem Homescreen gestartete Web-App nutzt den sicheren Anzeigebereich. */
  body{min-height:100dvh}
}


/* Co-Vision V1.1.5: Wochenüberblick im persönlichen Aufgabenbereich. */
.week-overview{padding:15px 18px 12px;background:#FBFAF7;border-bottom:1px solid var(--line)}
.week-overview-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.week-overview-heading .section-label{color:var(--gold-dark)}
.period-tabs{display:flex;flex-wrap:wrap;gap:7px}
.period-tab{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--anth);padding:10px 14px;min-height:44px;font:inherit;font-size:13px;font-weight:650;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.period-tab:hover:not(.active){background:var(--beige)}
.period-tab.active{background:var(--anth);color:#fff;border-color:var(--anth)}
.period-tab:focus-visible{outline:2px solid var(--gold-dark);outline-offset:2px}
.period-count{display:inline-flex;align-items:center;justify-content:center;min-width:23px;min-height:22px;border-radius:6px;background:#F0EEE9;color:var(--anth);font-weight:750;font-size:11px;padding:2px 5px;font-variant-numeric:tabular-nums}
.period-tab.active .period-count{color:var(--anth);background:#E6D9B9}
.week-summary{margin:10px 0 0;color:var(--muted);font-size:12px;line-height:1.4}
.queue-week-heading{padding:10px 18px;background:#F8F6F1;color:var(--muted);font-weight:750;font-size:12px;letter-spacing:.02em;display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line)}
.queue-overdue-heading{color:var(--danger);background:#F9EDEA}
.queue-week-heading span{font-variant-numeric:tabular-nums}
.employee-week-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-top:14px;margin-bottom:14px}
.employee-week-bar .period-tab{padding:9px 11px;min-height:40px}
@media(max-width:600px){
  .week-overview{padding:13px 12px 11px}
  .week-overview-heading{gap:5px}
  .week-overview-heading .mini{font-size:12px}
  .period-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%}
  .period-tab{min-width:0;padding:9px 6px;font-size:12px;gap:4px;white-space:normal;text-align:center}
  .period-count{min-width:20px}
  .queue-week-heading{padding:10px 13px}
  .employee-week-bar{align-items:stretch}
  .employee-week-bar .period-tab{padding:8px 4px;font-size:12px}
}

/* V1.1.6 – Wochenfilter ausschließlich unter dem Reiter "Offen". */
#queueOpenPanel > .week-overview{background:#FBFAF7;border-bottom:1px solid var(--line);padding-top:12px}
#queueOpenPanel > .week-overview .week-overview-heading{margin-bottom:8px}
#queueDonePanel > .week-overview{display:none}

/* Baupilot CSS-Fix – Status-Kapseln in der mobilen Fokusliste vertikal zentrieren.
   Die umgebende Flex-Reihe kann die Kapseln auf Button-Höhe strecken.
   Inline-Flex richtet den Text dennoch in der Mitte der Kapsel aus. */
@media (max-width:760px){
  #focusList .focus-row .tags .tag{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    line-height:1.25;
  }
}
