.customer-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-bottom:14px}.customer-toolbar label:first-child{flex:1;min-width:240px}.customer-toolbar label{margin:0}.customer-toolbar input,.customer-toolbar select{min-height:42px}.customer-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 18px}.customer-actions h2{margin:0 auto 0 0;font-size:22px}.customer-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:5px}.customer-table{width:100%;border-collapse:collapse;font-size:13px}.customer-table th{text-align:left;position:sticky;top:0;background:var(--surface-raised);color:var(--muted);font-size:12px}.customer-table th,.customer-table td{padding:12px;border-bottom:1px solid var(--line);vertical-align:middle}.customer-table small{display:block;margin-top:5px}.customer-name{padding:0;min-height:30px;background:none!important;border:0!important;color:var(--accent)!important;text-align:left;text-decoration:underline;text-underline-offset:3px;font-size:inherit}.customer-flags{color:#f5c77a;font-size:12px}.customer-profile{display:grid;grid-template-columns:minmax(240px,1fr) minmax(360px,2fr);gap:20px}.customer-card,.customer-history{border:1px solid var(--line);border-radius:6px;padding:18px;min-width:0}.customer-card h3,.customer-history h3{font-size:16px;margin:0 0 12px}.customer-card h3:not(:first-child){margin-top:22px}.customer-card p{margin:10px 0;overflow-wrap:anywhere}.customer-card small{display:block;color:var(--muted);margin-top:4px}.customer-card .customer-actions{margin-top:20px}.customer-note{white-space:pre-wrap;overflow-wrap:anywhere}.customer-booking{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--line)}.customer-booking>:first-child{flex:1;min-width:180px}.customer-booking .status-pill{font-size:11px}.customer-legacy{margin-top:18px;border:1px solid var(--line);border-radius:6px;padding:14px}.customer-legacy summary{cursor:pointer}.customer-legacy dl{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:13px}.customer-legacy dd{margin:0;overflow-wrap:anywhere}.customer-legacy dt{color:var(--muted)}.customer-dialog{width:min(650px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:24px}.customer-form{display:grid;gap:14px}.customer-form label{margin:0}.customer-edit-contact{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;padding:12px;border:1px solid var(--line);margin:0 0 12px}.customer-edit-contact legend{padding:0 6px;font-size:12px}.customer-edit-contact input[type=radio]{width:18px;min-height:18px;margin-right:8px}.customer-edit-contact label:has(input[type=radio]){display:flex;align-items:center;gap:6px}.customer-picker{margin-bottom:14px}.customer-picker-results{display:grid;gap:6px;max-height:250px;overflow-y:auto}.customer-picker-results button{text-align:left;font-size:13px}.customer-picker p{margin:5px 0;font-size:12px}.customer-selection{padding:12px;border:1px solid var(--line);margin-bottom:14px;border-radius:4px}.customer-selection p{margin:6px 0}.customer-linked{margin:18px 0;padding:12px;border:1px solid var(--line);border-radius:4px}.customer-linked button{margin:4px 8px 4px 0}
@media(max-width:1000px){.customer-profile{grid-template-columns:1fr}.customer-table th,.customer-table td{padding:10px;font-size:12px}.customer-card{display:block}}
@media(max-width:760px){.staff-sidebar nav{grid-template-columns:repeat(3,minmax(0,1fr))}.customer-table thead{display:none}.customer-table,.customer-table tbody{display:block}.customer-table tr{display:grid;grid-template-columns:1fr 1fr;padding:12px;border-bottom:1px solid var(--line)}.customer-table td{border:0;padding:5px}.customer-table td:first-child{grid-column:1/-1}.customer-table td:nth-child(3)::before{content:'Наступне: ';color:var(--muted)}.customer-table td:nth-child(4)::before{content:'Бронювань: ';color:var(--muted)}.customer-table td:nth-child(5){grid-column:1/-1}.customer-table td:nth-child(5)::before{content:'Останнє підтверджене: ';color:var(--muted)}.customer-edit-contact{grid-template-columns:1fr}.customer-dialog{padding:18px}.customer-actions h2{flex-basis:100%;order:-1}.customer-legacy dl{grid-template-columns:1fr}.customer-legacy dd{margin-bottom:6px}}
.customer-list-identity{display:flex;align-items:center;gap:8px}.customer-list-identity>.customer-name{min-width:0;overflow-wrap:anywhere}
.staff-page .customer-note-indicator{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;min-height:32px;padding:6px;border:1px solid var(--line);border-radius:5px;background:var(--surface-inset);color:var(--focus)}
.customer-note-indicator svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.staff-page .customer-note-indicator:hover{border-color:currentColor;background:var(--surface-raised)}
/* Customer card: bounded reading width and independently sized sections. */
.customer-profile-header,.customer-profile,.customer-profile~.customer-legacy{max-width:1200px}
.customer-back{background:none;border:0;color:var(--muted);padding:0;min-height:32px;font-size:12px;margin-bottom:8px}
.customer-profile-header{justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.customer-identity{display:flex;gap:10px;align-items:center;min-width:0}.customer-identity h2{overflow-wrap:anywhere;font-size:24px}
.customer-header-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.customer-header-tools button{font-size:12px;min-height:40px;padding:8px 14px}
.customer-more{position:relative}.customer-more summary{cursor:pointer;color:var(--muted);padding:10px;font-size:12px;min-height:40px;border:1px solid var(--line);border-radius:4px}
.customer-more>div{position:absolute;right:0;top:calc(100% + 6px);min-width:180px;padding:8px;background:var(--surface-raised);border:1px solid var(--control-border);border-radius:5px;z-index:5;box-shadow:0 8px 24px #0005;display:grid;gap:6px}
.customer-more>div button{text-align:left;white-space:nowrap}
.customer-profile{grid-template-columns:minmax(240px,300px) minmax(0,1fr);align-items:start;gap:16px}
.customer-sidebar{display:grid;gap:12px;min-width:0}.customer-card,.customer-history{padding:16px;background:var(--surface)}
.customer-section-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}.customer-section-heading h3{margin:0}
.customer-card .customer-name{font-size:12px;min-height:32px}.customer-contact-row{display:grid;gap:5px;padding:12px 0;border-bottom:1px solid var(--line)}.customer-contact-row:last-child{border-bottom:0;padding-bottom:0}
.customer-contact-label{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;color:var(--muted)}.customer-contact-label small{margin:0;font-size:10px;background:var(--surface-inset);padding:2px 6px;border-radius:3px}
.customer-contact-row>a,.customer-contact-row>span{overflow-wrap:anywhere;font-size:14px;line-height:1.5;text-underline-offset:3px}.customer-note-card h3{margin-bottom:4px}.customer-note-card p{font-size:13px;line-height:1.5}
.customer-review{border-color:var(--pending-edge)}.customer-review-actions{display:grid;gap:8px}.customer-review-actions button{font-size:12px;min-height:40px;text-align:left;padding:9px 12px;white-space:normal}
.customer-booking-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
.customer-stat{display:flex;flex-direction:column;gap:5px;padding:10px;border:1px solid var(--line);border-radius:4px;text-decoration:none;color:var(--ink);background:var(--surface-inset)}.customer-stat strong{font-size:21px;font-weight:500}.customer-stat span{font-size:11px;color:var(--muted)}
.customer-stat.pending{border-top:3px solid var(--pending-edge)}.customer-stat.confirmed{border-top:3px solid var(--confirmed-edge)}.customer-stat.cancelled{border-top:3px solid var(--control-border)}.customer-stat.all{border-top:3px solid var(--accent)}.customer-stat:hover{text-decoration:underline;text-underline-offset:3px}
.customer-history .customer-booking{flex-wrap:nowrap;gap:16px;padding:13px 0}.customer-booking-open{display:grid;gap:5px;text-decoration:none;line-height:1.5;min-width:0!important;overflow-wrap:anywhere}.customer-booking-open strong{font-size:13px;font-weight:500;text-decoration:underline;text-underline-offset:3px}.customer-booking-open small{font-size:12px;color:var(--muted)}
.customer-booking-result{display:grid;justify-items:end;gap:7px;flex-shrink:0}.customer-booking-result>strong{font-size:13px;font-weight:500}.customer-profile~.customer-legacy{margin-top:12px;font-size:12px}
@media(max-width:1100px){.customer-profile{grid-template-columns:240px minmax(0,1fr)}.customer-booking-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
 .customer-profile{grid-template-columns:1fr}.customer-profile-header{align-items:flex-start;gap:12px}.customer-identity{width:100%}.customer-identity h2{font-size:22px;order:initial;flex-basis:auto}.customer-header-tools{width:100%}.customer-header-tools>.primary{flex:1}.customer-header-tools button{padding-inline:10px}
 .customer-card,.customer-history{padding:14px}.customer-profile .customer-booking{align-items:start;gap:8px}.customer-booking-result .status-pill{font-size:10px}.customer-booking-open small{font-size:11px}
}
.customer-merge-suggestions{display:grid;gap:8px;margin-bottom:16px}
.customer-merge-suggestions h3{font-size:14px;margin:0 0 2px;color:var(--muted)}
.customer-suggestion-row{display:flex;align-items:stretch;gap:8px;flex-wrap:wrap}
.customer-suggestion{flex:1 1 220px;min-width:0;text-align:left;font-size:13px;line-height:1.45;min-height:42px;padding:9px 12px;white-space:normal;overflow-wrap:anywhere;background:transparent;border:1px solid var(--line);border-radius:8px;color:var(--ink)}
.customer-suggestion:hover:not(:disabled){background:var(--surface-raised)}
/* Overrides the dialog-wide full-width primary button: a row button sizes to its label. */
.staff-page dialog .customer-suggestion-fast{flex:0 1 auto;width:auto;margin-top:0;font-size:12px;min-height:42px;padding:9px 14px;white-space:nowrap}
/* A sortable head cell stays a plain caption until it is used. */
.customer-sort{display:inline-flex;align-items:center;gap:6px;min-height:0;padding:0;background:none;border:0;color:inherit;font:inherit;text-align:left}
.customer-sort:hover{color:var(--ink)}
.customer-sort-arrow{font-size:11px;opacity:.5;line-height:1}
.customer-sort[data-active]{color:var(--ink)}
.customer-sort[data-active] .customer-sort-arrow{opacity:1;color:var(--accent)}
.customer-table th:has(.customer-sort[data-active]){color:var(--ink)}
.customer-list-summary>p{margin-right:auto}
/* A client's worth, led by the money already earned — the only reliable figure. */
.customer-money{margin-top:14px}
.customer-money-headline{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.customer-money-headline strong{font-size:22px;font-weight:500;letter-spacing:-.4px;font-variant-numeric:tabular-nums}
.customer-money-headline span{font-size:11px;color:var(--muted)}
.customer-money-rows{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;margin:0;font-size:13px}
.customer-money-rows dt{color:var(--muted);font-size:12px}
.customer-money-rows dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}
.customer-money-rows dd small{display:block;color:var(--subtle);font-size:10px;margin-top:2px}
.customer-money-span{margin-top:12px;font-size:11px;color:var(--subtle);line-height:1.5}
/* Each warning states what is wrong and what to do about it. */
.customer-review-reasons{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:10px}
.customer-review-reasons li{display:grid;gap:3px}
.customer-review-reasons strong{font-size:13px;font-weight:500;color:#f5c77a;overflow-wrap:anywhere}
.customer-review-reasons small{font-size:11px;line-height:1.5;color:var(--muted)}
.customer-flags{overflow-wrap:anywhere}
/* The same person written two ways: the manager picks which spelling stands. */
.customer-name-choice{display:grid;gap:8px;margin:14px 0 0;padding:12px;border:1px solid var(--line);border-radius:6px}
.customer-name-choice legend{padding:0 6px;font-size:12px;color:var(--muted)}
.customer-name-choice label{display:flex;align-items:baseline;gap:8px;font-size:13px;font-weight:400;margin:0}
.customer-name-choice input[type=radio]{width:16px;min-height:16px;margin:0;flex:none}
.customer-name-choice small{color:var(--subtle);font-size:11px}
.customer-name-choice p{margin:4px 0 0;font-size:11px}

/* Filters and order are one toolkit, identical on a phone and on a desktop: the
   table head is a shortcut to the same order, not the only way to reach it. */
.customer-filters{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.customer-filters>label{margin:0}
.customer-sort-field{display:grid;gap:6px;min-width:0}
.customer-sort-field>label{margin:0;font-size:inherit}
.customer-sort-input{display:flex;align-items:stretch;gap:6px;min-width:0}
.customer-sort-input>select{min-width:0;flex:1}
.staff-page .customer-sort-direction{flex:none;min-height:42px;width:42px;padding:0;display:grid;place-items:center;font-size:15px;line-height:1}
.customer-sort-direction[data-direction=asc]{color:var(--accent)}
.customer-academy{min-width:0}
.customer-academy .customer-section-heading{align-items:center;gap:12px}
.customer-academy .customer-section-heading h3{margin:0}
.customer-academy button,.customer-academy-link{min-height:44px}
.customer-academy-login{margin:14px 0;display:grid;gap:4px}
.customer-academy-login dt{color:var(--muted)}
.customer-academy-login dd{margin:0;overflow-wrap:anywhere;font-weight:600}
.customer-academy-email{overflow-wrap:anywhere}
.customer-academy-courses{list-style:none;margin:16px 0 8px;padding:0;display:grid;gap:14px}
.customer-academy-courses li{padding-top:12px;border-top:1px solid var(--line);overflow-wrap:anywhere}
.customer-academy-courses p{margin:6px 0;font-size:14px;line-height:1.5}
.customer-academy-link{display:inline-flex;align-items:center;text-underline-offset:4px}
.customer-academy-account+.customer-academy-account{border-top:1px solid var(--line);margin-top:16px;padding-top:12px}
