/* ===================================================
   Staff Control Panel — Skote-style admin theme
   Dark navy sidebar, light grey canvas, white cards with soft shadow,
   indigo primary, solid status badges. Single (light) theme only.
   =================================================== */

:root {
  --primary: #556ee6;
  --primary-hover: #485ec4;
  --primary-soft: rgba(85,110,230,0.18);

  --sidebar-width: 250px;
  --sidebar-bg: #2a3042;
  --sidebar-text: #a6b0cf;
  --sidebar-text-active: #ffffff;
  --sidebar-heading: #6a7187;
  --sidebar-border: rgba(255,255,255,0.05);

  --header-height: 70px;
  --header-bg: #ffffff;

  --page-bg: #f8f8fb;
  --card-bg: #ffffff;
  --card-bg-strong: #ffffff;
  --card-border: #eff2f7;
  --card-border-strong: #e2e6ee;
  --card-radius: 4px;
  --card-shadow: 0 0.75rem 1.5rem rgba(18,38,63,0.03);
  --card-hover-shadow: 0 0.75rem 1.5rem rgba(18,38,63,0.08);

  --field-bg: #ffffff;
  --field-border: #ced4da;
  --search-bg: #f3f3f9;
  --modal-bg: #ffffff;
  --scrollbar-thumb: #3b4258;

  --text-primary: #495057;
  --text-heading: #343a40;
  --text-secondary: #74788d;
  --text-muted: #a6b0cf;

  --green:  #34c38f;
  --yellow: #f1b44c;
  --red:    #f46a6a;
  --blue:   #50a5f1;
  --purple: #6f42c1;
  --orange: #f1734f;

  /* legacy names still referenced inline by some templates */
  --accent: var(--primary);
  --accent-hover: var(--primary-hover);
  --accent-dim: var(--primary-soft);
  --sidebar-hover-bg: #f8f9fa;
  --badge-radius: 0.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.dash-body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  background: var(--page-bg);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: var(--primary); }
.customer-link { color: var(--primary); text-decoration: none; border-bottom: 1px dashed rgba(85,110,230,0.5); }
.customer-link:hover { color: var(--primary-hover); border-bottom-style: solid; text-decoration: none; }

/* ========================
   SIDEBAR
======================== */
.dash-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  transition: transform 0.25s ease;
  box-shadow: 0 0.75rem 1.5rem rgba(18,38,63,0.03);
}
.dash-sidebar::-webkit-scrollbar { width: 4px; }
.dash-sidebar::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }

.dash-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--header-height);
  padding: 0 20px;
  text-decoration: none;
  flex-shrink: 0;
}
.dash-brand:hover { text-decoration: none; }
.dash-brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}
.dash-brand-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.dash-brand-text span {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--sidebar-text);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.dash-nav { flex: 1; padding: 10px 0 20px; }

.dash-nav-section {
  padding: 18px 24px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sidebar-heading);
}

.dash-nav-item {
  display: flex;
  align-items: center;
  padding-right: 14px;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  flex: 1;
  min-width: 0;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 400;
  transition: color 0.15s;
}
.dash-nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--sidebar-text);
  transition: color 0.15s;
}
.dash-nav-link:hover,
.dash-nav-link:hover svg { color: var(--sidebar-text-active); text-decoration: none; }
.dash-nav-link.active,
.dash-nav-link.active svg { color: var(--sidebar-text-active); }

.dash-nav-add {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-text);
  flex-shrink: 0;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.dash-nav-add:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.dash-nav-add svg { width: 13px; height: 13px; }

.dash-nav-quickadd { position: relative; flex-shrink: 0; }
.dash-nav-quickadd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 60;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1rem 3rem rgba(0,0,0,0.175);
  padding: 8px 0;
  min-width: 170px;
}
.dash-nav-quickadd-menu.open { display: block; }
.dash-nav-quickadd-menu a {
  display: block;
  padding: 7px 20px;
  font-size: 0.8125rem;
  color: #212529;
  text-decoration: none;
  white-space: nowrap;
}
.dash-nav-quickadd-menu a:hover { background: #f8f9fa; color: #16181b; text-decoration: none; }

.dash-sidebar-appts {
  padding: 14px 0 18px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.dash-sidebar-appts-head {
  padding: 4px 24px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sidebar-heading);
}
.dash-sidebar-appt-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 24px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.15s;
}
.dash-sidebar-appt-link:hover { color: #fff; text-decoration: none; }
.dash-sidebar-appt-link svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ========================
   MAIN + HEADER
======================== */
.dash-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
}
body.sidebar-hidden .dash-sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); }
body.sidebar-hidden .dash-main { margin-left: 0; }

.dash-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-height);
  background: var(--header-bg);
  box-shadow: 0 0.75rem 1.5rem rgba(18,38,63,0.03);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px 0 12px;
  flex-shrink: 0;
}
.dash-header-toggle {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  color: #555b6d;
  padding: 8px 10px;
  line-height: 0;
  flex-shrink: 0;
}
.dash-header-toggle svg { width: 20px; height: 20px; }

.dash-search-form { flex: 1; min-width: 0; max-width: 300px; }
.dash-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--search-bg);
  border-radius: 30px;
  height: 38px;
}
.dash-search-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: #74788d;
  pointer-events: none;
}
.dash-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 16px 0 40px;
  font-size: 0.8125rem;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}
.dash-search-input::placeholder { color: #74788d; }

.dash-header-spacer { flex: 1; }

.dash-user { position: relative; }
.dash-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  font-family: inherit;
  color: #555b6d;
}
.dash-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}
.dash-user-name { font-size: 0.8125rem; font-weight: 400; white-space: nowrap; }
.dash-user-btn svg { width: 12px; height: 12px; }
.dash-user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1rem 3rem rgba(0,0,0,0.175);
  padding: 8px 0;
  min-width: 160px;
  z-index: 950;
}
.dash-user-menu.open { display: block; }
.dash-user-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  font-size: 0.8125rem;
  color: #212529;
  text-decoration: none;
}
.dash-user-menu a:hover { background: #f8f9fa; text-decoration: none; }
.dash-user-menu a.danger { color: var(--red); }
.dash-user-menu svg { width: 15px; height: 15px; }

/* ========================
   CONTENT
======================== */
.dash-content { flex: 1; padding: 24px; max-width: 100%; }

.dash-page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-page-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  text-transform: uppercase;
  margin: 0;
  line-height: 1.3;
}
.dash-page-sub { font-size: 0.8125rem; color: var(--text-secondary); margin: 4px 0 0; }
.dash-page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ========================
   CARDS
======================== */
.dash-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}
.dash-card-header {
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-card-title svg { width: 18px; height: 18px; color: var(--primary); }
.dash-card-body { padding: 20px; }

/* A card that only wraps a grid of item cards becomes invisible, so the
   item cards sit directly on the page like Skote's project grid. */
.dash-card:has(> .dash-card-body > .items-grid) {
  background: transparent;
  box-shadow: none;
  margin-bottom: 0;
}
.dash-card:has(> .dash-card-body > .items-grid) > .dash-card-header { padding: 0 0 16px; }
.dash-card:has(> .dash-card-body > .items-grid) > .dash-card-body { padding: 0 !important; }

/* ========================
   ITEM CARDS (grid lists)
======================== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.item-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: inherit;
  opacity: 0;
  transition: box-shadow 0.2s ease, opacity 0.2s ease;
}
.item-card.revealed { opacity: 1; }
a.item-card:hover { box-shadow: var(--card-hover-shadow); text-decoration: none; }

.item-card-header {
  padding: 16px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.item-card-id {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.item-card-body {
  padding: 14px 20px 20px;
  flex: 1;
  display: grid;
  grid-template-columns: 64px 1fr;
  column-gap: 16px;
  align-content: start;
}
.item-card-body > * { grid-column: 2; min-width: 0; }
.item-card-avatar {
  grid-column: 1 !important;
  grid-row: 1 / span 6;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eff2f7;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 600;
}
.item-card-avatar.has-photo {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f9fa;
}
.item-card-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-card-body:has(.has-photo) { grid-template-columns: 72px 1fr; }
.item-card.pwl .item-card-avatar { color: var(--yellow); }
.item-card.jok .item-card-avatar { color: var(--primary); }

.item-card-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-heading);
  margin: 2px 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-card-detail {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-card-detail svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-secondary); }

.item-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.item-card-date { font-size: 0.8125rem; color: var(--text-primary); }
.item-card-arrow { color: var(--primary); font-size: 0.8125rem; font-weight: 500; }

.item-card--unseen { box-shadow: inset 3px 0 0 var(--primary), var(--card-shadow); }
.item-card--unseen .item-card-name { font-weight: 600; }

.item-card-toggles {
  padding: 12px 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Infinite scroll sentinel */
.scroll-sentinel { height: 70px; display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.scroll-loader { display: none; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-secondary); }
.scroll-loader.active { display: flex; }
.scroll-loader-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: loaderBounce 0.8s infinite alternate; }
.scroll-loader-dot:nth-child(2) { animation-delay: 0.15s; }
.scroll-loader-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes loaderBounce { from { opacity: 0.3; transform: scale(0.8); } to { opacity: 1; transform: scale(1.2); } }

/* ========================
   BADGES — solid, small
======================== */
.badge-status {
  display: inline-block;
  padding: 0.25em 0.4em;
  border-radius: var(--badge-radius);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
}
.badge-success { background: var(--green); }
.badge-warning { background: var(--yellow); }
.badge-danger  { background: var(--red); }
.badge-info    { background: var(--blue); }
.badge-muted   { background: #74788d; }
.badge-purple  { background: var(--purple); }
.badge-gold    { background: var(--yellow); }
.badge-orange  { background: var(--orange); }

/* Brand tags: soft (tinted) badges - PWL yellow, JOK indigo */
.brand-chip {
  display: inline-block;
  padding: 0.25em 0.5em;
  border-radius: var(--badge-radius);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  vertical-align: middle;
}
.brand-chip.pwl { background: rgba(241,180,76,0.18); color: #d99a2b; }
.brand-chip.jok { background: rgba(85,110,230,0.18); color: var(--primary); }

/* ========================
   STAT CARDS (mini-stats)
======================== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 20px;
  position: relative;
  min-height: 104px;
}
.stat-card-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-card-icon svg { width: 22px; height: 22px; }
.stat-card-label { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; padding-right: 60px; }
.stat-card-value {
  font-size: 1.21875rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: 2px;
  padding-right: 60px;
  font-variant-numeric: tabular-nums;
}
.stat-card-sub { font-size: 0.75rem; color: var(--text-secondary); padding-right: 60px; }

.stat-card.green  .stat-card-icon { background: var(--green); }
.stat-card.blue   .stat-card-icon { background: var(--blue); }
.stat-card.red    .stat-card-icon { background: var(--red); }
.stat-card.purple .stat-card-icon { background: var(--purple); }
.stat-card.orange .stat-card-icon { background: var(--yellow); }

/* ========================
   DETAIL VIEW
======================== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.detail-full { grid-column: 1 / -1; }

.detail-section {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.detail-section-header {
  padding: 18px 20px 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-section-header svg { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table tr { border-top: 1px solid var(--card-border); }
.detail-table td {
  padding: 12px 20px;
  font-size: 0.8125rem;
  vertical-align: middle;
  word-break: break-word;
  color: var(--text-primary);
}
.detail-table td:first-child {
  color: var(--text-heading);
  font-weight: 600;
  width: 38%;
  white-space: nowrap;
}

/* ========================
   CHART CONTROLS
======================== */
.chart-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chart-select,
.chart-date-input {
  padding: 7px 12px;
  border: 1px solid var(--field-border);
  border-radius: 4px;
  font-size: 0.8125rem;
  background: #fff;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}
.chart-update-btn {
  padding: 7px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.8125rem;
  cursor: pointer;
  font-family: inherit;
}
.chart-update-btn:hover { background: var(--primary-hover); }

/* ========================
   ALERTS
======================== */
.dash-messages { margin-bottom: 0; }
.dash-alert {
  padding: 12px 20px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
}
.dash-alert.success { background: #d6f3e9; color: #1f7556; border-color: #c2edde; }
.dash-alert.error   { background: #fde1e1; color: #924040; border-color: #fcd2d2; }
.dash-alert.warning { background: #fcf0db; color: #916c2e; border-color: #fbe9c9; }
.dash-alert.info    { background: #dcedfc; color: #306391; border-color: #cbe4fb; }
.dash-alert-close { background: none; border: none; cursor: pointer; color: inherit; opacity: 0.6; font-size: 1.1rem; line-height: 1; padding: 0; }
.dash-alert-close:hover { opacity: 1; }

/* ========================
   BUTTONS
======================== */
.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.47rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: #fff;
}
.dash-btn:hover { text-decoration: none; }
.dash-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.dash-btn-sm { padding: 0.25rem 0.5rem; font-size: 0.71rem; }

.dash-btn-primary   { background: var(--primary); border-color: var(--primary); color: #fff; }
.dash-btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.dash-btn-secondary { background: #74788d; border-color: #74788d; color: #fff; }
.dash-btn-secondary:hover { background: #636678; border-color: #636678; color: #fff; }
.dash-btn-danger    { background: var(--red); border-color: var(--red); color: #fff; }
.dash-btn-danger:hover { background: #cf5a5a; border-color: #cf5a5a; color: #fff; }
.dash-btn-success   { background: var(--green); border-color: var(--green); color: #fff; }
.dash-btn-success:hover { background: #2ca67a; border-color: #2ca67a; color: #fff; }
.dash-btn-info      { background: var(--blue); border-color: var(--blue); color: #fff; }
.dash-btn-info:hover { background: #448ccd; border-color: #448ccd; color: #fff; }

/* ========================
   FORMS
======================== */
.dash-form-group { margin-bottom: 16px; }
.dash-form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.dash-form-control {
  display: block;
  width: 100%;
  padding: 0.47rem 0.75rem;
  border: 1px solid var(--field-border);
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}
.dash-form-control::placeholder { color: #74788d; }
.dash-form-control:focus { border-color: #b9bfc4; }
textarea.dash-form-control { min-height: 0; }
.dash-form-select { appearance: auto; cursor: pointer; }

/* ========================
   TOGGLE SWITCH
======================== */
.dash-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
}
.dash-toggle-wrap:hover { text-decoration: none; }
.dash-toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  background: #ced4da;
  border-radius: 10px;
  transition: background 0.2s;
  flex-shrink: 0;
  display: inline-block;
}
.dash-toggle-track.on { background: var(--primary); }
.dash-toggle-track.on .dash-toggle-thumb { transform: translateX(16px); }
.dash-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

/* ========================
   EMPTY STATE
======================== */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 20px;
  color: var(--text-secondary);
  text-align: center;
  grid-column: 1 / -1;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}
.no-results svg { width: 42px; height: 42px; opacity: 0.35; margin-bottom: 10px; }
.no-results p { font-size: 0.8125rem; margin: 0; }

/* ========================
   SIDEBAR OVERLAY (mobile)
======================== */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 999; }
.sidebar-overlay.active { display: block; }

/* ========================
   MODALS
======================== */
.modal-box {
  background: var(--modal-bg);
  border-radius: 0.4rem;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 1rem 3rem rgba(0,0,0,0.175);
  color: var(--text-primary);
}
.modal-box h3 { color: var(--text-heading); }
.modal-box.modal-box-wide { max-width: 520px; }
.modal-icon-circle {
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.modal-icon-circle.danger { background: rgba(244,106,106,0.18); }
.modal-icon-circle.danger svg { stroke: var(--red); }
.modal-btn-cancel {
  flex: 1;
  padding: 0.47rem 0.75rem;
  background: #74788d;
  border: 1px solid #74788d;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #fff;
  font-family: inherit;
}
.modal-btn-cancel:hover { background: #636678; }
.modal-btn-danger {
  flex: 1;
  padding: 0.47rem 0.75rem;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: inherit;
}
.modal-btn-danger:hover { background: #cf5a5a; }

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 992px) {
  .dash-sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
}
@media (max-width: 640px) {
  .items-grid { grid-template-columns: 1fr; gap: 16px; }
  .stat-cards { grid-template-columns: 1fr; gap: 16px; }
  .detail-grid { grid-template-columns: 1fr; gap: 16px; }
  .dash-content { padding: 16px; }
  .dash-header { padding: 0 12px 0 4px; gap: 8px; }
  .dash-search-form { max-width: none; }
  .dash-user-name { display: none; }
  .detail-table td:first-child { white-space: normal; }
}

/* ========================
   UTILITIES
======================== */
.text-accent { color: var(--primary) !important; }
.bg-accent  { background: var(--primary-soft) !important; }
.fw-700 { font-weight: 600; }
.fw-800 { font-weight: 600; }
.mb-16 { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }
.gap-16 { gap: 16px; }

/* ========================
   ACCESSIBILITY (WCAG 2.4.7 focus visible) - added 2026-11-21
   :focus-visible only shows for keyboard navigation, so the look for mouse
   users is unchanged. See /opt/ai_workspace/notes/2026-11-21_claude.md
======================== */
a:focus-visible,
button:focus-visible,
.dash-btn:focus-visible,
.item-card:focus-visible,
.dash-nav-quickadd-menu a:focus-visible,
.dash-user-menu a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.dash-sidebar a:focus-visible,
.dash-sidebar button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
}
.dash-form-control:focus-visible,
.dash-search-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(85,110,230,0.25);
}
