:root{font-family:Arial,Helvetica,sans-serif;color:#17324d;background:#eef3f7}*{box-sizing:border-box}body{margin:0}header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 20px;background:#0d3155;color:#fff;position:sticky;top:0;z-index:5}nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap}nav a,nav button{color:#fff;background:none;border:0;text-decoration:none;font:inherit;cursor:pointer;padding:6px}.user-badge{padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.15);font-size:.82rem}main{max-width:1180px;margin:auto;padding:20px}.card,.hero{background:#fff;border-radius:16px;padding:22px;margin-bottom:18px;box-shadow:0 8px 30px rgba(23,50,77,.1)}.narrow{max-width:520px;margin:40px auto}.admin-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.admin-wide{width:100%}label{display:block;font-weight:700;margin:12px 0}input,select,textarea{display:block;width:100%;margin-top:6px;padding:13px;border:1px solid #b9c7d5;border-radius:10px;font:inherit;background:#fff}textarea{min-height:90px;resize:vertical}.button,button{display:inline-block;padding:12px 18px;border-radius:10px;border:1px solid #0d3155;text-decoration:none;cursor:pointer;font:inherit}.primary{background:#0d5ea8;color:#fff;border-color:#0d5ea8}.danger{background:#fff;color:#b42318;border-color:#f1b4ae}.full,.finish{width:100%}.finish{font-size:1.1rem;margin:0 0 40px}.error,.flash.error{color:#8a1c13;background:#fff0ee;border-color:#f1b4ae}.flash.success{color:#17643a;background:#edf9f1;border-color:#99d5ae}.flash{padding:14px 16px;border:1px solid;border-radius:12px;margin:0 0 18px}.hint{color:#5f7182;font-weight:400}.optional{font-weight:400;color:#718190}.action-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.accordion-list{display:grid;gap:12px}.accordion-item{border:1px solid #d7e0e8;border-radius:12px;background:#fff;overflow:hidden}.accordion-item summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px;cursor:pointer;list-style:none}.accordion-item summary::-webkit-details-marker{display:none}.accordion-item summary span:first-child{display:grid;gap:4px}.accordion-item summary small{font-weight:400;color:#5f7182}.detail-form{padding:0 16px 18px;border-top:1px solid #e0e7ee}.vehicle-detail img{display:block;width:100%;max-height:320px;object-fit:cover}.camera-flow{min-height:380px}.camera-step{text-align:center}.step-number{display:inline-block;padding:5px 10px;border-radius:999px;background:#e8f1f9;color:#174d7d;font-weight:700}.camera-input{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(1px,1px,1px,1px)!important;white-space:nowrap!important}.camera-preview{display:grid;place-items:center;min-height:220px;margin:18px 0;border:2px dashed #b9c7d5;border-radius:14px;background:#f6f9fb;color:#6a7d8f;overflow:hidden}.camera-preview img{width:100%;max-height:420px;object-fit:contain;background:#111}.camera-button{font-size:1.08rem;min-height:54px}.progress-row{display:grid;gap:8px;margin-bottom:16px}.progress{height:10px;background:#dce6ee;border-radius:999px;overflow:hidden}.progress span{display:block;height:100%;width:0;background:#0d5ea8;transition:width .25s}.checks{display:grid;gap:14px}.checks label,fieldset{border:1px solid #d7e0e8;border-radius:12px;padding:14px}fieldset{margin:0 0 14px}.vehicle-detail{display:grid;grid-template-columns:minmax(220px,340px) 1fr;gap:16px;padding:16px;border-top:1px solid #e0e7ee}.vehicle-detail .detail-form{padding:0;border:0}
@media(max-width:820px){header{align-items:flex-start;flex-direction:column}main{padding:12px}.card,.hero{padding:18px;border-radius:14px}.admin-layout{grid-template-columns:1fr}.vehicle-detail{grid-template-columns:1fr}.action-row>*{flex:1}.user-badge{width:100%}.camera-preview{min-height:260px}.accordion-item summary{padding:14px}.button,button,input,select,textarea{min-height:48px}}
@media(max-width:480px){header strong{font-size:.96rem}nav{width:100%;justify-content:space-between}main{padding:8px}.card,.hero{padding:15px;margin-bottom:12px;border-radius:12px}h1{font-size:1.65rem}h2{font-size:1.3rem}.camera-button{position:sticky;bottom:10px;z-index:3}.camera-preview{min-height:300px}.action-row{flex-direction:column}.action-row>*{width:100%}}

.progress-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.capture-instruction{margin:18px 0;padding:14px 16px;border-radius:12px;background:#fff4d6;border:1px solid #f0cd76;color:#4c3900;font-size:1.08rem;line-height:1.45;text-align:left}.camera-action-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.camera-action-row .camera-button{width:100%}.photo-counter-inline{display:grid;place-items:center;min-width:72px;min-height:54px;padding:8px 12px;border-radius:12px;background:#e8f1f9;color:#0d3155;font-size:1.1rem;font-weight:800}.captured-gallery{margin:14px 0 18px;padding:12px;border:1px solid #d7e0e8;border-radius:14px;background:#f7fafc}.gallery-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}.gallery-items{display:flex;gap:10px;overflow-x:auto;padding-bottom:4px;scroll-snap-type:x proximity}.gallery-items figure{flex:0 0 110px;margin:0;scroll-snap-align:start}.gallery-items img{display:block;width:110px;height:82px;object-fit:cover;border-radius:10px;background:#111}.gallery-items figcaption{margin-top:5px;font-size:.75rem;line-height:1.2;color:#4b6072;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.note-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.note-card{border:1px solid #d7e0e8;border-radius:14px;overflow:hidden;background:#fff}.note-card label{border:0!important;margin:0;padding:14px}.note-photo{background:#eef3f7;min-height:150px;display:grid;place-items:center}.note-photo img{display:block;width:100%;height:220px;object-fit:cover;background:#111}
@media(max-width:820px){.note-checks{grid-template-columns:1fr}}
@media(max-width:480px){.camera-action-row{grid-template-columns:minmax(0,1fr) 68px}.photo-counter-inline{min-width:68px;padding:6px}.capture-instruction{font-size:1rem}.note-photo img{height:190px}}

.capture-target{margin:18px 0}.capture-target-label{margin:0 0 12px;font-size:1.35rem;font-weight:800;color:#0d3155;text-align:center}.vehicle-guide{width:min(100%,380px);margin:0 auto;padding:10px 12px;border:1px solid #d7e0e8;border-radius:16px;background:#fff}.vehicle-guide svg{display:block;width:100%;height:auto}.guide-lines{fill:none;stroke:#172b3d;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.guide-marker{fill:rgba(218,35,35,.66);stroke:#c01919;stroke-width:3;stroke-linejoin:round;filter:drop-shadow(0 3px 5px rgba(150,0,0,.22));animation:guidePulse 1.45s ease-in-out infinite}.vehicle-guide-front .guide-marker,.vehicle-guide-rear .guide-marker{transform-origin:center}.vehicle-guide-side-left .guide-marker,.vehicle-guide-side-right .guide-marker{transform-origin:center}.vehicle-guide-cargo .guide-marker,.vehicle-guide-cab .guide-marker{transform-origin:center}@keyframes guidePulse{0%,100%{opacity:.62}50%{opacity:.95}}.gallery-items figure{flex-basis:150px;padding:8px;border:1px solid #d7e0e8;border-radius:12px;background:#fff}.gallery-items img{width:100%;height:100px;object-fit:cover;border-radius:8px}.gallery-items figcaption{margin:0 0 7px;font-size:.8rem;font-weight:800;color:#17324d;white-space:normal;min-height:2.2em}.gallery-delete{width:100%;margin-top:8px;padding:8px 6px;border-color:#e3aaa5;background:#fff4f3;color:#9d2018;font-size:.76rem;line-height:1.2}.note-preview-title{padding:11px 14px;background:#e8f1f9;color:#0d3155;font-weight:800;border-bottom:1px solid #d7e0e8}
@media(max-width:480px){.capture-target-label{font-size:1.2rem}.vehicle-guide{max-width:330px;padding:8px}.gallery-items figure{flex-basis:140px}.gallery-items img{height:96px}}
.capture-target{display:flex;flex-direction:column;align-items:center}.capture-target-label{order:2;margin:.75rem 0 0;font-size:1.15rem;font-weight:800;text-align:center;color:#0d3155}.damage-card{display:grid;gap:1rem}.damage-camera-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.damage-photo-preview{min-height:120px;border:2px dashed #a9b8c7;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#f6f9fc;color:#52687c;overflow:hidden}.damage-photo-preview img{width:100%;max-height:260px;object-fit:cover;display:block}.damage-camera-button{width:100%}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: stretch;
}

.password-field input {
    min-width: 0;
}

.password-toggle {
    white-space: nowrap;
    padding-inline: 1rem;
}

@media (max-width: 420px) {
    .password-field {
        grid-template-columns: 1fr;
    }
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.damage-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.protocol-items {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.protocol-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid #d8e0e8;
    border-radius: 12px;
    background: #fff;
}

.protocol-item div {
    display: grid;
    gap: 0.25rem;
}

.protocol-item small {
    color: #526b82;
}

@media (max-width: 640px) {
    .protocol-item {
        align-items: stretch;
        flex-direction: column;
    }

    .protocol-item .button {
        width: 100%;
        text-align: center;
    }
}

.protocol-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin: 18px 0;
}

.protocol-tab {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f2742;
    border-radius: 999px;
    padding: 10px 14px;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 700;
}

.protocol-tab.is-active {
    background: #0f2742;
    color: #ffffff;
    border-color: #0f2742;
}

.protocol-panel {
    display: grid;
    gap: 12px;
}

.protocol-group {
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.protocol-group > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 14px 16px;
    background: #f6f8fb;
}

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

.protocol-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 840px;
}

.protocol-table th,
.protocol-table td {
    padding: 12px;
    text-align: left;
    border-top: 1px solid #e5eaf0;
    vertical-align: top;
}

.protocol-table th {
    font-size: 0.84rem;
    color: #526579;
    background: #fbfcfd;
}

.protocol-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.protocol-actions form {
    margin: 0;
}

@media (max-width: 700px) {
    .protocol-tabs {
        margin-left: -4px;
        margin-right: -4px;
    }
}

[hidden]{display:none!important}
.damage-list{display:grid;gap:12px;margin-bottom:14px}.add-damage-button{margin-top:8px}.damage-card{border:1px solid #d7e0e8;border-radius:12px;background:#fff;overflow:hidden}.damage-card>summary{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:15px;cursor:pointer;list-style:none}.damage-card>summary::-webkit-details-marker{display:none}.damage-summary-status{font-size:.85rem;color:#5f7182;text-align:right}.damage-card-content{padding:0 14px 16px;border-top:1px solid #e0e7ee}.damage-photo-preview{display:grid;place-items:center;min-height:160px;margin:14px 0;border:2px dashed #b9c7d5;border-radius:12px;overflow:hidden;color:#6a7d8f}.damage-photo-preview img{width:100%;max-height:360px;object-fit:contain;background:#111}.damage-camera-input{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(1px,1px,1px,1px)!important}.protocol-focus header{display:none}.protocol-focus main{padding-top:8px}.protocol-focus-zone{scroll-margin-top:8px}
.saved-confirmation{text-align:center;padding-top:42px;padding-bottom:42px}.saved-check{width:112px;height:112px;margin:0 auto 22px;border-radius:50%;display:grid;place-items:center;background:#168545;color:#fff;font-size:74px;font-weight:900;line-height:1;box-shadow:0 12px 30px rgba(22,133,69,.28)}.saved-confirmation h1{color:#126c3b}.saved-confirmation .button{margin-top:18px}

.api-guide {
    margin-top: 1.25rem;
    border-top: 1px solid #d8e2ec;
    padding-top: 1rem;
}

.api-guide summary {
    cursor: pointer;
    font-size: 1.05rem;
    color: #0d3155;
}

.api-guide pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 0.9rem;
    border-radius: 0.65rem;
    background: #eef4f9;
    border: 1px solid #d3dfeb;
}

.hero .action-row {
    margin-top: 1rem;
}

/* v20: kontinuierlicher Kamera-Modus */
.capture-intro{margin:0 0 14px;color:#4f6478;line-height:1.5}.camera-guide-template{display:none}.camera-open{overflow:hidden}.camera-overlay{position:fixed;inset:0;z-index:1000;background:#000;color:#fff}.camera-stage{position:relative;width:100%;height:100%;overflow:hidden;background:#000}.camera-stage video{width:100%;height:100%;object-fit:cover}.camera-topbar{position:absolute;left:0;right:0;top:0;display:grid;grid-template-columns:74px minmax(0,1fr) 48px;gap:10px;align-items:center;padding:max(12px,env(safe-area-inset-top)) 12px 12px;background:linear-gradient(180deg,rgba(0,0,0,.82),rgba(0,0,0,.15));text-shadow:0 2px 5px rgba(0,0,0,.8)}.camera-guide-overlay{width:74px;height:62px;display:grid;place-items:center;border-radius:12px;background:rgba(255,255,255,.92);overflow:hidden}.camera-guide-overlay .vehicle-guide{width:100%;height:100%;padding:3px;border:0;border-radius:0;background:transparent}.camera-guide-overlay svg{width:100%;height:100%}.camera-task{min-width:0;display:grid;gap:3px}.camera-task strong{font-size:clamp(1.05rem,4.8vw,1.45rem);line-height:1.15;overflow-wrap:anywhere}.camera-task span{font-size:1rem;font-weight:800}.camera-close{width:46px;height:46px;padding:0;border:1px solid rgba(255,255,255,.6);border-radius:50%;background:rgba(0,0,0,.45);color:#fff;font-size:2rem;line-height:1}.camera-controls{position:absolute;left:0;right:0;bottom:0;display:grid;place-items:center;padding:18px 18px max(24px,env(safe-area-inset-bottom));background:linear-gradient(0deg,rgba(0,0,0,.8),rgba(0,0,0,.05))}.camera-shutter{width:82px;height:82px;padding:7px;border:4px solid #fff;border-radius:50%;background:rgba(255,255,255,.2);box-shadow:0 3px 18px rgba(0,0,0,.5)}.camera-shutter span{display:block;width:100%;height:100%;border-radius:50%;background:#fff}.camera-shutter:active span{transform:scale(.9)}.camera-shutter:disabled{opacity:.55}.camera-status{position:absolute;left:50%;bottom:122px;transform:translateX(-50%);min-height:28px;padding:5px 12px;border-radius:999px;background:rgba(0,0,0,.55);font-weight:800}.camera-status:empty{display:none}@media(orientation:landscape){.camera-topbar{grid-template-columns:64px minmax(0,1fr) 44px}.camera-guide-overlay{width:64px;height:50px}.camera-shutter{width:70px;height:70px}.camera-status{bottom:102px}}

/* v21: gestückelte Uploads und lokale Notfall-Speicherung */
.upload-overlay{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:18px;background:rgba(5,20,35,.82);backdrop-filter:blur(4px)}
.upload-dialog{width:min(100%,520px);padding:24px;border-radius:18px;background:#fff;color:#17324d;box-shadow:0 24px 70px rgba(0,0,0,.35)}
.upload-dialog h2{margin-top:0}.upload-dialog .progress{margin:18px 0 10px}.upload-dialog .action-row>*{flex:1}
.pending-upload-link{position:relative}.pending-upload-count{font-weight:800}
.pending-upload-list{display:grid;gap:14px;margin-top:18px}
.pending-upload-card{display:grid;gap:10px;padding:16px;border:1px solid #d7e0e8;border-radius:14px;background:#fff}
.pending-upload-card>div:first-child{display:grid;gap:4px}.pending-upload-card span,.pending-upload-card small{color:#5f7182}
.pending-progress{height:10px;overflow:hidden;border-radius:999px;background:#dce6ee}.pending-progress span{display:block;height:100%;background:#0d5ea8;transition:width .25s}
.pending-upload-card.is-complete{border-color:#8acba5;background:#effaf3}
@media(max-width:520px){.upload-dialog{padding:18px}.upload-dialog .action-row{display:grid}.pending-upload-card .action-row{display:grid}.pending-upload-card .action-row>*{width:100%}}

.user-inspection-days{display:grid;gap:14px}.user-inspection-day{border:1px solid #d7e0e8;border-radius:14px;overflow:hidden;background:#f8fafc}.user-inspection-day-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:#e8f1f9}.user-inspection-day-heading span{font-size:.9rem;color:#355a78;font-weight:700}.user-inspection-list{display:grid}.user-inspection-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;background:#fff;border-top:1px solid #e0e7ee}.user-inspection-item:first-child{border-top:0}.user-inspection-item div{display:grid;gap:4px}.user-inspection-item small{color:#5f7182}.inspection-arrived{white-space:nowrap;padding:6px 10px;border-radius:999px;background:#edf9f1;color:#17643a;font-size:.82rem;font-weight:700}@media(max-width:600px){.user-inspection-day-heading,.user-inspection-item{align-items:flex-start}.user-inspection-item{flex-direction:column}.inspection-arrived{align-self:flex-start}}
.upload-progress-group{display:grid;gap:8px;margin:18px 0 10px}.upload-progress-label{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:.88rem;font-weight:700;color:#38536b}.upload-progress-group .progress{margin:0}.upload-progress-group .progress span{transition:width .12s linear}.upload-dialog{width:min(520px,100%)}

/* v22: einfacher Zielrahmen fuer gleichmaessigere Pflichtfotos */
.camera-target-frame{position:absolute;left:50%;top:51%;transform:translate(-50%,-50%);z-index:2;border:2px solid rgba(255,255,255,.88);border-radius:18px;box-shadow:0 0 0 100vmax rgba(0,0,0,.32);pointer-events:none;transition:width .2s ease,height .2s ease,border-radius .2s ease}.camera-target-wide{width:min(86vw,760px);height:min(48vh,470px)}.camera-target-square{width:min(78vw,520px);height:min(78vw,52vh,520px);border-radius:22px}.camera-target-narrow{width:min(82vw,680px);height:min(34vh,270px)}.camera-target-minimum{position:absolute;inset:14%;border:2px dashed rgba(255,255,255,.72);border-radius:12px}.camera-target-frame .corner{position:absolute;width:38px;height:38px;border-color:#42e879;border-style:solid}.camera-target-frame .corner-tl{left:-3px;top:-3px;border-width:6px 0 0 6px;border-radius:16px 0 0 0}.camera-target-frame .corner-tr{right:-3px;top:-3px;border-width:6px 6px 0 0;border-radius:0 16px 0 0}.camera-target-frame .corner-bl{left:-3px;bottom:-3px;border-width:0 0 6px 6px;border-radius:0 0 0 16px}.camera-target-frame .corner-br{right:-3px;bottom:-3px;border-width:0 6px 6px 0;border-radius:0 0 16px 0}.camera-frame-instruction{position:absolute;z-index:3;left:50%;bottom:126px;transform:translateX(-50%);width:min(90vw,620px);padding:9px 14px;border-radius:12px;background:rgba(0,0,0,.64);color:#fff;font-size:.95rem;font-weight:800;line-height:1.25;text-align:center;text-shadow:0 1px 3px rgba(0,0,0,.8);pointer-events:none}.camera-status{bottom:172px;z-index:4}@media(orientation:landscape){.camera-target-frame{top:54%}.camera-target-wide{width:min(70vw,760px);height:min(62vh,430px)}.camera-target-square{width:min(46vw,430px);height:min(64vh,430px)}.camera-target-narrow{width:min(68vw,680px);height:min(42vh,260px)}.camera-frame-instruction{bottom:100px}.camera-status{bottom:142px}}@media(max-width:480px) and (orientation:portrait){.camera-target-frame{top:50%}.camera-target-wide{width:88vw;height:43vh}.camera-target-square{width:82vw;height:82vw;max-height:48vh}.camera-target-narrow{width:86vw;height:27vh}.camera-frame-instruction{bottom:121px;font-size:.88rem}.camera-status{bottom:166px}}

/* v22: Controller, Schadenshistorie, robuster Langsamkamera-Modus */
.leave-guard-note{margin:.35rem 0 1rem;padding:.7rem .85rem;border-radius:10px;background:#fff7df;border:1px solid #ecd084;color:#5e4a0b;font-size:.9rem;font-weight:700}
.slow-camera-step{margin-top:18px;padding:16px;border:2px solid #b7c9da;border-radius:16px;background:#f8fbfd}.slow-camera-heading{display:grid;gap:8px;margin-bottom:12px;text-align:left}.slow-camera-heading strong{font-size:1.15rem;color:#0d3155}.slow-camera-guide{width:min(100%,360px);margin:0 auto 12px}.slow-camera-guide .vehicle-guide{width:100%;margin:0}.slow-camera-preview{min-height:150px;display:grid;place-items:center;margin:12px 0;border:2px dashed #b9c7d5;border-radius:12px;overflow:hidden;background:#fff;color:#607487}.slow-camera-preview img{display:block;width:100%;max-height:320px;object-fit:contain;background:#111}.slow-camera-button{position:sticky;bottom:10px;z-index:3}
.damage-add-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.damage-add-actions>button:only-child{grid-column:1/-1}.damage-camera-symbol{display:grid;place-items:center;width:100%;height:100%;font-size:2rem;color:#152f49;background:#fff}.known-damages{margin-top:18px;border:1px solid #cfdae4;border-radius:14px;overflow:hidden;background:#f9fbfd}.known-damages>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;cursor:pointer;list-style:none;background:#edf4fa}.known-damages>summary::-webkit-details-marker{display:none}.known-damages>summary span{min-width:30px;padding:4px 8px;border-radius:999px;background:#0d3155;color:#fff;text-align:center;font-size:.82rem}.known-damage-list{display:grid;gap:10px;padding:12px}.known-damage-item{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;padding:10px;border:1px solid #dce5ed;border-radius:12px;background:#fff}.known-damage-item img{width:110px;height:90px;object-fit:cover;border-radius:9px;background:#111}.known-damage-item div{display:grid;gap:4px;align-content:start}.known-damage-item span,.known-damage-item small{color:#5f7182}.known-damage-item p{margin:2px 0;white-space:pre-wrap}.damage-card.has-photo>summary{background:#f0faf4}
@media(max-width:560px){.damage-add-actions{grid-template-columns:1fr}.known-damage-item{grid-template-columns:86px minmax(0,1fr)}.known-damage-item img{width:86px;height:76px}.slow-camera-step{padding:13px}.leave-guard-note{font-size:.85rem}}


/* v24 Owner und Schadens-E-Mail */
.damage-mail-vehicle-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.damage-mail-vehicle-choice{display:flex;gap:10px;align-items:flex-start;margin:0;padding:12px;border:1px solid #d7e0e8;border-radius:12px;background:#fff;cursor:pointer}.damage-mail-vehicle-choice input{width:auto;margin:2px 0 0;padding:0;flex:0 0 auto}.damage-mail-vehicle-choice span{display:grid;gap:3px;min-width:0}.damage-mail-vehicle-choice small{font-weight:400;color:#5f7182;overflow:hidden;text-overflow:ellipsis}.damage-mail-vehicle-card{scroll-margin-top:88px}.damage-mail-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}.damage-mail-photo-slot{border:1px solid #d7e0e8;border-radius:12px;padding:10px;background:#f8fafc}.damage-mail-photo-slot input{font-size:.85rem;padding:9px}.damage-mail-photo-slot .danger{width:100%;margin-top:8px;padding:9px}.damage-mail-photo-preview{aspect-ratio:4/3;display:grid;place-items:center;border-radius:10px;overflow:hidden;background:#eaf0f5;color:#66798a;font-size:.82rem;text-align:center}.damage-mail-photo-preview img{width:100%;height:100%;object-fit:cover}@media(max-width:760px){.damage-mail-vehicle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.damage-mail-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.damage-mail-vehicle-card .section-heading-row{align-items:flex-start}.damage-mail-vehicle-card .section-heading-row .button{width:100%}}@media(max-width:390px){.damage-mail-vehicle-grid{grid-template-columns:1fr}.damage-mail-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.damage-email-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin-bottom:8px}.damage-email-row input{margin:0}.damage-email-row .button{min-width:44px;padding:10px 13px}.damage-mail-confirm{margin-top:14px}.damage-mail-known-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:12px}.damage-mail-known-choice{display:grid;gap:6px;margin:0;padding:7px;border:1px solid #d7e0e8;border-radius:11px;background:#fff;cursor:pointer;position:relative}.damage-mail-known-choice>input{position:absolute;top:9px;left:9px;width:20px;height:20px;margin:0;z-index:2;accent-color:#17324d}.damage-mail-known-thumb{display:block;aspect-ratio:1/1;border-radius:8px;overflow:hidden;background:#eaf0f5}.damage-mail-known-thumb img{width:100%;height:100%;object-fit:cover}.damage-mail-known-meta{display:grid;gap:2px;min-width:0}.damage-mail-known-meta strong,.damage-mail-known-meta small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.damage-mail-known-meta small{color:#5f7182;font-size:.72rem}@media(max-width:760px){.damage-mail-known-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.damage-mail-known-choice{padding:5px}.damage-mail-known-choice>input{top:7px;left:7px}}@media(max-width:360px){.damage-mail-known-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v26 Admin-Log */
.admin-log-card{grid-column:1/-1}.admin-system-log{max-height:420px;overflow:auto;margin:14px 0 0;padding:14px;border:1px solid #d7e0e8;border-radius:12px;background:#0e1b27;color:#eef6fc;font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;white-space:pre-wrap;overflow-wrap:anywhere}.admin-log-card .section-heading-row form{margin:0}@media(max-width:600px){.admin-log-card .section-heading-row{align-items:flex-start}.admin-log-card .section-heading-row form,.admin-log-card .section-heading-row .danger{width:100%}.admin-system-log{max-height:360px;font-size:11px;padding:11px}}

/* v26.2 Admin-Log: mobile Breitenbegrenzung und sicherer Zeilenumbruch */
.admin-log-card{min-width:0;max-width:100%;overflow:hidden}
.admin-system-log{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
    overflow-y:auto;
    overflow-x:hidden;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.admin-system-log *{max-width:100%}
@media(max-width:600px){
    .admin-log-card{padding-left:12px;padding-right:12px}
    .admin-system-log{font-size:10.5px;line-height:1.5;padding:10px}
}

/* v27 Controller-Wochenansicht, globale Schadenshistorie und Foto-Neuaufnahme */
.control-overview-head{display:flex;align-items:center;justify-content:space-between;gap:18px}.control-overview-head h1{margin-bottom:5px}.week-badge{flex:0 0 auto;padding:9px 13px;border-radius:999px;background:#e8f1f9;color:#0d3155;font-size:.9rem}.control-day{display:grid;gap:12px;margin:22px 0 30px}.control-day-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;padding:0 4px}.control-day-heading>div{display:grid;gap:2px}.control-day-heading span{font-size:.82rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#5b7186}.control-day-heading strong{font-size:1.35rem;color:#0d3155}.control-day-heading small{font-weight:700;color:#5f7182}.control-vehicle{margin:0;padding:0;overflow:hidden}.control-vehicle-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px;background:#0d3155;color:#fff}.control-vehicle-heading h2{margin:0;color:#fff}.control-vehicle-heading span{padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.15);font-size:.8rem;font-weight:800}.control-inspection-list{display:grid;gap:0}.control-inspection{padding:16px;border-top:1px solid #dce5ed}.control-inspection:first-child{border-top:0}.control-inspection-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:13px}.control-inspection-heading>div{display:grid;gap:4px}.control-inspection-heading small{color:#5f7182}.control-type{display:inline-flex;width:max-content;padding:4px 8px;border-radius:7px;background:#eaf3fb;color:#174c76;font-size:.78rem;font-weight:800}.photo-total{white-space:nowrap;padding:6px 9px;border-radius:999px;background:#edf9f1;color:#17643a;font-size:.78rem;font-weight:800}.control-photo-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.control-photo{display:grid;gap:5px;min-width:0;padding:6px;border:1px solid #d8e2ea;border-radius:10px;background:#f9fbfd;text-decoration:none;color:#17324d}.control-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:7px;background:#111}.control-photo span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.72rem;font-weight:700}.replace-check-photo{margin:10px 14px 0;width:calc(100% - 28px)}.note-photo span{padding:12px;color:#6b7d8c;text-align:center}.all-known-damages{margin-top:18px}.all-known-damage-vehicles{display:grid;gap:12px}.all-known-damage-vehicle{border:1px solid #d4dfe8;border-radius:14px;overflow:hidden;background:#f9fbfd}.all-known-damage-vehicle>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;cursor:pointer;list-style:none;background:#edf4fa}.all-known-damage-vehicle>summary::-webkit-details-marker{display:none}.all-known-damage-vehicle>summary span{display:grid;gap:2px}.all-known-damage-vehicle>summary small{color:#607487;font-weight:500}.all-known-damage-vehicle>summary b{min-width:32px;padding:4px 8px;border-radius:999px;background:#0d3155;color:#fff;text-align:center;font-size:.8rem}.all-known-damage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px}.all-known-damage-item{display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px;padding:9px;border:1px solid #dbe5ed;border-radius:11px;background:#fff;min-width:0}.all-known-damage-item>a,.damage-no-photo{width:110px;height:90px;border-radius:8px;overflow:hidden;background:#e8eef3}.all-known-damage-item img{display:block;width:100%;height:100%;object-fit:cover}.damage-no-photo{display:grid;place-items:center;padding:8px;color:#66798a;font-size:.75rem;text-align:center}.all-known-damage-item>div:last-child{display:grid;gap:3px;align-content:start;min-width:0}.all-known-damage-item span,.all-known-damage-item small{color:#5f7182}.all-known-damage-item p{margin:2px 0;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:900px){.control-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.all-known-damage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.control-overview-head,.control-inspection-heading{align-items:flex-start;flex-direction:column}.week-badge{align-self:flex-start}.control-day-heading{align-items:flex-start}.control-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.all-known-damage-grid{grid-template-columns:1fr}.all-known-damage-item{grid-template-columns:88px minmax(0,1fr)}.all-known-damage-item>a,.damage-no-photo{width:88px;height:76px}.replace-check-photo{font-size:.82rem}}

/* v27.1: kompakte Fahrzeuglisten fuer Kontrollen und bekannte Schaeden */
.control-day{gap:10px}.control-vehicle{margin:0}.control-vehicle-button,.all-known-damage-button{width:100%;min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border:1px solid #bfcfdd;border-radius:14px;background:#fff;color:#0d3155;text-align:left;box-shadow:0 2px 8px rgba(13,49,85,.06);cursor:pointer}.control-vehicle-button:hover,.all-known-damage-button:hover{background:#f4f8fb;border-color:#92acc2}.control-vehicle-button:focus-visible,.all-known-damage-button:focus-visible{outline:3px solid rgba(13,49,85,.22);outline-offset:2px}.control-vehicle-button[aria-expanded="true"],.all-known-damage-button[aria-expanded="true"]{background:#0d3155;border-color:#0d3155;color:#fff;border-radius:14px 14px 0 0}.control-vehicle-button>span,.all-known-damage-button>span{display:grid;gap:3px;min-width:0}.control-vehicle-button strong,.all-known-damage-button strong{font-size:1.08rem;color:inherit}.control-vehicle-button small,.all-known-damage-button small{font-size:.82rem;color:#617587;font-weight:600}.control-vehicle-button[aria-expanded="true"] small,.all-known-damage-button[aria-expanded="true"] small{color:rgba(255,255,255,.78)}.control-vehicle-button>b,.all-known-damage-button>b{flex:0 0 auto;padding:8px 11px;border-radius:10px;background:#e8f1f9;color:#0d3155;font-size:.78rem;font-weight:800;text-align:center}.control-vehicle-button[aria-expanded="true"]>b,.all-known-damage-button[aria-expanded="true"]>b{background:rgba(255,255,255,.16);color:#fff}.control-inspection-list,.all-known-damage-grid{border:1px solid #cfdbe5;border-top:0;border-radius:0 0 14px 14px;background:#f8fafc}.control-inspection-list[hidden],.all-known-damage-grid[hidden]{display:none!important}.all-known-damage-vehicles{gap:10px}.all-known-damage-vehicle{border:0;border-radius:14px;overflow:visible;background:transparent}.all-known-damage-grid{padding:14px}.control-inspection{background:#fff}.control-photo-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.control-photo img{aspect-ratio:4/3;max-height:220px}.all-known-damage-button{min-height:74px}.all-known-damage-button>b{min-width:105px}.camera-flow>.captured-gallery{display:none!important}
@media(max-width:760px){.control-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.control-vehicle-button,.all-known-damage-button{min-height:76px;padding:15px}.control-vehicle-button>b,.all-known-damage-button>b{min-width:96px;white-space:normal}.all-known-damage-grid{padding:10px}}
@media(max-width:430px){.control-vehicle-button,.all-known-damage-button{align-items:flex-start;flex-direction:column}.control-vehicle-button>b,.all-known-damage-button>b{width:100%;min-width:0}.control-photo-grid{grid-template-columns:1fr}.control-photo img{max-height:none}}

/* v27.2: einheitliche Fahrzeugbuttons mit klaren Spalten / Tabstopps */
.control-vehicle-button,
.all-known-damage-button{
    display:grid;
    grid-template-columns:minmax(150px,1.35fr) minmax(105px,.55fr) minmax(120px,.7fr);
    align-items:center;
    gap:18px;
    width:100%;
    min-height:76px;
    padding:14px 16px;
}
.control-vehicle-button .vehicle-button-plate,
.all-known-damage-button .vehicle-button-plate{
    display:grid;
    gap:3px;
    min-width:0;
    padding-right:18px;
    border-right:1px solid #d6e1e9;
}
.control-vehicle-button .vehicle-button-plate strong,
.all-known-damage-button .vehicle-button-plate strong{
    font-size:1.12rem;
    letter-spacing:.025em;
    white-space:nowrap;
}
.control-vehicle-button .vehicle-button-count,
.all-known-damage-button .vehicle-button-count{
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:baseline;
    gap:7px;
    min-width:0;
    padding-right:18px;
    border-right:1px solid #d6e1e9;
}
.control-vehicle-button .vehicle-button-count strong,
.all-known-damage-button .vehicle-button-count strong{
    font-size:1.2rem;
    line-height:1;
    color:inherit;
}
.control-vehicle-button .vehicle-button-count small,
.all-known-damage-button .vehicle-button-count small{
    color:#617587;
    font-size:.82rem;
    font-weight:700;
    white-space:nowrap;
}
.control-vehicle-button .vehicle-button-action,
.all-known-damage-button .vehicle-button-action{
    width:100%;
    min-width:0;
    padding:9px 12px;
    justify-self:stretch;
    text-align:center;
}
.control-vehicle-button[aria-expanded="true"] .vehicle-button-plate,
.control-vehicle-button[aria-expanded="true"] .vehicle-button-count,
.all-known-damage-button[aria-expanded="true"] .vehicle-button-plate,
.all-known-damage-button[aria-expanded="true"] .vehicle-button-count{
    border-color:rgba(255,255,255,.22);
}
.control-vehicle-button[aria-expanded="true"] .vehicle-button-count small,
.all-known-damage-button[aria-expanded="true"] .vehicle-button-count small{
    color:rgba(255,255,255,.78);
}
@media(max-width:680px){
    .control-vehicle-button,
    .all-known-damage-button{
        grid-template-columns:minmax(0,1fr) 92px;
        gap:10px 12px;
        padding:13px 14px;
    }
    .control-vehicle-button .vehicle-button-plate,
    .all-known-damage-button .vehicle-button-plate{
        grid-column:1;
        grid-row:1;
        padding-right:12px;
    }
    .control-vehicle-button .vehicle-button-count,
    .all-known-damage-button .vehicle-button-count{
        grid-column:2;
        grid-row:1;
        display:grid;
        grid-template-columns:1fr;
        gap:2px;
        padding:0;
        border-right:0;
        text-align:right;
    }
    .control-vehicle-button .vehicle-button-count small,
    .all-known-damage-button .vehicle-button-count small{
        white-space:normal;
    }
    .control-vehicle-button .vehicle-button-action,
    .all-known-damage-button .vehicle-button-action{
        grid-column:1 / -1;
        grid-row:2;
    }
}

/* v28: feste Touren, Tourenplanung und sortierbare Benutzeruebersicht */
.tour-overview-head,.tour-edit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap}.tour-overview-head h1,.tour-edit-head h1{margin:.35rem 0 .45rem}.tour-overview-head p,.tour-edit-head p{margin:0;color:#5f7182}.tour-date-badge{display:inline-flex;padding:5px 9px;border-radius:999px;background:#e8f1f9;color:#174d7d;font-size:.78rem;font-weight:800}.tour-overview-list{display:grid;gap:10px}.tour-overview-row{display:grid;grid-template-columns:minmax(130px,.7fr) minmax(220px,1.4fr) minmax(180px,.9fr) auto;align-items:center;gap:14px;padding:15px;border:1px solid #d7e0e8;border-radius:13px;background:#fff;color:#17324d;text-decoration:none}.tour-overview-row:hover{border-color:#91acc3;background:#f7fafc}.tour-overview-row>span{display:grid;gap:3px;min-width:0}.tour-overview-row small{color:#607487;font-size:.82rem}.tour-overview-main strong,.tour-overview-vehicle strong{overflow-wrap:anywhere}.tour-overview-open{display:inline-flex!important;justify-content:center;padding:8px 11px;border-radius:9px;background:#e8f1f9;color:#0d3155;font-size:.82rem;font-weight:800}.tour-form{display:grid;gap:0}.tour-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 14px}.tour-driver-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tour-driver-choice{display:flex;align-items:center;gap:11px;margin:0;padding:11px;border:1px solid #d7e0e8;border-radius:12px;background:#f9fbfd;cursor:pointer}.tour-driver-choice input{width:22px;height:22px;min-height:0;margin:0;flex:0 0 auto}.tour-driver-choice span{display:grid;gap:2px;min-width:0}.tour-driver-choice small{color:#607487;font-weight:400}.tour-stop-editor{display:grid;gap:12px}.tour-stop-edit{padding:14px;border:1px solid #d5e0e8;border-radius:14px;background:#f9fbfd}.tour-stop-edit-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.tour-stop-tools{display:flex;gap:7px;align-items:center}.tour-stop-tools .button,.tour-stop-tools .danger{padding:8px 10px;min-height:40px}.tour-stop-tools button:disabled{opacity:.38;cursor:not-allowed}.tour-stop-edit-grid{display:grid;grid-template-columns:minmax(0,1.3fr) repeat(2,minmax(115px,.45fr));gap:0 12px}.tour-stop-address,.tour-stop-issue{grid-column:1/-1}.tour-stop-address textarea{min-height:70px}.tour-save-card{position:sticky;bottom:8px;z-index:4;border:1px solid #c8d8e5;box-shadow:0 10px 36px rgba(23,50,77,.18)}.tour-secondary-actions form{margin:0}.tour-detail-card{display:grid;gap:18px}.tour-detail-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.tour-detail-title h1{margin:.45rem 0 0}.tour-vehicle-badge{display:inline-flex;padding:10px 13px;border-radius:10px;background:#0d3155;color:#fff;white-space:nowrap}.tour-facts{display:grid;grid-template-columns:minmax(190px,1.5fr) repeat(4,minmax(90px,.55fr));gap:10px}.tour-facts>div{display:grid;gap:4px;padding:11px;border:1px solid #dbe4eb;border-radius:11px;background:#f8fafc}.tour-facts span,.tour-facts small{font-size:.75rem;color:#607487;text-transform:uppercase;letter-spacing:.04em;font-weight:700}.tour-facts strong{overflow-wrap:anywhere}.tour-stop-list{display:grid;gap:10px}.tour-stop-card{display:grid;grid-template-columns:42px minmax(0,1.5fr) minmax(180px,.65fr) minmax(150px,.65fr);align-items:center;gap:12px;padding:13px;border:1px solid #d8e2ea;border-radius:13px;background:#fff}.tour-stop-number{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#e8f1f9;color:#0d3155;font-weight:800}.tour-stop-main{display:grid;gap:4px;min-width:0}.tour-stop-main p{margin:0;color:#607487;line-height:1.4}.tour-stop-times{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tour-stop-times span,.tour-stop-issue-view{display:grid;gap:3px;padding:8px;border-radius:9px;background:#f5f8fb}.tour-stop-times small,.tour-stop-issue-view small{color:#607487;font-size:.72rem}.tour-stop-issue-view strong{overflow-wrap:anywhere}.tour-notes{margin-top:14px;padding:14px;border-radius:12px;background:#f7f9fb}.tour-notes p{margin:.4rem 0 0;line-height:1.5}.today-tour-list{display:grid;gap:10px;margin:16px 0}.today-tour-choice{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px;border:1px solid #d7e0e8;border-radius:13px;color:#17324d;text-decoration:none;background:#fff}.today-tour-choice:hover{background:#f6f9fc;border-color:#92acc2}.today-tour-choice span{display:grid;gap:4px}.today-tour-choice small{color:#607487}.today-tour-choice b{padding:8px 11px;border-radius:9px;background:#e8f1f9;color:#0d3155;font-size:.82rem}.planned-tour-lock{display:grid;gap:12px;margin:12px 0;padding:14px;border:2px solid #90b2cf;border-radius:14px;background:#f4f8fc}.planned-tour-lock-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.planned-tour-lock-head>span{font-size:.82rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#174d7d}.planned-tour-lock-head .button{padding:8px 11px}.planned-tour-lock-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.planned-tour-lock-grid>div{display:grid;gap:3px;padding:9px;border-radius:9px;background:#fff;border:1px solid #dce6ee}.planned-tour-lock-grid small{color:#607487;font-size:.72rem}.planned-tour-drivers{grid-column:1/-1}.planned-tour-lock #vehicle-select{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none;margin:0;padding:0;border:0}.user-sort-header,.user-summary-grid{display:grid;grid-template-columns:minmax(190px,1.35fr) minmax(110px,.6fr) minmax(120px,.7fr) minmax(170px,1fr) minmax(92px,.45fr);align-items:center;gap:12px}.user-sort-header{padding:0 16px 8px;color:#52687b;font-size:.8rem;font-weight:800}.user-sort-header>div{display:flex;align-items:center;gap:6px}.user-sort-header>div>span{display:flex;gap:3px}.user-sort-header button{min-height:30px;padding:3px 7px;border-radius:7px;background:#fff;color:#0d3155;font-size:.9rem}.user-sort-header button.is-active{background:#0d3155;color:#fff}.accordion-item summary.user-summary-grid{display:grid}.user-summary-name{display:grid;gap:3px;min-width:0}.user-summary-name small{overflow-wrap:anywhere}.user-summary-value,.user-summary-notes{font-size:.88rem;overflow-wrap:anywhere}.user-summary-notes{color:#536b7f}.user-summary-action{justify-self:end;padding:6px 9px;border-radius:8px;background:#e8f1f9;color:#0d3155;font-size:.78rem;font-weight:800}
@media(max-width:900px){.tour-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tour-overview-row{grid-template-columns:minmax(120px,.7fr) minmax(0,1.4fr) minmax(150px,.8fr)}.tour-overview-open{grid-column:1/-1}.tour-facts{grid-template-columns:repeat(3,minmax(0,1fr))}.tour-facts>div:first-child{grid-column:1/-1}.tour-stop-card{grid-template-columns:38px minmax(0,1fr) minmax(170px,.8fr)}.tour-stop-issue-view{grid-column:2/-1}.user-sort-header,.user-summary-grid{grid-template-columns:minmax(170px,1.3fr) minmax(100px,.6fr) minmax(115px,.7fr) minmax(150px,1fr) 86px;gap:8px}.user-sort-header{padding-inline:12px}}
@media(max-width:700px){.tour-overview-head,.tour-edit-head,.tour-detail-title{flex-direction:column}.tour-overview-row{grid-template-columns:1fr 1fr}.tour-overview-main{grid-column:1/-1;grid-row:1}.tour-overview-date{grid-column:1;grid-row:2}.tour-overview-vehicle{grid-column:2;grid-row:2}.tour-overview-open{grid-row:3}.tour-form-grid,.tour-driver-grid{grid-template-columns:1fr}.tour-stop-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tour-stop-name,.tour-stop-address,.tour-stop-issue{grid-column:1/-1}.tour-stop-card{grid-template-columns:36px minmax(0,1fr)}.tour-stop-times,.tour-stop-issue-view{grid-column:2}.tour-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.tour-facts>div:first-child{grid-column:1/-1}.planned-tour-lock-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.planned-tour-drivers{grid-column:1/-1}.user-sort-header{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0 0 10px}.user-sort-header>div:last-child{display:none}.accordion-item summary.user-summary-grid{grid-template-columns:1fr auto;align-items:start}.user-summary-name{grid-column:1}.user-summary-action{grid-column:2;grid-row:1}.user-summary-value,.user-summary-notes{grid-column:1/-1;display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px}.user-summary-value:before,.user-summary-notes:before{content:attr(data-label);font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:#708295;font-weight:800}.tour-save-card{bottom:4px}}
@media(max-width:440px){.tour-overview-row{grid-template-columns:1fr}.tour-overview-main,.tour-overview-date,.tour-overview-vehicle,.tour-overview-open{grid-column:1;grid-row:auto}.tour-stop-tools{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.tour-stop-edit-head{align-items:stretch;flex-direction:column}.tour-stop-edit-grid{grid-template-columns:1fr}.tour-stop-name,.tour-stop-address,.tour-stop-issue{grid-column:1}.tour-facts,.planned-tour-lock-grid{grid-template-columns:1fr}.tour-facts>div:first-child,.planned-tour-drivers{grid-column:1}.tour-stop-card{grid-template-columns:34px minmax(0,1fr);align-items:start}.tour-stop-times{grid-template-columns:1fr 1fr}.today-tour-choice{align-items:stretch;flex-direction:column}.today-tour-choice b{text-align:center}.user-sort-header{grid-template-columns:1fr}.user-sort-header>div{justify-content:space-between}}

/* Touren: Excel-Import und vollständige Tagesübersicht */
.flash.warning{color:#7a4a00;background:#fff8e8;border-color:#e8c46a}.tour-import-card{border:1px solid #cbd9e5}.tour-import-form{display:grid;grid-template-columns:minmax(190px,.65fr) minmax(280px,1.35fr) auto;gap:12px;align-items:end}.tour-import-form label{margin:0}.tour-import-form button{min-height:48px}.tour-day-section{margin:0 0 24px}.tour-day-heading{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:0 2px 12px}.tour-day-heading span{display:block;color:#6b7e90;font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.tour-day-heading h2{margin:3px 0 0}.tour-day-heading>strong{padding:6px 10px;border-radius:999px;background:#e8f1f9;color:#174d7d;font-size:.8rem}.tour-board-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.tour-board-card{margin:0;padding:18px;min-width:0}.tour-board-card.has-warning{border:2px solid #e0b453}.tour-board-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.tour-board-card-head h3{margin:7px 0 0;font-size:1.18rem;line-height:1.25}.tour-board-card-head .button{padding:8px 11px;white-space:nowrap}.tour-board-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}.tour-board-facts>div{display:grid;gap:3px;padding:9px 10px;border:1px solid #dbe4eb;border-radius:10px;background:#f8fafc;min-width:0}.tour-board-facts small{color:#6b7e90;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;font-weight:800}.tour-board-facts strong{overflow-wrap:anywhere}.tour-import-warning{display:grid;gap:4px;margin:0 0 12px;padding:10px 11px;border-radius:10px;background:#fff7df;color:#704800;font-size:.83rem}.tour-import-warning span{font-weight:400;line-height:1.4}.tour-import-warning-card{border:2px solid #e0b453;background:#fffaf0}.tour-import-warning-card h2{margin-top:0}.tour-import-warning-card ul{margin:.5rem 0 0;padding-left:1.3rem}.tour-board-route{border:1px solid #d6e0e8;border-radius:11px;overflow:hidden}.tour-board-route-head,.tour-board-route-row{display:grid;grid-template-columns:minmax(0,1.55fr) 72px 72px minmax(85px,.6fr);align-items:stretch}.tour-board-route-head{background:#0d3155;color:#fff;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em}.tour-board-route-head span,.tour-board-route-row>span{padding:8px;border-right:1px solid #d6e0e8;min-width:0}.tour-board-route-head span:last-child,.tour-board-route-row>span:last-child{border-right:0}.tour-board-route-row{border-top:1px solid #d6e0e8;background:#fff;font-size:.84rem}.tour-board-route-row:first-of-type{border-top:0}.tour-board-route-row>span:not(:first-child){text-align:center;font-variant-numeric:tabular-nums}.tour-board-route-row>span:last-child{background:#fff5ee}.tour-board-route-row strong{display:block;overflow-wrap:anywhere}.tour-board-route-row small{display:block;margin-top:3px;color:#6a7d8f;line-height:1.3;overflow-wrap:anywhere}.tour-board-route-row br{line-height:1.3}
@media(max-width:900px){.tour-import-form{grid-template-columns:1fr 1fr}.tour-import-form button{grid-column:1/-1}.tour-board-grid{grid-template-columns:1fr}}
@media(max-width:700px){.tour-import-form{grid-template-columns:1fr}.tour-import-form button{grid-column:1}.tour-day-heading{align-items:flex-start}.tour-board-card{padding:14px}.tour-board-route-head{display:none}.tour-board-route-row{grid-template-columns:repeat(3,minmax(0,1fr));padding:8px;gap:6px}.tour-board-route-row>span{border:0!important;padding:6px 7px;border-radius:8px;background:#f6f9fb;text-align:left!important}.tour-board-route-row>span:first-child{grid-column:1/-1;background:#fff;padding:3px 2px 7px}.tour-board-route-row>span:nth-child(2)::before{content:"Ankunft"}.tour-board-route-row>span:nth-child(3)::before{content:"Abfahrt"}.tour-board-route-row>span:nth-child(4)::before{content:"Ausgabe"}.tour-board-route-row>span:not(:first-child)::before{display:block;margin-bottom:3px;color:#718394;font-size:.63rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.tour-board-route-row>span:last-child{background:#fff5ee}}
@media(max-width:440px){.tour-board-card-head{flex-direction:column}.tour-board-card-head .button{width:100%;text-align:center}.tour-board-facts{grid-template-columns:1fr}.tour-day-heading{flex-direction:column;gap:7px}}

/* Touren: wiederkehrende Planung, Suche, Sortierung und Schnellzuweisung */
.tour-search-card,.tour-sort-card{border:1px solid #cbd9e5}.tour-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.tour-search-form label{margin:0}.tour-search-form .action-row{margin:0}.tour-sort-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.tour-sort-heading h2{margin:0}.tour-sort-heading p{margin:4px 0 0;color:#607487}.tour-sort-bar{display:flex;gap:8px;overflow-x:auto;padding:2px 0 6px;scrollbar-width:thin}.tour-sort-control{flex:0 0 auto;display:grid;grid-template-columns:auto 32px 32px;align-items:center;gap:4px;padding:6px 7px 6px 10px;border:1px solid #d4dee7;border-radius:10px;background:#f8fafc}.tour-sort-control>span{font-size:.78rem;font-weight:800;color:#52687b;white-space:nowrap}.tour-sort-arrow{display:grid;place-items:center;width:32px;height:32px;border:1px solid #b9c8d6;border-radius:8px;background:#fff;color:#0d3155;text-decoration:none;font-weight:900}.tour-sort-arrow.is-active{background:#0d3155;color:#fff;border-color:#0d3155}.tour-board-section{margin-bottom:22px}.tour-board-card{scroll-margin-top:90px}.tour-board-card-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}.tour-board-card-actions form{margin:0}.tour-board-card-actions .button,.tour-board-card-actions button{min-height:38px;padding:8px 11px;white-space:nowrap}.tour-card-badges,.tour-meta-badges{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.tour-card-badges>span,.tour-meta-badges>span{display:inline-flex;align-items:center;min-height:25px;padding:4px 8px;border-radius:999px;background:#edf3f8;color:#425d74;font-size:.68rem;font-weight:800;line-height:1.2}.tour-card-badges .tour-date-badge{background:#e8f1f9;color:#174d7d}.tour-card-badges .is-today{background:#edf9f1;color:#17643a}.tour-meta-badges{margin-top:7px}.tour-quick-assign{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(180px,1.2fr) auto;gap:9px;align-items:end;margin:0 0 12px;padding:11px;border:1px solid #cbd9e5;border-radius:11px;background:#f6f9fc}.tour-quick-assign label{margin:0}.tour-quick-assign select{margin-top:5px;padding:9px;min-height:42px}.tour-quick-assign>button{min-height:42px;padding:9px 12px}.tour-quick-label{display:block;margin:0 0 5px;font-size:.82rem;font-weight:800}.tour-driver-dropdown{position:relative}.tour-driver-dropdown>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:42px;padding:9px 11px;border:1px solid #b9c7d5;border-radius:10px;background:#fff;cursor:pointer;font-size:.88rem;font-weight:700;list-style:none}.tour-driver-dropdown>summary::-webkit-details-marker{display:none}.tour-driver-dropdown>summary::after{content:"▾";font-size:.8rem}.tour-driver-dropdown[open]>summary::after{content:"▴"}.tour-driver-dropdown-panel{position:absolute;z-index:8;top:calc(100% + 4px);left:0;right:0;max-height:260px;overflow:auto;padding:7px;border:1px solid #b9c7d5;border-radius:10px;background:#fff;box-shadow:0 12px 28px rgba(23,50,77,.18)}.tour-driver-dropdown-panel label{display:flex;align-items:center;gap:9px;margin:0;padding:8px;border-radius:8px;font-weight:400}.tour-driver-dropdown-panel label:hover{background:#f1f6fa}.tour-driver-dropdown-panel input{width:18px;height:18px;min-height:0;margin:0;flex:0 0 auto}.tour-driver-dropdown-panel span{display:grid;gap:2px;min-width:0}.tour-driver-dropdown-panel strong{font-size:.84rem;overflow-wrap:anywhere}.tour-driver-dropdown-panel small{font-size:.72rem;color:#6b7e90}.tour-auto-date-note{display:grid;gap:4px;margin-top:14px;padding:11px 12px;border-radius:10px;background:#eef6fc;border:1px solid #c8dceb}.tour-auto-date-note strong{font-size:.82rem;color:#174d7d}.tour-auto-date-note span{font-size:.84rem;line-height:1.45;color:#536b7f}.tour-import-form{grid-template-columns:minmax(170px,.7fr) minmax(220px,.9fr) minmax(260px,1.3fr) auto}.tour-delete-form button{font-weight:700}
@media(max-width:1000px){.tour-quick-assign{grid-template-columns:1fr 1fr}.tour-quick-assign>button{grid-column:1/-1}.tour-import-form{grid-template-columns:1fr 1fr}.tour-import-form button{grid-column:1/-1}}
@media(max-width:700px){.tour-search-form{grid-template-columns:1fr}.tour-search-form .action-row{margin-top:0}.tour-sort-card{padding-inline:14px}.tour-quick-assign{grid-template-columns:1fr}.tour-quick-assign>button{grid-column:1}.tour-driver-dropdown-panel{position:static;margin-top:5px;box-shadow:none}.tour-import-form{grid-template-columns:1fr}.tour-import-form button{grid-column:1}.tour-board-card-actions{align-items:stretch}}
@media(max-width:440px){.tour-board-card-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.tour-board-card-actions>*{width:100%}.tour-board-card-actions .button,.tour-board-card-actions button{width:100%;text-align:center}.tour-sort-control{grid-template-columns:minmax(105px,1fr) 36px 36px;flex-basis:100%}.tour-sort-bar{display:grid;overflow:visible}.tour-card-badges>span{font-size:.65rem}.tour-meta-badges>span{font-size:.66rem}}

/* Kontrolle: Service-Meldungen und verpflichtende Update-Benachrichtigungen */
html.update-notice-locked,
body.update-notice-locked{overflow:hidden}
.update-notice-locked header,
.update-notice-locked main>:not(.update-notice-overlay){pointer-events:none;user-select:none}
.update-notice-overlay{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:18px;background:rgba(7,25,42,.78);backdrop-filter:blur(4px);pointer-events:auto}
.update-notice-dialog{width:min(560px,100%);max-height:calc(100dvh - 36px);overflow:auto;padding:24px;border:1px solid rgba(255,255,255,.22);border-radius:18px;background:#fff;box-shadow:0 24px 80px rgba(0,0,0,.32)}
.update-notice-kicker{margin-bottom:7px;color:#a54816;font-size:.75rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.update-notice-counter{display:inline-flex;margin-bottom:8px;padding:5px 9px;border-radius:999px;background:#eef4f9;color:#39576e;font-size:.74rem;font-weight:800}
.update-notice-dialog h2{margin:2px 0 14px;color:#102f4b}
.update-notice-text{padding:14px 15px;border:1px solid #d5e0e8;border-radius:12px;background:#f8fafc;color:#203c55;font-size:1rem;line-height:1.55;overflow-wrap:anywhere}
.update-notice-meta{margin:10px 0 0;color:#6a7d8e;font-size:.8rem}
.update-notice-confirm{margin:18px 0 0}
.update-notice-dialog>.hint{margin-bottom:0;text-align:center}
.update-notifications-admin{scroll-margin-top:88px}
.update-notice-create{display:grid;gap:10px}
.update-notice-create textarea{min-height:110px}
.update-notice-admin-list{display:grid;gap:12px;margin-top:14px}
.update-notice-admin-item{padding:15px;border:1px solid #d5e0e8;border-radius:13px;background:#f9fbfd}
.update-notice-admin-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.update-notice-admin-head>div{display:grid;gap:4px;min-width:0}
.update-notice-admin-head small{color:#6a7d8e}
.update-notice-admin-text{margin:12px 0;padding:12px;border-radius:10px;background:#fff;border:1px solid #dce5ec;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.update-notice-status{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 10px}
.update-notice-status span{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:.73rem;font-weight:800}
.update-notice-status .is-confirmed{background:#e9f7ef;color:#17633b}
.update-notice-status .is-open{background:#fff2e8;color:#8b431c}
.update-notice-user-list{display:grid;gap:6px;margin-top:9px}
.update-notice-user-row{display:grid;grid-template-columns:minmax(150px,1fr) minmax(90px,.55fr) minmax(150px,.9fr);gap:10px;align-items:center;padding:8px 10px;border-radius:9px;background:#fff;border:1px solid #e0e7ed;font-size:.83rem}
.update-notice-user-row>span:last-child{text-align:right;font-weight:700}
.update-notice-user-row.is-confirmed>span:last-child{color:#17633b}
.update-notice-user-row.is-open>span:last-child{color:#9a4a20}
.service-section{scroll-margin-top:88px}
.service-list{display:grid;gap:12px;margin:12px 0}
.service-card{border:1px solid #cbd9e5;border-radius:14px;background:#f9fbfd;overflow:hidden}
.service-card[open]{border-color:#8fb0ca;background:#f7fbfe}
.service-card summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;cursor:pointer;list-style:none;background:#eef4f9}
.service-card summary::-webkit-details-marker{display:none}
.service-card summary::after{content:"▾";margin-left:auto;color:#4b657b;font-size:.8rem}
.service-card[open] summary::after{content:"▴"}
.service-summary-status{max-width:56%;color:#4f667a;font-size:.78rem;font-weight:700;text-align:right;overflow-wrap:anywhere}
.service-card-content{display:grid;gap:11px;padding:14px}
.service-extra-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.service-card label{margin:0}
.service-card textarea{min-height:82px}
.service-photo-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;pointer-events:none!important;margin:0!important;padding:0!important;border:0!important}
.service-photo-preview{display:grid;place-items:center;min-height:105px;border:1px dashed #b9c8d5;border-radius:11px;background:#fff;color:#6d8091;overflow:hidden}
.service-photo-preview img{display:block;width:100%;max-height:250px;object-fit:contain;background:#edf2f6}
.service-card.has-photo .service-photo-preview{border-style:solid}
.service-photo-button .optional{margin-left:5px;opacity:.68;font-size:.76rem}
.service-admin-section{scroll-margin-top:88px}
.service-admin-count{display:inline-flex;margin-left:7px;padding:4px 8px;border-radius:999px;background:#e8f1f9;color:#174d7d;font-size:.75rem;font-weight:800;vertical-align:middle}
.service-admin-list{display:grid;gap:12px;margin-top:12px}
.service-admin-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(145px,.34fr);gap:14px;padding:15px;border:1px solid #d6e0e8;border-radius:13px;background:#f9fbfd}
.service-admin-main{min-width:0}
.service-admin-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.service-admin-title h3{margin:0;color:#17324d}
.service-admin-meta{display:flex;gap:7px 12px;flex-wrap:wrap;margin:6px 0;color:#617587;font-size:.8rem}
.service-admin-detail{margin:9px 0 0;font-weight:800;color:#294b67}
.service-admin-note{margin:8px 0 0;padding:10px;border-radius:9px;background:#fff;border:1px solid #dce5ec;line-height:1.45;overflow-wrap:anywhere}
.service-admin-mail{display:inline-flex;margin-top:9px;padding:5px 8px;border-radius:999px;font-size:.72rem;font-weight:800}
.service-admin-mail.is-sent{background:#e9f7ef;color:#17633b}
.service-admin-mail.is-failed{background:#fdebea;color:#8f2925}
.service-admin-mail.is-pending{background:#fff3df;color:#85521b}
.service-admin-photo{display:grid;gap:8px;align-content:start}
.service-admin-photo img{display:block;width:100%;max-height:190px;object-fit:cover;border-radius:10px;border:1px solid #d4dee7;background:#edf2f6}
.service-admin-photo .danger{width:100%}
@media(max-width:700px){
    .update-notice-dialog{padding:19px;border-radius:15px}
    .update-notice-admin-head{flex-direction:column}
    .update-notice-user-row{grid-template-columns:1fr auto}
    .update-notice-user-row>span:nth-child(2){grid-column:1}
    .update-notice-user-row>span:last-child{grid-column:2;grid-row:1 / span 2;align-self:center}
    .service-extra-grid{grid-template-columns:1fr}
    .service-admin-item{grid-template-columns:1fr}
    .service-admin-photo img{max-height:280px;object-fit:contain}
}
@media(max-width:440px){
    .update-notice-overlay{padding:10px}
    .update-notice-dialog{max-height:calc(100dvh - 20px);padding:16px}
    .service-card summary{align-items:flex-start;flex-wrap:wrap}
    .service-summary-status{max-width:100%;width:100%;text-align:left}
}

/* Feinabstimmung für Statuslisten und Service-Verwaltung */
.update-notice-status{display:block;margin:0;padding:0;border:0;background:transparent}
.update-notice-status>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid #d7e1e9;border-radius:9px;background:#fff;cursor:pointer;list-style:none;font-size:.82rem}
.update-notice-status>summary::-webkit-details-marker{display:none}
.update-notice-status>summary::after{content:"▾";color:#607487}
.update-notice-status[open]>summary::after{content:"▴"}
.update-notice-status>summary span{margin-left:auto;color:#607487;font-weight:700}
.update-notice-user-row{grid-template-columns:minmax(0,1fr) auto}
.update-notice-user-row>span{display:grid;gap:2px;min-width:0}
.update-notice-user-row>span small{color:#6b7e90;overflow-wrap:anywhere}
.update-notice-user-row>b{text-align:right;white-space:nowrap}
.update-notice-user-row.is-confirmed>b{color:#17633b}
.update-notice-user-row.is-open>b{color:#9a4a20}
.service-admin-item{grid-template-columns:minmax(0,1fr) minmax(145px,.32fr)}
.service-admin-body{min-width:0}
.service-admin-title>div{display:grid;gap:4px;min-width:0}
.service-admin-title>div>strong{font-size:1rem;color:#17324d;overflow-wrap:anywhere}
.service-admin-title>div>span{color:#617587;font-size:.8rem}
.service-mail-status{display:inline-flex;align-items:center;align-self:flex-start;padding:5px 8px;border-radius:999px;font-size:.7rem;white-space:nowrap}
.service-mail-sent{background:#e9f7ef;color:#17633b}
.service-mail-failed{background:#fdebea;color:#8f2925}
.service-mail-pending,.service-mail-unknown{background:#fff3df;color:#85521b}
.service-delete-form{margin-top:11px}
.service-delete-form .danger{width:100%}
.service-mail-error{margin-top:9px}
@media(max-width:700px){
    .update-notice-user-row{grid-template-columns:minmax(0,1fr)}
    .update-notice-user-row>b{text-align:left;white-space:normal}
    .update-notice-status>summary{align-items:flex-start;flex-wrap:wrap}
    .update-notice-status>summary span{width:100%;margin-left:0}
    .service-admin-item{grid-template-columns:1fr}
    .service-admin-photo{grid-row:auto}
    .service-admin-title{flex-direction:column}
}

/* Service-Sammelmeldungen, Mehrfachfotos und Schadenmarkierung */

.damage-marker-open{overflow:hidden}
.damage-marker-overlay{position:fixed;inset:0;z-index:1800;display:grid;place-items:center;padding:14px;background:rgba(5,18,31,.9);backdrop-filter:blur(4px)}
.damage-marker-overlay[hidden]{display:none!important}
.damage-marker-dialog{width:min(960px,100%);max-height:calc(100dvh - 28px);overflow:auto;padding:18px;border:1px solid rgba(255,255,255,.18);border-radius:18px;background:#fff;box-shadow:0 24px 80px rgba(0,0,0,.45)}
.damage-marker-dialog h2{margin:2px 0 6px;color:#17324d}
.damage-marker-dialog p{margin:.2rem 0 .8rem;line-height:1.45}
.damage-marker-kicker{display:inline-flex;padding:4px 8px;border-radius:999px;background:#fdeaea;color:#9a2226;font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.damage-marker-stage{display:grid;place-items:center;min-height:220px;max-height:68dvh;padding:8px;border-radius:14px;background:#10161c;overflow:auto;touch-action:manipulation}
.damage-marker-stage canvas{display:block;max-width:100%;max-height:64dvh;width:auto;height:auto;cursor:crosshair;border-radius:8px;background:#111;box-shadow:0 0 0 1px rgba(255,255,255,.08)}
.damage-marker-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}
.damage-marker-hint{margin:7px 0 0}

.service-card-content{gap:13px}
.service-card-intro{margin:0}
.service-choice-list{display:grid;gap:9px}
.service-choice{border:1px solid #d5e0e8;border-radius:12px;background:#fff;overflow:hidden}
.service-choice-toggle{display:flex!important;align-items:center;gap:11px!important;margin:0!important;padding:12px 13px;cursor:pointer;font-weight:800;color:#17324d}
.service-choice-toggle input{width:22px;height:22px;min-height:0;margin:0;flex:0 0 auto}
.service-choice-toggle span{min-width:0;overflow-wrap:anywhere}
.service-choice:has(.service-choice-toggle input:checked){border-color:#8aacC7;background:#f7fbfe}
.service-item-details{display:grid;gap:10px;padding:0 13px 13px;border-top:1px solid #e1e8ee;background:#f9fbfd}
.service-item-details[hidden]{display:none!important}
.service-item-details>label:first-child,.service-item-details>.service-extra-grid:first-child{margin-top:11px!important}
.service-photo-area{display:grid;gap:9px;padding-top:2px}
.service-photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:9px;min-height:92px;padding:9px;border:1px dashed #b9c8d5;border-radius:12px;background:#fff}
.service-photo-empty{grid-column:1/-1;display:grid;place-items:center;min-height:72px;color:#6d8091;text-align:center}
.service-photo-thumb{position:relative;min-width:0;border-radius:10px;overflow:hidden;background:#eef3f7;border:1px solid #d6e0e8}
.service-photo-thumb img{display:block;width:100%;height:120px;object-fit:cover;background:#111}
.service-photo-thumb button{position:absolute;top:6px;right:6px;width:32px;height:32px;min-height:0;padding:0;border:1px solid rgba(255,255,255,.75);border-radius:50%;background:rgba(116,24,24,.86);color:#fff;font-size:1.25rem;line-height:1}
.service-card.has-photo .service-photo-gallery{border-style:solid}
.service-photo-button .optional{margin-left:5px;opacity:.7;font-size:.76rem}

.service-vehicle-grid{display:grid;gap:10px}
.service-history-item{display:grid;gap:10px;padding:12px;border:1px solid #dce5ed;border-radius:12px;background:#fff}
.service-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.service-history-head strong{color:#17324d}
.service-history-head small{color:#617587;text-align:right}
.service-history-points,.service-admin-points{display:grid;gap:8px}
.service-history-point,.service-admin-point{padding:10px;border:1px solid #e1e8ee;border-radius:10px;background:#f8fafc}
.service-history-point strong,.service-admin-point strong{display:block;color:#17324d}
.service-history-point span,.service-admin-point span{display:block;margin-top:3px;color:#506a80;font-size:.82rem;font-weight:700}
.service-history-point p,.service-admin-point p{margin:6px 0 0;white-space:pre-wrap;line-height:1.4}
.service-history-photos,.service-admin-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.service-history-photos img,.service-admin-photo-grid img{display:block;width:100%;height:110px;object-fit:cover;border-radius:9px;border:1px solid #d4dee7;background:#111}
.service-admin-vehicles{margin-top:12px}
.service-admin-list{margin-top:0}
.service-admin-item{grid-template-columns:minmax(0,1.7fr) minmax(180px,.7fr)}
.service-admin-photo-grid{align-self:start}
.service-admin-photo-grid a{min-width:0}

@media(max-width:700px){
    .damage-marker-overlay{padding:8px}
    .damage-marker-dialog{max-height:calc(100dvh - 16px);padding:13px;border-radius:14px}
    .damage-marker-stage{max-height:62dvh;padding:5px}
    .damage-marker-stage canvas{max-height:59dvh}
    .damage-marker-actions{grid-template-columns:1fr}
    .service-photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
    .service-history-head{display:grid}
    .service-history-head small{text-align:left}
    .service-admin-item{grid-template-columns:1fr}
    .service-admin-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:430px){
    .service-photo-gallery{grid-template-columns:1fr 1fr}
    .service-photo-thumb img{height:105px}
}

/* 3-Wochen-Kontrollhistorie und Touren-Mehrfachauswahl */
.control-week-block{display:grid;gap:14px;margin:22px 0 34px}
.control-week-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-radius:13px;background:#17324d;color:#fff;box-shadow:0 5px 16px rgba(23,50,77,.12)}
.control-week-heading>div{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.control-week-heading strong{font-size:1.05rem}
.control-week-heading span{font-size:.84rem;font-weight:800;opacity:.86}
.control-week-block .control-day{margin:0}
.tour-bulk-card{border:1px solid #e1c2c4;background:#fffafa}
.tour-bulk-form{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0}
.tour-bulk-form>div:first-child{display:grid;gap:3px}
.tour-bulk-form>div:first-child strong{color:#6f2025}
.tour-bulk-form>div:first-child span{font-size:.82rem;color:#6d7d8b}
.tour-bulk-form .action-row{margin:0;justify-content:flex-end}
.tour-select-check{display:inline-flex!important;align-items:center;gap:7px!important;margin:0!important;padding:7px 9px;border:1px solid #c9d6e1;border-radius:9px;background:#f7fafc;color:#37536a;font-size:.78rem;font-weight:800;cursor:pointer;white-space:nowrap}
.tour-select-check input{width:18px;height:18px;min-height:0;margin:0;accent-color:#b3262d}
.tour-select-check:has(input:checked){border-color:#b3262d;background:#fff0f1;color:#8d1f25}
#tour-bulk-delete-button:disabled{opacity:.48;cursor:not-allowed}
@media(max-width:800px){.tour-bulk-form{align-items:stretch;flex-direction:column}.tour-bulk-form .action-row{justify-content:flex-start}.tour-board-card-actions{flex-wrap:wrap}.tour-select-check{order:-1}}
@media(max-width:520px){.tour-bulk-form .action-row{display:grid;grid-template-columns:1fr}.tour-bulk-form .action-row>*{width:100%}.control-week-heading>div{display:grid;gap:2px}}

/* Archiv-Bereinigung: Inspektionen älter als zwei Monate */
.old-inspection-cleanup{border:1px solid #e1c2c4;background:#fffafa;scroll-margin-top:16px}
.old-inspection-count{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;background:#f5e3e4;color:#7d252b;font-size:.82rem;font-weight:700;white-space:nowrap}
.old-inspection-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:14px 0}
.old-inspection-toolbar>div:first-child{display:grid;gap:3px}
.old-inspection-toolbar>div:first-child strong{color:#6f2025}
.old-inspection-toolbar>div:first-child span{font-size:.82rem;color:#6d7d8b}
.old-inspection-toolbar .action-row{margin:0;justify-content:flex-end}
.old-inspection-check{display:inline-flex;align-items:center;gap:8px;margin:0;white-space:nowrap;font-weight:600}
.old-inspection-check input{width:18px;height:18px;margin:0;accent-color:#9d252d}
#old-inspection-delete-button:disabled{opacity:.48;cursor:not-allowed}
@media(max-width:800px){.old-inspection-toolbar{align-items:stretch;flex-direction:column}.old-inspection-toolbar .action-row{justify-content:flex-start;display:grid;grid-template-columns:1fr}.old-inspection-toolbar .action-row>*{width:100%}.old-inspection-table{min-width:760px}}
