/* ═══════════════════════════════════════════
   REALTIME STATUS
   ═══════════════════════════════════════════ */
.realtime-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mid);
  margin-right: 8px;
  transition: background .3s;
}
.realtime-dot.connected { background: var(--green); box-shadow: 0 0 6px var(--green); }
.realtime-dot.disconnected { background: var(--red); animation: pulse-dot 1.5s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ═══════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════ */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dashboard-grid .card-full { grid-column: 1 / -1; }

/* Label helper */
.label-xs {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mid);
}

/* ─── Action Items ─── */
.dash-actions-card { }
.action-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: background .15s ease;
}
.action-row:hover { background: rgba(0,0,0,.02); }
.action-critical { border-left-color: var(--red); background: rgba(239,68,68,.03); }
.action-warning  { border-left-color: var(--amber); background: rgba(245,158,11,.03); }
.action-info     { border-left-color: var(--blue); background: rgba(59,130,246,.03); }
.action-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
}
.action-critical .action-icon { background: rgba(239,68,68,.1); color: var(--red); }
.action-warning  .action-icon { background: rgba(245,158,11,.1); color: var(--amber); }
.action-info     .action-icon { background: rgba(59,130,246,.1); color: var(--blue); }
.action-body { flex: 1; min-width: 0; }
.action-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-meta  { font-size: 11px; color: var(--mid); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-btn-group { display: flex; gap: 6px; flex-shrink: 0; }

/* Nudge channel radio */
.nudge-ch-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.nudge-ch-label:has(input:checked) {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.nudge-ch-label input { display: none; }

/* Toast */
.dash-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  z-index: 9999;
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.dash-toast.success { background: var(--green); color: var(--white); }
.dash-toast.error   { background: var(--red); color: var(--white); }
.dash-toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Live Shift Board ─── */
.live-shift-list { display: flex; flex-direction: column; gap: 2px; }
.live-shift-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.live-shift-row:hover { background: var(--bg); }
.live-shift-row.live-now { background: rgba(34,197,94,.06); }
.live-shift-row.unfilled { background: rgba(239,68,68,.04); }
.live-shift-avatar { position: relative; flex-shrink: 0; }
.live-pulse {
  position: absolute; top: -2px; right: -2px;
  width: 10px; height: 10px;
  border-radius: 9999px;
  background: var(--green);
  z-index: 1;
  border: 2px solid var(--white);
  animation: pulse-ring 1.5s infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.live-shift-info { flex: 1; min-width: 0; }
.live-shift-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-shift-meta { font-size: 11px; color: var(--mid); margin-top: 1px; }

/* ─── Revenue ─── */
.revenue-blocks { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.revenue-block { text-align: center; padding: 12px 6px; background: var(--bg); border-radius: var(--radius-sm); }
.revenue-val { font-family: var(--font-display); font-size: 18px; font-weight: 800; margin-top: 4px; }
.revenue-sub { font-size: 10px; color: var(--mid); margin-top: 2px; }

.brand-revenue-list { display: flex; flex-direction: column; gap: 6px; }
.brand-rev-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg); border-radius: var(--radius-sm); }
.brand-rev-info { display: flex; flex-direction: column; }
.brand-rev-name { font-size: 13px; font-weight: 700; }
.brand-rev-detail { font-size: 11px; color: var(--mid); }
.brand-rev-nums { display: flex; flex-direction: column; align-items: flex-end; }
.brand-rev-total { font-size: 13px; font-weight: 800; }
.brand-rev-paid { font-size: 11px; color: var(--green); }


/* ═══════════════════════════════════════════
   SHIFTS PAGE — LIFECYCLE TABS & STEPPER
   ═══════════════════════════════════════════ */

/* Tab bar */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.tab-bar .tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--mid);
  cursor: pointer;
  transition: all .15s ease;
}
.tab-bar .tab:hover { border-color: var(--charcoal); color: var(--charcoal); }
.tab-bar .tab.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* Lifecycle stepper (inside drawer) */
.lifecycle-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 0;
  overflow-x: auto;
}
.lifecycle-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 40px;
}
.lifecycle-dot {
  width: 28px; height: 28px;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--light);
  transition: all .2s ease;
}
.lifecycle-step.done .lifecycle-dot {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.lifecycle-step.current .lifecycle-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(201,169,110,.2);
}
.lifecycle-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--light);
  text-align: center;
  max-width: 60px;
  line-height: 1.2;
}
.lifecycle-step.done .lifecycle-label { color: var(--green); }
.lifecycle-step.current .lifecycle-label { color: var(--accent); font-weight: 800; }
.lifecycle-line {
  flex: 1;
  height: 2px;
  min-width: 12px;
  background: var(--border);
  margin: 0 2px;
  align-self: flex-start;
  margin-top: 14px;
  transition: background .2s ease;
}
.lifecycle-line.done { background: var(--green); }


/* ═══════════════════════════════════════════
   OTHER PAGES
   ═══════════════════════════════════════════ */

/* Talent Pipeline */
.pipeline-gates { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.gate-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.gate-title { font-size: 13px; font-weight: 800; color: var(--charcoal); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.gate-stats { display: flex; gap: 16px; }
.gate-stat { display: flex; flex-direction: column; }
.gate-stat-value { font-size: 20px; font-weight: 800; font-family: var(--font-display); }
.gate-stat-label { font-size: 11px; color: var(--mid); }
.talent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.talent-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); cursor: pointer; transition: all .15s ease; }
.talent-card:hover { border-color: rgba(201,169,110,.4); box-shadow: var(--shadow-md); }
.talent-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.talent-card-info { flex: 1; min-width: 0; }
.talent-card-name { font-weight: 800; font-size: 14px; }
.talent-card-email { font-size: 11px; color: var(--mid); }
.talent-card-meta { display: flex; gap: 16px; margin-bottom: 12px; }
.talent-card-meta-item { display: flex; flex-direction: column; }
.talent-card-meta-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--light); }
.talent-card-meta-value { font-size: 13px; font-weight: 700; }

/* Invoices */
.invoice-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.invoice-stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.invoice-stat-label { font-size: 11px; color: var(--mid); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.invoice-stat-value { font-family: var(--font-display); font-size: 28px; margin-top: 4px; }

/* Timecards */
.timecard-week { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.timecard-week-label { font-weight: 700; font-size: 13px; }

/* Automations */
.automation-list { display: flex; flex-direction: column; gap: 12px; }
.automation-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); }
.automation-status { flex-shrink: 0; }
.automation-info { flex: 1; min-width: 0; }
.automation-name { font-weight: 800; font-size: 13px; }
.automation-desc { font-size: 11px; color: var(--mid); margin-top: 2px; }
.automation-meta { font-size: 11px; color: var(--light); margin-top: 4px; }
.automation-toggle { position: relative; width: 44px; height: 24px; border-radius: 9999px; background: var(--border); cursor: pointer; border: none; transition: background .15s ease; flex-shrink: 0; }
.automation-toggle.active { background: var(--accent); }
.automation-toggle::after { content:''; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:9999px; background:var(--white); box-shadow:var(--shadow); transition:transform .15s ease; }
.automation-toggle.active::after { transform: translateX(20px); }
.automation-actions { display: flex; gap: 8px; flex-shrink: 0; }
.automation-category-section { margin-bottom: 24px; }
.automation-category-title {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--mid); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.automation-match-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 9999px; font-size: 10px; font-weight: 800;
  background: var(--red-bg); color: var(--red);
}
.automation-match-count.clear { background: var(--green-bg); color: var(--green); }

/* Nudge Center */
.nudge-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.nudge-template { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: all .15s ease; box-shadow: var(--shadow); }
.nudge-template:hover { border-color: rgba(201,169,110,.4); }
.nudge-template-name { font-weight: 800; font-size: 13px; margin-bottom: 8px; }
.nudge-template-preview { font-size: 11px; color: var(--mid); line-height: 1.5; }

/* Reporting */
.report-chart-placeholder { width: 100%; height: 280px; background: var(--bg); border: 2px dashed var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--light); font-size: 13px; }

/* Settings */
.settings-section { margin-bottom: 32px; }
.settings-section-title { font-size: 14px; font-weight: 800; color: var(--charcoal); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.integration-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); }
.integration-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: var(--light); }
.integration-info { flex: 1; }
.integration-name { font-weight: 800; font-size: 13px; }
.integration-status { font-size: 11px; color: var(--mid); }

/* ─── Settings Header ─── */
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.settings-header-info { display: flex; align-items: center; gap: 8px; }
.settings-header-actions { display: flex; gap: 8px; }

/* ─── Settings Tabs ─── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: none;
  color: var(--mid);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s ease;
}
.tabs .tab:hover { color: var(--charcoal); }
.tabs .tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Brand Accordion ─── */
.brand-accordion {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.brand-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background .15s ease;
  user-select: none;
}
.brand-accordion-header:hover { background: var(--bg); }
.brand-accordion-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.brand-chevron {
  flex-shrink: 0;
  color: var(--light);
  transition: transform .2s ease;
}
.brand-accordion.open .brand-chevron { transform: rotate(180deg); }
.brand-accordion-name {
  font-weight: 800;
  font-size: 15px;
  font-family: var(--font-display);
}
.brand-accordion-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.brand-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 20px;
}
.brand-accordion.open .brand-accordion-body {
  max-height: 2000px;
  padding: 0 20px 20px;
}

/* ─── Store Grid ─── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

/* ─── Store Card ─── */
.store-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all .15s ease;
  box-shadow: var(--shadow);
}
.store-card:hover {
  border-color: rgba(201,169,110,.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.store-card.store-inactive {
  opacity: 0.6;
  filter: grayscale(0.3);
}
.store-card.store-inactive:hover { opacity: 0.8; }

.store-card-img {
  width: 100%;
  height: 120px;
  background: var(--bg);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-card-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--light);
  font-size: 11px;
}
.store-inactive-badge,
.store-hidden-badge {
  position: absolute;
  top: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.store-inactive-badge {
  right: 8px;
  background: rgba(239,68,68,.9);
  color: white;
}
.store-hidden-badge {
  left: 8px;
  background: rgba(0,0,0,.65);
  color: white;
}

.store-card-body {
  padding: 12px 14px;
}
.store-card-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-card-address {
  font-size: 11px;
  color: var(--mid);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.store-card-roster {
  display: flex;
  align-items: center;
  gap: 6px;
}
.store-card-mgr {
  display: flex;
  align-items: center;
}

/* Add Store card */
.store-card-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  border-style: dashed;
  border-color: var(--border);
  background: transparent;
  box-shadow: none;
  color: var(--light);
  transition: all .15s ease;
}
.store-card-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201,169,110,.03);
  transform: none;
  box-shadow: none;
}
.store-add-icon {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: background .15s ease;
}
.store-card-add:hover .store-add-icon { background: rgba(201,169,110,.1); }
.store-add-label {
  font-size: 12px;
  font-weight: 700;
}

/* ─── Store Drawer ─── */
.store-drawer-hero {
  width: calc(100% + 48px);
  margin: -24px -24px 20px;
  height: 200px;
  background: var(--bg);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
}
.store-drawer-hero-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--light);
  font-size: 12px;
}
.store-img-upload-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0,0,0,.1);
  color: var(--charcoal);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s ease;
}
.store-img-upload-btn:hover {
  background: var(--white);
  box-shadow: var(--shadow);
}

.store-drawer-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.store-drawer-stat {
  text-align: center;
  padding: 12px 6px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.store-drawer-stat-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}
.store-drawer-stat-label {
  font-size: 10px;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ─── Dress Code Grid ─── */
.dress-code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dress-code-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dress-code-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.dress-code-label {
  color: var(--mid);
  font-weight: 600;
}
.dress-code-val {
  font-weight: 700;
  color: var(--charcoal);
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Modal Forms ─── */
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; gap: 12px; }
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.form-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mid);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--charcoal);
  transition: border-color .15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,169,110,.12);
}
.form-group textarea { resize: vertical; min-height: 60px; }

/* ─── Extra button variants ─── */
.btn-amber { background: var(--amber); color: white; border: none; }
.btn-amber:hover { opacity: .9; }
.btn-green { background: var(--green); color: white; border: none; }
.btn-green:hover { opacity: .9; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s ease;
}
.btn-icon:hover { background: rgba(239,68,68,.08); }

/* ─── Small Avatar ─── */
.avatar-xs {
  width: 24px;
  height: 24px;
  font-size: 9px;
  line-height: 24px;
}

/* ─── Grade Badge Classes ─── */
.badge-gold { background: rgba(201,169,110,.12); color: var(--accent); }
.badge-gray { background: var(--bg); color: var(--mid); }


/* ═══════════════════════════════════════════
   DASHBOARD — SIDEBAR LAYOUT + PIPELINE
   ═══════════════════════════════════════════ */

.dash-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.dash-main { flex: 1; min-width: 0; }
.dash-sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dash-sidebar .card { padding: 16px; }
.dash-sidebar .card-header { margin-bottom: 10px; padding: 0 0 10px; border-bottom: 1px solid var(--border); }
.dash-sidebar .card-title { font-size: 12px; }

/* Circulation Pipeline */
.circ-pipeline {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 0;
  overflow-x: auto;
  margin-bottom: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.circ-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 50px;
  cursor: pointer;
  transition: transform .15s;
}
.circ-node:hover { transform: translateY(-2px); }
.circ-count {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--charcoal);
  transition: all .2s ease;
}
.circ-node.has-items .circ-count {
  border-color: var(--accent);
  background: rgba(201,169,110,.1);
  color: var(--accent);
}
.circ-node.critical .circ-count {
  border-color: var(--red);
  background: rgba(239,68,68,.08);
  color: var(--red);
}
.circ-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--light);
  text-align: center;
  max-width: 65px;
  line-height: 1.2;
}
.circ-arrow {
  flex: 1;
  height: 2px;
  min-width: 8px;
  background: var(--border);
  margin: 0 2px;
  align-self: flex-start;
  margin-top: 18px;
  position: relative;
}
.circ-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  border: solid var(--border);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 2px;
  transform: rotate(-45deg);
}

/* Urgency timer badge */
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}
.urgency-critical { background: rgba(239,68,68,.1); color: var(--red); }
.urgency-warning { background: rgba(245,158,11,.1); color: var(--amber); }

/* Right sidebar cards */
.sidebar-activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 300px;
  overflow-y: auto;
}
.sidebar-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 12px;
}
.sidebar-activity-item:last-child { border-bottom: none; }
.sidebar-activity-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.sidebar-activity-text { flex: 1; min-width: 0; color: var(--charcoal); line-height: 1.4; }
.sidebar-activity-time { flex-shrink: 0; font-size: 10px; color: var(--light); }

/* Roster health in sidebar */
.roster-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 12px;
  flex-wrap: wrap;
}
.roster-row:last-child { border-bottom: none; }
.roster-critical { background: rgba(239,68,68,.04); margin: 0 -16px; padding: 10px 16px; border-radius: var(--radius-sm); }
.roster-warning { background: rgba(245,158,11,.04); margin: 0 -16px; padding: 10px 16px; border-radius: var(--radius-sm); }
.roster-info { flex: 1; min-width: 0; }
.roster-store { font-weight: 700; font-size: 12px; }
.roster-brand { font-size: 10px; color: var(--mid); }
.roster-health-detail { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; min-width: 120px; }
.roster-health-nums { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.roster-count { font-size: 11px; color: var(--mid); }

/* Engagement bar */
.roster-engagement-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg);
  width: 100%;
}
.roster-bar-seg { height: 100%; min-width: 2px; transition: width .3s ease; }
.roster-bar-active { background: var(--green); }
.roster-bar-cold { background: var(--blue); }
.roster-bar-stale { background: var(--amber); }
.roster-bar-inactive { background: var(--red); }

/* Roster legend */
.roster-legend {
  display: flex;
  gap: 10px;
  padding: 6px 0 8px;
  border-bottom: 1px solid var(--bg);
  margin-bottom: 4px;
}
.roster-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--mid);
}
.roster-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.roster-dot-active { background: var(--green); }
.roster-dot-cold { background: var(--blue); }
.roster-dot-stale { background: var(--amber); }
.roster-dot-inactive { background: var(--red); }

/* Auto-nudge timestamp */
.roster-auto-nudge-time {
  font-size: 10px;
  color: var(--mid);
  font-weight: 400;
}

/* Nudge button on critical rosters */
.btn-xs {
  padding: 3px 8px;
  font-size: 10px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
  font-weight: 600;
  cursor: pointer;
  border: none;
  width: 100%;
  margin-top: 4px;
  flex-basis: 100%;
}
.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover {
  opacity: .9;
}
.roster-nudge-btn {
  flex-basis: 100%;
}

/* Engine summary in sidebar */
.engine-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.engine-stat {
  text-align: center;
  padding: 10px 6px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.engine-stat-val {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-display);
}
.engine-stat-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mid);
  margin-top: 2px;
}
.engine-rule-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
}
.engine-rule-mini-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ═══════════════════════════════════════════
   AUTOMATIONS — SIDEBAR LAYOUT
   ═══════════════════════════════════════════ */

.auto-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.auto-main { flex: 1; min-width: 0; }
.auto-sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auto-sidebar .card { padding: 16px; }
.auto-sidebar .card-header { margin-bottom: 10px; padding: 0 0 10px; border-bottom: 1px solid var(--border); }
.auto-sidebar .card-title { font-size: 12px; }

/* Rule card left border */
.automation-item.sev-critical { border-left: 3px solid var(--red); }
.automation-item.sev-warning  { border-left: 3px solid var(--amber); }
.automation-item.sev-info     { border-left: 3px solid var(--blue); }

/* Threshold badge */
.threshold-badge {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  background: var(--bg);
  color: var(--charcoal);
  margin-left: 6px;
}
.run-count-badge {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  background: rgba(201,169,110,.1);
  color: var(--accent);
}

/* Engine status panel */
.engine-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.engine-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  animation: pulse-ring 1.5s infinite;
}
.engine-status-dot.running { background: var(--green); }
.engine-status-dot.paused  { background: var(--amber); animation: none; }

.engine-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--bg);
}
.engine-detail-row:last-child { border-bottom: none; }
.engine-detail-label { color: var(--mid); }
.engine-detail-value { font-weight: 700; }


/* ═══════════════════════════════════════════
   REPORTING — FULL ANALYTICS GRID
   ═══════════════════════════════════════════ */

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.report-grid .card-full { grid-column: 1 / -1; }
.report-grid .card-half { grid-column: span 1; }

/* Fill rate bars */
.fill-rate-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.fill-rate-brand { min-width: 100px; font-size: 13px; font-weight: 600; }
.fill-rate-bar { flex: 1; height: 24px; background: var(--bg); border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.fill-rate-fill { height: 100%; border-radius: var(--radius-sm); transition: width .3s ease; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 11px; font-weight: 800; color: var(--white); min-width: 36px; }
.fill-rate-fill.high { background: var(--green); }
.fill-rate-fill.mid  { background: var(--amber); }
.fill-rate-fill.low  { background: var(--red); }
.fill-rate-pct { min-width: 40px; text-align: right; font-size: 13px; font-weight: 800; }

/* Platform insight rows */
.insight-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 13px;
}
.insight-row:last-child { border-bottom: none; }
.insight-label { color: var(--mid); }
.insight-value { font-weight: 800; }

/* Top talent reliability */
.reliability-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg);
}
.reliability-row:last-child { border-bottom: none; }
.reliability-rank { width: 24px; text-align: center; font-size: 13px; font-weight: 800; color: var(--light); }
.reliability-info { flex: 1; min-width: 0; }
.reliability-name { font-weight: 700; font-size: 13px; }
.reliability-meta { font-size: 11px; color: var(--mid); }
.reliability-stats { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.reliability-pct { font-size: 13px; font-weight: 800; }

/* Roster health table */
.roster-health-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 13px;
}
.roster-health-row:last-child { border-bottom: none; }
.roster-health-store { flex: 1; min-width: 0; }
.roster-health-store-name { font-weight: 700; }
.roster-health-brand { font-size: 11px; color: var(--mid); }
.roster-health-stats { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.roster-health-num { font-size: 12px; color: var(--mid); min-width: 40px; text-align: center; }

/* Progress bar used in reporting */
.progress-bar {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .3s ease;
}


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 1200px) {
  .dash-layout, .auto-layout { flex-direction: column; }
  .dash-sidebar, .auto-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .dash-sidebar .card, .auto-sidebar .card { flex: 1; min-width: 280px; }
}

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .revenue-blocks { grid-template-columns: 1fr 1fr 1fr; }
  .lifecycle-stepper { padding: 12px 0; }
  .lifecycle-step { min-width: 34px; }
  .report-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid .card-full { grid-column: 1; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 22px; }

  .tab-bar { gap: 4px; }
  .tab-bar .tab { padding: 6px 10px; font-size: 11px; }

  .pipeline-gates { grid-template-columns: 1fr; }
  .revenue-blocks { grid-template-columns: 1fr; }
  .revenue-block { padding: 10px; }
  .revenue-val { font-size: 16px; }

  .action-row { flex-wrap: wrap; gap: 8px; padding: 10px 10px 10px 14px; }
  .action-body { flex-basis: calc(100% - 52px); }
  .action-row .btn { margin-left: 40px; }
  .action-btn-group { margin-left: 40px; }

  .live-shift-row { flex-wrap: wrap; gap: 8px; }
  .live-shift-info { flex-basis: calc(100% - 48px); }

  .lifecycle-stepper { overflow-x: auto; }
  .lifecycle-label { font-size: 8px; max-width: 50px; }
  .lifecycle-dot { width: 24px; height: 24px; font-size: 10px; }

  .talent-grid { grid-template-columns: 1fr; }
  .nudge-template-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: 1fr 1fr; }
  .store-drawer-stats { grid-template-columns: repeat(2, 1fr); }
  .dress-code-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .store-drawer-hero { height: 160px; }

  .dash-sidebar, .auto-sidebar { flex-direction: column; }
  .dash-sidebar .card, .auto-sidebar .card { min-width: 100%; }

  .circ-pipeline { padding: 12px; overflow-x: auto; }
  .circ-count { width: 30px; height: 30px; font-size: 11px; }
  .circ-label { font-size: 8px; max-width: 55px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-card { padding: 12px; gap: 4px; }
  .kpi-label { font-size: 9px; }
  .kpi-value { font-size: 18px; }
  .kpi-change { font-size: 10px; }

  .action-row .btn,
  .action-btn-group { margin-left: 0; width: 100%; }
  .action-btn-group .btn { flex: 1; }

  .tab-bar .tab { padding: 6px 8px; font-size: 10px; }
  .store-grid { grid-template-columns: 1fr; }
  .settings-header { flex-direction: column; gap: 12px; align-items: stretch; }
  .settings-header-actions { justify-content: flex-end; }
}

/* ═══════════════════════════════════════════
   WORKFORCE OPS
   ═══════════════════════════════════════════ */

/* ─── Tabs ─── */
.wf-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.wf-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mid);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wf-tab:hover { color: var(--black); background: var(--white); }
.wf-tab.active { color: var(--black); background: var(--white); box-shadow: var(--shadow); }
.wf-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
}

/* ─── Funnel ─── */
.wf-funnel {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.wf-funnel-stage {
  flex: 1;
  text-align: center;
  padding: 16px 8px 12px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.wf-funnel-stage:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.wf-funnel-count { font-size: 28px; font-weight: 800; font-family: var(--font-display); }
.wf-funnel-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mid); margin-top: 4px; }
.wf-funnel-bar { height: 3px; border-radius: 2px; margin-top: 10px; opacity: 0.5; }

/* Color utility classes */
.color-green { color: var(--green); }
.color-red { color: var(--red); }
.color-amber { color: var(--amber); }
.color-blue { color: var(--blue); }
.color-purple { color: var(--purple); }
.bg-green { background: var(--green); }
.bg-red { background: var(--red); }
.bg-amber { background: var(--amber); }
.bg-blue { background: var(--blue); }
.bg-purple { background: var(--purple); }
.font-bold { font-weight: 800; }

/* ─── Alert banner ─── */
.wf-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}
.wf-alert-warning {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid rgba(217,119,6,.2);
}
.wf-alert .btn-warning {
  margin-left: auto;
  background: var(--amber);
  color: var(--white);
  border: none;
}

/* ─── Filter row ─── */
.wf-filter-row { display: flex; gap: 12px; margin-bottom: 16px; }
.wf-filter-group { display: flex; gap: 10px; flex: 1; }
.form-select, .form-input {
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font);
  color: var(--black);
  outline: none;
  transition: border-color .15s ease;
}
.form-select:focus, .form-input:focus { border-color: var(--accent); }
.form-select { min-width: 150px; }
.form-input { flex: 1; }

/* ─── Doc progress bar (inline) ─── */
.wf-doc-bar {
  width: 60px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.wf-doc-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width .3s ease;
}

/* ─── Stalled row highlight ─── */
.wf-row-stalled { background: rgba(239,68,68,.03); }
.wf-row-stalled:hover { background: rgba(239,68,68,.06); }

/* ─── Status badges ─── */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }

/* ─── Button variants ─── */
.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--charcoal);
  cursor: pointer;
  transition: all .15s ease;
}
.btn-ghost:hover { background: var(--bg); border-color: var(--mid); }

/* ─── Drawer sections ─── */
.wf-drawer-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.wf-drawer-avatar img, .wf-drawer-avatar .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  font-size: 18px;
}
.wf-drawer-name { font-size: 16px; font-weight: 700; }
.wf-drawer-email { font-size: 13px; color: var(--mid); }

.wf-section { margin-bottom: 20px; }
.wf-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mid);
  margin-bottom: 10px;
}

/* State track (horizontal stepper) */
.wf-state-track {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 12px;
  overflow-x: auto;
}
.wf-state-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.wf-state-dot::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border);
  transition: all .2s ease;
}
.wf-state-done::before { background: var(--green); border-color: var(--green); }
.wf-state-current::before { background: var(--white); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.wf-state-dot span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--light);
  white-space: nowrap;
}
.wf-state-done span { color: var(--green); }
.wf-state-current span { color: var(--accent); font-weight: 800; }
.wf-state-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 12px;
  margin-bottom: 18px;
}

/* Compliance checklist */
.wf-checklist { display: flex; flex-direction: column; gap: 2px; }
.wf-checklist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: background .15s ease;
}
.wf-checklist-row:hover { background: var(--bg); }
.wf-check-icon { flex-shrink: 0; width: 18px; text-align: center; font-size: 14px; }
.wf-doc-complete .wf-check-icon { color: var(--green); }
.wf-doc-flagged .wf-check-icon { color: var(--red); }
.wf-doc-submitted .wf-check-icon { color: var(--blue); }
.wf-doc-pending .wf-check-icon { color: var(--light); }
.wf-check-label { flex: 1; font-weight: 600; }
.wf-check-status { font-size: 11px; text-transform: uppercase; font-weight: 700; color: var(--mid); }
.wf-check-reminders { font-size: 10px; color: var(--mid); }
.wf-check-actions { display: flex; gap: 4px; margin-left: auto; }

/* Shift list */
.wf-shift-list { display: flex; flex-direction: column; gap: 4px; }
.wf-shift-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.wf-shift-external { background: rgba(217,119,6,.03); padding: 6px 8px; border-radius: var(--radius-sm); }

/* Payroll list in drawer */
.wf-payroll-list { display: flex; flex-direction: column; gap: 4px; }
.wf-payroll-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

/* Audit log */
.wf-audit-list { display: flex; flex-direction: column; gap: 2px; }
.wf-audit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.wf-audit-action { font-weight: 600; text-transform: capitalize; flex: 1; }
.wf-audit-actor { color: var(--mid); }
.wf-audit-time { color: var(--light); font-size: 11px; }

/* Drawer footer */
.wf-drawer-footer { display: flex; gap: 8px; justify-content: flex-end; }

/* ─── Exception form ─── */
.wf-exception-form .card-header { display: flex; justify-content: space-between; align-items: center; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--mid);
  margin-bottom: 4px;
}
.wf-flag-reason {
  font-size: 12px;
  color: var(--red);
  padding: 4px 16px 8px;
  font-style: italic;
}

/* ─── Payroll KPIs ─── */
.wf-payroll-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.wf-kpi {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}
.wf-kpi-value { font-size: 24px; font-weight: 800; font-family: var(--font-display); }
.wf-kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mid); margin-top: 4px; }

/* Batch bar */
.wf-batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
}

/* ─── Cards (reuse from existing) ─── */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 15px; font-weight: 700; }
.card-body { padding: 16px 20px; }

/* ═══════════════════════════════════════════
   COPILOT — NEXT MOVE CARD
   ═══════════════════════════════════════════ */
.copilot-card {
  position: relative;
  background: var(--charcoal, #1a1a2e);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.copilot-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.copilot-accent-critical { background: var(--red, #ef4444); }
.copilot-accent-high { background: var(--amber, #f59e0b); }
.copilot-accent-medium { background: var(--blue, #3b82f6); }
.copilot-accent-clear { background: var(--green, #22c55e); }

.copilot-body {
  padding: 20px 24px;
}
.copilot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.copilot-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent, #c9a96e);
  color: var(--charcoal, #1a1a2e);
}
.copilot-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.copilot-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,.3);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.copilot-dismiss:hover { color: rgba(255,255,255,.7); }

.copilot-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
}
.copilot-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  line-height: 1.5;
  margin-bottom: 14px;
}
.copilot-actions {
  display: flex;
  gap: 8px;
}
.copilot-actions .btn-ghost {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  border: none;
}
.copilot-actions .btn-ghost:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* Copilot secondary recommendation chips */
.copilot-chips {
  display: flex;
  gap: 8px;
  padding: 0 24px 16px;
  flex-wrap: wrap;
}
.copilot-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,.06);
  border-radius: 20px;
  cursor: pointer;
  transition: background .15s;
}
.copilot-chip:hover { background: rgba(255,255,255,.12); }
.copilot-chip-text {
  font-size: 11px;
  color: rgba(255,255,255,.65);
  white-space: nowrap;
}
.copilot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-critical { background: var(--red, #ef4444); }
.dot-high { background: var(--amber, #f59e0b); }
.dot-medium { background: var(--blue, #3b82f6); }

/* ═══════════════════════════════════════════
   RE-ENGAGE MODAL — Dark Card UI
   ═══════════════════════════════════════════ */
.reengage-modal {
  max-width: 480px;
}
.reengage-dark-card {
  background: #111111;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.reengage-card-header {
  padding: 24px 24px 16px;
}
.reengage-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #c9a96e;
  margin-bottom: 10px;
}
.reengage-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 6px;
}
.reengage-card-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  line-height: 1.4;
}
.reengage-talent-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 16px;
}
.reengage-talent-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 10px 14px;
  flex: 1 1 calc(50% - 4px);
  min-width: 180px;
}
.reengage-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(201,169,110,.4);
}
.reengage-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #c9a96e;
  color: #111;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.reengage-talent-info {
  min-width: 0;
}
.reengage-talent-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reengage-talent-meta {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reengage-shifts-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 24px 16px;
}
.reengage-shift-card {
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 12px 14px;
  border-left: 3px solid #c9a96e;
}
.reengage-shift-role {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.reengage-shift-brand {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  margin-top: 2px;
}
.reengage-shift-date {
  font-size: 11px;
  color: #c9a96e;
  margin-top: 4px;
  font-weight: 600;
}
.reengage-card-footer {
  padding: 12px 24px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.reengage-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: #c9a96e;
  text-align: center;
}
.reengage-form {
  padding-top: 4px;
}
.reengage-recipients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.reengage-recipients .reengage-talent-card {
  background: var(--surface, #f8f7f5);
  border: 1px solid var(--border, #e5e2dc);
}
.reengage-recipients .reengage-avatar {
  border-color: var(--border, #e5e2dc);
}
.reengage-recipients .reengage-talent-name {
  color: var(--charcoal, #1a1a2e);
}
.reengage-recipients .reengage-talent-meta {
  color: var(--mid, #888);
}

/* ═══════════════════════════════════════════════════════
   SHIFT DETAIL DRAWER (.sd-*)
   ═══════════════════════════════════════════════════════ */

/* Header */
.sd-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sd-header-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sd-type-tag { font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.sd-store-name { font-size: 18px; font-weight: 700; margin: 0 0 2px; }
.sd-brand-name { font-size: 13px; color: var(--mid); margin: 0 0 8px; }
.sd-datetime {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dark);
}
.sd-datetime svg { color: var(--mid); flex-shrink: 0; }
.sd-time { color: var(--mid); }

/* Sections */
.sd-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.sd-section:last-of-type { border-bottom: none; }
.sd-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mid);
  margin-bottom: 10px;
}
.sd-count {
  font-weight: 600;
  color: var(--light);
  margin-left: 4px;
}

/* Fill progress bar */
.sd-fill-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sd-fill-bar {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.sd-fill-bar-inner {
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease;
}
.sd-fill-label { font-size: 13px; font-weight: 700; white-space: nowrap; }
.sd-fill-ok { color: var(--green); }
.sd-fill-partial { color: var(--amber); }
.sd-fill-empty { color: var(--red); }

/* Talent cards */
.sd-talent-list { display: flex; flex-direction: column; gap: 6px; }
.sd-talent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.sd-talent-card:hover { background: var(--border); }
.sd-talent-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.sd-talent-avatar .avatar-sm {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.sd-talent-info { display: flex; flex-direction: column; gap: 2px; }
.sd-talent-name { font-size: 14px; font-weight: 600; }
.sd-talent-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sd-rating { color: var(--accent); font-weight: 600; }

/* Circulation activity (offered/rejected) */
.sd-activity-grid { display: flex; gap: 20px; }
.sd-activity-item { display: flex; flex-direction: column; gap: 4px; }
.sd-activity-num { font-size: 22px; font-weight: 800; line-height: 1; }
.sd-num-offered { color: var(--blue); }
.sd-num-rejected { color: var(--red); }
.sd-activity-label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--mid); }
.sd-avatar-stack { display: flex; margin-top: 4px; }
.sd-stack-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--white);
  object-fit: cover;
  margin-left: -6px;
}
.sd-stack-avatar:first-child { margin-left: 0; }
.sd-stack-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-size: 10px;
  font-weight: 700;
  color: var(--mid);
}
.sd-stack-more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
}

/* Detail grid (key-value pairs) */
.sd-detail-grid { display: flex; flex-direction: column; gap: 2px; }
.sd-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.sd-detail-row:last-child { border-bottom: none; }
.sd-detail-label { color: var(--mid); font-weight: 500; }
.sd-detail-value { font-weight: 600; text-align: right; }
.sd-duration { font-size: 15px; font-weight: 800; color: var(--dark); }

/* Sibling shifts (booking context) */
.sd-sibling-list { display: flex; flex-direction: column; gap: 2px; }
.sd-sibling-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.sd-sibling-date { font-weight: 600; min-width: 60px; }
.sd-booking-meta { margin-bottom: 8px; }

/* Empty state */
.sd-empty-state {
  padding: 16px;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
}

/* Footer */
.sd-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

/* Row hover for clickable shift rows */
.data-table tbody tr[data-shift-id]:hover {
  background: var(--bg);
  transition: background .15s ease;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .wf-funnel { flex-wrap: wrap; }
  .wf-funnel-stage { min-width: calc(33% - 8px); }
  .wf-payroll-kpis { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .wf-checklist-row { flex-wrap: wrap; }
  .wf-check-actions { width: 100%; justify-content: flex-end; margin-top: 4px; }
  .copilot-chips { flex-wrap: wrap; }
  .sd-activity-grid { flex-direction: column; gap: 12px; }
  .sd-detail-row { font-size: 12px; }
}
