/* Kleine Bildschirme: gut lesbare Inhalte und sichere Touch-Bedienung. */
.nav-icon{display:none;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.brand img{width:160px;height:auto}
.brand .brand-logo-image{width:38px;height:38px;flex:none;object-fit:contain;background:#123b32;border-radius:8px;box-shadow:0 0 0 1px #60b4a6}
.brand .brand-wordmark{font-size:21px;font-weight:650;letter-spacing:-.045em;line-height:1;color:#f7fcf9}
.brand .brand-wordmark span{color:#67d6b1}
@media(max-width:520px){.brand .brand-logo-image{width:32px;height:32px}.brand .brand-wordmark{font-size:18px}}
.nav-compact{display:none}
.section-nav[hidden]{display:none!important}
.contact-groups .dot .ui-icon{width:15px;height:15px}
.help-intro{display:flex;align-items:center;gap:18px;padding:19px 21px;margin-bottom:17px;border:1px solid #dfece7;border-radius:7px;background:#f7fcf9}
.help-intro img{flex:none;width:56px;height:56px;background:#123b32;border-radius:8px;box-shadow:0 0 0 1px #60b4a6}
.help-intro h2{font-size:19px;margin:0 0 5px;color:#243e33}
.help-intro p{font-size:13px;line-height:1.55;color:#61776b;margin:0}
.help-grid .card{min-width:0}
.help-steps{counter-reset:help-step;list-style:none;margin:17px 0 13px;padding:0}
.help-steps li{counter-increment:help-step;position:relative;padding:10px 0 10px 39px;min-height:46px;border-top:1px solid #edf1ee;color:#52645a;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.help-steps li::before{content:counter(help-step);position:absolute;top:10px;left:0;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#def5eb;color:#16785e;font-weight:700;font-size:12px}
.help-source{display:inline-flex;align-items:center;min-height:42px;color:#128b6d;text-decoration:none;font-size:12px;font-weight:700}
.help-source:hover,.help-source:focus-visible{text-decoration:underline;text-underline-offset:3px}
:focus-visible{outline:3px solid #23bd95;outline-offset:3px}

@media(max-width:767px){
  html{-webkit-text-size-adjust:100%;scroll-padding-top:18px}
  body{min-width:320px;overflow-x:hidden}
  button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
  .header-inner{height:60px;min-height:60px;display:flex;align-items:center;flex-wrap:nowrap;padding:0 max(16px,env(safe-area-inset-left)) 0 max(16px,env(safe-area-inset-right));gap:8px}
  .brand{height:auto;min-width:0;flex:none}
  .brand img{width:140px;height:auto}
  .header-tools{margin-left:auto;flex:none}
  .header-tools select{font-size:16px;min-height:44px;max-width:130px;padding:6px 8px;border-radius:8px}
  .app-shell .main-nav{position:fixed;z-index:40;inset:auto 0 0;order:initial;width:100%;height:calc(65px + env(safe-area-inset-bottom));padding:3px max(5px,env(safe-area-inset-left)) env(safe-area-inset-bottom) max(5px,env(safe-area-inset-right));display:flex;justify-content:space-around;align-items:stretch;gap:0;overflow:visible;background:#080a0a;border-top:1px solid #28423a;box-shadow:0 -5px 22px #0b241923}
  .app-shell .main-nav button{min-width:0;min-height:58px;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:4px 2px;border:0;border-top:2px solid transparent;font-size:10px;font-weight:650;line-height:1.15;white-space:nowrap}
  .app-shell .main-nav button.selected{border-top-color:#71dfb5;color:#a5f1cf}
  .app-shell .main-nav button[hidden]{display:none!important}
  .app-shell .main-nav .nav-wide{display:none}
  .app-shell .main-nav .nav-compact{display:block}
  .main-nav .nav-icon{display:block}
  .app-shell .shell{padding:22px max(16px,env(safe-area-inset-right)) 24px max(16px,env(safe-area-inset-left));min-height:auto}
  .app-shell .footer{padding-bottom:calc(85px + env(safe-area-inset-bottom))}
  .subbar-inner{padding:10px 16px;font-size:12px}
  .demo-note{font-size:12px;line-height:1.5;margin-bottom:23px;padding:11px 13px}
  .page-heading{display:block;margin-bottom:20px}
  h1{font-size:27px;line-height:1.2}
  .lead{font-size:14px}
  .eyebrow{font-size:11px}
  .heading-actions{justify-content:flex-start;margin-top:16px}
  .button,.status-select,.filter-label select,.document-row button,.text-link{min-height:44px;font-size:14px}
  .button{padding:10px 13px;white-space:normal;text-align:center}
  .section-nav{gap:0;margin:0 -16px 22px;padding:0 16px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .section-nav::-webkit-scrollbar{display:none}
  .section-nav button{flex:none;min-height:48px;margin-right:22px;padding:10px 0;font-size:14px}
  .grid.two,.grid.three,.profile-grid{grid-template-columns:minmax(0,1fr)!important}
  .card{min-width:0;padding:17px}
  .card h2{font-size:17px}
  .card h3{font-size:15px}
  .card p,.ticket-card p,.operator-note p,.update-steps li,.abschluss-notice p{font-size:13px}
  .muted,.toolbar p,.info-callout,.list strong,.list small,.ticket-meta,.ticket-bottom small,.document-row strong,.document-row small{font-size:12px}
  .metric span,.metric small,.chip,.building-header small,.floor-name,.unit small,.role-access{font-size:11px}
  .metrics{gap:9px}
  .metrics .card{padding:13px;min-width:0}
  .metric strong{font-size:22px}
  .list li{align-items:center;min-width:0}
  .list-main,.document-row div:nth-child(2){min-width:0;overflow-wrap:anywhere}
  .table-wrap{max-width:100%;-webkit-overflow-scrolling:touch}
  .data-table{font-size:12px}
  .data-table th{font-size:11px}
  .floor-plan{grid-template-columns:minmax(0,1fr)}
  .building,.entrance{min-width:0}
  .building-header{gap:8px;flex-wrap:wrap}
  .floor{grid-template-columns:48px minmax(0,1fr);gap:7px;margin:0 5px;padding:10px 6px}
  .unit-row{min-width:0}
  .unit{min-height:44px;min-width:75px;padding:7px 8px;font-size:12px}
  .ticket-card{padding:15px}
  .ticket-top,.ticket-bottom{align-items:flex-start;flex-wrap:wrap}
  .ticket-title{font-size:15px;line-height:1.4}
  .ticket-status{font-size:12px;min-height:27px}
  .status-select{width:100%;max-width:100%;padding:8px 10px}
  .ticket-bottom small{width:100%}
  .document-row{flex-wrap:wrap;gap:10px}
  .document-row button{margin-left:41px;padding:7px 0}
  .field-grid{grid-template-columns:minmax(0,1fr)}
  .field-grid label,.modal label{font-size:13px}
  .field-grid input,.field-grid select,.field-grid textarea,.modal input,.modal select,.modal textarea{min-height:44px;font-size:16px;padding:10px 12px}
  .modal{width:calc(100vw - 24px);max-width:480px;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:22px 18px;overflow-y:auto;overscroll-behavior:contain}
  .modal-close{min-width:44px;min-height:44px;top:5px;right:5px}
  .modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .modal-actions .button{width:100%}
  .welcome-copy{max-width:100%;padding:20px}
  .welcome-copy h2{font-size:21px}
  .welcome-copy p,.document-visual p{font-size:13px}
  .document-visual{grid-template-columns:minmax(0,1fr)}
  .document-visual img{display:none}
  .footer-inner{align-items:flex-start;flex-direction:column;gap:14px}
  .footer a{font-size:13px;min-height:44px;display:inline-flex;align-items:center}
  .footer nav{gap:12px 22px}
  .legal-header{height:60px;min-height:60px;flex-wrap:nowrap}
  .legal-back{font-size:13px;min-height:44px;display:inline-flex;align-items:center;text-align:right}
  .legal-shell{padding:30px max(16px,env(safe-area-inset-right)) 60px max(16px,env(safe-area-inset-left))}
  .legal-shell h1{font-size:28px;overflow-wrap:anywhere}
  .legal-section p,.legal-section li,.legal-warning{font-size:14px}
  .legal-fields div{grid-template-columns:1fr;font-size:14px}
  .help-intro{align-items:flex-start;padding:16px;gap:13px}
  .help-intro img{width:45px;height:45px}
  .help-intro h2{font-size:17px}
  .help-intro p,.help-grid .card p{font-size:13px}
  .help-source{font-size:13px}
}
@media(max-width:600px){
  .app-shell .weg-house-grid .entrance-list{grid-template-columns:minmax(0,1fr);grid-auto-flow:row;grid-auto-columns:auto;overflow-x:visible;scroll-snap-type:none;padding-bottom:0}
  .app-shell .weg-house-grid .entrance{min-width:0;max-width:100%;scroll-snap-align:none}
}

@media(max-width:375px){
  .brand img{width:119px}
  .header-tools select{max-width:118px}
  .app-shell .main-nav button{font-size:9px}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .modal-actions{grid-template-columns:1fr}
}

/* Lesbare Grundschrift für die tägliche Nutzung auf Desktop und Smartphone. */
:root{font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif}
.app-shell{font-size:15px;line-height:1.5}
.app-shell h1{font-size:29px}
.app-shell .lead,.app-shell .card p,.app-shell .toolbar p,.app-shell .ticket-card p,.app-shell .muted,.app-shell .info-callout{font-size:14px;line-height:1.6}
.app-shell .card h2{font-size:17px}
.app-shell .section-nav button,.app-shell .main-nav button,.app-shell .button,.app-shell .text-link{font-size:13px}
.app-shell .list strong,.app-shell .ticket-title,.app-shell .document-row strong,.app-shell .finance-circle-members>summary{font-size:14px}
.app-shell .list small,.app-shell .ticket-meta,.app-shell .document-row small,.app-shell .finance-circle-members>ul,.app-shell .data-table,.app-shell .demo-note,.app-shell .storage-status{font-size:13px}
.app-shell .data-table th,.app-shell .chip,.app-shell .metric span,.app-shell .metric small,.app-shell .eyebrow{font-size:12px}
.app-shell .modal label,.app-shell .field-grid label{font-size:13px}
.app-shell .modal input,.app-shell .modal select,.app-shell .modal textarea{font-size:16px}
@media(max-width:767px){.app-shell h1{font-size:27px}.app-shell .main-nav button{font-size:10px}.app-shell .section-nav button,.app-shell .button,.app-shell .text-link{font-size:14px}.app-shell .card p,.app-shell .toolbar p,.app-shell .ticket-card p{font-size:14px}}
@media(max-width:375px){.app-shell .main-nav button{font-size:9px}}

/* Zusätzliche Lesbarkeit in Hausstruktur, Nachrichten, Profil und Abschluss. */
.app-shell .message-card>p,.app-shell .message-reply p,.app-shell .abschluss-checklist li{font-size:14px;line-height:1.6}
.app-shell .message-card>small,.app-shell .message-reply strong,.app-shell .profile-card dl div,.app-shell .abschluss-sections{font-size:13px;line-height:1.5}
.app-shell .profile-card dl div{grid-template-columns:minmax(75px,auto) 1fr;gap:10px;margin:13px 0}
.app-shell .profile-card dt,.app-shell .message-card>small{color:#60736a}
.app-shell .building-header strong,.app-shell .entrance-title,.app-shell .building-extras h3,.app-shell .asset-list strong{font-size:13px;line-height:1.45}
.app-shell .building-header small,.app-shell .entrance-count,.app-shell .floor-name,.app-shell .facade-roof,.app-shell .facade-base,.app-shell .asset-list span,.app-shell .asset-list small{font-size:12px;line-height:1.45}
.app-shell .floor-name,.app-shell .asset-list span,.app-shell .asset-list small{color:#5f7469}
.app-shell .abschluss-checklist li{padding:13px 0}
@media(max-width:767px){body{min-width:0}.app-shell .profile-icon{display:none}.app-shell .message-card{padding:18px}.app-shell .message-card>small{display:block;margin-top:10px}.app-shell .profile-card dl div{grid-template-columns:80px minmax(0,1fr)}.app-shell .unit small{font-size:12px}}
@media(max-width:375px){.app-shell .header-tools select{max-width:105px}.app-shell .main-nav button{font-size:10px}}
@media(max-width:767px){
  .app-shell .assignment-template .text-link,.app-shell .assignment-source .text-link{min-height:44px;padding:8px 4px;font-size:14px}
  .app-shell .assignment-templates>p,.app-shell .assignment-source small,.app-shell .assignment-state,.app-shell .assignment-current p,.app-shell .assignment-unassign,.app-shell .unit-assignment-hint{font-size:13px;line-height:1.5}
  .app-shell .asset-assignment-chip .structure-grip,.app-shell .asset-assignment-chip>button:not(.structure-grip){min-width:44px;min-height:44px}
}
@media(max-width:767px){
  .app-shell .section-nav{flex-wrap:wrap;gap:0 16px;margin:0 0 22px;padding:0;overflow:visible}
  .app-shell .section-nav button{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 0;white-space:normal;text-align:left;line-height:1.3}
  .app-shell .main-nav button{overflow-wrap:anywhere}
}

/* Die Einheitenliste bleibt auf kleinen Displays ohne seitliches Wischen lesbar. */
@media (max-width: 767px) {
  .app-shell .units-table, .app-shell .units-table tbody, .app-shell .units-table tr, .app-shell .units-table td { display: block; width: 100%; }
  .app-shell .units-table thead { display: none; }
  .app-shell .units-table tr { border: 1px solid #dfe9e4; border-radius: 8px; margin-bottom: 12px; padding: 8px 12px; }
  .app-shell .units-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; padding: 6px 0; font-size: 14px; text-align: right; }
  .app-shell .units-table td::before { content: attr(data-label); color: #64766e; text-align: left; }
  .app-shell .units-table td:empty { display: none; }
}

/* Ausgewählter Eintrag bleibt beim Suchen der Wohnung auf dem Handy sichtbar. */
.mobile-assignment-bar{display:none}
@media(max-width:767px){
  .app-shell .mobile-assignment-bar{position:fixed;z-index:39;bottom:calc(65px + env(safe-area-inset-bottom));left:8px;right:8px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:#e8f7ef;border:1px solid #9acfb5;border-radius:8px 8px 0 0;box-shadow:0 -4px 18px #173d2d22;color:#244d3b}
  .mobile-assignment-bar>div:first-child{min-width:0;flex:1}
  .mobile-assignment-bar strong,.mobile-assignment-bar span{display:block;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
  .mobile-assignment-bar span{color:#426c57}
  .mobile-assignment-actions{display:flex;gap:5px;flex-shrink:0}
  .mobile-assignment-actions button{min-height:44px;padding:6px 8px;border:1px solid #9acfb5;border-radius:5px;background:white;color:#245a43;font-size:12px;font-weight:600}
  .app-shell .weg-compound{scroll-margin-top:72px}
}

@media(max-width:767px){
  .mobile-assignment-bar strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-height:2.7em}
  .mobile-assignment-actions button{padding:6px}
}

.direct-template-actions{display:flex;flex-wrap:wrap;gap:8px}.direct-template-actions .button{min-height:44px}.assignment-notice .text-link{margin-left:8px;min-height:44px}

.ticket-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-bottom:16px}.ticket-filters label,.document-search{display:grid;gap:6px;font-size:13px;font-weight:600;color:#496559}.ticket-filters select,.document-search input{min-height:44px;padding:8px 10px;border:1px solid #c9dbd2;border-radius:5px;background:#fff;font-size:16px}.ticket-filters span{font-size:13px;color:#5e7468;padding-bottom:10px}.document-search{margin:0 0 15px}.document-row[hidden]{display:none!important}

.finance-position-presets{display:flex;flex-wrap:wrap;gap:8px}.finance-position-presets .button{min-height:44px;white-space:normal;text-align:left}.finance-position-presets+.grid{margin-top:16px}

.finance-allocation{border-top:1px solid #dce9e2;margin:14px 0;padding-top:12px}.finance-allocation summary{cursor:pointer;min-height:44px;font-weight:600;color:#246b51}.finance-allocation ul{list-style:none;padding:0;margin:0}.finance-allocation li{display:flex;justify-content:space-between;align-items:start;gap:12px;padding:10px 0;border-bottom:1px solid #e5eee9}.finance-allocation li small{display:block;color:#61776a}.finance-allocation li strong{white-space:nowrap}.finance-allocation-message{padding:10px;background:#f5f8f6;border-left:2px solid #a8caba}.distribution-fields{display:grid;gap:10px}.distribution-fields label{display:grid;gap:4px}

/* Bereichsnavigation: alle Einträge sichtbar, ohne horizontale Scrollleiste. */
.app-shell .section-nav{display:flex;flex-wrap:wrap;gap:0 24px;overflow:visible;align-items:stretch}
.app-shell .section-nav button{display:inline-flex;align-items:center;gap:6px;min-height:44px;margin-right:0;padding:8px 0;white-space:normal;text-align:left;line-height:1.3}
@media(max-width:767px){.app-shell .section-nav{gap:0 16px}}

@media(max-width:767px){html{scroll-padding-bottom:calc(90px + env(safe-area-inset-bottom))}.app-shell .section-nav button{scroll-margin-bottom:calc(90px + env(safe-area-inset-bottom))}}

/* Lesbare Auswahllisten auf dem iPhone; genügend Platz für den Fingertipp. */
@media(max-width:767px){.app-shell main select{font-size:16px;min-height:44px;max-width:100%}}

/* Kompakte Ticketübersicht mit aufklappbaren Details. */
.ticket-overview{margin:0 0 20px}.ticket-status-filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.ticket-filter-pill{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:8px 12px;border:1px solid #d7e4de;border-radius:7px;background:#fff;color:#435c52;font-size:14px;font-weight:600}.ticket-filter-pill span{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:11px;background:#eef4f1;font-size:12px}.ticket-filter-pill:hover,.ticket-filter-pill.selected{border-color:#55bfa3;background:#eaf8f1;color:#155c45}.ticket-filter-pill.selected span{background:#cceee1}.ticket-search-row{display:flex;flex-wrap:wrap;align-items:end;gap:12px}.ticket-search-row label{display:grid;gap:5px;color:#496559;font-size:13px;font-weight:600}.ticket-search-row input,.ticket-search-row select{min-height:44px;max-width:100%;padding:8px 10px;border:1px solid #c9dbd2;border-radius:5px;background:white;color:#26342d;font-size:16px}.ticket-search-row input{width:min(290px,100%)}.ticket-result-count{padding:0 0 10px;color:#61766c;font-size:13px}.ticket-compact{padding:0;overflow:hidden}.ticket-summary{display:flex;justify-content:space-between;gap:14px;padding:16px 18px;cursor:pointer;list-style:none}.ticket-summary::-webkit-details-marker{display:none}.ticket-summary:focus-visible{outline:2px solid #28ad88;outline-offset:-3px}.ticket-summary-main{display:block;min-width:0;flex:1}.ticket-summary-main .ticket-title,.ticket-summary-main .ticket-meta,.ticket-summary-info{display:block}.ticket-summary-main .ticket-meta{margin:4px 0}.ticket-summary-info{color:#61766c;font-size:12px;line-height:1.5}.ticket-summary-aside{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex-shrink:0}.ticket-summary-toggle{font-size:12px;font-weight:600;color:#167f62}.ticket-details-open,.ticket-compact[open] .ticket-details-closed{display:none}.ticket-compact[open] .ticket-details-open{display:inline}.ticket-details{border-top:1px solid #e5ece8;padding:16px 18px}.ticket-card .ticket-reporter{margin:0 0 14px;color:#61766c;font-size:12px}.ticket-compact .ticket-actions{margin-top:12px}
@media(max-width:600px){.ticket-status-filters{gap:6px}.ticket-filter-pill{min-height:44px;font-size:13px}.ticket-search-row label{flex:1 1 140px;min-width:0}.ticket-search-row input,.ticket-search-row select{width:100%}.ticket-result-count{flex-basis:100%;padding:0}.ticket-compact{padding:0}.ticket-summary{padding:14px;gap:8px}.ticket-summary-aside{max-width:42%;gap:6px}.ticket-summary-info,.ticket-summary-toggle{font-size:12px}.ticket-details{padding:14px}.ticket-card .ticket-reporter{font-size:13px}}

.demo-role-guide,.resident-shortcuts{margin-bottom:16px}.finance-cost-group{margin-top:16px}.finance-unit-cost summary{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}.finance-unit-cost summary span{flex:1;min-width:150px}.finance-unit-cost summary strong{font-size:14px}.finance-unit-cost summary small{color:#a0651a}.finance-unit-cost ul li small{overflow-wrap:anywhere}@media(max-width:600px){.resident-shortcuts .button,.demo-role-guide .button{flex:1 1 42%;min-height:44px}.finance-cost-group{padding:16px}.finance-unit-cost summary{line-height:1.4}}
