
.nav__right { display: flex; align-items: center; gap: 20px; }

.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-family: var(--font-body); font-size: var(--fs-base); color: var(--grey); }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold-dark); cursor: pointer; }

.app-main { max-width: 1440px; margin: 0 auto; padding: 60px; }


.pill-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 30px; }
#flag-pills {justify-content: flex-start;}
.cat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: var(--radius-pill); font-family: var(--font-body); font-size: var(--fs-base); cursor: pointer; border: 1.5px solid var(--taupe-dark); background: var(--white); color: var(--grey); transition: all var(--transition); }
.cat-pill svg { width: 14px; height: 14px; }
.cat-pill.selected { background: var(--creme); border-color: var(--gold-dark); }
.cat-pill:hover {border-color: var(--gold-dark);}


.cat-pill--keine_antwort { border-color: #C99A2E; color: #C99A2E; }
.cat-pill--keine_antwort.selected { background: #C99A2E; }
.cat-pill--bestaetigt { border-color: var(--success-text); color: var(--success-text); }
.cat-pill--bestaetigt.selected { background: var(--success-text); }
.cat-pill--abgelehnt { border-color: var(--danger-text); color: var(--danger-text); }
.cat-pill--abgelehnt.selected { background: var(--danger-text); }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 5px; margin-bottom: 20px; }
.tile-btn { padding:20px 8px; border: 1px solid var(--creme); border-radius: var(--radius-sm); background: var(--creme); cursor: pointer; text-align: center; font-family: var(--font-body); font-size: var(--fs-base); color: var(--grey); transition: all var(--transition); }
.tile-btn svg { width: 20px; height: 20px; display: block; margin: 0 auto 6px; stroke: currentColor; }
.tile-btn.selected { outline: 1px solid var(--gold-dark); outline-offset: -1px;color: var(--gold-dark); }
.tile-btn:hover { border-color: var(--gold-dark); }

.flag-pill.selected--paused { background: var(--flag-paused-bg); border-color: var(--flag-paused-border); color: var(--flag-paused-text); }
.flag-pill.selected--complaint { background: var(--flag-complaint-bg); border-color: var(--flag-complaint-border); color: var(--flag-complaint-text); }

.inline-add { display: flex; gap: 8px; margin-top: 8px; }
.inline-add.hidden { display: none; }
.inline-add input { flex: 1; }


.page-header { text-align: center; background: var(--white); padding: 36px 24px 28px; }
.page-header h1, .portal-header__name { font-size: clamp(29px, 4vw, 42px); margin-bottom: 6px; }
.page-header__meta { font-size: var(--fs-base); color: var(--grey); }
.page-header.hidden { display: none; }
.page-header__link { padding-bottom: 60px; }
.page-header__url {
    display: inline-block;
    align-items: center;
    margin: 0 auto;
    border: 1px solid var(--grey);
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    color: var(--grey);
    transition: all var(--transition);
}
.page-header__url:hover { color: var(--gold-dark); border-color: var(--gold-dark); }


.page-header__toggle-placeholder {
    display: block;
    visibility: hidden;
    height: 32px;
    margin-top: 16px;
    margin-bottom: 30px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    box-sizing: content-box;
}
.app-toolbar__sentinel { height: 1px; }
.app-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: var(--space-24); position: sticky; top: 64px; z-index: 90; padding: 0; transition: var(--transition);border-bottom-left-radius: 6px; border-bottom-right-radius:6px;}
.app-toolbar.stuck { background: white; margin: 0px -10px; padding: 0 10px 10px;box-shadow: var(--shadow-sm);}
.app-toolbar__left, .app-toolbar__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-toolbar__filters { display: flex; gap: 10px; align-items: center; }
.app-toolbar__filters.hidden { display: none; }
.cd-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.cd-toolbar-actions.hidden { display: none; }
.app-toolbar__filters select, .app-toolbar__filters input[type="text"] { width: auto;}

.dropdown-wrap { position: relative; }
.dropdown-panel {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 95;
    background: var(--white); border: 1px solid var(--taupe-dark); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md); padding: 12px 16px; min-width: 200px;
}
.dropdown-panel.hidden { display: none; }
.dropdown-panel__item { display: flex; align-items: center; gap: 8px; padding: 6px 0; white-space: nowrap; }
.dropdown-panel__item label { text-transform: none; letter-spacing: normal; font-weight: 400; cursor: pointer; }


.board-group {
    margin-bottom: 32px;
    padding-top: 20px;
	padding-bottom:60px;
    margin-bottom: 0px;
}
.board-group:first-child {
	padding-top:15px;
}

.board-group.board-group--collapsible:not(.expanded) {
	padding-bottom:0px;
}
.board-group__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: var(--fs-base); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-dark); margin-bottom: 12px; }
.board-group--collapsible .board-group__title { cursor: pointer; opacity: 1; }
.board-group__title .toggle-icon { font-size: var(--fs-xs); transition: transform var(--transition); }
.board-group--collapsible.expanded .toggle-icon { transform: rotate(90deg); }
.board-group__count { background: #f0e2cd; color: var(--grey); font-size: var(--fs-base); padding: 1px 8px; border-radius: var(--radius-pill); font-weight: 500; text-transform: none; letter-spacing: 0; }
.board-group__body { display: none; }
.board-group--collapsible.expanded .board-group__body { display: block; }
.board-group:not(.board-group--collapsible) .board-group__body { display: block; }

.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 5px; align-items: stretch; }

.board-col { background: var(--taupe-light); border-radius: var(--radius-md); display: flex; flex-direction: column; }
.board-col__header { padding: 25px 30px 15px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
.board-col__title { font-family: var(--font-body); font-size: var(--fs-base); font-weight: 500; color: var(--grey); display: flex; justify-content: space-between; align-items: center; }
.board-col__count { background: var(--taupe-dark); color: var(--grey); font-size: var(--fs-base); padding: 1px 8px; border-radius: var(--radius-pill); }
.board-col__body { padding: 0px 20px 20px 30px; flex: 1; min-height: 60px; max-height: 350px; overflow-y:scroll; scrollbar-width: thin; scrollbar-color: var(--taupe-dark) transparent; }
.board-col__body.drag-over { background: rgba(var(--gold-dark-rgb),.08); border-radius: var(--radius-sm); }
.board-col__body::-webkit-scrollbar { width: 5px; }
.board-col__body::-webkit-scrollbar-track { background: transparent; }
.board-col__body::-webkit-scrollbar-thumb { background: var(--taupe-dark); border-radius: var(--radius-pill); }
.board-col__body::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }
.board-col__add { display: block; text-align: center; padding: 10px 30px 20px; font-size: var(--fs-base); color: var(--grey); opacity: .6; text-decoration: none; transition: opacity var(--transition), color var(--transition); }
.board-col__add:hover { opacity: 1; color: var(--gold-dark); }


.p-card { position:relative; background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 10px; cursor: grab; border-left: 5px solid var(--gold-dark); transition: box-shadow var(--transition), transform var(--transition); }
.p-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.p-card--paused { opacity: 0.6; }
.p-card.dragging { opacity: 0.4; }

#project-list-table,
#customers-list-table,
#invoice-list-table,
#quote-list-table,
#product-list-table { table-layout: fixed; }


#project-list-table .col-title        { width: 20%; }
#project-list-table .col-customer     { width: 20%; }
#project-list-table .col-project_type { width: 20%; }
#project-list-table .col-status       { width: 20%; }
#project-list-table .col-deadline     { width: 15%; }
#project-list-table .col-billed       { width: 9%; }

#customers-list-table .col-customer_number { width: 10%; }
#customers-list-table .col-name            { width: 18%; }
#customers-list-table .col-fullname        { width: 18%; }
#customers-list-table .col-email           { width: 22%; }
#customers-list-table .col-actions         { width: 130px; }
/* Über den Spalten-Picker zuschaltbare Spalten (siehe assets/app.js
   initCustomerColumnsPicker()) — feste px-Breiten statt %, damit die Tabelle
   bei vielen gleichzeitig aktiven Spalten insgesamt breiter als der Container
   wird (siehe .p-table-wrap--list overflow-x:auto) statt sich zu überlappen,
   was bei table-layout:fixed ohne Breitenangabe für diese Spalten passierte
   (Bugreport: letzte Spalte wurde überlagert). */
#customers-list-table .col-phone,
#customers-list-table .col-mobile          { width: 110px; }
#customers-list-table .col-customer_type,
#customers-list-table .col-payment_type    { width: 120px; }
#customers-list-table .col-payment_terms,
#customers-list-table .col-currency        { width: 90px; }
#customers-list-table .col-city,
#customers-list-table .col-country,
#customers-list-table .col-vat_id          { width: 110px; }

#invoice-list-table .col-number       { width: 11%; }
#invoice-list-table .col-company_name { width: 19%; }
#invoice-list-table .col-name         { width: 15%; }
#invoice-list-table .col-order_number { width: 13%; }
#invoice-list-table .col-issue_date   { width: 9%; }
#invoice-list-table .col-due_date     { width: 9%; }
#invoice-list-table .col-amount       { width: 9%; }
#invoice-list-table .col-status       { width: 9%; }
#invoice-list-table .p-table__row-actions { width: 210px; }

#quote-list-table .col-number       { width: 13%; }
#quote-list-table .col-company_name { width: 23%; }
#quote-list-table .col-name         { width: 20%; }
#quote-list-table .col-issue_date   { width: 10%; }
#quote-list-table .col-valid_until  { width: 10%; }
#quote-list-table .col-amount       { width: 10%; }
#quote-list-table .col-status       { width: 10%; }
#quote-list-table .p-table__row-actions { width: 170px; }

#delivery-note-list-table .col-number       { width: 15%; }
#delivery-note-list-table .col-company_name { width: 25%; }
#delivery-note-list-table .col-name         { width: 20%; }
#delivery-note-list-table .col-order_number { width: 15%; }
#delivery-note-list-table .col-issue_date   { width: 12%; }
#delivery-note-list-table .col-status       { width: 13%; }
#delivery-note-list-table .p-table__row-actions { width: 130px; }

#product-list-table .col-article_number { width: 10%; }
#product-list-table .col-name           { width: 20%; }
#product-list-table .col-product_group  { width: 24%; }
#product-list-table .col-unit           { width: 10%; }
#product-list-table .col-price          { width: 10%; }
#product-list-table .col-tax_rate       { width: 10%; }
#product-list-table .col-usage_count    { width: 10%; }
#product-list-table .col-active         { width: 10%; }
#product-list-table .p-table__row-actions { width: 110px; }


.col-title, .col-name,
.col-company_name, .col-last_name,
#customers-list-table .col-fullname, #customers-list-table .col-email,
#customers-list-table .col-phone, #customers-list-table .col-mobile,
#customers-list-table .col-customer_type, #customers-list-table .col-payment_type,
#customers-list-table .col-payment_terms, #customers-list-table .col-currency,
#customers-list-table .col-city, #customers-list-table .col-country,
#customers-list-table .col-vat_id { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.p-card__deadline-icon { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; background: var(--danger-text); border-radius: var(--radius-pill); padding: 0;}
.p-card__deadline-icon svg { width: 100%; height: 100%; display: block; color:white;}
.p-card__title { font-family: var(--font-body); font-weight: 500; font-size: var(--fs-base); color: var(--grey); margin-bottom: 4px; }
.p-card__meta { font-size: var(--fs-base); color: var(--grey); opacity: .75; margin-bottom: 6px; }
.p-card__flags { display: flex; gap: 4px; flex-wrap: wrap; margin-left:auto; }
.p-card__flag { font-size: var(--fs-base); padding: 1px 7px; border-radius: var(--radius-pill); font-weight: 500; }
.p-card__flag--paused { background: var(--taupe-light); color: #6B6D6E; }
.p-card__flag--complaint { background: var(--danger-bg); color: var(--danger-text); }
.p-card__flag--billed { background: var(--success-bg); color: var(--success-text); }
.p-card__flag--round { background: rgba(var(--gold-dark-rgb),.12); color: var(--gold-tint-text); }
.p-card__flag--offer-confirmed { background: var(--success-bg); color: var(--success-text); }
.p-card__flag--offer-rejected { background: var(--danger-bg); color: var(--danger-text); }
.p-card__flag--offer-pending { background: var(--taupe-light); color: var(--grey); }
.p-card__conversation { font-size: var(--fs-base); color: var(--grey); margin-top: 6px; }
.p-card__deadline { font-size: var(--fs-base); margin-top: 6px; color: var(--grey); }
.p-card__deadline--soon { color: var(--danger-text); font-weight: 500; }
.p-card__footer-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.p-card__footer-row .p-card__deadline { margin-top: 0; }

.items-heading { display: flex; align-items: center; gap: 8px; }

.item-row-actions { display: flex; gap: 2px; align-items: center; }
.item-row-actions .btn--icon { width: 28px; height: 28px; padding: 4px; }
.item-row-actions .btn--icon:disabled { opacity: .3; cursor: default; }
#items-table.p-table td:has(.item-row-actions) {vertical-align: middle;padding-left: 10px;}
#items-table.p-table td { vertical-align: top; }

.item-desc-toolbar { margin-bottom: 4px; display: flex; gap: 4px; }
.item-desc-toolbar .btn--icon { width: 26px; height: 26px; padding: 4px; }
.item-desc-preview { cursor: pointer; padding: 10px 16px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: var(--radius-sm);border:1px solid var(--taupe-dark);max-width:305px;background:white;}
.item-desc-preview:hover { background: vwhite; }
.item-desc-preview--readonly { cursor: not-allowed; background: var(--taupe-light); opacity:0.6;padding-bottom:10px;padding-top:9px;}
.item-desc-preview--readonly:hover { background: var(--taupe-light); }
.preview-only .p-table tr:hover td {background:white;cursor:default;}
.preview-only #tax-treatment-hint {display:none;}
textarea#inv-intro, textarea#inv-footer {margin-top:4px;}



.p-table-wrap { background: white; padding:40px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.p-table-wrap--list { background: var(--taupe-light); padding:25px 30px 30px; overflow-x: auto; }
.sidebar .p-table-wrap {padding:30px;}
.p-table { width: 100%; border-collapse: collapse; }
.p-table th { text-align: left; font-size: var(--fs-base); color: var(--grey); padding: 0 0 10px 16px; font-weight:500; }
.p-table th.sortable-th { cursor: pointer; user-select: none; position: relative; padding-left: 30px; }
.p-table th.sortable-th:hover { color: var(--gold-dark); }
.p-table th.sortable-th::before { content: '\2195'; position: absolute; left: 16px; opacity: .35; font-size: var(--fs-xs); }
.p-table th.sortable-th.sort-asc::before { content: '\2191'; opacity: 1; color: var(--gold-dark); }
.p-table th.sortable-th.sort-desc::before { content: '\2193'; opacity: 1; color: var(--gold-dark); }
.p-table td { background:white; padding: 12px 16px; border-bottom: 2px solid var(--taupe-light); font-size: var(--fs-base); color: var(--grey); }
.p-table td:first-child {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
    max-width: 200px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.p-table td:last-child {border-top-right-radius:3px;border-bottom-right-radius:3px;}
.p-table tr:last-child td { border-bottom: none; }
.p-table td.p-table__row-actions { padding: 6px 16px; white-space: nowrap; }
.p-table .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.p-table .row-actions .btn--icon { width: 32px; height: 32px; padding: 6px; }
.p-table .row-actions .btn--icon svg { width: 18px; height: 18px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.pagination__sizes { display: flex; align-items: center; gap: 4px; }
.pagination__size {
    min-width: 32px; height: 32px; padding: 0 6px; border: none; border-radius: var(--radius-sm);
    background: transparent; color: var(--grey); font-size: var(--fs-base); font-family: var(--font-body);
    cursor: pointer; transition: background var(--transition);
}
.pagination__size:hover:not(.active) { background: var(--creme); }
.pagination__size.active { background: var(--gold-dark); color: var(--white); cursor: default; }
.pagination__right { display: flex; align-items: center; gap: 12px; }
.pagination__pages { display: flex; align-items: center; gap: 4px; }
.pagination__page {
    min-width: 32px; height: 32px; padding: 0 6px; border: none; border-radius: var(--radius-sm);
    background: transparent; color: var(--grey); font-size: var(--fs-base); font-family: var(--font-body);
    cursor: pointer; transition: background var(--transition);
}
.pagination__page:hover:not(:disabled) { background: var(--creme); }
.pagination__page.active { background: var(--gold-dark); color: var(--white); cursor: default; }
.pagination__ellipsis { color: var(--grey); padding: 0 2px; }
.p-row--warning td, .p-row--warning td .status-pill { color: var(--danger-text); font-weight:500;}
.p-row--warning td .status-pill { background: var(--danger-bg);}
.status-pill { font-family: var(--font-body); font-size: var(--fs-xs); padding: 3px 10px; border-radius: var(--radius-pill); background: var(--taupe-light); color: var(--grey); white-space: nowrap; font-weight:500; -webkit-text-stroke: 0;}
.status-pill--storniert, .status-pill--danger { background: var(--danger-bg); color: var(--danger-text); }
.status-pill--success { background: var(--success-bg); color: var(--success-text); }
.status-pill--warning { background: rgba(var(--gold-dark-rgb), .2); color: var(--gold-tint-text); }
.status-pill--info { background: var(--info-bg); color: var(--info-text); }
.lock-badge { margin-top: -2px; font-family: var(--font-body); font-weight: 500; vertical-align: middle; line-height:1.6; }

#quote-status-actions .status-pill {padding: 10px 20px;width: calc(50% - 3px); border-radius: 2px;}
#quote-status-actions .status-pill { padding: 10px 20px;}
#quote-status-actions { margin-top: 20px; gap: 5px; display: flex; flex-wrap: wrap;}

.quote-card {
    position: relative;
    background-image: linear-gradient(135deg, rgba(58,60,61,.62), rgba(58,60,61,.42)), url('images/raster_10.png');
    background-size: cover;
    background-position: center, top center;
    background-repeat: no-repeat, repeat;
    justify-content: center;
    min-height: 390px;
}
.quote-card h3 {
    color: var(--white);
    font-size: 60px;
    text-align: center;
}
.daily-quote {
    text-align: center;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 24px;
    line-height: 1.5;
    color: var(--white);
    max-width: 100%;
    padding: 0 30px;
    text-wrap: balance;
}

.quote-card h3, .daily-quote {
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}
.doc-number-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--fs-base); color: var(--grey); }
.doc-number-row input { margin-bottom: 0; padding: 4px 8px; width: 140px; }
.status-pill--clickable { cursor: pointer; border: none; font-family: var(--font-body); font-weight: 500; opacity: .55; transition: opacity var(--transition); }
.status-pill--clickable:hover { opacity: .85; }
.status-pill--clickable.active { opacity: 1; }


.data-table.p-table th { font-size: var(--fs-base); padding: 0 10px 8px; }
.data-table.p-table td { padding: 8px 10px; border: none; vertical-align: middle; }
.data-table.p-table td > input:not([type="color"]):not([type="hidden"]), .data-table.p-table td > select { width: 100%; margin-bottom: 0; }
.data-table.p-table td input[type="color"] { margin-bottom: 0; }
.data-table.p-table tr:hover td { background: white; cursor: default; }
.table-upload-btn { display: inline-flex; align-items: center; gap: 6px; font-weight:500;padding: 11px 15px; border: none; border-radius: var(--radius-sm); font-size: var(--fs-xs); color: var(--grey); cursor: pointer; white-space: nowrap; background: var(--taupe-light); transition: all var(--transition); }
.table-upload-btn svg { width: 16px; height: 16px; }
.table-upload-btn:hover { background: var(--taupe-dark); }
.table-thumb { height: 24px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.attachment-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--taupe-dark); display: block; }
.attachment-thumb--file { display: flex; align-items: center; justify-content: center; background: var(--taupe-light); color: var(--grey); font-size: 9px; font-weight: 600; letter-spacing: .02em; }
.form-group--upload { display: flex; gap: 16px; align-items: stretch; }
.form-placeholder-image { flex-shrink: 0; width: 64px; display: flex; align-items: center; justify-content: center; background: var(--creme); border: 1px solid var(--taupe-dark); border-radius: var(--radius-sm); }
.form-placeholder-image img { max-width: 100%; max-height: 56px; object-fit: contain; }
.form-placeholder-image .font-preview-sample { font-size: 18px; line-height: 1; color: var(--grey); }
.form-placeholder-image--empty { background: repeating-linear-gradient(45deg, var(--creme), var(--creme) 6px, var(--white) 6px, var(--white) 12px); }
.form-group-content { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.form-group-content label { margin-bottom: 0; }
.form-upload-row { display: flex; align-items: center; gap: 12px; }
.form-upload-row .form-hint { margin: 0; }
.social-link-icon-preview { width: 24px; height: 24px; object-fit: contain; display: block; }




.unmatched-actions { display: flex; align-items: center; gap: 8px; }
.unmatched-actions .custom-select { flex: 1; min-width: 0; }


#matches-table .col-desc, #unmatched-table .col-desc {
    max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


.groups-list-name-input {
    flex: 1; min-width: 0; width: auto;
    border: 1px solid transparent; background: transparent;
    padding: 6px 8px; border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: var(--fs-base); color: var(--grey);
}
.groups-list-name-input:hover, .groups-list-name-input:focus { border-color: var(--taupe-dark); background: var(--white); }


.modal-overlay { position: fixed; inset: 0; background: rgba(58,60,61,.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; }
.app-confirm-message, .app-alert-message { white-space: pre-line; line-height: 1.6; }
.modal-overlay.hidden { display: none; }

.modal-box { position: relative; background: var(--white); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; overflow-x: hidden; box-shadow: var(--shadow-lg); scrollbar-width: thin; scrollbar-color: var(--taupe-dark) transparent; }
.modal-box::-webkit-scrollbar { width: 5px; }
.modal-box::-webkit-scrollbar-track { background: transparent; }
.modal-box::-webkit-scrollbar-thumb { background: var(--taupe-dark); border-radius: var(--radius-pill); }
.modal-box::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

.modal-box--420 { max-width: 420px; }
.modal-box--440 { max-width: 440px; }
.modal-box--480 { max-width: 480px; }
.modal-box--900 { max-width: 900px; }

.modal-box__actions--end { justify-content: flex-end; }
.modal-box__actions--stack { flex-direction: column; align-items: stretch; gap: 8px; }
.modal-box__close {
    position: absolute; top: 5px; right: 5px; z-index: 10;
    width: 36px; height: 36px; border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;color: var(--grey);
    cursor: pointer; transition: all var(--transition); background:white;
}
.modal-box__close:hover { background: var(--danger-bg); color: var(--danger-text); }
.modal-box__close svg { width: 20px; height: 20px; }

#csv-mapping-modal { z-index: 1100; }
.modal-box h3 { margin-bottom: var(--space-24); }
.modal-box__actions {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    position: sticky; bottom: 0;
    margin: 40px 0 0;
    padding: 0;
}
.modal-box__actions-right { display: flex; gap: 10px; }
.modal-box__actions button[type="submit"] { margin-left: auto; }
.modal-box__header {display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom:40px;}
.modal-box__header h3 { margin-bottom: 0; }

.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.checkbox-row input[type="checkbox"] { width: auto; }
.checkbox-row label { margin-bottom: 0; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }

.round-stepper { display: flex; align-items: center; gap: 10px; }
.round-stepper button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--taupe-dark); background: var(--white); cursor: pointer; font-size: var(--fs-base); color: var(--grey); }
.round-stepper button:hover { border-color: var(--gold-dark); color: var(--gold-dark); }
.round-stepper__value { font-family: var(--font-display); font-size: var(--fs-headline-sm); min-width: 24px; text-align: center; }


.empty-hint { text-align: center; padding: 30px 10px; color: var(--grey); opacity: .6; font-size: var(--fs-base); font-style: italic; }


.collapsible-section { margin-bottom: 3px; overflow: hidden; }
.collapsible-section summary { background: var(--taupe-light); border-radius: var(--radius-sm); padding: 5px 15px; cursor: pointer; font-weight: 500; font-family: var(--font-body); list-style: none; display: flex; align-items: center; justify-content: space-between; }
.collapsible-section summary::-webkit-details-marker { display: none; }
.collapsible-section summary::after { content: '+'; font-size: var(--fs-headline-sm); color: var(--gold-dark); transition: transform var(--transition); }
.collapsible-section[open] summary::after { transform: rotate(45deg); }
.collapsible-section summary:hover { background: var(--creme); }
.collapsible-section__body { padding: 30px 0 10px; }
.collapsible-section .form-group:last-child, .collapsible-section .form-row:last-child { margin-bottom: 0; }
.collapsible-section[open] summary {
    background: var(--taupe-dark);
}


.dash-filters { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: var(--space-24); }
.dash-filters__group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-filters select { width: auto; margin-bottom: 0; }

.dash-filters .custom-select { width: auto; }


body.privacy-blur-active .stat-tile__value,
body.privacy-blur-active .stat-tile__sub,
body.privacy-blur-active .reminders-list__amount,
body.privacy-blur-active .reminders-list__days,
body.privacy-blur-active canvas {
    filter: blur(6px);
    user-select: none;
    transition: filter var(--transition);
}

.stat-tile { margin-bottom: 0; text-align:center; }
.stat-tile h3 { font-family: var(--font-body); font-size: var(--fs-base); font-weight: 500; color: var(--grey); opacity: .7; -webkit-text-stroke: 0; }
.stat-tile__value { font-family: var(--font-display); font-size: 40px; color: var(--grey); line-height: 1.1; -webkit-text-stroke: 0.3px var(--grey); }
.stat-tile__sub { font-size: var(--fs-base); color: var(--grey); opacity: .6; margin-top:13px; }
.stat-tile--warning { background: var(--danger-bg); }
.stat-tile--warning .stat-tile__value, .stat-tile--warning h3 { color: var(--danger-text); -webkit-text-stroke: 0.3px var(--danger-text);}
.stat-tile--warning .stat-tile__sub { color: var(--danger-text); opacity: .75; }

.chart-card { margin-bottom: 0; display: flex; flex-direction: column; }
.chart-card__canvas-wrap { position: relative; flex: 1;}
.chart-card__canvas-wrap--small { max-height:180px }
.card__body.chart-card h3, .card__body.chart-card .form-hint {
    text-align: center;
}

.reminders-list { list-style: none; }
.reminders-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--taupe-light); cursor: pointer; }
.reminders-list li:last-child { border-bottom: none; }
.reminders-list li:hover { opacity: .7; }


.product-rank-wrap {
    max-height: 420px; overflow-y: auto; padding-right: 14px;
    scrollbar-width: thin; scrollbar-color: var(--taupe-dark) transparent;
}
.product-rank-wrap::-webkit-scrollbar { width: 5px; }
.product-rank-wrap::-webkit-scrollbar-track { background: transparent; }
.product-rank-wrap::-webkit-scrollbar-thumb { background: var(--taupe-dark); border-radius: var(--radius-pill); }
.product-rank-wrap::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }
.product-rank-list li { cursor: default; }
.product-rank-list li:hover { opacity: 1; }
.product-rank-row__main { flex: 1; min-width: 0; }
.product-rank-row__name { font-weight: 500; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-rank-row__bar-track { height: 6px; border-radius: var(--radius-pill); background: var(--taupe-light); overflow: hidden; }
.product-rank-row__bar-fill { height: 100%; border-radius: var(--radius-pill); }


.chart-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-top: 32px; }
.chart-legend__item { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-base); color: var(--grey); }
.chart-legend__item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-legend__swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.reminders-list__right { text-align: right; }


.attachment-check-label { display: block; font-weight: 400; margin-bottom: 4px; font-size: var(--fs-base);}
.attachment-check-label input { width: auto; margin-right: 6px; width:20px; border-radius:2px;top:-1px;}
.reminders-list__name { font-weight: 500; height: 29px; display: flex; align-items: center;}
.reminders-list__meta { font-size: var(--fs-xs); color: var(--grey); opacity: .7; }
.reminders-list__amount { font-family: var(--font-display); font-size: 18px; white-space: nowrap; -webkit-text-stroke: 0.3px var(--grey);} 
.reminders-list__days { color: var(--danger-text); font-size: var(--fs-xs); white-space: nowrap; }

.agenda-legend { display: flex; gap: 16px; flex-wrap: wrap;}
.legend {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.legend-holder {display: flex;  justify-content: space-between;align-items:flex-end;}
.agenda-legend__item { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--grey); opacity: .8; }
.agenda-list { list-style: none; }
.agenda-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--taupe-light); cursor: pointer; }
.agenda-item:last-child { border-bottom: none; }
.agenda-item:hover { opacity: .7; }
.agenda-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;margin-top:-2px;}
.agenda-dot--queue    { background: var(--taupe-dark); }
.agenda-dot--progress { background: var(--gold-dark); }
.agenda-dot--feedback  { background: var(--rose-dark); }
.agenda-item__title { font-weight: 500; }
.agenda-item__customer { font-size: var(--fs-base); color: var(--grey); opacity: .7; }

@media (max-width: 768px) {
    .app-main { padding: 16px; }
    .board-col { width: 240px; }
}
