/* Scoped photo controls reuse the platform palette without changing page layout. */
.avatar,.mini-avatar{overflow:hidden}
.team-member .avatar{width:56px;height:56px;border-radius:50%;font-size:var(--fs-xl)}
.active-user-pill .mini-avatar{width:32px;height:32px;border-radius:50%}
.profile-photo-dialog{box-sizing:border-box;position:fixed;inset:0;margin:auto;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid var(--line,#dce5df);border-radius:20px;background:var(--surface,#fff);color:var(--ink,#18392f);box-shadow:0 24px 80px #10271f30;font:inherit}
.profile-photo-dialog::before{display:none}
.profile-photo-dialog::backdrop{background:#10271f66}
.profile-photo-dialog h2{margin:0;font-size:var(--fs-xl)}
.profile-photo-dialog p{font-size:var(--fs-sm);line-height:1.6;color:var(--muted,#697a73)}
.profile-photo-dialog .photo-name{margin:6px 0}
.profile-photo-dialog .photo-preview{width:112px;height:112px;display:grid;place-items:center;border-radius:50%;overflow:hidden;background:var(--surface-soft,#eef3ee);color:var(--ink,#18392f);font-size:var(--fs-4xl);margin:24px auto}
.profile-photo-dialog input{display:block;box-sizing:border-box;width:100%;max-width:100%;margin:10px 0;font:inherit;font-size:var(--fs-sm);color:inherit}
.profile-photo-dialog input::file-selector-button,.profile-photo-dialog button{font:inherit;font-size:var(--fs-sm);border:1px solid var(--line,#dce5df);border-radius:9px;padding:10px 12px;background:var(--surface,#fff);color:var(--ink,#18392f);cursor:pointer;min-height:42px}
.photo-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.photo-actions [data-save]{background:var(--button-primary-bg,#145b49);border-color:transparent;color:var(--button-primary-text,white);margin-left:auto}
.photo-actions [data-remove]{color:var(--muted,#697a73)}
.profile-photo-dialog :disabled{opacity:.5;cursor:wait}
.profile-photo-dialog :focus-visible,.profile-photo-button:focus-visible{outline:3px solid #4f9d81;outline-offset:3px}
.profile-heading{display:flex;align-items:center;gap:16px;margin:18px 0 26px}
.profile-heading>div{min-width:0}
.profile-heading h1{font-size:var(--fs-2xl);margin:0 0 5px;overflow-wrap:anywhere}
.profile-heading p{margin:0 0 4px}
.profile-heading small{font-size:var(--fs-xs)}
.profile-photo-button{position:relative;flex:0 0 80px;width:80px;height:80px;min-height:0;padding:0;border:0;border-radius:50%;background:var(--soft,#eef3ee);color:var(--ink,#18392f)}
.profile-photo-face{display:grid;place-items:center;width:100%;height:100%;overflow:hidden;border-radius:inherit;font-size:var(--fs-2xl);font-weight:var(--fw-strong)}
.profile-photo-badge{position:absolute;right:-3px;bottom:-3px;width:24px;height:24px;display:grid;place-items:center;border:2px solid var(--paper,#fff);border-radius:50%;background:#145b49;color:#fff;font-size:var(--fs-lg)}
#myProfilePhoto{padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;text-align:left;cursor:pointer}

.customer-photo{display:inline-flex;width:56px;height:56px;min-width:56px;flex-shrink:0;align-items:center;justify-content:center;font-size:var(--fs-sm);font-weight:var(--fw-strong);border-radius:6px;overflow:hidden;vertical-align:middle;margin-inline-end:0;background:var(--surface-soft,#eaf1ec)}.customer-name{display:flex;align-items:center;gap:12px}h2 .customer-photo,#customerPhotoPreview .customer-photo{width:80px;height:80px;min-width:80px}

/* Task photos have their own row; titles retain the full card width. */
.task-customer-row{display:flex;align-items:center;gap:12px;min-width:0;width:100%;margin:0 0 12px;padding:0 0 12px;border-bottom:1px solid var(--line,#dce5df)}
.task-customer-row>span{min-width:0;overflow-wrap:anywhere;line-height:1.45;font-size:var(--fs-sm);font-weight:var(--fw-strong);color:var(--primary-strong,#145b49)}
.customer-photo-trigger{display:inline-flex;flex:0 0 52px;width:52px;height:52px;min-height:52px;padding:0;border:0;border-radius:9px;background:transparent;cursor:zoom-in;color:inherit}
.task-customer-row .customer-photo{width:52px;height:52px;min-width:52px;border-radius:9px;margin:0}
.customer-photo-trigger:focus-visible{outline:3px solid #4f9d81;outline-offset:3px}
.customer-table .customer-card{min-height:88px}
.client-stat-main .title-stack:has(> strong > .customer-photo){position:relative;padding-inline-start:64px;min-height:56px}
.client-stat-main .title-stack > strong > .customer-photo{position:absolute;inset-inline-start:0;top:0;margin:0}
.customer-image-dialog{width:min(520px,calc(100vw - 28px));max-height:90dvh;overflow:auto;padding:22px;border:1px solid var(--line,#dce5df);border-radius:18px;background:var(--surface,#fcfdf9);color:var(--ink,#193d33);margin:auto}
.customer-image-dialog::backdrop{background:#10271f99}.customer-image-dialog::before{display:none}
.customer-image-close{display:block;margin:0 0 12px auto;padding:10px 16px;min-height:44px;border:1px solid var(--line,#dce5df);border-radius:10px;background:var(--surface-soft,#eaf1ec);color:inherit;cursor:pointer;font:inherit}
.customer-image-dialog h2{font-size:var(--fs-xl);line-height:1.4;margin:0 0 16px;overflow-wrap:anywhere}
.customer-image-large{width:100%;aspect-ratio:1;display:grid;place-items:center;background:#f1f5f2;border-radius:12px;overflow:hidden}
.customer-image-large img{width:100%;height:100%;object-fit:contain}.customer-image-large .photo-placeholder{width:100%;height:100%;font-size:64px}
.photo-placeholder{background:var(--surface-soft,#eaf1ec);color:var(--primary-strong,#145b49)}
.profile-photo-dialog .logo-preview{border-radius:10px}
.crop-controls{border:1px solid var(--line,#dce5df);border-radius:10px;margin:14px 0;padding:12px}.crop-controls label{display:block;font-size:var(--fs-sm)}.crop-controls input[type=range]{padding:0;min-height:32px;accent-color:#145b49}.crop-controls[hidden]{display:none}
.photo-file-label{position:relative;display:block;border:1px solid var(--line,#dce5df);border-radius:9px;padding:12px;text-align:center;cursor:pointer}.photo-file-label input[type=file]{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer}.photo-file-label:focus-within{outline:3px solid #4f9d81;outline-offset:2px}

.customer-figures{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:10px}.customer-figures>div{padding:12px;border:1px solid #dbe4dd;border-radius:12px}.customer-figures dt{font-size:var(--fs-xs);color:#596e62}.customer-figures dd{margin:6px 0 0;font-size:var(--fs-lg);font-weight:var(--fw-strong)}.customer-financial-fields{display:grid;gap:12px;margin-top:18px;border:1px solid #dbe4dd;border-radius:12px;min-width:0}.customer-financial-fields input{width:100%;box-sizing:border-box}#toggleCustomerPhotos{font-size:var(--fs-sm);padding:10px 14px}#recurringDailyDays .weekday-options{display:flex;flex-wrap:wrap;gap:10px}#recurringDailyDays label{display:flex;align-items:center;gap:4px}
.customer-financial-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-financial-fields>small{grid-column:1/-1}#customerEditDialog button,#toggleCustomerPhotos{font:inherit;color:inherit;border:1px solid var(--border,#dbe4dd);border-radius:10px;padding:10px 14px;background:var(--surface,#fff);cursor:pointer}#customerEditDialog button[type=submit]{background:var(--accent,#145b49);color:#fff}@media(max-width:600px){.customer-financial-fields{grid-template-columns:1fr}}

#customerDetails #deleteCustomer{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:10px 14px;margin-left:6px;vertical-align:middle;border:1px solid #d98686;border-radius:10px;background:transparent;color:#cf5050;font:inherit;font-size:var(--fs-sm);font-weight:var(--fw-strong);line-height:18px;cursor:pointer;transition:background .15s,border-color .15s}
#customerDetails #deleteCustomer svg{width:17px;height:17px;flex:none}
#customerDetails #deleteCustomer:hover{background:rgba(220,70,70,.12);border-color:#d65353}
#customerDetails #deleteCustomer:focus-visible{outline:3px solid #d98686;outline-offset:3px}
#customerDetails #deleteCustomer:disabled{opacity:.5;cursor:wait}

.deleted-customer-list{max-height:60vh;overflow:auto}.deleted-customer-list article{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line,#dce5df)}.deleted-customer-list small{display:block;margin-top:4px;opacity:.75}.deleted-customer-list button{font:inherit;border:1px solid var(--line,#dce5df);border-radius:10px;padding:10px 14px;background:var(--surface,#fff);color:var(--primary-strong,#145b49);cursor:pointer;white-space:nowrap}

#customerEditForm .customer-vat-toggle{display:flex;align-items:center;gap:10px;align-self:end;min-height:42px;cursor:pointer}#customerEditForm .customer-vat-toggle input{width:18px;height:18px;margin:0;flex:0 0 18px;accent-color:var(--accent,#145b49)}

#customerEditForm .customer-edit-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}#customerEditForm .customer-edit-heading h2{margin:0;min-width:0}#customerEditDialog .customer-edit-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;padding:0;border-radius:10px;background:transparent}#customerEditDialog .customer-edit-close:hover{background:var(--surface-soft,#f1f5f3)}#customerEditDialog .customer-edit-close:focus-visible{outline:2px solid var(--accent,#145b49);outline-offset:3px}

.customer-figures .customer-rent-tax-status{display:flex;align-items:center;gap:8px;margin:8px 0 0;font-size:var(--fs-xs);font-weight:var(--fw-regular);line-height:1.4}.customer-figures .customer-rent-tax-status input{width:16px;height:16px;min-height:0;margin:0;padding:0;flex:0 0 16px;accent-color:var(--accent,#145b49)}
