.employees-layout {
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  align-content: start;
  overflow: auto;
}

.reports-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 100%;
}

.section-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 200px;
  border: 1px solid #8fa4bf;
  border-radius: var(--radius-tight);
  background: linear-gradient(var(--theme-panel, #fdfefe), #eef3fa);
  overflow: hidden;
}

.section-panel-wide {
  grid-column: 1 / -1;
}

.panel-caption {
  padding: 6px 8px;
  border-bottom: 1px solid #9cb2cb;
  background: linear-gradient(#eef4fd, #dbe6f5);
  font-weight: 700;
  color: #456385;
}

.panel-body {
  min-height: 0;
  overflow: auto;
  background: rgba(255, 255, 255, 0.72);
}

.empty-state {
  padding: 12px;
  color: #5d748d;
}

.client-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  background: var(--theme-panel, #ffffff);
}

.products-layout {
  min-height: 0;
  height: 100%;
  grid-template-columns: var(--product-split-width, 460px) var(--product-split-resizer-width, 10px) minmax(320px, 1.4fr) !important;
  grid-template-rows: minmax(0, 1fr);
}

body[data-view="products"] #products-layout,
body[data-view="products"] .products-layout {
  grid-template-columns: var(--product-split-width, 460px) var(--product-split-resizer-width, 10px) minmax(320px, 1.4fr) !important;
  grid-template-rows: minmax(0, 1fr);
}

body[data-view="products"] #products-layout.is-detail-hidden,
body[data-view="products"] .products-layout.is-detail-hidden {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
}

body[data-view="products"] .products-layout.is-detail-hidden #product-split-resizer {
  display: none !important;
}

body[data-view="products"] #products-layout.is-detail-minimized,
body[data-view="products"] .products-layout.is-detail-minimized {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 40px !important;
}

body[data-view="products"] .products-layout.is-detail-minimized #product-split-resizer {
  display: none !important;
}

.product-split-resizer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  cursor: col-resize;
  background: transparent;
  user-select: none;
  touch-action: none;
  z-index: 5;
}

.product-split-resizer::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 9999px;
  background: var(--mobile-grid-line, #d7d9de);
  transition: background 0.15s ease, width 0.15s ease;
}

.product-split-resizer:hover::before,
.product-split-resizer:focus-visible::before,
body.is-resizing-product-split .product-split-resizer::before {
  background: var(--mobile-coral, #ec665c);
  width: 6px;
}

.product-split-resizer:focus-visible {
  outline: 2px solid var(--mobile-coral, #ec665c);
  outline-offset: 1px;
}

body.is-resizing-product-split {
  cursor: col-resize !important;
  user-select: none !important;
}

body.is-resizing-product-split * {
  user-select: none !important;
  pointer-events: none !important;
}

body.is-resizing-product-split #product-split-resizer {
  pointer-events: auto !important;
}

.product-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

.product-status-pill.is-active {
  background: #e6f9ed;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.product-status-pill.is-inactive {
  background: #f3f4f6;
  color: var(--theme-quiet, #6b7280);
  border: 1px solid #e5e7eb;
}

body[data-view="products"] .product-detail-panel.is-minimized {
  min-height: 40px !important;
  max-height: 40px !important;
  height: 40px !important;
  grid-template-rows: 40px !important;
  overflow: hidden !important;
}

body[data-view="products"] .product-detail-panel.is-minimized .panel-body {
  display: none !important;
}

.product-list {
  min-height: 0;
  overflow: auto;
  background: var(--theme-panel, #ffffff);
}

.product-grid-table {
  min-width: 850px;
}

.product-grid-table [hidden] { display: none !important; }

.product-sort-button {
  min-height: 36px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.product-editor-dialog {
  width: min(560px, calc(100vw - 40px));
  max-width: none;
  max-height: min(90vh, 760px);
  padding: 22px;
  border: 1px solid var(--theme-border, #9bc7df);
  border-radius: 16px;
  color: var(--theme-text, #21133d);
  background: var(--theme-panel, #fff);
  box-shadow: 0 22px 70px color-mix(in srgb, var(--theme-text, #21133d) 30%, transparent);
}

.product-editor-dialog::backdrop { background: rgba(33, 19, 61, 0.42); backdrop-filter: blur(2px); }
.product-editor-dialog form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product-editor-dialog h2 { grid-column: 1 / -1; margin: 0 0 4px; color: var(--theme-text, #21133d); font-size: 20px; }
.product-editor-dialog label { display: grid; align-content: start; gap: 6px; min-width: 0; color: #334b69; font-size: 13px; font-weight: 700; }
.product-editor-dialog label input:not([type="checkbox"]) { width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid var(--theme-border, #b9c8d9); border-radius: 9px; color: var(--theme-text, #21133d); font: inherit; }
.product-editor-dialog label small { color: #667991; font-size: 11px; font-weight: 400; line-height: 1.4; }
.product-editor-dialog .product-editor-active { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.product-editor-dialog .product-editor-active input { width: 18px; height: 18px; accent-color: var(--theme-accent, #ec665c); }
.product-editor-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; padding-top: 8px; }
.product-editor-actions button { min-height: 42px; padding: 0 16px; border: 1px solid var(--theme-border, #9bc7df); border-radius: 9px; background: #eaf5fb; color: var(--theme-text, #21133d); font-weight: 700; cursor: pointer; }
.product-editor-actions button[type="submit"] { border-color: var(--theme-accent, #ec665c); background: var(--theme-accent, #ec665c); color: white; }
#product-settings-dialog { width: min(560px, calc(100vw - 40px)); }
#product-settings-dialog form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#product-settings-dialog h2, #product-settings-dialog .product-settings-description, #product-settings-dialog .product-editor-actions { grid-column: 1 / -1; }
#product-settings-dialog .product-settings-description { margin: -8px 0 2px; color: #5f748f; font-size: 13px; line-height: 1.4; }
#product-settings-dialog label { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px; border: 1px solid var(--theme-border, #d7d9de); border-radius: 10px; background: var(--theme-panel, #f4f3f8); cursor: pointer; }
#product-settings-dialog label:focus-within { border-color: var(--theme-border, #9bc7df); box-shadow: 0 0 0 2px #c3e1f288; }
#product-settings-dialog label input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--theme-accent, #ec665c); }

.product-filter-details { position: relative; }
.product-filter-details > summary { min-height: 40px; display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--theme-border, #9bc7df); border-radius: 9px; background: var(--theme-panel, #fff); color: var(--theme-text, #21133d); cursor: pointer; }
.product-filter-popover { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: none; width: min(320px, 82vw); gap: 10px; padding: 13px; border: 1px solid var(--theme-border, #9bc7df); border-radius: 12px; background: var(--theme-panel, #fff); box-shadow: 0 12px 30px color-mix(in srgb, var(--theme-text, #21133d) 18%, transparent); }
.product-filter-details[open] .product-filter-popover { display: grid; animation: product-filter-open .18s ease-out; }
.product-filter-popover label { display: grid; gap: 5px; color: var(--theme-text, #21133d); font-size: 12px; font-weight: 700; }
.product-filter-popover select { min-height: 40px; padding: 6px 9px; border: 1px solid var(--theme-border, #d7d9de); border-radius: 8px; color: var(--theme-text, #21133d); background: var(--theme-panel, #fff); }
.product-filter-popover .product-inactive-filter { display: flex; align-items: center; min-height: 40px; }
.product-inactive-filter input { width: 18px; height: 18px; accent-color: var(--theme-accent, #ec665c); }

.product-grid-row {
  cursor: pointer;
}

.product-grid-row:focus-visible {
  outline: 2px solid #2864a6;
  outline-offset: -2px;
}

.product-summary-grid {
  margin-bottom: 12px;
}

.product-detail-hero {
  margin-bottom: 12px;
}

.product-detail-shell {
  padding-bottom: 12px;
}

/* Luxury Mobile Products View */
.mobile-products-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px calc(72px + env(safe-area-inset-bottom, 0px));
  height: 100%;
  min-height: 0;
  background: var(--mobile-page-bg, #f4f3f8);
  box-sizing: border-box;
}

.mobile-products-header {
  display: grid;
  gap: 10px;
  padding: 4px 2px 8px;
}

.mobile-products-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-products-back-btn {
  color: var(--mobile-coral, #ec665c);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 6px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.mobile-products-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-products-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--mobile-purple, #21133d);
  letter-spacing: -0.02em;
}

.mobile-products-count-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--mobile-card-blue, #c3e1f2);
  border: 1px solid var(--mobile-card-border, #9bc7df);
  color: var(--mobile-purple, #21133d);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.mobile-products-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.mobile-products-search-icon {
  position: absolute;
  left: 14px;
  color: var(--mobile-text-muted, #64748b);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.mobile-products-search-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  border-radius: 12px;
  background: var(--mobile-card-surface, #ffffff);
  color: var(--mobile-purple, #21133d);
  font: inherit;
  font-size: 14px;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--theme-text, #21133d) 4%, transparent);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mobile-products-search-input:focus {
  outline: none;
  border-color: var(--mobile-coral, #ec665c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, #ec665c) 16%, transparent);
}

.mobile-products-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-products-chips::-webkit-scrollbar {
  display: none;
}

.mobile-product-chip {
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  background: var(--mobile-card-surface, #ffffff);
  color: var(--mobile-purple, #21133d);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.mobile-product-chip.is-active {
  background: var(--mobile-coral, #ec665c);
  border-color: var(--mobile-coral, #ec665c);
  color: var(--mobile-on-accent, #100d1f);
  font-weight: 750;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--theme-accent, #ec665c) 25%, transparent);
}

.mobile-products-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-product-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  border-radius: 14px;
  background: var(--mobile-card-surface, #ffffff);
  color: var(--mobile-purple, #21133d);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-text, #21133d) 4%, transparent);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.mobile-product-card:active {
  transform: scale(0.985);
  background: var(--mobile-surface-soft, #f8fafc);
  border-color: var(--mobile-card-border, #9bc7df);
}

.mobile-product-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--mobile-surface-soft, #eef4fb);
  border: 1px solid var(--mobile-card-border, #9bc7df);
  color: var(--mobile-purple, #21133d);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.mobile-product-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.mobile-product-name {
  font-size: 14.5px;
  font-weight: 750;
  color: var(--mobile-purple, #21133d);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-product-meta {
  font-size: 12px;
  color: var(--mobile-text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-product-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.mobile-product-tag-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.mobile-product-tag-pill.is-sku {
  background: var(--mobile-page-bg, #f4f3f8);
  color: var(--mobile-purple, #21133d);
  font-family: monospace;
}

.mobile-product-tag-pill.is-tax {
  background: var(--mobile-surface-soft, #eaf5fa);
  color: var(--mobile-accent-text, #2b618a);
}

.mobile-product-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-product-price-pill {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--mobile-card-blue, #c3e1f2);
  border: 1px solid var(--mobile-card-border, #9bc7df);
  color: var(--mobile-purple, #21133d);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mobile-product-chevron {
  font-size: 18px;
  font-weight: 600;
  color: var(--mobile-text-muted, #a49fb2);
}

/* Luxury Mobile Product Detail Sheet */
.mobile-product-detail-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}

.mobile-product-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 6px;
}

.mobile-product-back-btn {
  color: var(--mobile-coral, #ec665c);
  font-size: 1rem;
  font-weight: 700;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 0;
}

.mobile-product-detail-eyebrow {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #716982;
}

.mobile-product-detail-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  border-radius: 16px;
  background: var(--mobile-card-surface, #ffffff);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--theme-text, #21133d) 4%, transparent);
}

.mobile-product-detail-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--mobile-brand-surface, #21133d);
  color: var(--mobile-brand-text, #ffffff);
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-text, #21133d) 20%, transparent);
  flex-shrink: 0;
}

.mobile-product-detail-hero-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mobile-product-detail-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--mobile-purple, #21133d);
  line-height: 1.25;
}

.mobile-product-detail-brand {
  margin: 0;
  font-size: 13px;
  color: var(--mobile-text-muted, #64748b);
}

.mobile-product-price-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--mobile-card-border, #9bc7df);
  border-radius: 14px;
  background: var(--mobile-accent-soft, #eef6fc);
}

.mobile-product-price-label {
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mobile-purple, #21133d);
}

.mobile-product-price-value {
  font-size: 22px;
  font-weight: 850;
  color: var(--mobile-purple, #21133d);
}

.mobile-product-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-product-stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  border-radius: 12px;
  background: var(--mobile-card-surface, #ffffff);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--theme-text, #21133d) 3%, transparent);
}

.mobile-product-stat-label {
  font-size: 10.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mobile-text-muted, #6d667c);
}

.mobile-product-stat-val {
  font-size: 14.5px;
  font-weight: 750;
  color: var(--mobile-purple, #21133d);
  overflow-wrap: break-word;
  word-break: break-word;
}

.mobile-product-stat-note {
  font-size: 10px;
  font-weight: 650;
  color: var(--mobile-coral, #ec665c);
  margin-top: 2px;
}

.mobile-product-info-card {
  padding: 14px 16px;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  border-radius: 14px;
  background: var(--mobile-card-surface, #ffffff);
}

.mobile-product-info-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 750;
  color: var(--mobile-purple, #21133d);
}

.mobile-product-info-card p {
  margin: 0;
  font-size: 13px;
  color: var(--mobile-text-muted, #514b5d);
  line-height: 1.45;
}

.mobile-product-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.mobile-product-action-btn {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  background: var(--mobile-card-surface, #ffffff);
  color: var(--mobile-purple, #21133d);
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.mobile-product-action-btn:active {
  background: var(--mobile-page-bg, #f4f3f8);
}

.mobile-product-action-btn.is-primary {
  background: var(--mobile-coral, #ec665c);
  border-color: var(--mobile-coral, #ec665c);
  color: var(--mobile-on-accent, #100d1f);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-accent, #ec665c) 25%, transparent);
}

.mobile-product-action-btn.is-primary:active {
  background: #d8574d;
}

body[data-view="products"] .section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #8fa4bf;
  border-radius: var(--radius-tight);
  background: linear-gradient(var(--theme-panel, #f8fbff), #dfe9f7);
}

body[data-view="products"] .search-field {
  flex: 1 1 340px;
  max-width: 620px;
}

body[data-view="products"] .search-field input {
  width: 100%;
}

/* Products uses the Mobile Theme across desktop and mobile surfaces. */
body[data-view="products"] #products-view {
  background: var(--mobile-page-bg, #f4f3f8);
}

body[data-view="products"] .section-shell {
  gap: 10px;
  padding: 10px;
  background: var(--mobile-page-bg, #f4f3f8);
}

body[data-view="products"] .section-toolbar {
  min-height: 60px;
  padding: 10px 14px;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  border-radius: 14px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-text, #21133d) 5%, transparent);
}

.product-search-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 420px;
  max-width: 620px;
}

body[data-view="products"] .product-search-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 420px;
  max-width: 620px;
}

body[data-view="products"] .product-search-group .search-field {
  flex: 1 1 auto;
  max-width: none;
  min-width: 220px;
}

body[data-view="products"] .search-field input {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--mobile-card-border, #9bc7df);
  border-radius: 10px;
  color: var(--mobile-purple, #21133d);
  background: var(--theme-panel, #ffffff);
  font-size: 14px;
}

body[data-view="products"] .search-field input:focus {
  outline: none;
  border-color: var(--mobile-coral, #ec665c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, #ec665c) 16%, transparent);
}

body[data-view="products"] .products-layout {
  gap: 12px;
  padding: 2px 0 0;
}

body[data-view="products"] .section-panel {
  min-height: 0;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  border-radius: 14px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--theme-text, #21133d) 6%, transparent);
}

body[data-view="products"] .panel-caption {
  min-height: 44px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--mobile-grid-line, #d7d9de);
  background: var(--mobile-card-blue, #c3e1f2);
  color: var(--mobile-purple, #21133d);
  font-size: 13px;
}

body[data-view="products"] .client-count-badge {
  padding: 4px 10px;
  border: 1px solid var(--mobile-card-border, #9bc7df);
  border-radius: 999px;
  background: var(--theme-panel, #ffffff);
  color: var(--mobile-purple, #21133d);
  font-size: 12px;
}

body[data-view="products"] .product-list,
body[data-view="products"] .product-detail {
  background: var(--theme-panel, #ffffff);
}

body[data-view="products"] .product-grid-table {
  font-size: 13px;
}

body[data-view="products"] .product-grid-table .client-th {
  padding: 12px 14px;
  border-bottom: 2px solid var(--mobile-card-border, #9bc7df);
  background: var(--theme-panel, #f4f3f8);
  color: var(--mobile-purple, #21133d);
}

body[data-view="products"] .product-grid-table .client-td {
  min-height: 48px;
  padding: 12px 14px;
  border-color: var(--mobile-grid-line, #d7d9de);
  color: var(--mobile-purple, #21133d);
  font-size: 13px;
}

body[data-view="products"] .product-grid-row:nth-child(even) td {
  background: #f8f7fb;
}

body[data-view="products"] .product-grid-row:hover td,
body[data-view="products"] .product-grid-row:focus-visible td {
  background: #e7f3f9;
}

body[data-view="products"] .product-grid-row.is-active td {
  background: #fff4f2 !important;
  color: var(--mobile-purple, #21133d);
}

body[data-view="products"] .product-grid-row.is-active .product-td-0 {
  border-left: 4px solid var(--mobile-coral, #ec665c);
}

body[data-view="products"] .product-grid-row strong {
  color: var(--mobile-purple, #21133d);
}

body[data-view="products"] .product-detail-shell {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--mobile-page-bg, #f4f3f8);
}

body[data-view="products"] .product-detail-hero {
  margin: 0;
  padding: 4px 2px 12px;
  border-bottom: 1px solid var(--mobile-grid-line, #d7d9de);
}

body[data-view="products"] .client-detail-hero-name,
body[data-view="products"] .client-detail-hero-sub {
  color: var(--mobile-purple, #21133d);
}

body[data-view="products"] .product-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
}

body[data-view="products"] .product-summary-grid .metric-card {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  border-radius: 12px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-text, #21133d) 4%, transparent);
}

body[data-view="products"] .product-summary-grid .metric-card strong,
body[data-view="products"] .product-summary-grid .metric-value {
  color: var(--mobile-purple, #21133d);
}

body[data-view="products"] .client-section {
  border: 1px solid var(--mobile-grid-line, #d7d9de);
  border-radius: 12px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-text, #21133d) 4%, transparent);
}

body[data-view="products"] .client-section h4 {
  color: var(--mobile-purple, #21133d);
}

@media (max-width: 1040px) {
  body[data-view="products"] .products-layout:not(.is-detail-hidden):not(.is-detail-minimized) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(280px, 1fr) minmax(260px, 1.1fr);
    overflow-y: auto;
  }

  .products-layout:not(.is-detail-hidden):not(.is-detail-minimized) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(280px, 1fr) minmax(260px, 1.1fr);
    overflow-y: auto;
  }
}

.client-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #d3deec;
  border-left: 3px solid transparent;
  background: var(--theme-panel, #ffffff);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.client-row:nth-child(even) {
  background: #f7faff;
}

.client-row:hover,
.client-row:focus-visible {
  background: var(--theme-panel, #eaf2fc);
}

.client-row.is-active {
  background: #deecfc !important;
  border-left-color: #2864a6;
}

.client-row-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.client-row-name {
  font-size: 13px;
  font-weight: 700;
  color: #193452;
}

.client-id-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e1ebf6;
  color: #35587f;
  font-family: monospace;
}

.client-row-contact {
  font-size: 11px;
  color: #4b6480;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-row-address {
  font-size: 11px;
  color: #5c7490;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
}

.client-row-stylist {
  font-weight: 600;
  color: #23588f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-row-meta {
  color: #69829f;
  font-size: 10px;
  flex-shrink: 0;
}

.client-row-match {
  color: #496b91;
  font-weight: 700;
  font-size: 11px;
}

.employee-list {
  display: grid;
  align-content: start;
}

.employee-row {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #d3deec;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.employee-row:hover,
.employee-row:focus-visible {
  background: rgba(80, 118, 162, 0.08);
}

.employee-row.is-active {
  background: rgba(78, 117, 161, 0.15);
}

.employee-row strong {
  font-size: 12px;
}

.employee-row span {
  color: #5b728c;
}

.employee-row-match {
  color: #496b91;
  font-weight: 700;
}

/* Client Merge Selection */
.client-row.is-merge-selectable {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
}

.client-merge-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid #9bb0c7;
  border-radius: 4px;
  background: var(--theme-panel, #ffffff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s, border-color 0.15s;
}

.client-row.is-merge-selected {
  background: var(--theme-panel, #edf4fc) !important;
  border-left: 3px solid #3b6da4;
}

.client-row.is-merge-selected .client-merge-checkbox {
  background: #3b6da4;
  border-color: #3b6da4;
}

.client-row.is-merge-selected .client-merge-checkbox::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}

.client-detail-shell,
.employee-detail-shell {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.client-detail-shell {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.detail-header h3 {
  font-size: 16px;
}

.detail-header p {
  margin-top: 3px;
  color: #5e748d;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.client-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.employee-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-view="employees"] .section-shell {
  min-height: 0;
  gap: 10px;
  padding: 10px;
  background: var(--mobile-page-bg, #f4f3f8);
}

body[data-view="employees"] .section-toolbar {
  min-height: 54px;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--theme-border, #cad9e6);
  border-radius: 14px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-text, #21133d) 5%, transparent);
}

body[data-view="employees"] .toolbar-field {
  gap: 8px;
}

body[data-view="employees"] .toolbar-field span {
  color: var(--mobile-purple, #21133d);
  font-size: 12px;
  font-weight: 700;
}

body[data-view="employees"] .search-field input {
  min-height: 36px;
  padding: 0 14px;
  border: 1.5px solid var(--theme-border, #b8cde2);
  border-radius: 9999px;
  background: var(--theme-panel, #f8fafd);
  color: var(--theme-text, #21133d);
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body[data-view="employees"] .search-field input:focus {
  border-color: var(--mobile-coral, #ec665c);
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, #ec665c) 15%, transparent);
  outline: none;
}

body[data-view="employees"] .toolbar-button,
body[data-view="employees"] .drawer-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--theme-border, #b8cde2);
  border-radius: 9999px;
  background: var(--theme-panel, #ffffff);
  color: var(--theme-text, #21133d);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--theme-text, #21133d) 5%, transparent);
}

body[data-view="employees"] .toolbar-button:hover:not(:disabled),
body[data-view="employees"] .drawer-button:hover:not(:disabled) {
  border-color: var(--theme-accent, #221d3b);
  background: var(--theme-panel, #f0f6fc);
}

body[data-view="employees"] #employee-new {
  border-color: #b6711a;
  background: linear-gradient(180deg, var(--theme-accent, #e59a38) 0%, var(--theme-accent, #d98c2b) 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--theme-accent, #ec665c) 25%, transparent);
}

body[data-view="employees"] #employee-new:hover {
  border-color: #9e5f12;
  background: linear-gradient(180deg, #dc8e2b 0%, #c47a1e 100%);
  color: #ffffff;
}

body[data-view="employees"] #plan-fab {
  display: none;
}

body[data-view="employees"] .employee-form .form-actions {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Clients Tab — Modern Spacious Theme & Mobile Palette Integration
   ========================================================================== */

.clients-layout {
  display: grid;
  grid-template-columns: minmax(280px, var(--client-split-width, 1fr)) 10px minmax(320px, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  box-sizing: border-box;
}

.client-split-resizer {
  width: 10px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  border-radius: 8px;
  background: linear-gradient(90deg, transparent, #b7c8db, transparent);
  transition: background 0.15s ease;
}
.client-split-resizer:hover {
  background: linear-gradient(90deg, transparent, #2876d2, transparent);
}
.client-split-resizer:focus-visible { outline: 2px solid #2876d2; }
.client-page-size-control { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.client-page-size-control select { min-height:30px; border-radius:8px; }

.clients-layout.is-detail-hidden {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
}
.clients-layout.is-detail-hidden #client-split-resizer { display:none; }

.clients-layout.is-detail-hidden #client-detail-panel {
  display: none !important;
}

.clients-layout.is-detail-minimized {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 40px !important;
}
.clients-layout.is-detail-minimized #client-split-resizer { display:none; }

@media (max-width: 1100px) {
  .clients-layout:not(.is-detail-hidden):not(.is-detail-minimized) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(200px, var(--client-split-height, 1fr)) 10px minmax(240px, 1.2fr);
    overflow: hidden;
  }
  .client-split-resizer {
    width: 100%;
    height: 10px;
    cursor: row-resize;
    background: linear-gradient(180deg, transparent, #b7c8db, transparent);
  }
  .client-split-resizer:hover {
    background: linear-gradient(180deg, transparent, #2876d2, transparent);
  }
}

body[data-view="clients"] .section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: linear-gradient(var(--theme-panel, #ffffff), #f7fafe);
  border-bottom: 1px solid #d8e2ef;
}

body[data-view="clients"] .search-field {
  flex: 1;
  max-width: 440px;
}

body[data-view="clients"] .search-field input {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #c7d5e6;
  border-radius: 8px;
  font-size: 13px;
  background: var(--theme-panel, #ffffff);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-view="clients"] .search-field input:focus {
  outline: none;
  border-color: var(--mobile-coral, #ec665c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, #ec665c) 15%, transparent);
}

body[data-view="clients"] .toolbar-button {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mobile-purple, #21133d);
  background: var(--theme-panel, #ffffff);
  border: 1px solid #c7d5e6;
  transition: all 0.15s ease;
}

body[data-view="clients"] .toolbar-button:hover {
  background: #f4f7fb;
  border-color: #abbecf;
}

body[data-view="clients"] [data-action="modal:client"] {
  background: var(--mobile-coral, #ec665c) !important;
  border-color: var(--mobile-coral, #ec665c) !important;
  color: var(--mobile-on-accent, #100d1f) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--theme-accent, #ec665c) 25%, transparent);
}

body[data-view="clients"] [data-action="modal:client"]:hover {
  background: #e2584e !important;
  border-color: #e2584e !important;
}

body[data-view="clients"] .section-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--theme-text, #21133d) 4%, transparent);
  overflow: hidden;
}

body[data-view="clients"] .client-detail-panel.is-minimized {
  min-height: 40px !important;
  max-height: 40px !important;
  height: 40px !important;
  grid-template-rows: 40px !important;
  overflow: hidden !important;
  box-shadow: 0 -2px 10px color-mix(in srgb, var(--theme-text, #21133d) 6%, transparent);
}

body[data-view="clients"] .client-detail-panel.is-minimized .panel-body {
  display: none !important;
}

body[data-view="clients"] .panel-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 14px;
  box-sizing: border-box;
  border-bottom: 1px solid #e5edf7;
  background: linear-gradient(#fbfdfe, #f1f6fc);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--mobile-purple, #21133d);
}

body[data-view="clients"] .client-detail-caption-left,
body[data-view="clients"] .client-directory-caption-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body[data-view="clients"] .client-detail-caption-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--theme-quiet, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-view="clients"] .client-count-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--theme-quiet, #475569);
}

body[data-view="clients"] .client-detail-caption-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

body[data-view="clients"] .panel-caption-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--theme-border, #cbd5e1);
  border-radius: 6px;
  background: var(--theme-panel, #ffffff);
  color: var(--mobile-purple, #21133d);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

body[data-view="clients"] .panel-caption-action-btn:hover {
  background: var(--mobile-coral, #ec665c);
  border-color: var(--mobile-coral, #ec665c);
  color: var(--mobile-on-accent, #100d1f);
}

body[data-view="clients"] .panel-body {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  background: var(--theme-panel, #ffffff);
}

body[data-view="clients"] .client-list {
  background: var(--theme-panel, #ffffff);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

/* Data Grid Table */
body[data-view="clients"] .client-grid-wrapper {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  background: var(--theme-panel, #ffffff);
  position: relative;
}

body[data-view="clients"] .client-grid-table {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  text-align: left;
}

body[data-view="clients"] .client-th {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px 14px;
  background: var(--theme-panel, #f8fafc);
  color: var(--mobile-purple, #21133d);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--theme-border, #e2e8f0);
  border-right: 1px solid var(--theme-border, #edf2f7);
  white-space: nowrap;
  user-select: none;
}

body[data-view="clients"] .client-th-sticky-first,
body[data-view="clients"] .client-td-sticky-first {
  position: sticky;
  left: 0;
  background: var(--theme-panel, #ffffff);
  border-right: 2px solid var(--theme-border, #e2e8f0);
}

body[data-view="clients"] .client-th-sticky-first {
  z-index: 15;
  background: var(--theme-panel, #f8fafc);
}

body[data-view="clients"] .client-td {
  padding: 9px 14px;
  color: var(--theme-text, #1e293b);
  border-bottom: 1px solid var(--theme-border, #edf2f7);
  border-right: 1px solid #f1f5f9;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 12.5px;
}

body[data-view="clients"] .client-grid-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

body[data-view="clients"] .client-grid-row:nth-child(even) td {
  background-color: #fafbfe;
}

body[data-view="clients"] .client-grid-row:hover td {
  background-color: var(--theme-panel, #f1f5f9);
}

body[data-view="clients"] .client-grid-row.is-active td {
  background-color: #fff8f7 !important;
  color: var(--mobile-purple, #21133d);
}

body[data-view="clients"] .client-grid-row.is-active .client-td-sticky-first {
  border-left: 3px solid var(--mobile-coral, #ec665c);
}

body[data-view="clients"] .client-cell-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-view="clients"] .client-cell-name strong {
  color: var(--mobile-purple, #21133d);
  font-size: 13px;
  font-weight: 700;
}

body[data-view="clients"] .client-id-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: #edf2f7;
  color: var(--theme-quiet, #475569);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body[data-view="clients"] .client-grid-row.is-active .client-id-badge {
  background: #ffebe9;
  color: var(--mobile-coral, #ec665c);
}

body[data-view="clients"] .client-grid-match-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 10.5px;
  color: var(--mobile-coral, #ec665c);
  font-weight: 600;
}

body[data-view="clients"] .client-noshow-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--theme-panel, #f1f5f9);
  color: var(--theme-quiet, #64748b);
}

body[data-view="clients"] .client-noshow-badge.has-noshows {
  background: #ffebe9;
  color: var(--mobile-coral, #ec665c);
}

/* Client Columns Settings Modal */
.client-columns-modal-card {
  max-width: 720px;
  width: 92vw;
  border-radius: 14px;
}

.client-directory-preview-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 10px;
  background: var(--theme-panel, #fff);
}

.client-directory-preview-setting span {
  display: grid;
  gap: 3px;
}

.client-directory-preview-setting strong {
  color: var(--mobile-purple, #21133d);
  font-size: 13px;
}

.client-directory-preview-setting small {
  color: var(--theme-quiet, #64748b);
  font-size: 11px;
}

.client-directory-preview-setting select {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--theme-border, #cbd5e1);
  border-radius: 8px;
  background: var(--theme-panel, #fff);
  color: var(--theme-text, #1e293b);
}

@media (max-width: 480px) {
  .client-directory-preview-setting {
    align-items: stretch;
    flex-direction: column;
  }
}

.client-columns-dual-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}

@media (max-width: 680px) {
  .client-columns-dual-container {
    grid-template-columns: 1fr;
  }
}

.columns-box {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 12px;
  background: var(--theme-panel, #ffffff);
  padding: 14px;
  min-height: 340px;
  max-height: 420px;
}

.columns-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.columns-box-header h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 750;
  color: var(--mobile-purple, #21133d);
}

.columns-box-hint {
  margin: 6px 0 10px 0;
  font-size: 11px;
  color: var(--theme-quiet, #64748b);
}

.columns-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.column-option-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 8px;
  background: var(--theme-panel, #f8fafc);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.column-option-pill:hover {
  background: var(--theme-panel, #f1f5f9);
  border-color: var(--theme-border, #cbd5e1);
}

.column-option-pill.is-available:hover {
  background: #fff8f7;
  border-color: var(--mobile-coral, #ec665c);
}

.column-pill-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.column-pill-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mobile-purple, #21133d);
}

.column-pill-hint {
  font-size: 10.5px;
  color: #718096;
}

.column-pill-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--theme-panel, #e2e8f0);
  color: var(--theme-quiet, #334155);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.column-option-pill:hover .column-pill-action {
  background: var(--mobile-coral, #ec665c);
  color: var(--mobile-on-accent, #100d1f);
}

.column-pill-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--theme-panel, #f1f5f9);
  color: var(--theme-quiet, #64748b);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.column-pill-remove:hover {
  background: #ffebe9;
  color: var(--mobile-coral, #ec665c);
}

.column-pill-locked {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #edf2f7;
  color: var(--theme-quiet, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.columns-empty-notice {
  padding: 20px;
  text-align: center;
  color: var(--theme-quiet, #94a3b8);
  font-size: 12px;
}

.client-columns-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--theme-border, #edf2f7);
  margin-top: 14px;
}

body[data-view="clients"] .client-detail {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  background: var(--theme-panel, #ffffff);
}

body[data-view="clients"] .client-detail-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

body[data-view="clients"] .client-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff9f8 0%, var(--theme-panel, #ffffff) 55%, #f9f8fc 100%);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--theme-text, #21133d) 4%, transparent);
}

body[data-view="clients"] .client-detail-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

body[data-view="clients"] .client-detail-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mobile-purple, #21133d) 0%, #4a2b7a 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 750;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--theme-text, #21133d) 20%, transparent);
  flex-shrink: 0;
}

body[data-view="clients"] .client-detail-hero-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body[data-view="clients"] .client-detail-hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-view="clients"] .client-detail-hero-name {
  margin: 0;
  font-size: 19px;
  font-weight: 750;
  color: var(--mobile-purple, #21133d);
  line-height: 1.2;
}

body[data-view="clients"] .client-hero-id-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ece8f5;
  color: var(--mobile-purple, #21133d);
}

body[data-view="clients"] .client-detail-hero-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--theme-quiet, #64748b);
}

body[data-view="clients"] .client-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-view="clients"] .client-action-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mobile-purple, #21133d);
  background: var(--theme-panel, #ffffff);
  border: 1px solid #d0d7e2;
  transition: all 0.15s ease;
}

body[data-view="clients"] .client-action-btn:hover {
  background: #f7f9fc;
  border-color: #b8c4d4;
}

body[data-view="clients"] .client-action-primary {
  background: var(--mobile-coral, #ec665c) !important;
  border-color: var(--mobile-coral, #ec665c) !important;
  color: var(--mobile-on-accent, #100d1f) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-accent, #ec665c) 25%, transparent);
}

body[data-view="clients"] .client-action-primary:hover {
  background: #e2584e !important;
  border-color: #e2584e !important;
}

body[data-view="clients"] .client-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1300px) {
  body[data-view="clients"] .client-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  body[data-view="clients"] .client-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-view="clients"] .metric-card {
  padding: 12px 14px;
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 12px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--theme-text, #21133d) 4%, transparent);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

body[data-view="clients"] .metric-card:hover {
  border-color: var(--theme-border, #cbd5e1);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--theme-text, #21133d) 8%, transparent);
}

body[data-view="clients"] .metric-card strong {
  color: var(--theme-quiet, #64748b);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-view="clients"] .metric-value {
  color: var(--mobile-purple, #21133d);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  white-space: normal;
  word-break: break-word;
}

body[data-view="clients"] .metric-note {
  color: #718096;
  font-size: 11px;
  margin-top: 6px;
  line-height: 1.3;
}

body[data-view="clients"] .client-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body[data-view="clients"] .client-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 12px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--theme-text, #21133d) 3%, transparent);
}

body[data-view="clients"] .client-section-wide {
  grid-column: 1 / -1;
}

body[data-view="clients"] .client-section h4 {
  color: var(--mobile-purple, #21133d);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

body[data-view="clients"] .detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

body[data-view="clients"] .detail-field {
  padding: 8px 12px;
  border: 1px solid var(--theme-border, #edf2f7);
  border-radius: 8px;
  background: var(--theme-panel, #f8fafc);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

body[data-view="clients"] .detail-field:hover {
  background: var(--theme-panel, #f1f5f9);
  border-color: var(--theme-border, #e2e8f0);
}

body[data-view="clients"] .detail-field strong {
  color: var(--theme-quiet, #64748b);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

body[data-view="clients"] .detail-field div {
  color: var(--theme-text, #1e293b);
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: break-word;
  word-break: break-word;
}

body[data-view="clients"] .history-shell {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 12px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--theme-text, #21133d) 3%, transparent);
}

body[data-view="clients"] .history-heading {
  color: var(--mobile-purple, #21133d);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

body[data-view="clients"] .history-table {
  overflow-x: auto;
}

body[data-view="clients"] .history-table .data-table {
  width: 100%;
  border-collapse: collapse;
}

body[data-view="clients"] .history-table .data-table th {
  padding: 9px 12px;
  color: var(--theme-quiet, #64748b);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--theme-border, #e2e8f0);
  background: var(--theme-panel, #f8fafc);
}

body[data-view="clients"] .history-table .data-table td {
  padding: 10px 12px;
  color: var(--theme-text, #1e293b);
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

body[data-view="clients"] .history-table .data-table tr:hover td {
  background: #f8faff;
}

body[data-view="clients"] .table-action {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mobile-purple, #21133d);
  background: var(--theme-panel, #f1f5f9);
  border: 1px solid var(--theme-border, #e2e8f0);
  cursor: pointer;
  transition: all 0.15s ease;
}

body[data-view="clients"] .table-action:hover {
  background: var(--mobile-coral, #ec665c);
  border-color: var(--mobile-coral, #ec665c);
  color: var(--mobile-on-accent, #100d1f);
}


