/* HT OS list-page shell — HCP-parity layout */

.list-page {
  padding: 0;
  background: var(--panel-0, #f5f7fa);
  min-height: calc(100vh - 64px);
}

.list-subtabs {
  display: flex;
  gap: 0;
  padding: 0 1.5rem;
  background: var(--panel, #fff);
  border-bottom: 1px solid var(--line, #e0e6ef);
  overflow-x: auto;
}
.ls-tab {
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.ls-tab:hover { color: var(--ink); }
.ls-tab.active { color: var(--accent, #1a88f5); border-bottom-color: var(--accent, #1a88f5); }

.list-head {
  padding: 1rem 1.5rem 0.5rem;
  background: var(--panel, #fff);
}
.list-breadcrumbs {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; color: var(--muted);
  margin-bottom: 0.3rem;
}
.ls-crumb { color: var(--muted); text-decoration: none; }
.ls-crumb.active { color: var(--ink); }
.ls-sep { color: var(--line); }

.list-title-row {
  display: flex; align-items: baseline; gap: 1rem; margin-bottom: 0.6rem;
}
.list-title { margin: 0; font-size: 1.35rem; color: var(--ink); }
.list-record-count { font-size: 0.85rem; color: var(--muted); }

.list-toolbar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0 0.85rem; border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}
/* Grain segmented control — leading slot in the toolbar.
   Lets a single list page slice the same surface two ways
   (e.g., Service plans → Enrollments vs Visits). */
.list-grains {
  display: inline-flex;
  background: var(--panel-2, #f7f9fc);
  border: 1px solid var(--line, #e0e6ef);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.list-grains:empty { display: none; }
.ls-grain {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: color .15s, background .15s;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.ls-grain:hover { color: var(--ink); }
.ls-grain.active {
  background: var(--panel, #fff);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 27, 50, 0.08);
}
@media (max-width: 640px) {
  .list-grains { width: 100%; justify-content: stretch; }
  .ls-grain { flex: 1; justify-content: center; min-height: 40px; }
}

.list-search { flex: 0 1 320px; }
.list-search input {
  width: 100%; padding: 0.55rem 0.85rem;
  background: var(--panel-2, #f7f9fc);
  border: 1px solid var(--line, #e0e6ef); border-radius: 6px;
  font-family: inherit; font-size: 0.85rem;
}
.list-actions { display: flex; gap: 0.5rem; }
.filter-count { color: var(--accent, #1a88f5); font-weight: 700; margin-left: 4px; }

.list-body {
  display: flex; gap: 0; background: var(--panel, #fff);
  position: relative;
}

.list-filter-panel {
  display: none; flex: 0 0 320px;
  border-right: 1px solid var(--line-2);
  background: var(--panel, #fff);
  max-height: calc(100vh - 200px); overflow-y: auto;
  flex-direction: column;
}
.list-filter-panel.open { display: flex; }
.lfp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--line-2);
}
.lfp-head h3 { margin: 0; font-size: 0.95rem; }
.lfp-body { padding: 0.85rem 1rem; flex: 1; overflow-y: auto; }
.lfp-field { margin-bottom: 1rem; }
.lfp-field > label {
  display: block; font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ink-2, #3c4b66);
  font-weight: 700; margin-bottom: 6px;
}
.lfp-pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.lfp-pill {
  background: var(--panel-2, #f7f9fc); border: 1px solid var(--line, #e0e6ef);
  color: var(--ink-2); padding: 0.35rem 0.75rem; border-radius: 999px;
  font-size: 0.8rem; cursor: pointer; transition: background .1s, color .1s;
}
.lfp-pill:hover { background: var(--panel-3, #eef2f7); }
.lfp-pill.on {
  background: var(--accent, #1a88f5); color: #fff; border-color: var(--accent, #1a88f5);
}
.lfp-date, .lfp-num, .lfp-text {
  width: 100%; padding: 0.45rem 0.6rem;
  border: 1px solid var(--line, #e0e6ef); border-radius: 4px;
  font-family: inherit; font-size: 0.85rem; background: var(--panel, #fff);
}
.lfp-foot {
  display: flex; gap: 0.5rem; justify-content: space-between;
  padding: 0.85rem 1rem; border-top: 1px solid var(--line-2);
}

.list-table-wrap {
  flex: 1; overflow: auto; max-height: calc(100vh - 200px);
  background: var(--panel, #fff);
}
.list-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.list-table th {
  text-align: left; padding: 0.6rem 0.9rem;
  background: var(--panel-2, #f7f9fc);
  border-bottom: 1px solid var(--line, #e0e6ef);
  font-weight: 700; color: var(--ink-2); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.03em;
  position: sticky; top: 0; z-index: 1;
  white-space: nowrap;
}
.list-table th.sortable { cursor: pointer; user-select: none; }
.list-table th.sortable:hover { background: var(--panel-3, #eef2f7); }
.list-table th.lt-checkbox { width: 32px; padding-left: 0.85rem; }
.list-table td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line-2, #eef2f7);
  color: var(--ink); vertical-align: middle;
  white-space: nowrap;
}
.list-table td.lt-checkbox { padding-left: 0.85rem; width: 32px; }
.list-table tr:hover td { background: var(--panel-2, #f7f9fc); }
.list-empty {
  text-align: center; color: var(--muted); font-size: 0.9rem;
  padding: 2rem 1rem;
}

.list-footer {
  display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1.5rem;
  background: var(--panel, #fff); border-top: 1px solid var(--line-2);
  font-size: 0.85rem;
}
.list-footer select {
  padding: 0.3rem 0.5rem; border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel, #fff); font-family: inherit; font-size: 0.85rem;
}
.list-range { color: var(--muted); }
.list-pgbtns { margin-left: auto; display: flex; gap: 0.3rem; }

.list-bulkbar {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink, #1a2b4a); color: #fff;
  padding: 0.75rem 1.25rem; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.85rem; z-index: 100;
}
.list-bulkbar button.htos-btn-primary { background: var(--accent, #1a88f5); color: #fff; border-color: var(--accent, #1a88f5); }
.list-bulkbar button.htos-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }

/* Chip for tags displayed in cells */
.lt-tag-chip {
  display: inline-block; padding: 2px 8px; margin-right: 4px;
  background: var(--accent-soft, #e0efff); color: var(--accent-ink, #0d4b8a);
  border-radius: 999px; font-size: 0.72rem; font-weight: 600;
}
.lt-status {
  display: inline-block; padding: 2px 8px;
  border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.lt-status.scheduled { background: #e0efff; color: #0d4b8a; }
.lt-status.in_progress, .lt-status\.in-progress { background: #fff4d6; color: #7a5400; }
.lt-status.completed { background: #d6f5e3; color: #0b6a3f; }
.lt-status.canceled, .lt-status\.user_canceled, .lt-status\.pro_canceled { background: #fde2e4; color: #8b1e2b; }
.lt-status.unscheduled { background: #eef2f7; color: #5a6b85; }
.lt-status.draft { background: #eef2f7; color: #5a6b85; }
.lt-status.sent { background: #e0efff; color: #0d4b8a; }
.lt-status.approved { background: #d6f5e3; color: #0b6a3f; }
.lt-status.converted { background: #e7dbfa; color: #4a2a8e; }

/* Views dropdown (presets + saved views) */
.list-views-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--card, #fff); border: 1px solid var(--line, #e3e8ef);
  border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  min-width: 260px; padding: 6px 0; z-index: 200;
}
.list-views-menu .views-group-label {
  padding: 6px 12px 4px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted, #5a6b85); font-weight: 700;
}
.list-views-menu .views-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 7px 12px; border: 0; background: none;
  text-align: left; cursor: pointer; font-size: 0.85rem; font-family: inherit;
  color: var(--text, #1a2b4a);
}
.list-views-menu .views-item:hover { background: #f3f4f6; }
.views-item-del {
  padding: 0 6px; color: var(--muted, #8a9bb8); border-radius: 3px;
  font-weight: 700; font-size: 1.1rem; line-height: 1;
}
.views-item-del:hover { color: var(--fail, #c83e3e); background: #fff; }
.settings-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.settings-table th { text-align: left; padding: 6px 8px; font-weight: 700; color: var(--muted, #5a6b85); border-bottom: 1px solid var(--line, #e3e8ef); }
.settings-table td { padding: 6px 8px; border-bottom: 1px solid var(--line, #e3e8ef); vertical-align: middle; }
.settings-table input[type=text], .settings-table input[type=url], .settings-table input[type=email] {
  padding: 4px 6px; border: 1px solid var(--border, #d0d7e2); border-radius: 4px; font-size: 0.82rem;
}
.settings-btn {
  padding: 4px 10px; font-size: 0.8rem; border-radius: 4px; border: 1px solid var(--border, #d0d7e2);
  background: var(--card, #fff); cursor: pointer; margin-right: 4px;
}
.settings-btn:hover { background: #f3f4f6; }
.settings-btn-primary { padding: 6px 14px; background: var(--accent, #1a88f5); color: #fff; border: 0; border-radius: 6px; cursor: pointer; font-weight: 600; }
.chip { display: inline-block; padding: 2px 8px; background: #eef2f7; border-radius: 999px; font-size: 0.75rem; color: var(--muted, #5a6b85); font-weight: 600; }

/* ────────────────────────────────────────────────────────────────
   User cards (Staff & Users settings tab)
   ──────────────────────────────────────────────────────────────── */
/* ────────────────────────────────────────────────────────────────
   Staff roster cards — v2 (2026-04-23)
   HCP-inspired: photo-forward, grid layout, hover-revealed actions,
   status dot, clean typographic hierarchy. Works at 3 cols on wide,
   collapses to 1 col below 720px.
   ──────────────────────────────────────────────────────────────── */
.user-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.9rem;
}
.user-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: start; gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: var(--panel, #fff);
  border: 1px solid var(--line-2, #e3e8ef);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  cursor: default;
}
.user-card:hover {
  border-color: var(--accent, #1a88f5);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.user-card-inactive {
  background: repeating-linear-gradient(135deg, #fff 0 12px, #fafbfc 12px 24px);
  border-style: dashed;
}
.user-card-inactive .uc-avatar { filter: grayscale(0.4); opacity: 0.7; }
.user-card-inactive .uc-name strong { color: var(--muted, #5a6b85); }

.uc-avatar {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.15rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18), 0 2px 8px rgba(0,0,0,0.08);
  letter-spacing: 0.02em;
  overflow: hidden;
  flex-shrink: 0;
}
/* Status dot on the avatar — green = active, red = inactive */
.uc-avatar::after {
  content: ''; position: absolute; right: -2px; bottom: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #10b981; border: 2px solid var(--panel, #fff);
}
.user-card-inactive .uc-avatar::after { background: #cbd5e1; }

.uc-main { min-width: 0; }
.uc-name {
  font-size: 1rem; color: var(--ink, #1a2b4a);
  margin-bottom: 4px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
  line-height: 1.3;
}
.uc-name strong { font-weight: 600; }
.uc-email {
  color: var(--muted, #5a6b85); font-size: 0.85rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.uc-meta {
  color: var(--muted, #5a6b85); font-size: 0.78rem;
  margin-top: 4px; line-height: 1.4;
}
.uc-meta-sep { opacity: 0.4; margin: 0 0.3rem; }

/* Action bar — revealed on hover. Always visible on touch devices. */
.uc-actions {
  grid-column: 1 / -1;
  display: flex; gap: 0.3rem; flex-wrap: wrap;
  margin-top: 0.7rem; padding-top: 0.7rem;
  border-top: 1px dashed var(--line-2, #e3e8ef);
  opacity: 0.45; transition: opacity .15s;
}
.user-card:hover .uc-actions,
.user-card:focus-within .uc-actions { opacity: 1; }
@media (hover: none) { .uc-actions { opacity: 1; } }
.uc-actions .settings-btn {
  font-size: 0.76rem; padding: 0.35rem 0.55rem;
}

.uc-chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.02em; text-transform: lowercase;
  line-height: 1.4;
}
.uc-chip-you { background: #dbeafe; color: #1e40af; text-transform: none; }
.uc-chip-bookable { background: #fef3c7; color: #92400e; text-transform: none; }
.uc-chip-incomplete { background: #fef2cc; color: #8b5a00; text-transform: none; cursor: help; }
.uc-chip-inactive { background: #fde2e4; color: #8b1e2b; }
.uc-chip-discipline { background: #eef2ff; color: #3730a3; text-transform: none; }

/* ────────────────────────────────────────────────────────────────
   User edit dialog polish
   ──────────────────────────────────────────────────────────────── */
.ud-modal { max-width: 680px; max-height: 90vh; display: flex; flex-direction: column; }
.ud-body { padding: 1.25rem 1.5rem; overflow: auto; flex: 1; }
.ud-field { margin-bottom: 0.85rem; }
.ud-field > label {
  display: block; font-size: 0.78rem; color: var(--muted, #5a6b85);
  margin-bottom: 5px; font-weight: 600; letter-spacing: 0.02em;
}
.ud-field input, .ud-field select {
  width: 100%; padding: 0.55rem 0.7rem;
  border: 1px solid var(--border, #d2d8e1); border-radius: 6px;
  font-size: 0.92rem; background: #fff;
  transition: border-color .12s, box-shadow .12s;
}
.ud-field input:focus, .ud-field select:focus {
  outline: none; border-color: var(--accent, #1a88f5);
  box-shadow: 0 0 0 3px rgba(26,136,245,0.12);
}
.ud-field input:disabled { background: #f3f4f6; color: var(--muted); cursor: not-allowed; }
.ud-hint { color: var(--muted, #5a6b85); font-size: 0.77rem; margin: 6px 0 0; }
.ud-hint code { background: #f1f5f9; padding: 1px 5px; border-radius: 3px; font-size: 0.85em; }

.ud-grid-wrap { margin-top: 0.85rem; border-top: 1px solid var(--line-2, #e3e8ef); padding-top: 0.85rem; }

/* Owner — short inline callout, not a big block */
.ud-owner-hint {
  display: flex; gap: 0.85rem; align-items: center;
  padding: 14px 16px; border-radius: 10px;
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 1px solid #e9d5ff; color: #6b21a8;
  margin: 0.5rem 0;
}
.ud-owner-hint .uoh-icon { font-size: 1.4rem; }
.ud-owner-hint strong { display: block; font-size: 0.95rem; margin-bottom: 2px; color: #581c87; }
.ud-owner-hint p { margin: 0; font-size: 0.82rem; }

/* Permissions header + stats */
.ud-perm-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 0.85rem;
}
.ud-perm-heading { flex: 1; min-width: 0; }
.ud-perm-title { font-size: 0.95rem; color: var(--ink, #1a2b4a); margin-bottom: 0.15rem; font-weight: 700; }
.ud-perm-sub { font-size: 0.78rem; color: var(--muted, #5a6b85); margin: 0; }
.ud-perm-stats {
  display: flex; gap: 0.5rem; flex-shrink: 0;
}
.ud-perm-stat {
  display: inline-flex; gap: 0.3rem; align-items: baseline;
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.72rem; color: var(--muted, #5a6b85);
  background: #f3f4f6; font-weight: 500;
}
.ud-perm-stat strong { color: var(--ink, #1a2b4a); font-weight: 700; }
.ud-perm-stat-override { background: #fef3c7; color: #92400e; }
.ud-perm-stat-override strong { color: #78350f; }

/* Search bar */
.ud-perm-search-wrap {
  position: relative; margin-bottom: 0.7rem;
}
.ud-perm-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted, #5a6b85); font-size: 0.9rem; pointer-events: none;
}
.ud-perm-search {
  width: 100%; padding: 0.6rem 2.4rem 0.6rem 2.2rem;
  border: 1px solid var(--border, #d2d8e1); border-radius: 8px;
  font-size: 0.88rem; background: #fafbfc;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.ud-perm-search:focus {
  outline: none; border-color: var(--accent, #1a88f5); background: #fff;
  box-shadow: 0 0 0 3px rgba(26,136,245,0.12);
}
.ud-perm-search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted, #5a6b85);
  cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.ud-perm-search-clear:hover { background: #f3f4f6; color: var(--ink); }

/* Collapsible permission groups */
.ud-perm-groups { border: 1px solid var(--line-2, #e3e8ef); border-radius: 10px; overflow: hidden; }
.ud-perm-group {
  border-bottom: 1px solid var(--line-2, #e3e8ef);
  margin: 0;
}
.ud-perm-group:last-child { border-bottom: 0; }
.ud-perm-group-summary {
  list-style: none;
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 0.95rem;
  cursor: pointer; user-select: none;
  background: #fafbfc; font-weight: 600;
  transition: background .1s;
}
.ud-perm-group-summary::-webkit-details-marker { display: none; }
.ud-perm-group-summary:hover { background: #f3f4f6; }
.ud-perm-group[open] > .ud-perm-group-summary { background: #fff; border-bottom: 1px solid var(--line-2, #e3e8ef); }
.ud-perm-group-label {
  font-size: 0.82rem; color: var(--ink, #1a2b4a); font-weight: 600;
  letter-spacing: 0;
  flex: 1; text-transform: none; border: 0; padding: 0; margin: 0;
}
.ud-perm-group-count {
  display: inline-flex; padding: 2px 8px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 600;
  background: #e2e8f0; color: var(--muted, #5a6b85);
}
.ud-perm-group-chevron {
  color: var(--muted, #5a6b85); font-size: 0.85rem;
  transition: transform .15s;
}
.ud-perm-group[open] > .ud-perm-group-summary .ud-perm-group-chevron {
  transform: rotate(180deg);
}
.ud-perm-group-body {
  padding: 0.35rem 0.95rem 0.7rem;
  background: #fff;
}

/* Permission row — flipped to inline checkbox + label + key + badges */
.ud-perm-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.55rem 0.4rem;
  margin: 0;
  border-radius: 6px;
  font-size: 0.86rem;
  cursor: pointer; transition: background .1s;
}
.ud-perm-row:hover { background: #f8fafc; }
.ud-perm-row-disabled { cursor: not-allowed; opacity: 0.55; }
.ud-perm-row-disabled:hover { background: transparent; }
.ud-perm-row input[type=checkbox] { margin-top: 2px; accent-color: var(--accent, #1a88f5); width: 16px; height: 16px; }
.ud-perm-label { line-height: 1.4; min-width: 0; }
.ud-perm-label-text {
  display: block; color: var(--ink, #1a2b4a); font-weight: 500;
}
.ud-perm-key {
  display: inline-block; font-family: 'SF Mono','Monaco','Consolas',monospace;
  font-size: 0.68rem; color: var(--muted, #5a6b85);
  background: #f1f5f9; padding: 1px 6px; border-radius: 3px;
  margin-top: 2px;
}
.ud-perm-override {
  display: inline-block; color: #b45309; background: #fef3c7;
  font-size: 0.68rem; font-weight: 600; padding: 1px 6px; border-radius: 3px;
  margin-left: 6px;
}
.ud-perm-locked {
  display: inline-block; color: #6b7280; background: #f3f4f6;
  font-size: 0.68rem; font-weight: 500; padding: 1px 6px; border-radius: 3px;
  margin-left: 6px;
}

.ud-perm-empty {
  padding: 1.5rem; text-align: center;
  color: var(--muted, #5a6b85); font-size: 0.88rem;
  border: 1px dashed var(--line-2, #e3e8ef); border-radius: 8px;
  margin-top: 0.5rem;
}

.ud-perm-footer {
  margin-top: 0.85rem; display: flex; justify-content: flex-end;
}
.ud-perm-reset { font-size: 0.82rem; }

.ud-pw-section { border-top: 1px solid var(--line-2, #e3e8ef); margin-top: 0.85rem; padding-top: 0.85rem; }

/* Profile photo + details section (admin user dialog, migration 035) */
.ud-photo-row {
  display: flex; gap: 1rem; align-items: center;
  margin-bottom: 1rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-2, #e3e8ef);
}
.ud-photo-preview {
  width: 72px; height: 72px; border-radius: 50%;
  background: #f1f5f9; border: 1px solid var(--line-2, #e3e8ef);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer; flex-shrink: 0;
}
.ud-photo-preview:hover { border-color: var(--accent, #1a88f5); }
.ud-photo-img { width: 100%; height: 100%; object-fit: cover; }
.ud-photo-placeholder { font-size: 1.8rem; color: var(--muted, #5a6b85); }
.ud-photo-actions { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.ud-photo-actions .htos-btn { align-self: flex-start; }

.ud-profile-section {
  margin-top: 1rem; padding-top: 0.85rem;
  border-top: 1px solid var(--line-2, #e3e8ef);
}
.ud-section-title {
  font-size: 0.88rem; color: var(--ink, #1a2b4a);
  margin: 0 0 0.75rem 0; font-weight: 700;
}
.ud-profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 0.9rem;
}
.ud-profile-grid .ud-field { margin-bottom: 0; }
.ud-field-wide { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .ud-profile-grid { grid-template-columns: 1fr; }
}
.ud-pw-manual-label {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.86rem; color: var(--ink, #1a2b4a); margin-bottom: 0.5rem; cursor: pointer;
}
.ud-pw-wrap input {
  width: 100%; padding: 0.55rem 0.7rem;
  border: 1px solid var(--border, #d2d8e1); border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}
.ud-footer { justify-content: flex-end; gap: 0.5rem; }

/* User dialog tab bar */
.ud-tab-bar {
  display: flex; border-bottom: 1px solid var(--line-2, #e3e8ef);
  padding: 0 1.5rem; background: var(--panel, #fff); flex-shrink: 0;
}
.ud-tab {
  padding: 0.65rem 1rem; font: inherit; font-size: 0.875rem; font-weight: 600;
  color: var(--muted, #5a6b85); background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px; cursor: pointer; white-space: nowrap;
}
.ud-tab:hover { color: var(--ink, #1a2b4a); }
.ud-tab.active { color: var(--accent, #1a88f5); border-bottom-color: var(--accent, #1a88f5); }

/* Dept pill picker inside user dialog */
.ud-dept-pills {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.5rem; border: 1px solid var(--border, #d2d8e1); border-radius: 6px;
  min-height: 2.5rem;
}
.ud-dept-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 5px 10px; border: 1px solid var(--line-2, #e3e8ef); border-radius: 20px;
  cursor: pointer; font-size: 0.85rem; background: var(--panel, #fff); user-select: none;
}
.ud-dept-pill input[type=checkbox] { margin: 0; }
.ud-dept-pill input[type=radio]    { margin: 0; }
.ud-dept-pill-star { font-size: 0.7rem; color: var(--muted, #6b7280); }

/* More nav dropdown */
.htos-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--card, #fff); border: 1px solid var(--line-2, #e3e8ef);
  border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  min-width: 200px; padding: 6px 0; z-index: 300;
  display: none;
}
.htos-more-menu.open { display: block; }
.htos-more-menu a {
  display: block; padding: 8px 14px; font-size: 0.88rem;
  color: var(--ink, #1a2b4a); text-decoration: none;
}
.htos-more-menu a:hover { background: #f3f4f6; }
