/* =========================================================================
   views/settings.css — Settings pages
   Split from the old monolithic styles/views.css. LOAD ORDER MATTERS:
   the <link> order in Magnet CRM.html / Client App.html reproduces the
   original file order, so the cascade is unchanged — add new rules to the
   matching feature file, not the end of the list.
   ========================================================================= */
/* ---------------------------------------------------------------------- */
/* Settings pages                                                         */
/* ---------------------------------------------------------------------- */
.set-page { max-width: 720px; margin: 0 auto; padding: var(--space-6) var(--space-6) var(--space-10); display: flex; flex-direction: column; gap: var(--space-6); }
.set-section { display: flex; flex-direction: column; gap: var(--space-4); }
.set-section-head h2 { font-size: var(--text-xl); font-weight: var(--fw-bold); color: var(--text-strong); letter-spacing: -0.01em; }
.set-section-head p { margin-top: var(--space-1); font-size: var(--text-sm); color: var(--text-soft); max-width: 56ch; }
.set-card { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
/* Settings → Business: the Finish-setting-up banner above the profile card */
.set-setup { margin-bottom: var(--space-4); }
.set-setup[hidden] { display: none; }

.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.set-field { display: flex; flex-direction: column; gap: var(--space-1-5); }
.set-field--full { grid-column: 1 / -1; }
.set-label { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--text-muted); }
.set-card-foot { display: flex; justify-content: flex-end; padding-top: var(--space-1); }
.set-subhead { margin-top: var(--space-2); }
.set-timezone { padding: 4px 0; }
.set-timezone select { width: 100%; min-height: 44px; box-shadow: none; }
.set-logout { padding-top: 8px; }
.set-logout .btn { min-height: 44px; border-radius: 100px; }
@media (max-width: 640px) {
  .set-timezone select { font-size: 16px; }
}
.set-pic { display: flex; align-items: center; gap: var(--space-4); padding-bottom: var(--space-3); }
.set-pic-avatar { flex-shrink: 0; display: flex; }
.set-pic-avatar[data-set-photo] { border: 0; padding: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.set-pic-avatar[data-set-photo]:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 4px; }
.set-pic-avatar[data-set-photo] { position: relative; }
.set-pic-media { display: flex; }
/* Attio-style "change photo" affordance: a raised white disc riding the avatar's
   bottom-right edge. Decorative — the whole avatar button opens the picker. */
.set-pic-badge { position: absolute; right: 0; bottom: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text-strong); border: 1px solid var(--border); box-shadow: var(--shadow-sm); pointer-events: none; }
.set-pic-badge svg { width: 15px; height: 15px; }
.profile-photo-menu { position: fixed; margin: 0; width: 220px; padding: var(--space-1); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); animation: popIn var(--dur) var(--ease); }
.profile-photo-menu button { display: flex; align-items: center; gap: var(--space-2-5); width: 100%; min-height: 34px; padding: 0 var(--space-2-5); border-radius: var(--radius-sm); text-align: left; font-size: var(--text-sm); color: var(--text); }
@media (hover: hover) and (pointer: fine) { .profile-photo-menu button:hover { background: var(--surface-field); } }
.profile-photo-menu button svg { width: 16px; height: 16px; color: var(--text-soft); }
.profile-photo-menu button[hidden] { display: none; }
.profile-photo-menu-sep { height: 1px; margin: var(--space-1) 0; background: var(--border); }
.profile-photo-menu button.danger, .profile-photo-menu button.danger svg { color: var(--danger-600); }
.set-pic-avatar .avatar { width: 84px; height: 84px; font-size: var(--text-2xl); }
.set-pic-img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; display: block; }
.set-pic-text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); flex: 1; }
.set-pic-title { font-size: var(--text-md); font-weight: var(--fw-semibold); color: var(--text-strong); }
.set-pic-desc { font-size: var(--text-sm); color: var(--text-soft); }
.set-pic-btn { align-self: flex-start; margin-top: var(--space-2-5); }
.set-readfield { position: relative; display: flex; align-items: center; }
/* Client-portal account details: an iOS-style key/value list in its own card —
   muted label column, ink value, hairline dividers, no input chrome (Attio
   rule 3: hierarchy from type, not boxes). Sits below the photo card. */
.set-pic-card .set-pic { padding-bottom: 0; }
.set-kv-card { padding-top: 0; padding-bottom: 0; gap: 0; }
.set-kv { margin: 0; display: flex; flex-direction: column; }
.set-kv-row { display: flex; align-items: center; gap: var(--space-4); min-height: 44px; padding: var(--space-2-5) 0; border-bottom: 1px solid var(--border-faint); }
.set-kv-row:last-child { border-bottom: 0; }
.set-kv dt { flex: 0 0 140px; font-size: var(--text-sm); color: var(--text-muted); }
.set-kv dd { flex: 1; min-width: 0; margin: 0; font-size: var(--text-md); font-weight: var(--fw-medium); color: var(--text-strong); overflow-wrap: anywhere; }
.set-kv-foot { margin: 0 var(--space-1); font-size: var(--text-sm); color: var(--text-soft); line-height: var(--leading-relaxed); }
.set-readinput { padding-right: 64px; background: var(--gray-50); color: var(--text-muted); }
.set-readinput:not([readonly]) { background: var(--surface); color: var(--text); }
.set-read-edit { position: absolute; right: 6px; height: 30px; }

.pw-input { padding-right: 42px; }
.pw-toggle {
  position: absolute; right: 6px; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: none; background: transparent; border-radius: var(--radius-sm);
  color: var(--text-soft); cursor: pointer; transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .pw-toggle:hover { color: var(--text); background: var(--gray-50); }
}
.pw-toggle svg { width: 17px; height: 17px; }

/* toggle rows */
.notification-channels { border: 1px solid var(--border-faint); border-radius: 20px; overflow: hidden; background: var(--surface); }
.notification-channel + .notification-channel { border-top: 1px solid var(--border-faint); }
.notification-channel > summary { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 20px; cursor: pointer; list-style: none; font-size: 16px; font-weight: var(--fw-medium); }
.notification-channel > summary::-webkit-details-marker { display: none; }
.notification-channel > summary > svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--text-soft); }
.notification-channel > summary > svg:last-child { width: 18px; height: 18px; }
.notification-channel > summary > svg:last-child { transition: transform var(--dur-slow) var(--ease-ios); }
.notification-channel[open] > summary > svg:last-child { transform: rotate(90deg); }
.notification-channel-status { margin-left: auto; color: var(--text-soft); font-size: 14px; font-weight: var(--fw-normal, 400); white-space: nowrap; }
.notification-channel-options { padding: 0 20px 16px; overflow: hidden; transition: height var(--dur-slow) var(--ease-ios), padding-bottom var(--dur-slow) var(--ease-ios), opacity var(--dur) var(--ease); }
.notification-channel-options.is-collapsed { padding-bottom: 0; }
.notification-channel-options > .set-row:first-child { border-top: 0; }
.notification-channel-options [data-native-notification-card] { box-shadow: none; border: 0; padding: 0; }
.notification-channel > summary:focus-visible { outline: 2px solid var(--primary-600); outline-offset: -3px; border-radius: 16px; }
.set-rows { gap: 0; padding: var(--space-2) var(--space-5); }
.set-rows-label { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); padding: var(--space-3) 0 var(--space-2); }
.set-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--border-faint); }
.set-rows-label + .set-row { border-top: 0; }
.set-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-0-5); }
.set-row-title { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.set-row-desc { font-size: var(--text-xs); color: var(--text-soft); }
/* a line of guidance among the rows (where push alerts come; nothing to switch) */
.set-row-note { margin: 0; padding: var(--space-3) 0; border-top: 1px solid var(--border-faint); font-size: var(--text-xs); line-height: var(--leading-relaxed); color: var(--text-soft); }
.notification-channel-options > .set-row-note:first-child { border-top: 0; }
.set-block-head { margin-bottom: var(--space-1); }

/* toggle switch */
.set-row-ctrl { display: inline-flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.set-time { width: auto; height: 34px; padding: 0 var(--space-2-5); font-variant-numeric: tabular-nums; }
/* legacy button-based toggle — new work should use the input-based .switch
   primitive in components.css instead */
.stoggle { flex-shrink: 0; width: 40px; height: 24px; border-radius: var(--radius-full); background: var(--gray-200); position: relative; cursor: pointer; transition: background var(--dur) var(--ease); }
.stoggle .stoggle-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: transform var(--dur) var(--ease); }
.stoggle.on { background: var(--primary-600); }
.stoggle.on .stoggle-knob { transform: translateX(16px); }
.stoggle:disabled, .stoggle[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* client lead-alert numbers — chip input (Enter adds a number) */
.set-row--stack { flex-direction: column; align-items: stretch; gap: var(--space-2); }
.set-phones {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1-5);
  min-height: 44px; padding: var(--space-1-5) var(--space-2);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--btn-shadow); cursor: text;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.set-phones:focus-within { border-color: var(--primary-400); box-shadow: var(--ring-primary); }
.set-phone-chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) 5px var(--space-1) var(--space-2-5); border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--primary-600) 10%, transparent);
  color: var(--primary-600); font-size: var(--text-sm); font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.set-phone-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0; border: none; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.set-phone-x svg { width: 11px; height: 11px; }
@media (hover: hover) and (pointer: fine) {
  .set-phone-x:hover { background: color-mix(in srgb, var(--primary-600) 16%, transparent); }
}
.set-phones-field {
  flex: 1; min-width: 140px; height: 30px; padding: 0 var(--space-1);
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: var(--text-sm); color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* the wrapper carries the focus ring — kill the global :focus-visible ring on
   the inner field so it doesn't read as double-wrapped */
.set-phones-field:focus, .set-phones-field:focus-visible { outline: none; box-shadow: none; }
.set-phones-field::placeholder { color: var(--text-soft); }
.set-phones-field:disabled { cursor: default; }
.set-phones-kbd { flex-shrink: 0; align-self: center; padding-right: var(--space-0-5); }

/* workspace integrations */
/* .set-intg-cat is a structural wrapper only (spacing comes from the flex gap) */
.set-intg-groups { display: flex; flex-direction: column; gap: var(--space-6); }
.set-intg-cat-head { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); margin-bottom: var(--space-3); }

/* accounts (admins + client accounts) */
.acct-list { display: flex; flex-direction: column; gap: var(--space-3); }
.acct-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .acct-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
}
.acct-av { flex-shrink: 0; display: inline-flex; }
.acct-av .logo, .acct-av .avatar, .acct-av .proj-logo { width: 40px; height: 40px; font-size: var(--text-md); }
.acct-av .logo, .acct-av .proj-logo { border-radius: var(--radius-md); }
.acct-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.acct-name { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-md); font-weight: var(--fw-semibold); color: var(--text-strong); }
.acct-sub { font-size: var(--text-sm); color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-you { font-size: var(--text-2xs); font-weight: var(--fw-bold); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-soft); background: var(--gray-100); padding: var(--space-0-5) 7px; border-radius: var(--radius-full); }
.acct-role { flex-shrink: 0; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-muted); margin-right: var(--space-2); }
.acct-open { flex-shrink: 0; gap: var(--space-1-5); }
.acct-open svg { width: 15px; height: 15px; }
/* per-client portal activity modal (Settings → Accounts → Activity) */
.acct-act { display: flex; flex-direction: column; gap: var(--space-3); }
.acct-act-loading { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-6) 0; color: var(--text-soft); font-size: var(--text-sm); }
.acct-act-loading svg { width: 16px; height: 16px; }
.acct-act-sum { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2-5) var(--space-3); border: 1px solid var(--border-faint); border-radius: var(--radius-md); background: var(--gray-25); font-size: var(--text-sm); color: var(--text); }
.acct-act-sum svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: var(--space-0-5); color: var(--text-muted); }
.acct-act-list { display: flex; flex-direction: column; gap: var(--space-1-5); }
/* one event = a collapsed row; the head toggles an expanded detail block */
.acct-act-row2 { border: 1px solid var(--border-faint); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.acct-act-row2.is-admin .acct-act-who { color: var(--text-muted); }
.acct-act-head { display: flex; align-items: center; gap: var(--space-2-5); width: 100%; padding: var(--space-2-5) var(--space-3); border: 0; background: none; cursor: pointer; text-align: left; }
@media (hover: hover) and (pointer: fine) { .acct-act-head:hover { background: var(--gray-25); } }
.acct-act-ico { flex: 0 0 auto; display: flex; color: var(--text-muted); }
.acct-act-ico svg { width: 15px; height: 15px; }
.acct-act-who { flex: 1; min-width: 0; font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-act-when { flex: 0 0 auto; font-size: var(--text-xs); color: var(--text-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.acct-act-chev { flex: 0 0 auto; display: flex; color: var(--text-soft); transition: transform var(--dur) var(--ease); }
.acct-act-chev svg { width: 14px; height: 14px; }
.acct-act-row2.is-open .acct-act-chev { transform: rotate(180deg); }
.acct-act-detail { display: flex; flex-direction: column; gap: 7px; padding: var(--space-1) var(--space-3) var(--space-3) 37px; }
.acct-act-detail[hidden] { display: none; }
.acct-act-kv { display: flex; align-items: baseline; gap: var(--space-2-5); font-size: var(--text-sm); }
.acct-act-kv > span { flex: 0 0 88px; color: var(--text-soft); font-size: var(--text-xs); font-weight: var(--fw-medium); }
.acct-act-kv > b { color: var(--text-strong); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.acct-act-note { color: var(--text-soft); font-style: normal; font-size: var(--text-xs); }
/* the IP's approximate-area map: panned OSM tiles + translucent radius */
.acct-act-map { position: relative; height: 170px; margin-top: var(--space-1); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-faint); background: var(--gray-100); }
.acct-act-map-pan { position: absolute; left: 50%; top: 50%; width: 768px; height: 768px; transform: translate(calc(-1 * var(--px)), calc(-1 * var(--py))); }
.acct-act-map-pan img { position: absolute; width: 256px; height: 256px; display: block; }
.acct-act-map-radius { position: absolute; left: var(--px); top: var(--py); transform: translate(-50%, -50%); border-radius: 50%; background: color-mix(in srgb, var(--primary-500) 18%, transparent); border: 1.5px solid color-mix(in srgb, var(--primary-500) 55%, transparent); }
.acct-act-map-dot { position: absolute; left: var(--px); top: var(--py); transform: translate(-50%, -50%); width: 9px; height: 9px; border-radius: 50%; background: var(--primary-500); box-shadow: 0 0 0 2.5px #fff; }
.acct-act-map-attr { position: absolute; right: 6px; bottom: 4px; z-index: 2; font-size: var(--text-micro); color: rgba(0, 0, 0, .55); background: rgba(255, 255, 255, .7); padding: 0 var(--space-1); border-radius: 3px; }
.acct-act-map-cap { position: absolute; left: 8px; bottom: 6px; z-index: 2; font-size: var(--text-2xs); font-weight: var(--fw-semibold); color: #1f2430; background: rgba(255, 255, 255, .85); padding: var(--space-0-5) var(--space-2); border-radius: var(--radius-full); box-shadow: var(--shadow-xs); }
.acct-pin { flex-shrink: 0; display: inline-flex; align-items: center; gap: var(--space-2); height: 34px; padding: 0 13px; border: none; border-radius: var(--radius-full); background: var(--gray-100); color: var(--text-soft); cursor: pointer; font-family: ui-monospace, Menlo, monospace; font-size: var(--text-sm); letter-spacing: 0.14em; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .acct-pin:hover { background: var(--gray-200); }
}
.acct-pin.is-open { color: var(--text-strong); background: var(--primary-50); }
/* dark theme keeps the light primary-50 ramp, which would put near-white text
   on a near-white pill — tint the surface instead (same as .time-slot.active) */
html[data-theme="dark"] .acct-pin.is-open { background: color-mix(in srgb, var(--primary-500) 22%, var(--surface)); }
/* copied-to-clipboard confirmation flash (--success-bg is theme-aware; the
   html[data-theme] variant outranks the dark .is-open background above) */
.acct-pin.is-copied,
html[data-theme="dark"] .acct-pin.is-copied { color: var(--success-600); background: var(--success-bg); }
@media (hover: hover) and (pointer: fine) {
  .acct-pin.is-copied:hover { color: var(--success-600); background: var(--success-bg); }
}
.acct-pin-ico { display: inline-flex; }
.acct-pin-ico svg { width: 13px; height: 13px; }
.acct-del { flex-shrink: 0; color: var(--text-soft); }
@media (hover: hover) and (pointer: fine) {
  .acct-del:hover { color: var(--danger-600); border-color: color-mix(in srgb, var(--danger-600) 40%, var(--border)); background: var(--danger-bg); }
}
/* design-system .search bar, stretched full-width for the accounts list */
.acct-search { display: flex; width: 100%; margin-bottom: var(--space-3); }
.acct-count { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--text-soft); margin-bottom: var(--space-3); }
.acct-empty { padding: var(--space-6); text-align: center; color: var(--text-soft); font-size: var(--text-sm); }

/* appearance */
.set-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.set-theme { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-1-5) var(--space-1-5) var(--space-2-5); border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .set-theme:hover { border-color: var(--border-strong); }
}
.set-theme.sel { border-color: var(--primary-500); box-shadow: 0 0 0 1px var(--primary-500); }
.set-theme-prev { position: relative; height: 116px; border-radius: var(--radius-md); border: 1px solid var(--border-faint); overflow: hidden; }
.set-sk { display: block; width: 100%; height: 100%; }
.set-theme-prev--light, .set-theme-prev--system { --sk-bg: #ffffff; --sk-side: #f5f5f8; --sk-line: #e1e1e7; --sk-faint: #eeeef2; --sk-logo: #c8c8d2; --sk-pill: #eaf1ff; }
.set-theme-prev--dark { --sk-bg: #1c1c22; --sk-side: #25252d; --sk-line: #3b3b45; --sk-faint: #2b2b33; --sk-logo: #50505c; --sk-pill: #1d2942; }
.set-theme-prev-dark { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); --sk-bg: #1c1c22; --sk-side: #25252d; --sk-line: #3b3b45; --sk-faint: #2b2b33; --sk-logo: #50505c; --sk-pill: #1d2942; }
.set-theme-label { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1-5); font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text); }
.set-theme-label > svg { width: 15px; height: 15px; color: var(--text-soft); }
.set-theme.sel .set-theme-label > svg:first-child { color: var(--text); }
.set-theme-label > svg:last-child { color: var(--primary-600); }
.set-theme.sel .set-theme-label > span { font-weight: var(--fw-semibold); }

.set-accents { display: flex; gap: var(--space-3); align-items: center; }
.set-accent { width: 28px; height: 28px; padding: 0; border: none; border-radius: 50%; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform var(--dur) var(--ease); }
.set-accent-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--swatch); transition: box-shadow var(--dur) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .set-accent:hover { transform: scale(1.08); }
}
.set-accent.sel { box-shadow: inset 0 0 0 2px var(--swatch); border-radius: 50%; }
/* the Ink swatch shows what Ink IS in the current theme: near-black on light,
   white on dark (tokens.css inverts the ramp) — a hairline keeps it visible on
   a same-tone ground */
.set-accent[data-accent="ink"] .set-accent-dot { box-shadow: inset 0 0 0 1px var(--border-strong); }
html[data-theme="dark"] .set-accent[data-accent="ink"] { --swatch: #f6f6f9; }
.set-accent.sel .set-accent-dot { width: 12px; height: 12px; }

@media (max-width: 560px) { .set-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .set-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .set-theme { min-width: 0; padding: 5px 5px 10px; }
  .set-theme-prev { height: 72px; }
  .set-theme-label { font-size: 12px; gap: 4px; }
  .set-theme-label > svg { width: 12px; height: 12px; flex-shrink: 0; }
}

.intg-name-row { flex-wrap: wrap; row-gap: var(--space-1); }

/* ---- Settings → Employees (client portal, main account only) ----------
   Row anatomy: name input · PIN field (the shared .cd-pin-field look from
   clients.css) · remove; the section-visibility toggles sit underneath as a
   wrapping row of switch+label pairs. */
.emp-add { display: flex; gap: var(--space-2-5); }
.emp-add .input { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .emp-add { flex-direction: column; }
  .emp-add .input { flex: none; width: 100%; }
  .emp-add [data-emp-add] { width: 100%; }
}
.emp-row { padding: var(--space-3-5) var(--space-0-5); }
.emp-row:first-child { padding-top: var(--space-1); }
.emp-row + .emp-row { border-top: 1px solid var(--border); }
.emp-row-top { display: flex; align-items: center; gap: var(--space-2-5); }
.emp-name { flex: 1; min-width: 0; font-weight: var(--fw-medium); }
.emp-pin { flex: 0 0 200px; gap: var(--space-2); }
.emp-pin .cd-pin-val { font-size: var(--text-md); }
.emp-del { color: var(--text-soft); }
@media (hover: hover) and (pointer: fine) {
  .emp-del:hover { color: var(--danger-600); }
}
.emp-perms { display: flex; flex-wrap: wrap; gap: var(--space-2-5) var(--space-5); margin-top: var(--space-3); }
.emp-perm-cell { display: inline-flex; align-items: center; gap: var(--space-2); }
.emp-perm-label { font-size: var(--text-sm); color: var(--text-muted); font-weight: var(--fw-medium); }
@media (max-width: 560px) {
  .emp-row-top { flex-wrap: wrap; }
  .emp-name { flex-basis: 100%; }
  .emp-pin { flex: 1; }
}

/* ---- Settings → Business (settingsBusiness): the profile list in a card ---- */
.set-biz-card { padding-top: var(--space-1); padding-bottom: var(--space-1); gap: 0; }
.set-link { padding: 0; border: 0; background: none; font: inherit; color: var(--primary-600); text-decoration: underline; cursor: pointer; }
