/* Staff redesign (Nov 2026): clients screen. Spec: docs/STAFF_REDESIGN_PROTOTYPE_2026-11-04 */

/* Page heading */
.staff.clients-screen .clients-top{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px}
.staff.clients-screen .clients-top h1{margin:0;font-family:var(--font-title);font-weight:400;font-size:34px;letter-spacing:-.6px;line-height:1.15}
.staff.clients-screen .clients-top .staff-view-tools{margin:0;flex-wrap:nowrap}
.staff.clients-screen #client-error{margin:0 0 14px}

/* Two columns: list panel + profile card */
.staff.clients-screen .clients-cols{display:flex;gap:20px;align-items:flex-start;font-size:15px;color:var(--ink)}
.staff.clients-screen .clients-list-panel{width:360px;flex:none;min-width:0;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.staff.clients-screen .clients-profile-panel{flex:1;min-width:0;background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px 28px 26px}
.staff.clients-screen .clients-cols.no-list .clients-list-panel{display:none}
.staff.clients-screen .clients-empty{margin:0;padding:30px 16px;text-align:center;color:var(--ink);font:400 20px var(--font-title)}
.staff.clients-screen .clients-profile-panel.is-empty{align-self:stretch;display:flex;align-items:center;justify-content:center;min-height:240px}

/* Shared buttons and inside-label fields */
.staff.clients-screen .client-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:0 16px;border:1px solid var(--green);border-radius:10px;background:#fff;color:var(--green);font:600 15px var(--font);white-space:nowrap}
.staff.clients-screen .client-btn:hover{background:var(--soft)}
.staff.clients-screen .client-btn.primary{background:var(--green);color:#fff}
.staff.clients-screen .client-btn.primary:hover{background:var(--green-pressed)}
.staff.clients-screen .client-field{display:block;min-width:0;border:1px solid var(--line);border-radius:10px;padding:6px 10px 5px;background:#fff;font-size:13px;font-weight:700;color:var(--ink);line-height:1.3}
.staff.clients-screen .client-field span{display:block}
.staff.clients-screen .client-field input{display:block;width:100%;min-height:0;margin:0;border:0;padding:2px 0 1px;font:16px var(--font);color:var(--ink);background:transparent;outline:none}
.staff.clients-screen .client-field:focus-within{border-color:var(--green);box-shadow:0 0 0 1px var(--green)}

/* List panel */
.staff.clients-screen .clients-list-tools{display:flex;flex-direction:column;gap:8px;margin:0;padding:12px;background:var(--paper);border-bottom:1px solid var(--divider)}
.staff.clients-screen .clients-search{display:flex;align-items:center;gap:8px;height:42px;padding:0 12px;background:var(--fill);border:1px solid var(--fill);border-radius:10px;color:var(--ink)}
.staff.clients-screen .clients-search:focus-within{border-color:var(--green);box-shadow:0 0 0 1px var(--green)}
.staff.clients-screen .clients-search input{flex:1;min-width:0;min-height:0;height:100%;margin:0;border:0;padding:0;outline:none;font:15px var(--font);background:transparent;color:var(--ink)}
.staff.clients-screen .clients-list-meta{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;color:var(--muted)}
.staff.clients-screen .clients-sort{display:flex;align-items:center;gap:6px;font-weight:400}
.staff.clients-screen .clients-sort select{height:32px;min-height:0;margin:0;border:1px solid var(--line);border-radius:10px;padding:0 6px;font:15px var(--font);color:var(--ink);background:#fff}
.staff.clients-screen .clients-list-notice{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;border-bottom:1px solid var(--divider);font-size:14px;color:var(--warm)}
.staff.clients-screen .clients-list-notice[hidden]{display:none}
.staff.clients-screen .clients-list-notice p{margin:0}
.staff.clients-screen .clients-list-panel .form-error{margin:10px 16px;font-size:14px}
.staff.clients-screen .clients-list-panel .form-error:empty{display:none}
.staff.clients-screen .client-list{border:0;margin:0}
.staff.clients-screen .client-list .clients-empty{border-top:0}
.staff.clients-screen .client-row{display:block;width:100%;min-height:60px;margin:0;padding:12px 16px;border:0;border-top:1px solid var(--fill);border-radius:0;background:#fff;text-align:left;font:15px var(--font);font-weight:400;color:var(--ink)}
.staff.clients-screen .client-list>.client-row:first-child{border-top:0}
.staff.clients-screen .client-row:hover{background:#f4f7f2}
.staff.clients-screen .client-row.is-selected{background:var(--soft);box-shadow:inset 3px 0 0 var(--green)}
.staff.clients-screen .client-row-line{display:flex;justify-content:space-between;align-items:baseline;gap:10px;min-width:0}
.staff.clients-screen .client-row-line+.client-row-line{margin-top:2px}
.staff.clients-screen .client-row strong{min-width:0;overflow-wrap:anywhere;font-size:17px;font-weight:600}
.staff.clients-screen .client-row small{display:inline;margin:0;font-size:15px;color:var(--ink);white-space:nowrap}
.staff.clients-screen .clients-list-panel .page-controls{height:auto;margin:0;padding:6px 12px;border-top:1px solid var(--divider);font-size:13px;color:var(--muted)}
.staff.clients-screen .clients-list-panel .page-controls button{min-height:36px;padding:0 12px;font-size:20px;border-color:var(--line);border-radius:10px}
.staff.clients-screen .clients-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-top:1px solid var(--divider);background:var(--paper);font-size:13px;color:var(--muted)}
.staff.clients-screen .clients-pager[hidden]{display:none}
.staff.clients-screen .clients-pager .client-btn{min-height:36px;padding:0 12px;font-size:14px}

/* Profile header */
.staff.clients-screen .clients-phone-back{display:none}
.staff.clients-screen .clients-cols.no-list .clients-phone-back{display:inline-flex}
.staff.clients-screen .clients-phone-back{align-items:center;gap:4px;min-height:40px;margin:-6px 0 6px;padding:0;border:0;border-radius:0;background:none;font:600 15px var(--font);color:var(--green)}
.staff.clients-screen .clients-phone-back:hover{background:none;text-decoration:underline}
.staff.clients-screen .client-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.staff.clients-screen .client-head[hidden]{display:none}
.staff.clients-screen .client-head-text{min-width:0}
.staff.clients-screen .client-name{margin:0;font-family:var(--font-title);font-weight:400;font-size:32px;letter-spacing:-.4px;line-height:1.15;overflow-wrap:anywhere}
.staff.clients-screen .client-phone{margin:6px 0 0;font-size:15px;color:var(--ink)}
.staff.clients-screen .client-phone a{color:inherit;text-decoration:none}
.staff.clients-screen .client-phone a:hover{text-decoration:underline}
.staff.clients-screen .client-head-note{margin:4px 0 0;font-size:13px;color:var(--warm)}
.staff.clients-screen .client-actions{display:flex;align-items:center;gap:4px;flex:none;margin:-4px -8px 0 0}
.staff.clients-screen .client-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:none;color:var(--green);cursor:pointer}
.staff.clients-screen .client-icon-btn:hover{background:var(--soft)}
.staff.clients-screen .client-icon-btn:focus-visible{outline:2px solid var(--green);outline-offset:1px}
.staff.clients-screen .client-icon-edit{margin-left:10px}

/* Inline contact editor */
.staff.clients-screen .client-contact-form{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin:0}
.staff.clients-screen .client-field-name{flex:1 1 200px}
.staff.clients-screen .client-field-phone{flex:0 1 200px}
.staff.clients-screen .client-field-reason{flex:1 1 220px}
.staff.clients-screen .client-contact-actions{display:flex;gap:8px}
.staff.clients-screen .client-contact-form .form-error{flex-basis:100%;margin:2px 0 0;font-size:14px}
.staff.clients-screen .client-contact-form .form-error:empty{display:none}

/* Stat boxes */
.staff.clients-screen .client-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:20px 0 6px;border:1px solid var(--divider);border-radius:16px}
.staff.clients-screen .client-stat{min-width:0;padding:12px 18px}
.staff.clients-screen .client-stat+.client-stat{border-left:1px solid var(--divider)}
.staff.clients-screen .client-stat span{display:block;font-size:13px;color:var(--ink)}
.staff.clients-screen .client-stat strong{display:block;margin-top:2px;font-family:var(--font-title);font-size:26px;font-weight:400;color:var(--ink)}
.staff.clients-screen .client-stat.is-owed strong{color:var(--warm)}
.staff.clients-screen .client-stat small{display:block;font-size:13px;color:var(--warm)}
.staff.clients-screen .client-stat small[hidden]{display:none}

/* Profile tabs */
.staff.clients-screen .client-profile{display:block;margin:14px 0 0}
.staff.clients-screen .client-profile .section-tabs{display:flex;flex-wrap:nowrap;gap:26px;margin:0 0 8px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.staff.clients-screen .client-profile .section-tabs::-webkit-scrollbar{display:none}
.staff.clients-screen .client-profile .section-tabs button{flex:none;min-height:44px;padding:0 0 11px;border:0;border-bottom:3px solid transparent;border-radius:0;background:none;font:15px var(--font);color:var(--muted);white-space:nowrap}
.staff.clients-screen .client-profile .section-tabs button[aria-selected=true]{color:var(--green);font-weight:700;border-bottom-color:var(--green)}

/* Trips */
.staff.clients-screen .client-trip-section{margin:0}
.staff.clients-screen .client-trip-heading{display:block;width:auto;margin:16px 0 4px;padding:0;border:0;background:none;font:700 14px var(--font);color:var(--ink)}
.staff.clients-screen .client-trip-heading:hover{background:none}
.staff.clients-screen .client-trip{text-align:left}
.staff.clients-screen button.client-trip{display:grid;grid-template-columns:176px minmax(0,1fr) 150px;gap:16px;align-items:center;width:100%;min-height:56px;margin:0;padding:12px 0;border:0;border-top:1px solid var(--divider);border-radius:0;background:none;font:15px var(--font);font-weight:400;color:var(--ink)}
.staff.clients-screen button.client-trip:hover{background:#f4f7f2}
.staff.clients-screen button.client-trip[hidden]{display:none}
.staff.clients-screen .client-trip strong{display:block;font-size:17px;font-weight:600}
.staff.clients-screen .client-trip small{display:block;margin:0;font-size:13px;color:var(--ink)}
.staff.clients-screen .client-trip-when small{white-space:nowrap}
.staff.clients-screen .client-trip-route{min-width:0;overflow-wrap:anywhere}
.staff.clients-screen .client-trip-status{text-align:right;font-size:15px;font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.staff.clients-screen .client-trip-status.is-warn{color:var(--warm)}
.staff.clients-screen .client-trip-status.is-cancelled{color:var(--error)}
.staff.clients-screen .client-trip-section .page-controls{margin-top:4px}

/* Details */
.staff.clients-screen .client-records{margin:0;padding:0;border:0}
.staff.clients-screen .client-detail-rows{display:grid;grid-template-columns:200px minmax(0,1fr);margin:8px 0 0;font-size:16px}
.staff.clients-screen .client-detail-rows dt,.staff.clients-screen .client-detail-rows dd{margin:0;padding:11px 0;border-top:1px solid var(--divider)}
.staff.clients-screen .client-detail-rows dt{color:var(--muted);font-size:15px}
.staff.clients-screen .client-detail-rows dd{overflow-wrap:anywhere}

/* Text consent */
.staff.clients-screen #client-consent{font-size:15px}
.staff.clients-screen .consent-record{padding:14px 0;border-top:1px solid var(--divider)}
.staff.clients-screen .consent-record:first-child{border-top:0}
.staff.clients-screen .consent-record-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.staff.clients-screen .consent-record-head small{display:block;margin:0;font-size:13px;color:var(--muted);white-space:nowrap}
.staff.clients-screen .consent-wording{margin:6px 0 0;font-size:15px;color:var(--ink)}
.staff.clients-screen .consent-facts{display:grid;grid-template-columns:170px minmax(0,1fr);gap:2px 12px;margin:8px 0 0;font-size:15px}
.staff.clients-screen .consent-facts dt{color:var(--muted)}
.staff.clients-screen .consent-facts dd{margin:0;overflow-wrap:anywhere}

/* Notes */
.staff.clients-screen .client-notes-form{margin:12px 0 0}
.staff.clients-screen .client-notes-field{display:block}
.staff.clients-screen .client-notes-field span{display:block;margin-bottom:6px;font-size:13px;font-weight:700}
.staff.clients-screen .client-notes-section textarea{display:block;width:100%;min-height:180px;max-height:50vh;margin:0;border:1px solid var(--line);border-radius:10px;padding:12px;font:16px/1.5 var(--font);color:var(--ink);background:#fff;resize:vertical}
.staff.clients-screen .client-notes-section textarea:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 1px var(--green)}
.staff.clients-screen .client-notes-form .form-error{margin:10px 0 0;font-size:14px}
.staff.clients-screen .client-note-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.staff.clients-screen .client-note-reload{width:42px;padding:0;font-size:18px}

/* Tablet: stack the list above the profile */
@media (max-width:860px){
 .staff.clients-screen .clients-cols{flex-direction:column;align-items:stretch}
 .staff.clients-screen .clients-list-panel{width:auto}
 .staff.clients-screen .clients-profile-panel.is-empty{display:none}
}

/* Phone: list first, then the profile alone with a back button */
@media (max-width:600px){
 .staff.clients-screen .clients-top h1{font-size:28px}
 .staff.clients-screen .clients-cols{flex-direction:column;align-items:stretch;gap:12px}
 .staff.clients-screen .clients-list-panel,.staff.clients-screen .clients-profile-panel{width:100%;max-width:100%}
 .staff.clients-screen .clients-profile-panel{display:none}
 .staff.clients-screen .clients-cols.show-detail .clients-list-panel{display:none}
 .staff.clients-screen .clients-cols.show-detail .clients-profile-panel{display:block}
 .staff.clients-screen .clients-phone-back{display:inline-flex;min-height:44px}
 .staff.clients-screen .clients-search{height:44px}
 .staff.clients-screen .clients-search input{font-size:16px}
 .staff.clients-screen .clients-sort select{height:44px;font-size:16px}
 .staff.clients-screen .client-btn{min-height:44px}
 .staff.clients-screen .clients-list-panel .page-controls button,.staff.clients-screen .clients-pager .client-btn{min-height:44px}
 .staff.clients-screen .clients-profile-panel{padding:16px}
 .staff.clients-screen .client-name{font-size:28px}
 .staff.clients-screen .client-head{flex-wrap:nowrap;gap:8px}
 .staff.clients-screen .client-icon-edit{margin-left:4px}
 .staff.clients-screen .client-field-name,.staff.clients-screen .client-field-phone,.staff.clients-screen .client-field-reason{flex:1 1 100%}
 .staff.clients-screen .client-contact-actions{width:100%}
 .staff.clients-screen .client-contact-actions>*{flex:1}
 .staff.clients-screen .client-stat{padding:10px 12px}
 .staff.clients-screen .client-stat span{font-size:13px}
 .staff.clients-screen .client-stat strong{font-size:22px}
 .staff.clients-screen .client-profile .section-tabs{gap:18px}
 .staff.clients-screen button.client-trip{grid-template-columns:minmax(0,1fr) auto;gap:4px 12px}
 .staff.clients-screen .client-trip-route{grid-column:1/-1;grid-row:2}
 .staff.clients-screen .client-detail-rows{grid-template-columns:130px minmax(0,1fr)}
 .staff.clients-screen .consent-facts{grid-template-columns:120px minmax(0,1fr)}
}
/* A client's trips: Upcoming | Past | Cancelled is the segmented control used on Bookings,
   so it reads as a choice inside the Trips section rather than a second row of tabs. */
.client-trip-tabs{display:inline-flex;gap:2px;padding:3px;margin:10px 0 8px;border:0;border-radius:9px;background:var(--fill)}
.client-trip-tabs button{flex:none;width:auto;min-height:30px;margin:0;padding:0 14px;border:0;border-radius:7px;background:none;box-shadow:none;font:400 15px var(--font);color:var(--ink)}
.client-trip-tabs button:hover{background:none}
.client-trip-tabs button[aria-selected="true"]{background:#fff;color:var(--ink);font-weight:600;box-shadow:0 1px 2px rgba(26,31,29,.14)}
@media(max-width:600px){.client-trip-tabs{display:flex}.client-trip-tabs button{flex:1}}
/* Sort: a round icon button in the Clients title row (as in the app). The real select sits on top,
   invisible, so choosing opens the device's own list. The "N Clients Shown" row goes with it. */
.staff.clients-screen .clients-top .clients-sort{position:relative;display:grid;place-items:center;width:40px;height:40px;margin:0;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(26,31,29,.14);color:var(--green);font-size:0;cursor:pointer}
.staff.clients-screen .clients-top .clients-sort:hover{background:var(--soft)}
.staff.clients-screen .clients-top .clients-sort select{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;opacity:0;cursor:pointer;font-size:16px}
.staff.clients-screen .clients-top .clients-sort:focus-within{outline:2px solid var(--green);outline-offset:2px}
.staff.clients-screen .clients-list-meta{display:none}
@media (max-width:600px){.staff.clients-screen .clients-top .clients-sort{width:44px;height:44px}html .staff.clients-screen .clients-top{padding-right:0}}
