/* Isolated v3 navigation and appointment composition, using the existing CRM theme. */
#board-filters{display:contents}.mobile-filter-toggle{display:none}.board-panel{position:relative}
.board:not(.table-mode){display:grid;grid-template-columns:repeat(var(--visible-columns,3),minmax(0,1fr));overflow:hidden;min-height:0;padding:12px;gap:14px}.board:not(.table-mode) .column{min-height:0;min-width:0;width:auto}.board:not(.table-mode) .cards{min-height:0;overflow:hidden;flex:1;gap:10px}.board:not(.table-mode) .lead-card{height:202px;flex-shrink:0;padding:12px}.board:not(.table-mode).compact-cards .lead-card{height:140px}.lead-card h3,.interest,.source-label,.card-footer .crm-person>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-label{min-width:0}.priority{flex-shrink:0}.card-top{margin-bottom:8px}.card-footer{margin-top:9px;gap:5px}.tag-row{overflow:hidden;white-space:nowrap}.column-paging{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--crm-color-border);padding-top:8px;flex-shrink:0;font-size:11px;color:var(--crm-color-muted)}.column-paging>div{display:flex;gap:6px}.column-paging .crm-button{min-height:32px;padding:6px}.phase-navigation{display:flex;align-items:center;gap:12px;min-height:52px;padding:6px 18px;border-top:1px solid var(--crm-color-border);border-bottom:1px solid var(--crm-color-border);background:var(--crm-color-surface)}.phase-jump{width:230px}.phase-range{font-size:11px;color:var(--crm-color-muted);white-space:nowrap}.phase-actions{margin-left:auto;display:flex;gap:6px}.phase-actions .crm-button{min-height:34px}.board-bottom{min-height:34px}.board.table-mode{overflow-y:auto;overflow-x:hidden;min-height:0}.board.table-mode .crm-table-wrap{overflow:visible}.board.table-mode .crm-table{table-layout:fixed;width:100%;min-width:0}.board.table-mode td,.board.table-mode th{overflow-wrap:anywhere}.column-menu{z-index:6;max-height:calc(100dvh - 410px);overflow:auto}
.appointment-dialog{width:min(1160px,calc(100vw - 48px))}.appointment-dialog .crm-dialog-frame{height:min(860px,calc(100dvh - 48px));max-height:calc(100dvh - 48px)}.appointment-dialog .crm-dialog-body{background:var(--crm-color-canvas);padding:22px;overflow:auto}.ap-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}.ap-form{padding:22px;background:var(--crm-color-surface);border:1px solid var(--crm-color-border);border-radius:12px;min-width:0}.ap-section+.ap-section{border-top:1px solid var(--crm-color-border);margin-top:24px;padding-top:22px}.ap-section h3{display:flex;align-items:center;gap:10px;font-size:15px;margin-bottom:18px}.ap-section h3>b{display:grid;place-items:center;font-size:12px;width:27px;height:27px;border-radius:50%;background:var(--crm-color-primary-soft);color:var(--crm-color-primary-text)}.ap-customer{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.ap-customer>div{flex:1;min-width:150px}.ap-customer small{overflow-wrap:anywhere}.ap-customer small,.ap-service-heading small,.ap-choice small,.ap-suggestion small,.ap-slot small,.ap-summary small,.ap-service-option small{display:block;margin-top:4px;font-size:11px;color:var(--crm-color-muted);font-weight:400}.ap-hint{font-size:11px;color:var(--crm-color-muted);line-height:1.6;margin:14px 0}.ap-service-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}.ap-selected{display:grid;gap:10px;margin:14px 0}.ap-selected article{background:var(--crm-color-canvas);border:1px solid var(--crm-color-border);padding:14px;border-radius:8px}.ap-selected .crm-field{margin:12px 0 6px}.ap-selected article>small{font-size:10px;color:var(--crm-color-muted)}.ap-form .crm-field-grid{gap:14px}.ap-form .crm-field{font-size:12px}.ap-form .crm-input{min-height:40px}.ap-form .crm-field-grid>small{font-size:10px;color:var(--crm-color-muted)}.ap-staff{border:0;padding:0;margin:6px 0 12px;display:flex;flex-wrap:wrap;gap:8px}.ap-staff legend{font-size:12px;font-weight:600;margin-bottom:10px}.ap-staff label{display:flex;align-items:center;gap:7px;border:1px solid var(--crm-color-border);border-radius:8px;padding:9px 10px;font-size:11px;cursor:pointer}.ap-staff label:has(input:checked){border-color:var(--crm-color-primary);background:var(--crm-color-primary-soft)}.ap-staff input,.ap-choice input,.ap-service-option input{accent-color:var(--crm-color-primary);width:16px;height:16px;flex-shrink:0}.ap-choice{display:flex;align-items:flex-start;gap:10px;margin:16px 0;padding:12px;background:var(--crm-color-canvas);border:1px solid var(--crm-color-border);border-radius:8px;font-size:12px;cursor:pointer}.ap-choice input{margin-top:2px}.ap-suggestion{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid var(--crm-color-border);border-radius:8px;font-size:12px}.ap-summary{position:sticky;top:0;padding:20px;background:var(--crm-color-surface);border:1px solid var(--crm-color-border);border-radius:12px;font-size:12px}.ap-summary h3{font-size:15px;margin-bottom:22px}.ap-summary-customer{display:flex;align-items:center;gap:10px}.ap-summary-date{display:flex;align-items:flex-start;gap:10px;padding:18px 0;margin-top:8px;border-bottom:1px solid var(--crm-color-border);color:var(--crm-color-primary-text)}.ap-summary dl{margin:0}.ap-summary dl>div{display:flex;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--crm-color-border)}.ap-summary dt{color:var(--crm-color-muted)}.ap-summary dd{margin:0;text-align:right;overflow-wrap:anywhere}.ap-summary .ap-total{display:block}.ap-total dd{font-size:24px;font-weight:650;text-align:left;margin-top:6px}.ap-summary>p{font-size:11px;color:var(--crm-color-muted);line-height:1.6;margin:14px 0}.ap-summary .crm-notice{font-size:11px;padding:12px}.ap-footer{justify-content:space-between}.ap-picker-filters{display:grid;grid-template-columns:1.5fr 1fr;gap:12px}.service-dialog,.suggestion-dialog,.series-dialog{width:min(760px,calc(100vw - 48px))}#ap-service-results h3,#ap-suggestion-results h3{font-size:12px;margin:20px 0 8px;color:var(--crm-color-muted)}.ap-service-option{display:flex;align-items:center;gap:12px;padding:14px 6px;border-bottom:1px solid var(--crm-color-border);font-size:12px;cursor:pointer}.ap-service-option>span{flex:1}.ap-service-option:has(input:checked){background:var(--crm-color-primary-soft)}.service-dialog .crm-dialog-footer,.suggestion-dialog .crm-dialog-footer{justify-content:space-between;gap:12px}.ap-slot{width:100%;justify-content:space-between;margin-bottom:8px;text-align:left}.ap-conflict{border:0;padding:0}.ap-conflict legend{font-size:13px}.ap-occurrences{columns:2;font-size:12px}.ap-occurrences p{padding:5px 0}.ap-recurrence{padding:16px;background:var(--crm-color-canvas);border-radius:8px}.suggestion-dialog .crm-notice{margin-bottom:18px}.ap-form input:read-only{background:var(--crm-color-canvas)}
.board:not(.table-mode):not(.compact-cards) .lead-card{height:184px}.board:not(.compact-cards) .next-step{padding-top:9px;margin-top:9px}.board:not(.compact-cards) .tag-row{margin-top:7px}
@media(max-width:1000px){.ap-layout{grid-template-columns:minmax(0,1fr) 240px;gap:14px}.ap-form{padding:16px}.ap-summary{padding:16px}.board-bottom>span:first-child{display:none}}
@media(max-width:760px){.ap-layout{grid-template-columns:1fr}.ap-summary{position:static}.appointment-dialog .crm-dialog-body{padding:12px}.ap-summary dl{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ap-summary dl>div{display:block}.ap-summary dd{text-align:left;margin-top:6px}.phase-range{display:none}.phase-jump{width:auto;min-width:0;flex:1}.phase-actions [data-action="column"]{font-size:0;padding:7px}.phase-actions [data-action="column"] .crm-icon{width:18px}.phase-navigation{padding:6px 12px;gap:8px}.board-bottom{font-size:9px}.board.table-mode .crm-table,.board.table-mode tbody,.board.table-mode tr,.board.table-mode td{display:block;width:100%}.board.table-mode thead{display:none}.board.table-mode tr{border:1px solid var(--crm-color-border);border-radius:8px;margin-bottom:12px;padding:12px}.board.table-mode td{border:0;padding:4px}.board.table-mode td:nth-child(3)::before{content:'Phase: ';color:var(--crm-color-muted)}.board.table-mode td:nth-child(5)::before{content:'Zuständig: ';color:var(--crm-color-muted)}}
@media(max-width:620px){.appointment-dialog,.service-dialog,.suggestion-dialog,.series-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.appointment-dialog .crm-dialog-frame{height:100dvh;max-height:100dvh}.ap-footer .save-hint{display:none}.ap-footer .footer-right{width:100%;justify-content:space-between}.ap-service-heading,.ap-suggestion{align-items:flex-start;flex-wrap:wrap}.ap-customer>.crm-badge{margin-left:44px}.ap-picker-filters{grid-template-columns:1fr}.ap-occurrences{columns:1}.ap-staff label{min-height:44px}.phase-actions .crm-button,.column-paging .crm-button{min-height:38px}.board:not(.table-mode){gap:10px;padding:10px}.board:not(.table-mode) .lead-card{height:202px}.board:not(.table-mode).compact-cards .lead-card{height:140px}.board-bottom{padding:4px 10px;min-height:26px}.column-menu{max-height:230px}}
@media(max-height:700px){.topbar{height:44px}.filters{padding-top:8px;padding-bottom:6px}.quick-row{padding-bottom:6px}.view-row{min-height:46px!important}.view-row .crm-tabs button{min-height:42px}.phase-navigation{min-height:44px}.board-bottom{display:none}}
@media(max-height:570px){.quick-row,.preview-bar{display:none}.shell{height:100dvh}.filters .filter-select{display:none}.filters{padding:5px 12px}.extra-filters{max-height:96px;overflow-y:auto}.board:not(.table-mode) .column-head{min-height:30px;padding-bottom:4px}.board:not(.table-mode) .sort-row{padding-bottom:4px}.board:not(.table-mode) .lead-card{height:140px;padding:10px}.board:not(.table-mode) .tag-row{display:none}.board:not(.table-mode) .card-top{margin-bottom:4px}.board:not(.table-mode) .next-step{padding-top:5px;margin-top:5px}.board:not(.table-mode) .card-footer{margin-top:5px}}
@media(max-width:620px){.topbar>.crm-row:first-child>.crm-muted{display:none}.topbar>.crm-row:first-child>span:last-child{font-size:11px}.topbar{flex-shrink:0}.board-bottom>#board-page-note{display:block}}
@media(max-height:700px) and (max-width:900px){.mobile-filter-toggle{display:flex;justify-content:center;border:0;border-bottom:1px solid var(--crm-color-border);border-radius:0;min-height:38px;flex-shrink:0;font-size:11px}#board-filters{display:none}#board-filters.filters-open{display:block;position:absolute;z-index:8;inset:88px 0 auto;background:var(--crm-color-surface);border-bottom:1px solid var(--crm-color-border);box-shadow:var(--crm-shadow-dialog);max-height:calc(100dvh - 180px);overflow:auto}#board-filters .filter-select{display:block}#board-filters .quick-row{display:flex}#board-filters .filters{padding:10px 12px}#board-filters .quick-row{padding:4px 12px 10px}.board:not(.table-mode){overflow-y:auto}.board:not(.table-mode) .column{min-height:330px}}
/* v4: fixed column controls, independently scrollable complete lead lists. */
.board:not(.table-mode){grid-template-rows:minmax(0,1fr);overflow:hidden}
.board:not(.table-mode) .column{min-height:0;overflow:visible}
.board:not(.table-mode) .column-head,.board:not(.table-mode) .sort-row{flex-shrink:0}
.board:not(.table-mode) .cards{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--crm-color-border-strong) transparent;scrollbar-gutter:stable;touch-action:pan-y;padding:2px 5px 5px 2px}
.board:not(.table-mode) .cards:focus-visible{outline:2px solid var(--crm-color-focus);outline-offset:-2px;border-radius:8px}
/* The compact trigger width must never constrain the menu's action rows. */
.column-actions .column-menu .crm-button{width:100%;min-height:40px;justify-content:flex-start;padding:9px 10px;text-align:left;white-space:normal;line-height:1.4}
.column-actions .column-menu .crm-icon{flex-shrink:0;width:16px;height:16px}
.column-menu{max-width:calc(100vw - 32px);max-height:min(280px,calc(100dvh - 250px));overflow-y:auto;overflow-x:hidden}
