:root{
  --primary:#1f4e78;
  --primary-dark:#163b5c;
  --bg:#f3f6f9;
  --card:#fff;
  --text:#17212b;
  --muted:#65717d;
  --border:#dce3e9;
  --danger:#b42318;
  --shadow:0 10px 30px rgba(21,47,71,.08);
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--text);background:var(--bg);min-height:100vh}
button,input,textarea,select{font:inherit}
button,.file-button{
  border:0;border-radius:10px;background:var(--primary);color:#fff;padding:12px 16px;font-weight:700;cursor:pointer;
}
button:hover,.file-button:hover{background:var(--primary-dark)}
button.secondary,.file-button.secondary{background:#e8eef4;color:var(--primary)}
button.danger{background:#fbe9e7;color:var(--danger)}
button.small{padding:8px 10px;font-size:.86rem}
.hidden{display:none!important}
.app-header{display:flex;justify-content:space-between;gap:16px;align-items:center;background:#fff;padding:18px max(18px,calc((100% - 1180px)/2));border-bottom:1px solid var(--border)}
.brand{display:flex;gap:13px;align-items:center}
.brand-icon{width:54px;height:54px;border-radius:13px}
h1,h2,h3,p{margin-top:0}
h1{font-size:1.25rem;margin-bottom:3px}
.brand p,.section-heading p,.muted{color:var(--muted);margin-bottom:0}
.header-actions{display:flex;gap:10px;align-items:center}
.sync-status{font-size:.88rem;color:var(--muted)}
.tabs{position:sticky;top:0;z-index:10;display:flex;gap:8px;overflow-x:auto;padding:10px max(14px,calc((100% - 1180px)/2));background:#fff;border-bottom:1px solid var(--border)}
.tabs button{white-space:nowrap;background:transparent;color:var(--muted);padding:10px 12px}
.tabs button.active{background:#e9f1f8;color:var(--primary)}
main{max-width:1180px;margin:auto;padding:24px 16px 60px}
.view{display:none}
.view.active{display:block}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px}
.section-heading h2{margin-bottom:4px}
.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:20px;box-shadow:var(--shadow);margin-bottom:20px}
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
.kpi{background:#fff;border:1px solid var(--border);border-radius:16px;padding:18px;box-shadow:var(--shadow);min-width:0}
.kpi span{display:block;color:var(--muted);font-size:.9rem;margin-bottom:8px;overflow-wrap:anywhere}
.kpi strong{font-size:clamp(1rem,2.4vw,1.45rem);overflow-wrap:anywhere;line-height:1.15}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.form-grid h3{margin-bottom:0}
.full{grid-column:1/-1}
label{display:flex;flex-direction:column;gap:7px;font-weight:650}
input,textarea,select{width:100%;border:1px solid #cfd8df;border-radius:10px;background:#fff;padding:12px;color:var(--text)}
input:focus,textarea:focus,select:focus{outline:3px solid rgba(31,78,120,.13);border-color:var(--primary)}
.calculation{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;background:#edf4fa;border-radius:14px;padding:14px}
.calculation div{display:flex;flex-direction:column;gap:4px}
.calculation span{color:var(--muted);font-size:.88rem}
.calculation strong{font-size:1.15rem}
.form-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.file-button{display:inline-flex;align-items:center}
.pilot-mode #legacyImportControl,.pilot-mode #legacyPreviewSync,.pilot-mode #legacyCloudSetup,.pilot-mode #exportJson{display:none!important}
#pilotAccountCloudInfo[hidden]{display:none!important}
#localBackupPanel[hidden]{display:none!important}
.local-account-mode #legacyCloudSetup,.local-account-mode #legacyPreviewSync{display:none!important}
.local-account-mode.owner-cloud-settings #legacyCloudSetup{display:grid!important}
.owner-cloud-settings #legacyCloudSetup [hidden]{display:none!important}
.local-account-mode #previewOnlyNotice[hidden]{display:none!important}
.local-account-mode .customer-start-option[hidden]{display:none!important}
.file-button input{display:none}
.list{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.list.empty{padding:24px;text-align:center;color:var(--muted);background:#f7f9fb;border-radius:12px}
.list-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px 14px;padding:14px;border:1px solid var(--border);border-radius:13px;background:#fff;min-width:0}
.today-op-tile{cursor:pointer}
.today-op-tile:hover{box-shadow:inset 0 0 0 2px #69c3cd}
.today-op-tile:focus-visible{outline:3px solid #2777b9;outline-offset:3px}
.room-status-card.today-op-tile{cursor:pointer}
.grow{min-width:0;overflow-wrap:anywhere}
.list-item>.grow{grid-column:1}
.invoice-title,.invoice-meta{display:block;overflow-wrap:anywhere}
.invoice-meta{margin-top:4px;color:var(--muted);font-size:.9rem}
.invoice-side{grid-column:2;justify-self:end;text-align:right;min-width:0}
.amount{display:block;overflow-wrap:anywhere}
.badge{display:inline-block;margin-top:5px;border-radius:999px;padding:4px 8px;font-size:.78rem;text-transform:capitalize;background:#eef1f4}
.badge.bezahlt{background:#e6f4ea;color:#1e6b35}
.badge.offen{background:#fff4dd;color:#8a5a00}
.badge.storniert{background:#fbe9e7;color:var(--danger)}
.item-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-start;grid-column:1/-1;min-width:0}
#printArea{display:none}
@media (max-width:800px){
  .app-header{align-items:flex-start}
  .header-actions{flex-direction:column;align-items:flex-end}
  .kpi-grid{grid-template-columns:repeat(2,1fr)}
  .list-item{grid-template-columns:minmax(0,1fr)}
  .invoice-side{grid-column:1;justify-self:start;text-align:left}
  .item-actions{width:100%}
}
@media (max-width:560px){
  .app-header{padding:14px}
  .brand-icon{width:46px;height:46px}
  .brand p{display:none}
  .sync-status{display:none}
  main{padding:18px 12px 50px}
  .section-heading{align-items:flex-start}
  .form-grid{grid-template-columns:1fr}
  .booking-room-pick{grid-template-columns:auto 1fr}
  .full{grid-column:auto}
  .calculation{grid-template-columns:1fr}
  .kpi-grid{grid-template-columns:1fr 1fr}
  .kpi{padding:14px}
  .kpi strong{font-size:1.15rem}
}
@media print{
  body>*:not(#printArea){display:none!important}
  #printArea{display:block!important}
  @page{size:A4;margin:12mm}
}


.capture-box{
  border:2px dashed #9fb5c7;border-radius:14px;padding:20px;text-align:center;
  background:#f7fafc;color:var(--primary);cursor:pointer
}
.capture-box input{margin-top:10px}
.receipt-preview{display:flex;justify-content:center;background:#eef2f5;border-radius:14px;padding:12px}
.receipt-preview img{max-width:100%;max-height:420px;border-radius:10px;object-fit:contain}
.notice{background:#fff6db;border:1px solid #ecd795;border-radius:10px;padding:11px;color:#6c5300}
.receipt-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}
.receipt-summary>div{background:#edf4fa;border-radius:12px;padding:14px}
.receipt-summary span{display:block;color:var(--muted);font-size:.86rem;margin-bottom:5px}
.receipt-summary strong{font-size:1.15rem}
.receipt-thumb{width:58px;height:58px;object-fit:cover;border-radius:9px;border:1px solid var(--border)}
.ocr-text{white-space:pre-wrap;font-size:.8rem;max-height:120px;overflow:auto;background:#f6f8fa;padding:8px;border-radius:8px}
@media(max-width:560px){.receipt-summary{grid-template-columns:1fr}}

.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.toolbar input,.toolbar select{width:auto;min-width:180px;flex:1}
.report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.report-grid article{background:#edf4fa;border-radius:14px;padding:16px}
.report-grid span{display:block;color:var(--muted);font-size:.88rem;margin-bottom:6px}
.report-grid strong{font-size:1.3rem}
.report-details{margin-top:18px}
.book-credit{color:#1e6b35}
.book-debit{color:#b42318}
.booking-confirmed{border-left:5px solid #1f4e78}
.booking-cancelled{opacity:.55}
@media(max-width:700px){.report-grid{grid-template-columns:1fr 1fr}.toolbar input,.toolbar select{width:100%}}

.booking-calendar{overflow-x:auto;margin:16px 0}
.calendar-grid{display:grid;min-width:760px;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.calendar-cell{min-height:42px;padding:6px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);font-size:.78rem;background:#fff}
.calendar-head{font-weight:700;background:#edf4fa;text-align:center;min-height:auto}
.calendar-room{font-weight:700;background:#f7f9fb;position:sticky;left:0;z-index:2}
.calendar-booked{background:#dfeef9}
.calendar-reserved{background:#fff1cc}
.calendar-paid{background:#e4f4e8}
.calendar-cancelled{background:#f4e8e8;text-decoration:line-through;opacity:.7}
.calendar-label{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.invoice-email{font-size:.86rem;color:var(--muted)}

.editing-banner{background:#fff4dd;border:1px solid #e7c66d;border-radius:10px;padding:10px 12px;margin-bottom:14px}
.manual-entry{border-left:5px solid #7a5a9e}

.version-badge{background:#1f4e78;color:#fff;border-radius:999px;padding:4px 8px;font-size:.75rem;font-weight:700}
.diagnostic-summary{margin-top:18px;padding:14px;border-radius:12px;background:#edf4fa}
.diagnostic-list{display:grid;gap:10px;margin-top:14px}
.diagnostic-item{display:flex;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--border);border-radius:10px}
.diagnostic-ok{color:#1e6b35;font-weight:700}
.diagnostic-warn{color:#8a5a00;font-weight:700}
.diagnostic-fail{color:#b42318;font-weight:700}
.check-row{display:flex;flex-direction:row;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border)}
.check-row input{width:auto}
.setup-steps{display:grid;gap:10px}
.setup-steps>div{display:flex;align-items:center;gap:12px;padding:10px;border-radius:10px;background:#f7f9fb}
.setup-steps strong{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#1f4e78;color:#fff}

.cloud-ok{color:#1e6b35;font-weight:700}
.cloud-warn{color:#8a5a00;font-weight:700}
.cloud-error{color:#b42318;font-weight:700}
.receipt-thumb.loading{opacity:.45}

.review-item{border-left:5px solid #e0a800}
.review-item.done{border-left-color:#1e6b35;opacity:.72}
.review-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;margin-top:10px}
.review-fields label{font-size:.86rem}
@media(max-width:600px){.review-fields{grid-template-columns:1fr}}

.quick-result{margin-top:14px;padding:12px;border-radius:10px;background:#f7f9fb}
.quick-result.ok{background:#e6f4ea;color:#1e6b35}
.quick-result.warn{background:#fff4dd;color:#8a5a00}
.task-overdue{border-left:5px solid #b42318}
.task-today{border-left:5px solid #e0a800}
.task-done{opacity:.6;text-decoration:line-through}
.task-high{background:#fff7f6}

.invoice-overdue{border-left:5px solid #b42318;background:#fff8f7}
.invoice-due-soon{border-left:5px solid #e0a800}
.operation-arrival{border-left:5px solid #1f4e78}
.operation-departure{border-left:5px solid #7a5a9e}
.operation-task{border-left:5px solid #e0a800}
.reminder-text{white-space:pre-wrap;background:#f7f9fb;border-radius:10px;padding:10px;margin-top:10px;font-size:.9rem}

.inventory-defect{border-left:5px solid #b42318}
.inventory-retired{opacity:.55}
.category-breakdown{display:grid;gap:8px;margin-top:12px}
.category-row{display:flex;justify-content:space-between;gap:16px;padding:8px 10px;background:#f7f9fb;border-radius:8px}

.receipt-preview canvas{
  display:block;max-width:100%;max-height:520px;border-radius:10px;background:#fff;
  box-shadow:0 2px 12px rgba(0,0,0,.08)
}
.image-tools{
  display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:12px;
  border:1px solid var(--border);border-radius:12px;background:#f7f9fb
}
.image-tools button{padding:9px 11px;font-size:.86rem}
.contrast-control{
  display:flex;flex-direction:row;align-items:center;gap:8px;padding:8px 10px;
  background:#fff;border-radius:10px;border:1px solid var(--border)
}
.contrast-control input{width:130px;padding:0;border:0}
@media(max-width:560px){
  .image-tools button{flex:1 1 46%}
  .contrast-control{width:100%;justify-content:space-between}
  .contrast-control input{flex:1}
}

.recognition-box{
  display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#edf4fa;
  border-radius:12px;padding:14px
}
.recognition-box span{display:block;color:var(--muted);font-size:.86rem;margin-bottom:5px}
.recognition-box strong{font-size:1rem}
.ocr-details{border:1px solid var(--border);border-radius:10px;padding:10px;background:#fafbfc}
.ocr-details summary{cursor:pointer;font-weight:700;color:var(--primary)}
.ocr-details pre{white-space:pre-wrap;max-height:260px;overflow:auto;font-size:.78rem;margin-bottom:0}
.validation-ok{color:#1e6b35}
.validation-warn{color:#8a5a00}
.validation-fail{color:#b42318}
@media(max-width:560px){.recognition-box{grid-template-columns:1fr}}

.suggestion-box{
  display:flex;justify-content:space-between;gap:12px;align-items:center;
  padding:14px;border:1px solid #b9d1e4;border-radius:12px;background:#f2f8fc
}
.suggestion-box span{display:block;color:var(--muted);font-size:.86rem;margin-bottom:4px}
.suggestion-box strong{display:block}
.rule-item{border-left:5px solid #1f4e78}
.inventory-suggest{background:#fff8e6}
@media(max-width:560px){.suggestion-box{align-items:flex-start;flex-direction:column}}

.match-high{border-left:5px solid #1e6b35;background:#f4fbf6}
.match-medium{border-left:5px solid #e0a800;background:#fffaf0}
.match-low{border-left:5px solid #9aa4ad}
.match-score{font-weight:800;font-size:1rem}
.match-reasons{margin-top:6px;color:var(--muted);font-size:.86rem}

.release-ready{color:#1e6b35}
.release-not-ready{color:#b42318}
.test-pass{background:#e6f4ea;color:#1e6b35}
.test-fail{background:#fbe9e7;color:#b42318}
.test-warn{background:#fff4dd;color:#8a5a00}

.room-status-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.room-status-card{border:1px solid var(--border);border-radius:12px;padding:14px;background:#fff}
.room-status-card strong,.room-status-card span{display:block}
.room-status-card span{margin-top:4px;color:var(--muted);font-size:.86rem}
.room-status-free{border-left:5px solid #1e6b35}
.room-status-occupied{border-left:5px solid #1f4e78;background:#f2f8fc}
.room-status-cleaning{border-left:5px solid #e0a800;background:#fffaf0}
.room-status-blocked{border-left:5px solid #b42318;background:#fff7f6}
.history-entry{border-left:5px solid #7a5a9e}
@media(max-width:700px){.room-status-grid{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.room-status-grid{grid-template-columns:1fr}}

.customer-good{border-left:5px solid #1e6b35}
.customer-open{border-left:5px solid #e0a800}
.customer-overdue{border-left:5px solid #b42318;background:#fff8f7}
.customer-metrics{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px;font-size:.85rem;color:var(--muted)}
.customer-metrics strong{color:var(--text)}

.audit-create{border-left:5px solid #1e6b35}
.audit-update{border-left:5px solid #1f4e78}
.audit-delete{border-left:5px solid #b42318;background:#fff8f7}
.audit-system{border-left:5px solid #7a5a9e}
.audit-meta{font-size:.82rem;color:var(--muted);margin-top:5px}

.hero-card{
  display:flex;justify-content:space-between;align-items:center;gap:20px;
  padding:22px;border-radius:20px;background:linear-gradient(135deg,#1f4e78,#2f6f9f);
  color:#fff;box-shadow:var(--shadow);margin-bottom:18px
}
.hero-card h2{font-size:2rem;margin:3px 0 4px}
.hero-card p{margin:0;color:rgba(255,255,255,.8)}
.eyebrow{font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;opacity:.8}
.hero-status{padding:8px 12px;border-radius:16px;background:rgba(255,255,255,.14);white-space:normal;max-width:100%;overflow-wrap:anywhere}
.quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.quick-action{
  display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:132px;
  padding:18px;border-radius:18px;background:#fff;color:var(--text);border:1px solid var(--border);
  box-shadow:var(--shadow);text-align:left;min-width:0;overflow:visible
}
.quick-action:hover{background:#f8fbfd}
.quick-action.primary-action{background:var(--primary);color:#fff}
.quick-action strong,.quick-action small{min-width:0;max-width:100%;overflow-wrap:anywhere}
.quick-action small{color:var(--muted);font-weight:500}
.quick-action.primary-action small{color:rgba(255,255,255,.8)}
.quick-icon{font-size:1.65rem;line-height:1}
.today-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.today-kpi{background:#fff;border:1px solid var(--border);border-radius:16px;padding:17px;box-shadow:var(--shadow);min-width:0}
.today-kpi span,.today-kpi small{display:block;color:var(--muted);overflow-wrap:anywhere}
.today-kpi strong{display:block;font-size:clamp(1.05rem,3vw,1.55rem);margin:6px 0;overflow-wrap:anywhere;line-height:1.15}
.today-section{background:#fff;border:1px solid var(--border);border-radius:18px;padding:18px;box-shadow:var(--shadow);margin-bottom:18px}
.section-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px;flex-wrap:wrap;min-width:0}
.section-title-row h3{margin-bottom:3px}
.section-title-row p{margin:0;color:var(--muted);font-size:.9rem}
.finance-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.finance-strip>div{padding:14px;background:#f7f9fb;border-radius:12px;min-width:0}
.finance-strip span{display:block;color:var(--muted);font-size:.86rem;margin-bottom:5px;overflow-wrap:anywhere}
.finance-strip strong{font-size:clamp(.95rem,2vw,1.1rem);overflow-wrap:anywhere;line-height:1.2}
@media(max-width:850px){
  .quick-actions,.today-kpi-grid,.finance-strip{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:560px){
  .hero-card{align-items:flex-start;padding:18px}
  .hero-card h2{font-size:1.7rem}
  .hero-status{font-size:.78rem}
  .quick-actions{grid-template-columns:1fr 1fr}
  .quick-action{min-height:118px;padding:15px}
  .today-kpi-grid{grid-template-columns:1fr 1fr}
  .finance-strip{grid-template-columns:1fr 1fr}
  .section-title-row{align-items:flex-start}
}

.more-nav{
  display:flex;gap:8px;flex-wrap:wrap;padding:10px 14px;margin:0 auto 14px;
  max-width:1200px;background:#f7f9fb;border:1px solid var(--border);border-radius:12px
}
.more-nav button{background:#fff;color:var(--text);border:1px solid var(--border)}
.first-use-hint{
  display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;
  padding:13px 15px;margin-bottom:14px;border:1px solid #b9d1e4;border-radius:14px;background:#f2f8fc
}
.first-use-hint div{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.first-use-hint span{color:var(--muted);font-size:.88rem}
.pilot-first-steps{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;margin-bottom:16px;border:1px solid #9ed2c3;border-radius:16px;background:#eaf7f2}
.pilot-first-steps[hidden]{display:none}
.pilot-first-steps h3{margin:5px 0 6px;font-size:1.2rem}
.pilot-first-steps p{margin:0 0 8px;line-height:1.45}
.pilot-first-steps small{color:#315e54}
.pilot-first-steps button{flex:0 0 auto}
.mobile-bottom-nav{display:none}
@media(max-width:700px){
  body{padding-bottom:78px}
  .tabs{display:none}
  .more-nav{
    position:fixed;left:10px;right:10px;bottom:76px;z-index:30;
    max-height:58vh;overflow:auto;padding:12px;box-shadow:0 12px 36px rgba(0,0,0,.2);
    background:#fff;border-radius:16px
  }
  .more-nav button{width:100%;text-align:left;padding:12px}
  .mobile-bottom-nav{
    display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;
    z-index:40;background:#fff;border-top:1px solid var(--border);padding:7px 8px calc(7px + env(safe-area-inset-bottom));
    box-shadow:0 -6px 18px rgba(0,0,0,.08)
  }
  .mobile-bottom-nav button{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 2px;
    background:transparent;color:var(--muted);border:0;border-radius:10px;
    font-size:.72rem;font-weight:700;line-height:1.15;text-align:center
  }
  .mobile-bottom-nav button.active{color:var(--primary);background:#edf4fa}
  .first-use-hint{align-items:flex-start}
  .pilot-first-steps{flex-direction:column;align-items:stretch}
  .pilot-first-steps button{width:100%}
}

.status-ok{color:#1e6b35}
.status-info{color:#1c5a75}
.status-warn{color:#8a5a00}
.status-bad{color:#b42318}

.comparison-table{overflow-x:auto}
.comparison-grid{
  display:grid;min-width:760px;border:1px solid var(--border);border-radius:12px;overflow:hidden
}
.comparison-cell{
  padding:10px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);
  background:#fff;font-size:.86rem
}
.comparison-head{font-weight:800;background:#edf4fa}
.comparison-label{font-weight:700;background:#f7f9fb}
.comparison-positive{color:#1e6b35;font-weight:700}
.comparison-negative{color:#b42318;font-weight:700}
.expense-rank{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#edf4fa;font-weight:800}
.cockpit-kpis article:first-child{border-left:5px solid var(--primary)}

.compact-header{position:sticky;top:0;z-index:45;backdrop-filter:blur(14px)}
.global-search-wrap{position:relative;flex:1;min-width:220px;max-width:520px;margin-left:auto}
.global-search-wrap input{
  width:100%;border-radius:999px;padding:11px 16px;background:#fff;border:1px solid var(--border)
}
.global-search-results{
  position:absolute;left:0;right:0;top:calc(100% + 8px);max-height:420px;overflow:auto;
  background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 16px 40px rgba(0,0,0,.18);
  padding:8px;z-index:60
}
.global-search-item{
  display:flex;justify-content:space-between;gap:12px;padding:11px;border-radius:10px;cursor:pointer
}
.global-search-item:hover{background:#f2f7fb}
.global-search-item strong,.global-search-item span{display:block}
.global-search-item span{font-size:.82rem;color:var(--muted);margin-top:3px}
.search-type{font-size:.7rem;font-weight:800;text-transform:uppercase;color:var(--primary)}
.daily-status-strip{
  display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px
}
.daily-status-strip span{
  padding:7px 10px;border-radius:999px;background:#f7f9fb;border:1px solid var(--border);
  font-size:.78rem;font-weight:700;color:var(--muted)
}
.daily-status-strip .ok{background:#e6f4ea;color:#1e6b35;border-color:#b8dfc2}
.daily-status-strip .neutral{background:#e9f3f9;color:#1c5a75;border-color:#bfd5e3}
.daily-status-strip .warn{background:#fff4dd;color:#8a5a00;border-color:#ecd79b}
.card,.today-section,.today-kpi,.quick-action,.hero-card{transition:transform .15s ease,box-shadow .15s ease}
.quick-action:active{transform:scale(.985)}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:3px solid rgba(31,78,120,.22);outline-offset:2px
}
@media(max-width:700px){
  .compact-header{align-items:flex-start;flex-wrap:wrap}
  .global-search-wrap{order:3;max-width:none;width:100%;margin:8px 0 0}
  .global-search-results{position:fixed;left:10px;right:10px;top:118px}
}

.update-banner{
  position:fixed;left:50%;transform:translateX(-50%);top:12px;z-index:100;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  width:min(620px,calc(100% - 24px));padding:12px 14px;border-radius:14px;
  background:#152b3d;color:#fff;box-shadow:0 14px 40px rgba(0,0,0,.28)
}
.update-banner div{display:flex;flex-direction:column;gap:2px}
.update-banner span{font-size:.82rem;opacity:.8}
.update-banner button{white-space:nowrap;background:#fff;color:#152b3d}
.dependency-ok{color:#1e6b35}
.dependency-warn{color:#8a5a00}
.dependency-fail{color:#b42318}
@media(max-width:520px){
  .update-banner{align-items:flex-start}
  .update-banner button{padding:8px 10px}
}

.field-invalid{border-color:#b42318!important;background:#fff8f7!important}
.field-valid{border-color:#9ec9aa!important}
.validation-message{
  margin-top:6px;font-size:.78rem;color:#b42318;font-weight:700
}
button[disabled]{opacity:.55;cursor:not-allowed}
.final-ok{color:#1e6b35}
.final-warn{color:#8a5a00}
.final-bad{color:#b42318}

.practical-pass{border-left:5px solid #1e6b35}
.practical-fail{border-left:5px solid #b42318;background:#fff8f7}
.practical-warn{border-left:5px solid #e0a800;background:#fffaf0}

.linked-booking-banner{
  padding:12px 14px;border-radius:12px;background:#edf4fa;border:1px solid #b9d1e4;
  color:#1f4e78;font-weight:700
}
.customer-match{
  margin-top:6px;padding:8px 10px;border-radius:9px;background:#e6f4ea;color:#1e6b35;font-size:.84rem
}

.auto-booking-note{
  padding:10px 12px;border-radius:10px;background:#f2f8fc;border:1px solid #b9d1e4;
  color:#1f4e78;font-size:.86rem
}
.finance-linked{color:#1e6b35;font-weight:700}

.booking-calculation{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  padding:12px 14px;border-radius:12px;background:#f2f8fc;border:1px solid #b9d1e4
}
.booking-calculation span{color:var(--muted)}
.booking-calculation strong{font-size:1.15rem;color:var(--primary)}
.workflow-arrival{border-left:5px solid #1f4e78}
.workflow-departure{border-left:5px solid #7a5a9e}
.workflow-complete{opacity:.62}

.calendar-controls{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.calendar-controls input{width:auto;min-width:155px}
.calendar-legend{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0 14px;font-size:.8rem;color:var(--muted)}
.calendar-legend span{display:flex;align-items:center;gap:5px}
.calendar-legend i{display:inline-block;width:13px;height:13px;border-radius:4px;border:1px solid rgba(0,0,0,.08)}
.legend-free{background:#f7f9fb}
.legend-reserved{background:#fff2b8}
.legend-occupied{background:#b8d8f0}
.legend-cleaning{background:#ffd7a8}
.legend-blocked{background:#f3b1ad}
.legend-open{background:#fff;border:2px solid #b42318!important}
.room-calendar{overflow:auto;border:1px solid var(--border);border-radius:14px;background:#fff}
.calendar-grid{display:grid;min-width:1050px}
.calendar-cell{
  min-height:44px;border-right:1px solid var(--border);border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:center;padding:4px;font-size:.76rem;position:relative
}
.calendar-header{background:#edf4fa;font-weight:800;position:sticky;top:0;z-index:3}
.calendar-room{background:#f7f9fb;font-weight:800;justify-content:flex-start;padding-left:10px;position:sticky;left:0;z-index:2}
.calendar-free{background:#fff}
.calendar-reserviert,.calendar-confirmed{background:#fff2b8}
.calendar-belegt,.calendar-occupied{background:#b8d8f0}
.calendar-cleaning{background:#ffd7a8}
.calendar-blocked{background:#f3b1ad}
.calendar-open-invoice{box-shadow:inset 0 0 0 2px #b42318}
.calendar-today{outline:2px solid var(--primary);outline-offset:-2px}
.calendar-booking{cursor:pointer;font-weight:700;line-height:1.05;text-align:center}
.calendar-booking small{display:block;font-size:.64rem;font-weight:500;margin-top:2px}
.calendar-detail{
  margin-top:14px;padding:14px;border-radius:12px;background:#f2f8fc;border:1px solid #b9d1e4
}
.calendar-detail strong,.calendar-detail span{display:block}
.calendar-detail span{margin-top:4px;color:var(--muted)}
@media(max-width:700px){
  .calendar-controls{width:100%}
  .calendar-controls input{flex:1;min-width:135px}
  .room-calendar{margin-left:-4px;margin-right:-4px}
}

.entrepreneur-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px
}
.entrepreneur-grid article,.liquidity-grid>div{
  padding:14px;background:#f7f9fb;border-radius:12px;border:1px solid var(--border)
}
.entrepreneur-grid span,.entrepreneur-grid small,.liquidity-grid span{
  display:block;color:var(--muted);font-size:.84rem
}
.entrepreneur-grid strong,.liquidity-grid strong{
  display:block;font-size:1.18rem;margin:6px 0
}
.liquidity-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.home-alert-danger{border-left:5px solid #b42318;background:#fff8f7}
.home-alert-warning{border-left:5px solid #e0a800;background:#fffaf0}
.home-alert-info{border-left:5px solid #1f4e78}
.customer-rank{
  display:grid;place-items:center;width:32px;height:32px;border-radius:50%;
  background:#edf4fa;color:var(--primary);font-weight:800
}
@media(max-width:850px){
  .entrepreneur-grid{grid-template-columns:repeat(2,1fr)}
  .liquidity-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:520px){
  .entrepreneur-grid{grid-template-columns:1fr 1fr}
}

.document-invoice{border-left:5px solid #1f4e78}
.document-receipt{border-left:5px solid #1e6b35}
.document-other{border-left:5px solid #7a5a9e}
.document-unlinked{background:#fffaf0}
.document-thumb{
  width:54px;height:54px;object-fit:cover;border-radius:10px;border:1px solid var(--border);background:#f7f9fb
}
.document-icon{
  display:grid;place-items:center;width:54px;height:54px;border-radius:10px;background:#edf4fa;
  font-weight:800;color:var(--primary)
}

.quality-ok{color:#1e6b35}
.quality-warn{color:#8a5a00}
.quality-bad{color:#b42318}

.performance-fast{color:#1e6b35}
.performance-medium{color:#8a5a00}
.performance-slow{color:#b42318}
.load-pass{border-left:5px solid #1e6b35}
.load-warn{border-left:5px solid #e0a800;background:#fffaf0}
.load-fail{border-left:5px solid #b42318;background:#fff8f7}

.productive-ok{color:#1e6b35}
.productive-warn{color:#8a5a00}
.productive-bad{color:#b42318}
@media(max-width:700px){
  button,.small{min-height:44px}
  input,select,textarea{font-size:16px}
  .form-actions{gap:10px}
  .form-actions button{flex:1 1 100%}
  .toolbar{gap:10px}
  .toolbar input,.toolbar select,.toolbar button{width:100%}
  .card,.today-section{padding:15px}
}

.release-gate-card{border:2px solid #b9d1e4}
.release-gate-ready{border-color:#1e6b35;background:#f4fbf6}
.release-gate-failed{border-color:#b42318;background:#fff8f7}
.gate-ok{color:#1e6b35}
.gate-open{color:#8a5a00}
.gate-fail{color:#b42318}

.test-candidate-badge{
  padding:6px 9px;border-radius:999px;background:#fff4dd;color:#8a5a00;
  border:1px solid #ecd79b;font-size:.72rem;font-weight:900;letter-spacing:.04em
}
.predeploy-card{border:2px solid #b9d1e4}
.predeploy-ready{border-color:#1e6b35;background:#f4fbf6}
.predeploy-failed{border-color:#b42318;background:#fff8f7}
@media(max-width:700px){
  .test-candidate-badge{font-size:.65rem;padding:5px 7px}
}

.production-sync-ok{color:#1e6b35}
.production-sync-warn{color:#8a5a00}
.production-sync-error{color:#b42318}
.production-sync-working{color:#1f4e78}

.maintenance-ok{color:#1e6b35}
.maintenance-warn{color:#8a5a00}
.maintenance-error{color:#b42318}

.closing-pass{border-left:5px solid #1e6b35}
.closing-warn{border-left:5px solid #e0a800;background:#fffaf0}
.closing-fail{border-left:5px solid #b42318;background:#fff8f7}

.control-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
.control-grid section{border:1px solid var(--border);border-radius:14px;padding:14px;background:#fff}
.control-grid h4{margin:0 0 10px}
.control-warning-high{border-left:5px solid #b42318;background:#fff8f7}
.control-warning-medium{border-left:5px solid #e0a800;background:#fffaf0}
.control-suggestion{border-left:5px solid #1f4e78;background:#f2f8fc}
.control-rank{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#edf4fa;font-weight:800;color:var(--primary)}
@media(max-width:760px){.control-grid{grid-template-columns:1fr}}

.release-candidate-card{border:2px solid #b9d1e4}
.release-candidate-ready{border-color:#1e6b35;background:#f4fbf6}
.release-candidate-open{border-color:#e0a800;background:#fffaf0}
.rc-ok{color:#1e6b35}
.rc-warn{color:#8a5a00}
.rc-error{color:#b42318}

.management-stage-1{border-left:5px solid #e0a800;background:#fffaf0}
.management-stage-2{border-left:5px solid #d97706;background:#fff7ed}
.management-stage-3{border-left:5px solid #b42318;background:#fff8f7}
.management-check-ok{border-left:5px solid #1e6b35}
.management-check-warn{border-left:5px solid #e0a800;background:#fffaf0}

.smart-dashboard-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.smart-dashboard-grid article{
  padding:14px;background:#f7f9fb;border:1px solid var(--border);border-radius:12px
}
.smart-dashboard-grid span,.smart-dashboard-grid small{display:block;color:var(--muted);font-size:.84rem}
.smart-dashboard-grid strong{display:block;font-size:1.25rem;margin:6px 0}
.smart-priority-high{border-left:5px solid #b42318;background:#fff8f7}
.smart-priority-medium{border-left:5px solid #e0a800;background:#fffaf0}
.smart-opportunity{border-left:5px solid #1f4e78;background:#f2f8fc}
@media(max-width:850px){.smart-dashboard-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.smart-dashboard-grid{grid-template-columns:1fr 1fr}}

.assistant-safe{border-left:5px solid #1e6b35;background:#f4fbf6}
.assistant-review{border-left:5px solid #e0a800;background:#fffaf0}
.assistant-warning{border-left:5px solid #b42318;background:#fff8f7}
.assistant-type{
  display:inline-block;padding:3px 7px;border-radius:999px;background:#edf4fa;
  color:var(--primary);font-size:.7rem;font-weight:800;text-transform:uppercase
}

.document-expiring{border-left:5px solid #e0a800;background:#fffaf0}
.document-expired{border-left:5px solid #b42318;background:#fff8f7}
.customer-file-header{
  display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px
}
.customer-file-badge{
  padding:4px 8px;border-radius:999px;background:#edf4fa;color:var(--primary);
  font-size:.75rem;font-weight:800
}

.property-switch{display:flex;align-items:center;gap:7px;font-size:.78rem;color:var(--muted)}
.property-switch select{min-width:180px;padding:8px 10px}
.property-active{border-left:5px solid #1f4e78;background:#f2f8fc}
.property-code{
  display:inline-block;padding:3px 7px;border-radius:999px;background:#edf4fa;
  color:var(--primary);font-size:.72rem;font-weight:800
}
@media(max-width:700px){
  .property-switch{order:4;width:100%}
  .property-switch select{flex:1;min-width:0}
}

.stay-guide{margin:0 0 16px}
.stay-guide h3{margin:0 0 4px}
.stay-guide textarea{width:100%;min-height:3.2rem}
.stay-guide .form-actions{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}
.stay-guide #stayVoiceOpenFromToday{min-width:9rem}
.stay-guide-type{margin-top:8px;color:var(--muted);font-size:.9rem}
html.stay-customer .settings-lab,
html.stay-customer .release-candidate-card,
html.stay-customer .predeploy-card,
html.stay-customer .daily-status-strip,
html.stay-customer #moreNav [data-view="diagnostics"],
html.stay-customer #moreNav [data-view="review"],
html.stay-customer #moreNav [data-view="audit"],
html.stay-customer #ownerAdminNav,
html.stay-customer #firstUseHint,
body.local-account-mode .settings-lab,
body.local-account-mode .daily-status-strip,
body.local-account-mode .customer-scope,
body.local-account-mode .app-version-badge,
body.local-account-mode .demo-notice,
body.local-account-mode .release-candidate-card,
body.local-account-mode .predeploy-card{display:none!important}
.production-ready{border-color:#1e6b35;background:#f4fbf6}
.production-attention{border-color:#e0a800;background:#fffaf0}
.production-critical{border-color:#b42318;background:#fff8f7}
.production-check-ok{border-left:5px solid #1e6b35}
.production-check-warn{border-left:5px solid #e0a800;background:#fffaf0}
.production-check-fail{border-left:5px solid #b42318;background:#fff8f7}

/* Produktivsystem 1.0.1 – iPhone-Kopfleistenkorrektur */
.app-header,
header.app-header,
.topbar,
.header-shell{
  overflow:visible;
}

.app-version-badge{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:6px 11px;
  border-radius:999px;
  background:#315b87;
  color:#fff;
  font-size:.78rem;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}
body.pilot-mode .test-candidate-badge{display:none!important}

@media(max-width:700px){
  .app-header,
  header.app-header,
  .topbar,
  .header-shell{
    display:grid !important;
    grid-template-columns:auto 1fr !important;
    align-items:center !important;
    gap:10px 12px !important;
    height:auto !important;
    min-height:0 !important;
    padding:14px 16px 16px !important;
  }

  .app-header .brand,
  .topbar .brand,
  .header-shell .brand{
    grid-column:1 / -1;
    width:100%;
    min-width:0;
  }

  .app-header h1,
  .topbar h1,
  .header-shell h1{
    margin:0 !important;
    font-size:1.55rem !important;
    line-height:1.12 !important;
  }

  .app-version-badge{
    grid-column:1;
    justify-self:start;
    max-width:100%;
  }

  .property-switch{
    grid-column:1 / -1 !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    display:grid !important;
    grid-template-columns:72px minmax(0,1fr) !important;
    align-items:center !important;
    gap:8px !important;
  }

  .property-switch span{
    font-size:.78rem;
    font-weight:700;
    color:var(--muted);
  }

  .property-switch select{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    min-height:46px;
    margin:0 !important;
    font-size:16px !important;
  }

  .test-candidate-badge{
    grid-column:1;
    justify-self:start;
    margin:0 !important;
  }

  .global-search,
  .header-search,
  #globalSearch{
    grid-column:1 / -1 !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
  }

  .global-search input,
  .header-search input,
  #globalSearch{
    width:100% !important;
    min-width:0 !important;
    font-size:16px !important;
  }
}

/* Produktivsystem 1.0.2 – Navigation */
.mobile-bottom-nav{
  pointer-events:auto !important;
  touch-action:manipulation;
}
.mobile-bottom-nav button{
  pointer-events:auto !important;
  touch-action:manipulation;
  cursor:pointer;
  -webkit-tap-highlight-color:rgba(31,78,120,.12);
}

/* Produktivsystem 1.0.3 – Safari-Browserleisten-Fix
   In Safari lag die sichtbare App-Navigation hinter der unteren Browserleiste.
   Im installierten Home-Bildschirm-Modus bleibt sie am unteren Rand. */
:root{
  --mobile-browser-toolbar-offset: 92px;
}

@media(max-width:700px){
  body:not(.standalone-app){
    padding-bottom:calc(170px + env(safe-area-inset-bottom)) !important;
  }

  body:not(.standalone-app) .mobile-bottom-nav{
    bottom:var(--mobile-browser-toolbar-offset) !important;
    border:1px solid var(--border);
    border-radius:18px;
    left:10px;
    right:10px;
    width:auto;
    padding:7px 8px;
    box-shadow:0 8px 28px rgba(0,0,0,.18);
  }

  body:not(.standalone-app) .more-nav{
    bottom:calc(var(--mobile-browser-toolbar-offset) + 78px) !important;
  }

  body.standalone-app{
    padding-bottom:calc(78px + env(safe-area-inset-bottom)) !important;
  }

  body.standalone-app .mobile-bottom-nav{
    bottom:0 !important;
  }
}

/* Produktivsystem 1.0.5 – Personenauswahl */
#persons{
  min-height:48px;
  font-size:16px;
  font-weight:700;
  background:#fff;
}

/* Produktivsystem 1.0.6 – Original-Logo */
.company-logo{
  object-fit:contain !important;
  background:#fff;
  border-radius:18px;
  flex:0 0 auto;
}
.brand .company-logo{
  width:72px;
  height:72px;
}
@media(max-width:700px){
  .brand .company-logo{
    width:66px;
    height:66px;
  }
}
@media print{
  .company-logo{
    print-color-adjust:exact;
    -webkit-print-color-adjust:exact;
  }
}

/* Produktivsystem 1.0.7 – Fahrtenbuch */
.trip-status-vorschlag{border-left:5px solid #d9a400;background:#fffaf0}
.trip-status-bestätigt{border-left:5px solid #2f77b5;background:#f3f8fc}
.trip-status-erledigt{border-left:5px solid #1e6b35;background:#f4fbf6}
.trip-status-verworfen{opacity:.62}
.trip-route{font-weight:800;color:var(--primary)}

/* Version 3.0: Finanzbereich klar sichtbar */
.more-nav .finance-nav-button{background:#eaf5ee;border:2px solid #8bc79b;color:#17652e;font-weight:800}
.more-nav .finance-nav-button::after{content:"Direkt zum Bankbuch";display:block;font-size:.72rem;font-weight:600;opacity:.8;margin-top:2px}
.quick-action.finance-action{border-color:#8bc79b;background:#f1fbf4}
.quick-action.finance-action strong{color:#17652e}

/* Synchronisationskonflikte 3.1.1 */
.sync-conflict-dialog{width:min(980px,94vw);max-height:92vh;border:0;border-radius:18px;padding:0;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.sync-conflict-dialog::backdrop{background:rgba(15,23,42,.62)}
.sync-conflict-card{padding:22px;overflow:auto;max-height:92vh}
.conflict-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.conflict-heading h2{margin:.2rem 0}
.conflict-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}
.conflict-version{border:1px solid #d8e0e8;border-radius:14px;padding:16px;background:#f8fafc}
.conflict-version h3{margin-top:0}
.conflict-version pre{white-space:pre-wrap;overflow-wrap:anywhere;min-height:180px;max-height:320px;overflow:auto;background:white;border:1px solid #e5e7eb;border-radius:10px;padding:12px;font:13px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace}
.conflict-version button{width:100%}
.conflict-navigation{display:flex;justify-content:space-between;gap:12px}
@media(max-width:700px){.conflict-columns{grid-template-columns:1fr}.sync-conflict-card{padding:14px}.conflict-version pre{min-height:120px;max-height:220px}}

/* Version 3.2.0 – Betriebs- und Datensicherheit */
.governance-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:14px 0}
.governance-grid article{background:var(--card,#fff);border:1px solid #d9e0e6;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:5px}
.governance-grid span{font-size:.8rem;color:#64748b}.governance-grid strong{font-size:1.15rem}
.governance-ok{color:#137333}.governance-warn{color:#b45309}
.governance-critical{border-left:5px solid #b91c1c}.governance-high{border-left:5px solid #d97706}.governance-medium{border-left:5px solid #ca8a04}
@media(max-width:800px){.governance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.governance-grid article:first-child{grid-column:1/-1}}

/* Version 4.0.0 – PHOENIX Unternehmer-Cockpit */
.phoenix-cockpit{background:linear-gradient(145deg,#102f49,#1f4e78 58%,#2b658f);color:#fff;border-radius:24px;padding:22px;margin:0 0 20px;box-shadow:0 16px 40px rgba(17,47,73,.22)}
.phoenix-head,.phoenix-status-row,.phoenix-section-title{display:flex;justify-content:space-between;gap:16px;align-items:center}
.phoenix-head h2{font-size:1.75rem;margin:4px 0}.phoenix-head p,.phoenix-cockpit .eyebrow{color:rgba(255,255,255,.78)}
.phoenix-controls{display:flex;gap:8px;align-items:center}.phoenix-controls select{min-width:150px;background:#fff;color:#173b58}
.phoenix-status-row{margin:16px 0 14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.18)}
.phoenix-traffic{display:flex;gap:9px;align-items:center}.phoenix-traffic span{width:14px;height:14px;border-radius:50%;background:#4caf50;box-shadow:0 0 0 5px rgba(76,175,80,.18)}
.phoenix-traffic.yellow span{background:#ffc107;box-shadow:0 0 0 5px rgba(255,193,7,.2)}.phoenix-traffic.red span{background:#ff5b5b;box-shadow:0 0 0 5px rgba(255,91,91,.2)}
.phoenix-property{font-size:.9rem;color:rgba(255,255,255,.8)}
.phoenix-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.phoenix-kpis article{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);border-radius:15px;padding:14px;min-width:0}.phoenix-kpis span,.phoenix-kpis small{display:block;color:rgba(255,255,255,.72);font-size:.78rem}.phoenix-kpis strong{display:block;font-size:1.18rem;margin:6px 0;overflow-wrap:anywhere}
.phoenix-body{display:grid;grid-template-columns:1.35fr .65fr;gap:12px;margin-top:14px}.phoenix-body>section{background:#fff;color:var(--text);border-radius:16px;padding:16px}.phoenix-section-title h3,.phoenix-recommendation h3{margin:0 0 4px}.phoenix-section-title p{margin:0;color:var(--muted)}
.phoenix-recommendation{border-left:6px solid #d3a32c}.phoenix-recommendation>span{font-size:.72rem;font-weight:800;letter-spacing:.08em;color:#8a6710}.phoenix-recommendation p{color:var(--muted);line-height:1.45}.phoenix-action.red{border-left:5px solid #b42318}.phoenix-action.yellow{border-left:5px solid #e0a800}.phoenix-action.green{border-left:5px solid #2e7d32}
@media(max-width:1050px){.phoenix-kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.phoenix-cockpit{padding:17px;border-radius:19px}.phoenix-head{align-items:flex-start;flex-direction:column}.phoenix-controls{width:100%}.phoenix-controls select{flex:1}.phoenix-kpis{grid-template-columns:repeat(2,1fr)}.phoenix-body{grid-template-columns:1fr}.phoenix-status-row{align-items:flex-start}.phoenix-head h2{font-size:1.45rem}}

/* Version 4.1.0 – Sprint 1: praktikabler Kernablauf */
.sprint-focus-card{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:18px;align-items:center;background:#fff;border:1px solid var(--border);border-radius:20px;padding:20px;margin:0 0 20px;box-shadow:var(--shadow)}
.sprint-focus-copy h3{font-size:1.35rem;margin:5px 0}.sprint-focus-copy p{margin:0;color:var(--muted)}
.sprint-focus-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.sprint-focus-actions button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;background:#f7f9fb;color:var(--text);border:1px solid var(--border);min-height:92px}.sprint-focus-actions button>span{font-size:1.35rem}.sprint-focus-actions button small{color:var(--muted);font-weight:500}.sprint-focus-actions .sprint-focus-primary{background:var(--primary);color:#fff;border-color:var(--primary)}.sprint-focus-actions .sprint-focus-primary small{color:rgba(255,255,255,.78)}
.sprint-secondary-dashboard{display:none}.show-sprint-secondary .sprint-secondary-dashboard{display:block}.sprint-more-toggle{width:100%;margin:0 0 20px}
.booking-room-picks{display:flex;flex-direction:column;gap:8px}.booking-room-pick{display:grid;grid-template-columns:auto minmax(0,1.4fr) minmax(120px,.8fr) 88px;gap:8px;align-items:center}.booking-room-pick input[type=checkbox]{width:auto}.booking-room-pick input[type=number]{min-width:0}.booking-bed-hint{margin:0}.booking-bed-hint.is-short{color:#8a4b08;font-weight:700}.property-bed-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}.property-bed-grid label{display:flex;flex-direction:column;gap:4px}.property-bed-grid input{width:100%;min-width:0}.booking-entry-card{border:2px solid rgba(31,78,120,.18)}.booking-workflow-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:12px;border-bottom:1px solid var(--border)}.booking-workflow-head h3{font-size:1.35rem;margin:4px 0}.booking-workflow-head p{margin:0;color:var(--muted);font-weight:500}.booking-time-badge{white-space:nowrap;background:#eaf5ee;color:#17652e;border-radius:999px;padding:7px 10px;font-size:.8rem;font-weight:800}.booking-primary-actions{padding-top:4px}.booking-main-button{flex:1;min-height:52px;font-size:1rem}.booking-more-options{border-top:1px solid var(--border);padding-top:12px}.booking-more-options summary{cursor:pointer;color:var(--primary);font-weight:750;margin-bottom:12px}
@media(max-width:760px){.sprint-focus-card{grid-template-columns:1fr}.sprint-focus-actions{grid-template-columns:1fr}.sprint-focus-actions button{min-height:76px}.booking-workflow-head{flex-direction:column}.booking-time-badge{align-self:flex-start}.booking-primary-actions{display:grid}.booking-main-button{width:100%}}


/* Produktivsystem 4.2.3 – iPhone-Mehr-Menü vollständig erreichbar */
@media(max-width:700px){
  .more-nav{
    top:calc(env(safe-area-inset-top) + 10px) !important;
    bottom:calc(78px + env(safe-area-inset-bottom)) !important;
    max-height:none !important;
    height:auto !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    align-content:flex-start;
    z-index:50 !important;
    padding-bottom:24px !important;
  }
  body:not(.standalone-app) .more-nav{
    bottom:calc(var(--mobile-browser-toolbar-offset) + 78px) !important;
  }
}


/* Produktivsystem 4.2.5 – verhindert iPhone-Ghost-Clicks auf Belegung */
body.more-nav-touch-lock .mobile-bottom-nav{pointer-events:none !important;}
@media(max-width:700px){
  #moreNav:not(.hidden){pointer-events:auto !important;touch-action:pan-y;}
  #moreNav:not(.hidden) button{position:relative;z-index:2;touch-action:manipulation;}
}

/* 4.3.9 sichtbare Speicherbestätigung für Belege */
.receipt-just-saved{outline:3px solid currentColor;outline-offset:2px;}

/* Version 4.3.12 – kompakte Auswertung */
.report-card-title-row{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:14px}.report-card-title-row h3{margin:0 0 4px}.compact-report-toolbar{justify-content:flex-end;flex-wrap:wrap}.compact-report-details{margin-top:12px}.report-subsection{margin-top:18px;padding-top:16px;border-top:1px solid var(--line,#d9e0e7)}.report-subsection h4{margin:0 0 10px}.report-advanced-card{padding:0;overflow:hidden}.report-advanced-card>summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:18px 20px;list-style:none}.report-advanced-card>summary::-webkit-details-marker{display:none}.report-advanced-card>summary span{font-size:.88rem;color:var(--muted,#667085);font-weight:500}.report-advanced-card[open]>summary{border-bottom:1px solid var(--line,#d9e0e7)}.advanced-report-content{padding:4px 20px 20px}.report-inner-section{padding:20px 0;border-bottom:1px solid var(--line,#d9e0e7)}.report-inner-section:last-child{border-bottom:0}@media(max-width:760px){.report-card-title-row{flex-direction:column}.compact-report-toolbar{justify-content:flex-start}.report-advanced-card>summary{align-items:flex-start;flex-direction:column}}
.business-mirror #books .form-grid,
.business-mirror #books #bookList .item-actions { display: none !important; }
.business-mirror .quick-actions .quick-action:not([data-open-view="books"]) { display: none !important; }

/* v180: Kalender-Monatsübersicht und ganze-Haus-Markierung */
.calendar-month-summary{font-size:.88rem;font-weight:600;margin:.5rem 0 1rem;line-height:1.5}
.calendar-whole-house{outline:2px solid currentColor;outline-offset:-3px}

/* V275: author display rules must never expose the owner-only action. */
#ownerAdminNav[hidden]{display:none!important}
.stay-start-meter{background:#173042;color:#fff;padding:8px 16px;font-size:.875rem;line-height:1.35;z-index:9}
.stay-start-meter a{color:#fff;text-decoration:none;display:block;overflow-wrap:anywhere}
.stay-start-meter strong{font-size:1.05rem}

/* Kacheln und Fenster: Text umbrechen, nichts überdecken */
.kpi-grid,.report-grid,.cockpit-kpis,.phoenix-kpis,.smart-dashboard-grid,.room-status-grid{min-width:0}
.kpi-grid,.today-kpi-grid,.finance-strip,.phoenix-kpis,.report-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr))}
.room-status-card,.report-grid article,.phoenix-kpis article,.cockpit-kpis article{min-width:0;overflow:visible}
.room-status-card strong,.room-status-card span,.report-grid article strong,.phoenix-kpis strong{overflow-wrap:anywhere}
.hero-card{flex-wrap:wrap;min-width:0;overflow:visible}
.hero-card h2{overflow-wrap:anywhere;max-width:100%}
.card,.today-section,.md-form-stage,.md-editor-rail{min-width:0;overflow:visible}
dialog{max-width:min(980px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto}
.sync-conflict-dialog{overflow:auto}
.conflict-heading,.booking-workflow-head,.ledger-dialog-head,.report-card-title-row{flex-wrap:wrap;gap:12px;min-width:0}
.mobile-bottom-nav button{min-width:0;max-width:100%;overflow-wrap:anywhere;hyphens:auto}
@media(max-width:700px){
  .first-use-hint{flex-direction:column;align-items:stretch}
  .first-use-hint button{width:100%}
  .kpi-grid,.today-kpi-grid,.finance-strip{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
