:root{
  color-scheme:dark;
  --bg:#0d0d0d;--bg-soft:#141414;--panel:#1d1d1d;--panel-2:#232323;--line:rgba(255,255,255,.10);--line-strong:rgba(255,255,255,.18);
  --text:#f8f8f8;--muted:#a9a9ad;--muted-2:#77777c;--red:#d8323d;--red-soft:rgba(216,50,61,.15);--green:#3ac37b;--green-soft:rgba(58,195,123,.14);--blue:#4f91e8;--blue-soft:rgba(79,145,232,.15);--orange:#ef9d42;--orange-soft:rgba(239,157,66,.16);
  font-family:Arial,Helvetica,sans-serif;
}
*{box-sizing:border-box} body{min-width:320px;min-height:100vh;margin:0;background:radial-gradient(800px 500px at 92% -10%,rgba(216,50,61,.14),transparent 60%),linear-gradient(180deg,#0c0c0c 0%,#111 100%);color:var(--text)} button,input,select,textarea{font:inherit} button{cursor:pointer} .is-hidden{display:none!important}
.boot-screen,.auth-layout{min-height:100vh;display:grid;place-items:center;padding:22px}.boot-card{display:flex;align-items:center;gap:16px;min-width:min(100%,370px);padding:18px 20px;border:1px solid var(--line);border-radius:17px;background:rgba(28,28,28,.92);box-shadow:0 24px 80px rgba(0,0,0,.38)}.boot-card strong,.boot-card span{display:block}.boot-card span{margin-top:3px;color:var(--muted);font-size:.9rem}.boot-logo{width:48px;height:48px;object-fit:contain;border-radius:10px;background:#fff;padding:3px}
.auth-layout{background:linear-gradient(125deg,rgba(255,255,255,.03),transparent 42%),radial-gradient(820px 450px at 100% 0%,rgba(216,50,61,.18),transparent 58%)}.auth-panel{width:min(100%,480px);padding:clamp(26px,6vw,48px);border:1px solid var(--line);border-radius:24px;background:linear-gradient(145deg,rgba(35,35,35,.98),rgba(20,20,20,.98));box-shadow:0 32px 90px rgba(0,0,0,.5)}.auth-panel.compact{max-width:455px}.auth-brand{display:flex;align-items:center;gap:14px;margin-bottom:26px}.auth-brand img{width:58px;height:58px;object-fit:contain;background:#fff;border-radius:12px;padding:4px}.auth-brand p,.eyebrow{margin:0;color:var(--muted);font-size:.72rem;letter-spacing:.105em;font-weight:800;text-transform:uppercase}.auth-brand h1{margin:3px 0 0;font-size:1.45rem}.auth-panel h2{margin:16px 0 10px;font-size:clamp(1.75rem,5vw,2.35rem);line-height:1.1}.auth-copy{margin:0;color:#d3d3d4;line-height:1.58}
.environment-badge,.status-badge,.pill{display:inline-flex;align-items:center;border:1px solid rgba(216,50,61,.50);border-radius:999px;padding:5px 10px;background:var(--red-soft);color:#ffd4d7;font-size:.78rem;font-weight:800}.environment-badge.warning{border-color:rgba(239,157,66,.5);background:var(--orange-soft);color:#ffddbb}.pill{white-space:nowrap;background:rgba(255,255,255,.04);border-color:var(--line-strong);color:#dcdcdf}.pill.green,.status-badge{border-color:rgba(58,195,123,.42);background:var(--green-soft);color:#baf1d1}.pill.orange{border-color:rgba(239,157,66,.5);background:var(--orange-soft);color:#ffddb2}.pill.red{border-color:rgba(216,50,61,.45);background:var(--red-soft);color:#ffd1d4}.pill.blue{border-color:rgba(79,145,232,.45);background:var(--blue-soft);color:#c3ddff}
.login-form{display:grid;gap:9px;margin-top:28px}.login-form label,.form-grid label{margin-top:8px;font-size:.88rem;font-weight:700;color:#e8e8e9}.login-form input,.form-grid input,.form-grid select,.form-grid textarea,.list-search{width:100%;min-height:44px;padding:0 13px;border:1px solid var(--line-strong);border-radius:10px;color:var(--text);background:#111;outline:none}.form-grid textarea{min-height:94px;padding-top:10px;resize:vertical}.login-form input:focus,.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.list-search:focus{border-color:rgba(216,50,61,.92);box-shadow:0 0 0 3px rgba(216,50,61,.13)}.password-field{position:relative}.password-field input{padding-right:53px}
.primary-button,.secondary-button,.icon-button,.table-button{border:1px solid transparent;transition:transform .16s ease,background .16s ease,border-color .16s ease}.primary-button:active,.secondary-button:active,.icon-button:active,.table-button:active{transform:translateY(1px)}.primary-button{display:flex;justify-content:space-between;align-items:center;min-height:45px;padding:0 15px;border-radius:10px;color:#fff;background:linear-gradient(135deg,#d8323d,#a91923);font-weight:800}.primary-button:hover{background:linear-gradient(135deg,#e4424c,#bf202b)}.primary-button[disabled]{cursor:wait;opacity:.63}.secondary-button{min-height:38px;padding:0 12px;border-color:var(--line-strong);border-radius:9px;color:var(--text);background:rgba(255,255,255,.025);font-weight:700}.secondary-button:hover{background:rgba(255,255,255,.07)}.danger-button{border-color:rgba(216,50,61,.42);color:#ffd2d4;background:var(--red-soft)}.icon-button{display:inline-grid;place-items:center;width:38px;height:38px;border-color:var(--line-strong);border-radius:10px;color:var(--text);background:rgba(255,255,255,.03)}.password-field .icon-button{position:absolute;right:5px;top:3px;border:0;background:transparent}.icon-button:hover,.table-button:hover{background:rgba(255,255,255,.08)}.form-message{min-height:20px;margin:13px 0 0;color:var(--muted);font-size:.88rem}.form-message.error{color:#ff959b}.auth-note{margin-top:26px;padding:13px;border-left:3px solid var(--red);border-radius:7px;background:rgba(255,255,255,.03);color:var(--muted);font-size:.84rem;line-height:1.5}
.app-layout{min-height:100vh}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;min-height:72px;padding:0 24px;border-bottom:1px solid var(--line);background:rgba(14,14,14,.92);backdrop-filter:blur(14px)}.brand-link{display:flex;align-items:center;gap:11px;color:inherit;text-decoration:none}.brand-link img{width:40px;height:40px;object-fit:contain;border-radius:8px;background:#fff;padding:3px}.brand-link span,.user-text{display:grid;gap:1px}.brand-link b{font-size:1.02rem}.brand-link small,.user-text small{color:var(--muted);font-size:.74rem}.topbar-actions{display:flex;align-items:center;gap:9px}.user-chip{display:flex;align-items:center;gap:8px}.user-initials{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;color:#ffdcde;background:var(--red-soft);border:1px solid rgba(216,50,61,.45);font-weight:800;font-size:.78rem}.user-text b{font-size:.84rem}.logout-button{font-size:1.2rem}
.app-shell{display:grid;grid-template-columns:238px minmax(0,1fr);min-height:calc(100vh - 72px)}.sidebar{display:flex;flex-direction:column;gap:5px;padding:18px 13px;border-right:1px solid var(--line);background:rgba(15,15,15,.75)}.nav-item{display:flex;align-items:center;gap:11px;min-height:44px;padding:0 11px;border:1px solid transparent;border-radius:9px;color:#d8d8da;text-align:left;background:transparent;font-size:.93rem;font-weight:700}.nav-item>span{width:17px;font-size:1.15rem;text-align:center}.nav-item.active{border-color:rgba(216,50,61,.30);background:var(--red-soft);color:#fff}.nav-item.disabled{cursor:not-allowed;color:#777}.nav-item em{margin-left:auto;color:#888;font-size:.65rem;font-style:normal;font-weight:800;text-transform:uppercase}.sidebar-foot{margin-top:auto;padding:11px;color:#777;font-size:.75rem}
.content{width:min(1440px,100%);margin:0 auto;padding:clamp(22px,4vw,42px)}.page-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:25px}.page-heading h2{margin:5px 0 4px;font-size:clamp(1.7rem,4vw,2.45rem);line-height:1.08}.muted{color:var(--muted)}.page-heading .muted{margin:0}.heading-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.app-alert{margin:0 0 20px;padding:13px 15px;border:1px solid rgba(239,157,66,.40);border-radius:10px;background:var(--orange-soft);color:#ffddbb;font-size:.9rem}.app-alert.error{border-color:rgba(216,50,61,.45);background:var(--red-soft);color:#ffd1d4}.app-alert.success{border-color:rgba(58,195,123,.42);background:var(--green-soft);color:#baf1d1}
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.kpi-card,.panel-card{border:1px solid var(--line);border-radius:15px;background:linear-gradient(145deg,rgba(35,35,35,.98),rgba(26,26,26,.98));box-shadow:0 12px 35px rgba(0,0,0,.16)}.kpi-card{display:flex;gap:13px;align-items:flex-start;padding:17px}.kpi-card small,.kpi-card span{display:block}.kpi-card small{color:#dcdcdf;font-size:.78rem;font-weight:700}.kpi-card strong{display:block;margin:2px 0;font-size:2rem;line-height:1}.kpi-card span:not(.kpi-icon){color:var(--muted);font-size:.72rem;line-height:1.35}.kpi-icon{display:grid;flex:0 0 auto;place-items:center;width:36px;height:36px;border-radius:10px;font-weight:900}.kpi-icon.red{color:#ffced1;background:var(--red-soft)}.kpi-icon.green{color:#a9f1c9;background:var(--green-soft)}.kpi-icon.blue{color:#b7d8ff;background:var(--blue-soft)}.kpi-icon.orange{color:#ffddb2;background:var(--orange-soft)}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:14px;margin-top:14px}.panel-card{padding:19px}.panel-card.wide{grid-column:span 1}.panel-head{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:17px}.panel-head h3{margin:4px 0 0;font-size:1.1rem}.status-list{display:grid;gap:13px}.status-list>div{display:flex;align-items:start;gap:10px}.status-check{display:grid;flex:0 0 auto;place-items:center;width:22px;height:22px;border-radius:99px;color:#aef3cc;background:var(--green-soft);font-size:.78rem;font-weight:900}.status-list b,.status-list small{display:block}.status-list b{margin-top:1px;font-size:.88rem}.status-list small{margin-top:2px;color:var(--muted);font-size:.78rem;line-height:1.4}.roadmap{display:grid;gap:10px;margin:2px 0 0;padding:0;list-style:none;counter-reset:steps}.roadmap li{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:.86rem}.roadmap li::before{counter-increment:steps;content:counter(steps);display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--line-strong);border-radius:50%;color:#c5c5c8;font-size:.7rem;font-weight:800}.roadmap li.done{color:#b7eccc}.roadmap li.done::before{content:"✓";border-color:rgba(58,195,123,.45);background:var(--green-soft);color:#aef3cc}
.empty-state{display:grid;place-items:center;min-height:148px;border:1px dashed var(--line-strong);border-radius:12px;color:var(--muted);text-align:center}.empty-state span{font-size:1.7rem;opacity:.7}.empty-state p{margin:8px 16px 0;font-size:.9rem}.data-panel{border:1px solid var(--line);border-radius:15px;background:linear-gradient(145deg,rgba(35,35,35,.98),rgba(26,26,26,.98));overflow:hidden}.data-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px;border-bottom:1px solid var(--line)}.toolbar-left{display:flex;align-items:center;gap:9px;flex:1}.list-search{max-width:380px;min-height:39px}.filter-select{min-height:39px;max-width:180px;padding:0 10px;border:1px solid var(--line-strong);border-radius:9px;background:#111;color:var(--text)}.data-note{padding:10px 15px;color:var(--muted);font-size:.78rem;border-bottom:1px solid var(--line)}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;white-space:nowrap}.data-table th,.data-table td{padding:13px 14px;border-bottom:1px solid var(--line);text-align:left;font-size:.86rem}.data-table th{position:sticky;top:0;background:#202020;color:#c7c7ca;font-size:.72rem;letter-spacing:.05em;text-transform:uppercase}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:rgba(255,255,255,.025)}.table-title{font-weight:800}.table-sub{display:block;margin-top:3px;color:var(--muted);font-size:.76rem}.table-button{min-height:32px;padding:0 9px;border:1px solid var(--line-strong);border-radius:8px;background:rgba(255,255,255,.03);color:#fff;font-size:.78rem;font-weight:700}.table-button+ .table-button{margin-left:6px}.table-button.danger{border-color:rgba(216,50,61,.42);color:#ffd1d4;background:var(--red-soft)}
.modal-backdrop{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:16px;background:rgba(0,0,0,.70);backdrop-filter:blur(4px)}.modal{width:min(100%,800px);max-height:min(90vh,900px);overflow:auto;border:1px solid var(--line-strong);border-radius:18px;background:linear-gradient(145deg,#292929,#171717);box-shadow:0 32px 90px rgba(0,0,0,.65)}.modal-head{display:flex;justify-content:space-between;align-items:start;gap:14px;padding:20px 21px 15px;border-bottom:1px solid var(--line)}.modal-head h3{margin:3px 0 0;font-size:1.28rem}.modal-body{padding:19px 21px 22px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.form-grid .full{grid-column:1/-1}.form-grid label{display:grid;gap:6px;margin:0}.form-grid small{color:var(--muted);font-size:.74rem;font-weight:400}.form-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}.form-actions .right{display:flex;gap:9px}.confirm-text{margin:0;color:#ddd;line-height:1.55}.section-row{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:20px 0 10px}.section-row h4{margin:0;font-size:.94rem}.divider{height:1px;margin:18px 0;background:var(--line)}
@media(max-width:1100px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr}}@media(max-width:760px){.topbar{min-height:62px;padding:0 13px}.brand-link small,.user-text{display:none}.app-shell{display:block;min-height:auto}.sidebar{position:sticky;top:62px;z-index:12;flex-direction:row;overflow-x:auto;padding:8px 10px;border-right:0;border-bottom:1px solid var(--line)}.nav-item{flex:0 0 auto;min-height:38px;padding:0 9px;font-size:.78rem}.nav-item em{display:none}.sidebar-foot{display:none}.content{padding:22px 13px 35px}.page-heading{align-items:start;flex-direction:column;margin-bottom:19px}.heading-actions{width:100%}.heading-actions .primary-button,.heading-actions .secondary-button{flex:1;justify-content:center}.kpi-grid{grid-template-columns:1fr;gap:10px}.panel-card{padding:16px}.auth-layout{padding:13px}.auth-panel{border-radius:18px}.data-toolbar{align-items:stretch;flex-direction:column}.toolbar-left{width:100%;flex-direction:column;align-items:stretch}.list-search,.filter-select{max-width:none}.form-grid{grid-template-columns:1fr}.modal-backdrop{align-items:end;padding:0}.modal{width:100%;max-height:94vh;border-radius:18px 18px 0 0}.modal-body,.modal-head{padding-left:16px;padding-right:16px}.form-actions{align-items:stretch;flex-direction:column-reverse}.form-actions .right{display:grid;grid-template-columns:1fr 1fr;width:100%}.form-actions>.secondary-button{width:100%}}


/* V4 – Mietaufträge anlegen und bearbeiten */
.inline-control{display:flex;gap:8px;align-items:center}.inline-control select{flex:1}.label-action{float:right}.link-button{padding:0;border:0;color:#ffb9bd;background:transparent;text-decoration:underline;font-size:.78rem;font-weight:700;cursor:pointer}.transport-options{display:grid;grid-template-columns:1.5fr repeat(3,minmax(0,1fr));gap:12px;margin:19px 0;padding:15px;border:1px solid var(--line);border-radius:12px;background:rgba(0,0,0,.12)}.transport-options>div{grid-row:span 2}.transport-options strong,.transport-options small{display:block}.transport-options strong{font-size:.9rem}.transport-options small{margin-top:4px;color:var(--muted);font-size:.76rem;line-height:1.38}.transport-options label,.rental-notes{display:grid;gap:6px;margin:0;color:#e8e8e9;font-size:.82rem;font-weight:700}.transport-options input,.rental-notes textarea{width:100%;min-height:42px;padding:0 11px;border:1px solid var(--line-strong);border-radius:9px;color:var(--text);background:#111;outline:none}.transport-options input:focus,.rental-notes textarea:focus{border-color:rgba(216,50,61,.92);box-shadow:0 0 0 3px rgba(216,50,61,.13)}.transport-options .switch-label{display:flex;align-items:center;gap:8px;padding-top:20px}.transport-options .switch-label input,.item-toggle input{width:auto;min-height:0;accent-color:var(--red)}.rental-items{display:grid;gap:12px}.rental-item-editor{padding:14px;border:1px solid var(--line);border-radius:12px;background:rgba(0,0,0,.13)}.rental-item-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.rental-item-heading strong{font-size:.88rem}.rental-item-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.rental-item-grid label{display:grid;gap:6px;margin:0;color:#e8e8e9;font-size:.78rem;font-weight:700}.rental-item-grid select,.rental-item-grid input{width:100%;min-height:40px;padding:0 10px;border:1px solid var(--line-strong);border-radius:8px;color:var(--text);background:#111;outline:none}.rental-item-grid select:focus,.rental-item-grid input:focus{border-color:rgba(216,50,61,.92);box-shadow:0 0 0 3px rgba(216,50,61,.13)}.rental-item-grid .wide{grid-column:span 2}.rental-item-grid .item-toggle{display:flex;align-items:center;gap:8px;padding-top:21px}.rental-notes{margin-top:18px}.rental-notes textarea{min-height:84px;padding-top:10px;resize:vertical}.compact-modal{width:min(100%,620px)}.quick-customer-layer{z-index:150}.rental-conflict-message{line-height:1.55}
@media(max-width:980px){.transport-options{grid-template-columns:repeat(2,minmax(0,1fr))}.transport-options>div{grid-column:1/-1;grid-row:auto}.rental-item-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.inline-control{align-items:stretch;flex-direction:column}.transport-options,.rental-item-grid{grid-template-columns:1fr}.transport-options .switch-label{padding-top:0}.rental-item-grid .wide{grid-column:auto}.label-action{float:none;display:block;margin-top:5px}.section-row{align-items:start;flex-direction:column}.section-row>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}}


/* ==========================================================================
   V5 – Mietkalender
   ========================================================================== */
.calendar-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(35,35,35,.98), rgba(26,26,26,.98));
  box-shadow: 0 12px 35px rgba(0,0,0,.16);
}

.calendar-toolbar,
.calendar-filterbar,
.calendar-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.calendar-toolbar {
  justify-content: space-between;
}

.calendar-navigation,
.calendar-range-options {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.calendar-navigation strong {
  margin-left: 5px;
  color: #e7e7e9;
  font-size: .9rem;
}

.calendar-range-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #d7d7da;
  background: rgba(255,255,255,.025);
  font-size: .78rem;
  font-weight: 800;
}

.calendar-range-button:hover,
.calendar-range-button.active {
  border-color: rgba(216,50,61,.45);
  color: #fff;
  background: var(--red-soft);
}

.calendar-filterbar {
  align-items: stretch;
  flex-wrap: wrap;
}

.calendar-filterbar .list-search {
  min-width: min(100%, 280px);
  flex: 1 1 280px;
  max-width: 430px;
}

.calendar-filterbar .filter-select {
  min-width: 165px;
}

.calendar-filterbar .muted {
  align-self: center;
  margin-left: auto;
  font-size: .8rem;
}

.calendar-legend {
  flex-wrap: wrap;
  color: #d4d4d7;
  font-size: .78rem;
}

.calendar-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend small {
  margin-left: auto;
  color: var(--muted);
  font-size: .74rem;
}

.legend-booking,
.legend-transport {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 4px;
}

.legend-booking.request { background: rgba(79,145,232,.72); }
.legend-booking.reserved { background: rgba(239,157,66,.76); }
.legend-booking.rented { background: rgba(58,195,123,.76); }
.legend-booking.pickup { background: rgba(216,50,61,.76); }

.legend-transport {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: #fff;
  font-size: .65rem;
  font-weight: 900;
}

.legend-transport.delivery { background: #4f91e8; }
.legend-transport.pickup { background: #ef9d42; }

.calendar-scroller {
  overflow: auto;
  max-height: calc(100vh - 285px);
  min-height: 310px;
  background: #171717;
}

.calendar-board {
  min-width: calc(245px + (var(--calendar-days) * 72px));
}

.calendar-header-row,
.calendar-row {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
}

.calendar-header-row {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #242424;
  border-bottom: 1px solid var(--line-strong);
}

.calendar-device-heading,
.calendar-device {
  position: sticky;
  left: 0;
  z-index: 5;
  border-right: 1px solid var(--line-strong);
}

.calendar-device-heading {
  display: flex;
  align-items: center;
  min-height: 51px;
  padding: 0 15px;
  background: #242424;
  color: #cdcdcf;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.calendar-day-headings,
.calendar-day-cells {
  display: grid;
  grid-template-columns: repeat(var(--calendar-days), minmax(72px, 1fr));
}

.calendar-day-heading {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 51px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.calendar-day-heading b {
  margin-top: 3px;
  color: #eeeeef;
  font-size: .78rem;
}

.calendar-day-heading.weekend {
  background: rgba(255,255,255,.025);
}

.calendar-day-heading.today {
  color: #ffd9db;
  background: rgba(216,50,61,.15);
}

.calendar-day-heading.today b {
  color: #fff;
}

.calendar-row {
  min-height: 74px;
  border-bottom: 1px solid var(--line);
}

.calendar-device {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 74px;
  padding: 9px 15px;
  background: #202020;
}

.calendar-device b {
  color: #fff;
  font-size: .86rem;
}

.calendar-device span {
  overflow: hidden;
  color: #d0d0d2;
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-device small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: .69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-track {
  position: relative;
  min-height: 74px;
  background: #1a1a1a;
}

.calendar-day-cells {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.calendar-day-cell {
  display: block;
  height: 100%;
  border-right: 1px solid rgba(255,255,255,.07);
}

.calendar-day-cell.weekend {
  background: rgba(255,255,255,.025);
}

.calendar-day-cell.today {
  background: rgba(216,50,61,.10);
  box-shadow: inset 1px 0 0 rgba(216,50,61,.50), inset -1px 0 0 rgba(216,50,61,.50);
}

.calendar-booking {
  position: absolute;
  z-index: 3;
  top: 27px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 7px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.20);
  text-align: left;
  white-space: nowrap;
}

.calendar-booking:hover {
  z-index: 4;
  filter: brightness(1.14);
  transform: translateY(-1px);
}

.calendar-booking b,
.calendar-booking span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-booking b {
  flex: 0 0 auto;
  font-size: .7rem;
}

.calendar-booking span {
  min-width: 0;
  color: rgba(255,255,255,.86);
  font-size: .68rem;
}

.calendar-booking.request { background: linear-gradient(135deg, #4f91e8, #2a67b5); }
.calendar-booking.reserved { background: linear-gradient(135deg, #ef9d42, #bb6e1e); }
.calendar-booking.rented { background: linear-gradient(135deg, #3ac37b, #198c4d); }
.calendar-booking.pickup { background: linear-gradient(135deg, #d8323d, #a91923); }
.calendar-booking.completed { background: linear-gradient(135deg, #6d6d70, #49494c); opacity: .72; }
.calendar-booking.default { background: linear-gradient(135deg, #727276, #4d4d50); }

.calendar-transport {
  position: absolute;
  z-index: 5;
  top: 5px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  color: #fff;
  font-size: .65rem;
  font-weight: 900;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(0,0,0,.30);
}

.calendar-transport.delivery { background: #4f91e8; }
.calendar-transport.pickup { background: #ef9d42; }
.calendar-transport.is-completed { opacity: .55; }

.calendar-loading {
  min-height: 310px;
  padding: 16px;
}

@media (max-width: 860px) {
  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-navigation,
  .calendar-range-options {
    justify-content: space-between;
  }

  .calendar-navigation strong {
    order: 2;
    width: 100%;
    margin: 5px 0 0;
    text-align: center;
  }

  .calendar-legend small {
    width: 100%;
    margin: 2px 0 0;
  }

  .calendar-scroller {
    min-height: 350px;
    max-height: calc(100vh - 330px);
  }
}

@media (max-width: 520px) {
  .calendar-toolbar,
  .calendar-filterbar,
  .calendar-legend {
    padding: 12px;
  }

  .calendar-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .calendar-navigation .secondary-button {
    padding: 0 7px;
    font-size: .75rem;
  }

  .calendar-range-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .calendar-range-button {
    padding: 0 5px;
  }

  .calendar-filterbar .filter-select {
    min-width: 0;
    flex: 1 1 100%;
  }

  .calendar-board {
    min-width: calc(205px + (var(--calendar-days) * 68px));
  }

  .calendar-header-row,
  .calendar-row {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  .calendar-device-heading,
  .calendar-device {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* ========================================================================== */
/* V6 – Transport-Disposition & digitale Übergabe-/Rücknahmeprotokolle       */
/* ========================================================================== */
.transport-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 14px;
}
.transport-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(35,35,35,.98), rgba(26,26,26,.98));
}
.transport-summary-card > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #c7dcff;
  background: var(--blue-soft);
  font-weight: 800;
}
.transport-summary-card:nth-child(2) > span { color: #ffddb2; background: var(--orange-soft); }
.transport-summary-card:nth-child(3) > span { color: #b7eccc; background: var(--green-soft); }
.transport-summary-card:nth-child(4) > span { color: #ffced1; background: var(--red-soft); }
.transport-summary-card small,
.transport-summary-card strong { display: block; }
.transport-summary-card small { color: var(--muted); font-size: .76rem; font-weight: 700; }
.transport-summary-card strong { margin-top: 1px; font-size: 1.65rem; }

.table-actions {
  min-width: 204px;
  white-space: nowrap;
}
.protocol-button {
  border-color: rgba(79,145,232,.38);
  color: #c8dfff;
  background: var(--blue-soft);
}
.protocol-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  white-space: nowrap;
}
.protocol-state.done { color: #b7eccc; background: var(--green-soft); border: 1px solid rgba(58,195,123,.38); }
.protocol-state.open { color: #ffddb2; background: var(--orange-soft); border: 1px solid rgba(239,157,66,.40); }

.transport-context,
.protocol-header,
.protocol-address {
  display: flex;
  align-items: start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0,0,0,.14);
}
.transport-context > div,
.protocol-header > div { display: grid; gap: 3px; }
.transport-context small,
.protocol-header small,
.protocol-address small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
}
.protocol-header {
  display: block;
}
.protocol-header > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.protocol-address {
  display: grid;
  gap: 3px;
}
.protocol-address strong { font-size: .8rem; }
.protocol-address span { color: #dedee1; font-size: .9rem; }

.media-section {
  margin-top: 22px;
  padding-top: 2px;
}
.media-section > input[type="file"] {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(0,0,0,.16);
}
.protocol-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 9px;
  margin-top: 11px;
}
.media-empty {
  grid-column: 1 / -1;
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  font-size: .83rem;
}
.protocol-photo {
  display: grid;
  gap: 5px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  background: rgba(0,0,0,.14);
}
.protocol-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1.25 / 1;
  object-fit: cover;
  border-radius: 6px;
}
.protocol-photo span,
.protocol-photo small {
  overflow: hidden;
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.protocol-photo.no-preview {
  min-height: 90px;
  place-items: center;
  text-align: center;
}
.signature-pad-wrap {
  overflow: hidden;
  margin-top: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
}
.signature-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}
.signature-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}
.signature-actions .muted { font-size: .77rem; line-height: 1.35; }
.stored-signature {
  display: grid;
  place-items: start;
  min-height: 42px;
  margin: 0 0 10px;
}
.stored-signature img {
  display: block;
  max-width: 260px;
  max-height: 90px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.protocol-complete {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 19px;
  padding: 11px 12px;
  border: 1px solid rgba(58,195,123,.35);
  border-radius: 10px;
  color: #cef4df;
  background: var(--green-soft);
  font-size: .86rem;
  font-weight: 700;
}
.protocol-complete input { width: 17px; height: 17px; }

@media (max-width: 1100px) {
  .transport-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .transport-summary-grid { grid-template-columns: 1fr; gap: 10px; }
  .transport-summary-card { min-height: 74px; }
  .table-actions { min-width: 192px; }
  .signature-actions { align-items: stretch; flex-direction: column; }
  .signature-actions .secondary-button { width: 100%; }
}

/* ========================================================================== */
/* V7 – Dokumentencenter, PDF-Erzeugung und E-Mail-Vorlagen                  */
/* ========================================================================== */
.document-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 14px;
}
.document-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(35,35,35,.98), rgba(26,26,26,.98));
}
.document-summary-card > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #c7dcff;
  background: var(--blue-soft);
  font-weight: 800;
}
.document-summary-card:nth-child(2) > span { color: #b7eccc; background: var(--green-soft); }
.document-summary-card:nth-child(3) > span { color: #ffddb2; background: var(--orange-soft); }
.document-summary-card:nth-child(4) > span { color: #ffced1; background: var(--red-soft); }
.document-summary-card small,
.document-summary-card strong { display: block; }
.document-summary-card small { color: var(--muted); font-size: .76rem; font-weight: 700; }
.document-summary-card strong { margin-top: 1px; font-size: 1.65rem; }

.document-link-button,
.email-template-button {
  border-color: rgba(79,145,232,.38);
  color: #c8dfff;
  background: var(--blue-soft);
}
.document-generator-note,
.document-email-note {
  margin-top: 17px;
  padding: 12px;
  border: 1px solid rgba(79,145,232,.36);
  border-radius: 10px;
  color: #c7dcff;
  background: var(--blue-soft);
  font-size: .84rem;
  line-height: 1.5;
}
.document-email-note {
  margin-top: 0;
  border-color: rgba(239,157,66,.38);
  color: #ffddb2;
  background: var(--orange-soft);
}
.email-preview {
  display: grid;
  gap: 13px;
  margin-top: 17px;
}
.email-preview > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.email-preview strong {
  padding-top: 11px;
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.email-preview span,
.email-preview textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: rgba(0,0,0,.18);
  font-size: .88rem;
}
.email-preview textarea {
  min-height: 245px;
  resize: vertical;
  line-height: 1.45;
  font-family: inherit;
}
.document-table .table-actions {
  min-width: 242px;
}
@media (max-width: 1100px) {
  .document-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .document-summary-grid { grid-template-columns: 1fr; gap: 10px; }
  .document-summary-card { min-height: 74px; }
  .document-table .table-actions { min-width: 238px; }
  .email-preview > div { grid-template-columns: 1fr; gap: 4px; }
  .email-preview strong { padding-top: 0; }
}

/* ========================================================================== */
/* V8 – Gerätebilder, Archivierung und sichere Löschvorgänge                 */
/* ========================================================================== */
.device-table-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 205px;
}
.device-thumb {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #c7c7cb;
  background: rgba(255,255,255,.035);
  font-size: 1.1rem;
}
.device-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.device-image-editor {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  margin: 0 0 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.13);
}
.device-image-preview {
  display: grid;
  place-items: center;
  min-height: 128px;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  text-align: center;
  font-size: .8rem;
}
.device-image-preview img {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
}
.device-image-controls {
  display: grid;
  gap: 8px;
}
.device-image-controls strong {
  font-size: .94rem;
}
.device-image-controls .muted {
  font-size: .78rem;
  line-height: 1.4;
}
.device-image-controls input[type="file"] {
  width: 100%;
  min-height: 40px;
  padding: 7px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
}
.device-image-remove {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 1px !important;
  color: #ffd0d3 !important;
  font-size: .82rem !important;
}
.device-image-remove input {
  width: 16px;
  height: 16px;
}
.danger-modal-head {
  border-bottom-color: rgba(216,50,61,.38);
  background: linear-gradient(90deg, rgba(216,50,61,.13), transparent 65%);
}
.danger-callout {
  padding: 13px;
  border: 1px solid rgba(216,50,61,.42);
  border-radius: 10px;
  color: #ffd3d6;
  background: var(--red-soft);
  line-height: 1.48;
  font-size: .9rem;
}
.confirm-copy {
  margin: 16px 0 10px;
  color: #dddddf;
  line-height: 1.5;
  font-size: .88rem;
}
.confirm-copy strong {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 4px;
  color: #fff;
  background: rgba(255,255,255,.10);
  letter-spacing: .04em;
}
.table-actions {
  min-width: 205px;
  white-space: nowrap;
}
.table-actions .table-button {
  margin-right: 5px;
}
.table-actions .table-button:last-child {
  margin-right: 0;
}
@media (max-width: 760px) {
  .device-image-editor {
    grid-template-columns: 1fr;
  }
  .device-image-preview {
    min-height: 160px;
  }
  .device-image-preview img {
    height: 160px;
  }
  .table-actions {
    min-width: 242px;
  }
}

/* ========================================================================== */
/* V9 – Dispo-Board und mobile Arbeitsansicht                                */
/* ========================================================================== */
.dispatch-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(35,35,35,.98), rgba(23,23,23,.98));
}
.dispatch-nav-button {
  flex: 0 0 42px;
  min-height: 42px;
  font-size: 1.45rem;
}
.dispatch-date-label {
  display: grid;
  gap: 5px;
  min-width: 178px;
  margin: 0;
}
.dispatch-date-label span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.dispatch-date-label input {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: rgba(0,0,0,.18);
  font: inherit;
}
.dispatch-summary {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.dispatch-summary span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: .78rem;
}
.dispatch-summary b {
  margin-right: 4px;
  color: #fff;
  font-size: .98rem;
}
.dispatch-info-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px 13px;
  border: 1px solid rgba(79,145,232,.28);
  border-radius: 10px;
  color: #c7dcff;
  background: var(--blue-soft);
  font-size: .8rem;
}
.dispatch-info-strip span:nth-child(1) { color: #ffced1; }
.dispatch-info-strip span:nth-child(2) { color: #ffddb2; }
.dispatch-info-strip span:nth-child(3) { margin-left: auto; color: #c7dcff; }

.dispatch-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 15px;
}
.dispatch-column {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(21,21,21,.74);
}
.dispatch-column.other { grid-column: 1 / -1; }
.dispatch-column-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 67px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.dispatch-column.delivery .dispatch-column-head { background: linear-gradient(90deg, rgba(216,50,61,.15), transparent 80%); }
.dispatch-column.pickup .dispatch-column-head { background: linear-gradient(90deg, rgba(239,157,66,.14), transparent 80%); }
.dispatch-column.other .dispatch-column-head { background: linear-gradient(90deg, rgba(79,145,232,.14), transparent 80%); }
.dispatch-column-head > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 1.3rem;
}
.dispatch-column.delivery .dispatch-column-head > span { color: #ffccd0; background: var(--red-soft); }
.dispatch-column.pickup .dispatch-column-head > span { color: #ffddb2; background: var(--orange-soft); }
.dispatch-column.other .dispatch-column-head > span { color: #c7dcff; background: var(--blue-soft); }
.dispatch-column-head small { display: block; color: var(--muted); font-size: .73rem; font-weight: 700; }
.dispatch-column-head h3 { margin: 2px 0 0; font-size: 1.05rem; }
.dispatch-card-list { display: grid; gap: 10px; padding: 11px; }
.dispatch-empty {
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  font-size: .86rem;
}
.dispatch-empty span { font-size: 1.35rem; }
.dispatch-empty p { margin: 2px 12px 0; }
.dispatch-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(38,38,38,.94), rgba(25,25,25,.98));
  box-shadow: 0 4px 18px rgba(0,0,0,.10);
}
.dispatch-card.route { border-color: rgba(79,145,232,.45); }
.dispatch-card.done { opacity: .72; border-color: rgba(87,181,120,.4); }
.dispatch-card.cancelled { opacity: .55; border-color: rgba(216,50,61,.4); }
.dispatch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dispatch-type {
  padding: 4px 7px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .035em;
}
.dispatch-type.delivery { color: #ffced1; background: var(--red-soft); }
.dispatch-type.pickup { color: #ffddb2; background: var(--orange-soft); }
.dispatch-time {
  margin-top: 10px;
  color: #d1d1d3;
  font-size: .78rem;
  font-weight: 800;
}
.dispatch-card h3 { margin: 6px 0 1px; font-size: 1.12rem; }
.dispatch-customer { margin: 0 0 12px; color: #e7e7e8; font-size: .9rem; font-weight: 700; }
.dispatch-detail,
.dispatch-driver {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  margin-top: 8px;
}
.dispatch-detail > span,
.dispatch-driver > span { color: #aaaab0; font-size: .9rem; text-align: center; }
.dispatch-detail b,
.dispatch-driver b { display: block; color: var(--muted); font-size: .69rem; text-transform: uppercase; letter-spacing: .045em; }
.dispatch-detail small,
.dispatch-driver small { display: block; margin-top: 1px; color: #e6e6e7; font-size: .82rem; line-height: 1.35; }
.dispatch-driver { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); }
.dispatch-driver.missing { color: #ffced1; }
.dispatch-driver.missing > span,
.dispatch-driver.missing small { color: #ffb8bd; }
.dispatch-note {
  margin-top: 10px;
  padding: 8px;
  border-left: 2px solid rgba(79,145,232,.7);
  color: #cfdcf4;
  background: var(--blue-soft);
  font-size: .79rem;
  line-height: 1.38;
}
.dispatch-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.dispatch-card-foot > div { display: flex; gap: 5px; }
.dispatch-protocol { color: var(--muted); font-size: .71rem; font-weight: 700; }
.dispatch-protocol.available { color: #b7eccc; }
.dispatch-no-jobs { grid-column: 1 / -1; min-height: 230px; }

.mobile-bottom-nav {
  display: none;
}

.mobile-more-menu {
  display: grid;
  gap: 8px;
}
.mobile-more-item {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  text-align: left;
  background: rgba(255,255,255,.025);
}
.mobile-more-item > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #c7dcff;
  background: var(--blue-soft);
  font-size: 1.1rem;
}
.mobile-more-item b { display: block; }
.mobile-more-item small { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; }

@media (max-width: 960px) {
  .dispatch-board { grid-template-columns: 1fr; }
  .dispatch-column.other { grid-column: auto; }
  .dispatch-summary { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .content { padding-bottom: 92px; }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 5px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-strong);
    background: rgba(18,18,18,.97);
    box-shadow: 0 -9px 24px rgba(0,0,0,.34);
    backdrop-filter: blur(16px);
  }
  .mobile-bottom-nav button {
    display: grid;
    place-items: center;
    min-height: 48px;
    gap: 2px;
    border: 0;
    border-radius: 9px;
    color: #a8a8ad;
    background: transparent;
    font: inherit;
  }
  .mobile-bottom-nav button span {
    height: 18px;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 18px;
  }
  .mobile-bottom-nav button b {
    max-width: 100%;
    overflow: hidden;
    font-size: .61rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-bottom-nav button.active {
    color: #fff;
    background: var(--red-soft);
  }
  .dispatch-toolbar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: end;
    gap: 8px;
    padding: 11px;
  }
  .dispatch-date-label { min-width: 0; }
  .dispatch-summary {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .dispatch-summary span {
    padding: 8px 6px;
    text-align: center;
    font-size: .67rem;
  }
  .dispatch-summary b { display: block; margin: 0 0 1px; }
  .dispatch-info-strip { gap: 7px; font-size: .72rem; }
  .dispatch-info-strip span:nth-child(3) { width: 100%; margin-left: 0; }
  .dispatch-card-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .dispatch-card-foot > div { display: grid; grid-template-columns: 1fr 1fr; }
  .dispatch-card-foot .table-button { width: 100%; }
}

/* ========================================================================== */
/* V10 – Abrechnungsfreigabe und Intranet-Ereignisse                         */
/* ========================================================================== */
.billing-button {
  border-color: rgba(87,181,120,.38);
  color: #bcefcf;
  background: var(--green-soft);
}
.billing-ready-text { color: #b7eccc !important; }
.billing-missing-text { color: #ffced1 !important; }

.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 0 0 13px;
}
.billing-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 99px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(35,35,35,.98), rgba(25,25,25,.98));
}
.billing-summary-card > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 1.18rem;
  font-weight: 900;
}
.billing-summary-card small,
.billing-summary-card strong,
.billing-summary-card p { display: block; }
.billing-summary-card small { color: var(--muted); font-size: .72rem; font-weight: 800; }
.billing-summary-card strong { margin-top: 1px; font-size: 1.6rem; }
.billing-summary-card p { margin: 1px 0 0; color: #bdbdc1; font-size: .75rem; }
.billing-summary-card.ready > span { color: #ffddb2; background: var(--orange-soft); }
.billing-summary-card.released > span { color: #c7dcff; background: var(--blue-soft); }
.billing-summary-card.correction > span { color: #ffced1; background: var(--red-soft); }
.billing-summary-card.billed > span { color: #b7eccc; background: var(--green-soft); }

.billing-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 13px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(0,0,0,.14);
  font-size: .76rem;
  white-space: nowrap;
}
.billing-flow i { color: #86868c; font-style: normal; font-size: 1.05rem; }
.flow-step {
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255,255,255,.025);
}
.flow-step.active {
  color: #ffddb2;
  background: var(--orange-soft);
  font-weight: 800;
}
.billing-table .table-actions { min-width: 96px; }
.billing-access-denied .empty-state { min-height: 260px; }
.billing-access-denied small { display: block; max-width: 540px; margin: 7px auto 0; color: var(--muted); line-height: 1.5; }

.billing-modal-hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1.2fr;
  gap: 10px;
  margin: 0 0 16px;
}
.billing-modal-hero > div {
  display: grid;
  gap: 3px;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,.14);
}
.billing-modal-hero .muted {
  color: var(--muted);
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.billing-modal-hero strong { font-size: .95rem; }
.billing-modal-hero small { color: #bcbcc1; font-size: .78rem; }

.modal-section {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.billing-readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.billing-readiness-item {
  display: grid;
  grid-template-columns: 29px minmax(0,1fr);
  gap: 8px;
  align-items: center;
  min-height: 57px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.02);
}
.billing-readiness-item > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  font-weight: 900;
}
.billing-readiness-item.ok > span { color: #b7eccc; background: var(--green-soft); }
.billing-readiness-item.missing > span { color: #ffced1; background: var(--red-soft); }
.billing-readiness-item b,
.billing-readiness-item small { display: block; }
.billing-readiness-item b { font-size: .8rem; }
.billing-readiness-item small { margin-top: 1px; color: var(--muted); font-size: .72rem; line-height: 1.3; }

.billing-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.billing-values span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 37px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #cfcfd3;
  font-size: .79rem;
}
.billing-values span:nth-child(3n) { border-right: 0; }
.billing-values span:nth-last-child(-n+3) { border-bottom: 0; }
.billing-values b { color: #fff; white-space: nowrap; }

.billing-document-list {
  display: grid;
  gap: 5px;
}
.billing-document-list span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #dadade;
  background: rgba(255,255,255,.025);
  font-size: .79rem;
}
.billing-protocol-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}
.billing-protocol-info > span {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #dbdbde;
  background: rgba(255,255,255,.02);
  font-size: .81rem;
}
.billing-protocol-info > span.wide { grid-column: 1 / -1; }
.billing-protocol-info b { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.billing-warning {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(239,157,66,.42);
  border-radius: 9px;
  color: #ffddb2;
  background: var(--orange-soft);
  font-size: .82rem;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .billing-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .billing-summary-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .billing-summary-card { min-height: 90px; padding: 11px; gap: 9px; }
  .billing-summary-card > span { width: 33px; height: 33px; }
  .billing-summary-card strong { font-size: 1.35rem; }
  .billing-summary-card p { font-size: .68rem; }
  .billing-flow { margin-bottom: 10px; }
  .billing-modal-hero { grid-template-columns: 1fr; }
  .billing-readiness { grid-template-columns: 1fr; }
  .billing-values { grid-template-columns: 1fr; }
  .billing-values span,
  .billing-values span:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .billing-values span:last-child { border-bottom: 0; }
  .billing-protocol-info { grid-template-columns: 1fr; }
  .billing-protocol-info > span.wide { grid-column: auto; }
}



/* Intranet-Integration */
.intranet-return-link{display:inline-flex;align-items:center;gap:7px;margin-right:10px;padding:8px 10px;border:1px solid rgba(255,255,255,.12);border-radius:10px;color:#e4e8ef;text-decoration:none;font-size:12px;font-weight:800;background:rgba(255,255,255,.035);transition:.18s}.intranet-return-link:hover{border-color:rgba(242,58,64,.65);background:rgba(160,28,38,.28);color:#fff}.intranet-access-note{display:none}.mietpark-intranet #login-view,.mietpark-intranet #access-denied-view{display:none!important}.mietpark-intranet .topbar{position:sticky;top:0;z-index:50}
@media(max-width:720px){.intranet-return-link{margin-right:4px;padding:7px 8px;font-size:11px}.intranet-return-link span{display:none}}
