/* ── Inter font — self-hosted ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter.woff2') format('woff2');
}


/* ShopBoard — Design System */

:root {
    /* Brand primary — copper */
    --sb-primary: var(--sb-accent);
    --sb-primary-hover: #8F4323;
    --sb-primary-tint: #F4E6DE;
    --sb-primary-tint-strong: #E9D0C0;

    /* Warm neutral ramp */
    --sb-bg: #F3F1EC;
    --sb-surface: #FFFFFF;
    --sb-surface-alt: #FBFAF7;
    --sb-border: #D8D2C7;
    --sb-line: #C5BDB0;

    /* Warm text hierarchy */
    --sb-text: #202325;
    --sb-text-2: #4F555A;
    --sb-text-3: #716C64;
    --sb-text-muted: #948D82;
    --sb-text-disabled: #B5AFA6;

    /* Semantic status colours — DO NOT CHANGE */
    --sb-overdue-bg: #fef2f2;
    --sb-overdue-text: #7f1d1d;
    --sb-overdue-accent: #dc2626;

    --sb-due-soon-bg: #fffbeb;
    --sb-due-soon-text: #92400e;
    --sb-due-soon-accent: #d97706;

    --sb-ready-bg: #f0fdf4;
    --sb-ready-text: #14532d;
    --sb-ready-accent: #16a34a;

    --sb-active-bg: #eff6ff;
    --sb-active-text: #1e3a8a;
    --sb-active-accent: #2563eb;

    --sb-complete-bg: #f8fafc;
    --sb-complete-text: #334155;
    --sb-complete-accent: #64748b;

    --sb-neutral-bg: #f8fafc;
    --sb-neutral-text: #334155;
    --sb-neutral-accent: #64748b;

    /* Bootstrap primary override — copper */
    --bs-primary: #A54E2A;
    --bs-primary-rgb: 165, 78, 42;
    --bs-link-color: #8F4323;
    --bs-link-hover-color: #733618;
    --bs-focus-ring-color: rgba(165,78,42,0.25);
}

/* ── Status badges ── */
.badge-active {
    background-color: var(--sb-active-accent);
    color: #fff;
    padding: 0.25em 0.6em;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-ready {
    background-color: var(--sb-ready-accent);
    color: #fff;
    padding: 0.25em 0.6em;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-complete {
    background-color: var(--sb-complete-accent);
    color: #fff;
    padding: 0.25em 0.6em;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-overdue {
    background-color: var(--sb-overdue-accent);
    color: #fff;
    padding: 0.25em 0.6em;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Section headers for grouped job board ── */
.section-overdue {
    background-color: var(--sb-overdue-accent);
    color: #fff;
}
.section-due-this-week {
    background-color: var(--sb-due-soon-accent);
    color: #fff;
}
.section-active {
    background-color: var(--sb-active-accent);
    color: #fff;
}
.section-ready {
    background-color: var(--sb-ready-accent);
    color: #fff;
}
.section-complete {
    background-color: var(--sb-complete-accent);
    color: #fff;
}

/* ── Scrollable job group ── */
.job-group-scroll {
    max-height: 320px;
    overflow-y: auto;
    border-radius: 0 0 12px 12px;
}

/* ── Primary button ── */
.btn-sb-primary {
    background-color: var(--sb-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    min-height: 44px;
    font-weight: 500;
    transition: background-color 0.15s ease;
    padding: 0.5rem 1rem;
}
.btn-sb-primary:hover, .btn-sb-primary:focus {
    background-color: var(--sb-primary-hover);
    color: #fff;
}

/* ── Bootstrap btn-primary override — copper ── */
.btn-primary {
    --bs-btn-bg: #A54E2A;
    --bs-btn-border-color: #A54E2A;
    --bs-btn-hover-bg: #8F4323;
    --bs-btn-hover-border-color: #8F4323;
    --bs-btn-active-bg: #8F4323;
    --bs-btn-active-border-color: #8F4323;
    --bs-btn-focus-shadow-rgb: 165, 78, 42;
}
.btn-outline-primary {
    --bs-btn-color: #A54E2A;
    --bs-btn-border-color: #A54E2A;
    --bs-btn-hover-bg: #A54E2A;
    --bs-btn-hover-border-color: #A54E2A;
    --bs-btn-active-bg: #A54E2A;
    --bs-btn-active-border-color: #A54E2A;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
}

/* ── Dashboard tiles ── */
.tile-due-this-week { color: var(--sb-active-accent); }
.tile-overdue { color: var(--sb-overdue-accent); }
.tile-ready { color: var(--sb-ready-accent); }
.tile-neutral { color: var(--sb-neutral-accent); }

/* ── Mobile tap targets ── */
.btn { min-height: 44px; }

/* ── Job row hover ── */
.job-row:hover { background-color: #FBFAF7; cursor: pointer; }

/* ── Empty state ── */
.empty-state {
    padding: 2rem;
    text-align: center;
    color: #948D82;
    font-size: 0.9rem;
}

/* ── Global text contrast ── */
body {
    color: #202325;
}

.list-group-item,
.op-job-row,
.customer-row {
    color: #202325;
}

.job-card-number {
    font-weight: 700;
    color: #202325;
}

.text-muted-label {
    color: #716C64;
    font-size: 0.8rem;
}

.date-label {
    color: #948D82;
    font-size: 0.75rem;
}

.section-heading {
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Tile count numbers ── */
.tile-count {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
}

/* ── Tile labels ── */
.tile-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ── Dashboard op column headers ── */
.op-col-header-due {
    background: #fffbeb;
    color: #92400e;
    border-bottom: 2px solid #d97706;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.op-col-header-ready {
    background: #f0fdf4;
    color: #14532d;
    border-bottom: 2px solid #16a34a;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Nav bar links ── */
.sb-nav-link {
    color: rgba(255,255,255,0.88);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.1s ease;
}
.sb-nav-link:hover {
    color: #ffffff;
    text-decoration: none;
}

.sb-nav-org {
    color: rgba(255,255,255,0.55);
    font-size: 0.75rem;
    font-weight: 500;
}

.sb-nav-user {
    color: rgba(255,255,255,0.82);
    font-size: 0.8rem;
    font-weight: 500;
}

.sb-nav-logout {
    color: rgba(255,255,255,0.75);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.1s ease;
}
.sb-nav-logout:hover {
    color: #ffffff;
    text-decoration: none;
}

/* ── Form container — wider forms on desktop ── */
.sb-form-container {
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 991px) {
    .sb-form-container {
        max-width: 100%;
    }
}

/* ── Jobs table — sticky header and hover transition ── */
.jobs-table thead th {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
    box-shadow: 0 1px 0 #D8D2C7;
}
.jobs-table tbody tr {
    transition: background-color 0.12s ease;
}
.jobs-table tbody tr:hover {
    background: #FBFAF7;
    cursor: pointer;
}

/* ── Filter chip — completed (slate) ── */
.filter-chip.active-completed {
    background: #64748b;
    border-color: #64748b;
    color: #fff;
}

/* ── Job detail metadata ── */
.job-meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #948D82;
    margin-bottom: 0.2rem;
}

.job-meta-value {
    color: #202325;
    font-size: 0.95rem;
    font-weight: 500;
}

/* ── Activity Timeline ── */
.sb-timeline {
    display: flex;
    flex-direction: column;
}
.sb-timeline-item {
    display: flex;
    gap: 0.75rem;
}
.sb-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 0.625rem;
}
.sb-marker-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: var(--sb-accent);
    flex-shrink: 0;
    margin-top: 0.3125rem;
}
.sb-marker-line {
    width: 2px;
    flex: 1;
    background: #B5AFA6;
    margin-top: 0.25rem;
    min-height: 0.75rem;
}
.sb-timeline-item:last-child .sb-marker-line {
    display: none;
}
.sb-timeline-content {
    flex: 1;
    min-width: 0;
    padding-bottom: 1.25rem;
}
.sb-timeline-item:last-child .sb-timeline-content {
    padding-bottom: 0;
}
.sb-timeline-user {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4F555A;
}
.sb-timeline-time {
    font-size: 0.75rem;
    color: #B5AFA6;
}
.sb-timeline-action {
    font-size: 0.8125rem;
    color: #716C64;
    line-height: 1.4;
}
.sb-timeline-note {
    font-size: 0.8125rem;
    color: #948D82;
    font-style: italic;
    margin-top: 0.25rem;
}
.sb-timeline-empty {
    font-size: 0.875rem;
    color: #B5AFA6;
    margin-bottom: 0;
}

/* ── Workload View ── */
.sb-workload-grid {
  width: 100%;
}

.sb-workload-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #D8D2C7;
}

.sb-workload-dow {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #948D82;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sb-workload-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #D8D2C7;
}

.sb-workload-week:last-child {
  border-bottom: none;
}

.sb-workload-day {
  min-height: 6rem;
  padding: 0.375rem;
  border-right: 1px solid #D8D2C7;
  min-width: 0;
}

.sb-workload-day:last-child {
  border-right: none;
}

.sb-workload-day--other {
  background: #FBFAF7;
}

.sb-workload-day--today {
  background: #eff6ff;
}

.sb-workload-day--today .sb-workload-date {
  color: var(--sb-accent);
  font-weight: 700;
}

.sb-workload-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: #B5AFA6;
  margin-bottom: 0.25rem;
}

.sb-workload-chip {
  display: block;
  border-radius: 4px;
  padding: 0.2rem 0.3rem;
  margin-bottom: 0.2rem;
  text-decoration: none;
  overflow: hidden;
}

.sb-workload-chip--active {
  background: #dbeafe;
  color: #1e40af;
  border-left: 3px solid var(--sb-accent);
}

.sb-workload-chip--overdue {
  background: #fee2e2;
  color: #991b1b;
  border-left: 3px solid #dc2626;
}

.sb-workload-chip--ready {
  background: #dcfce7;
  color: #166534;
  border-left: 3px solid #16a34a;
}

.sb-workload-chip--complete {
  background: #FBFAF7;
  color: #716C64;
  border-left: 3px solid #B5AFA6;
}

.sb-workload-chip-num {
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-workload-chip-customer {
  font-size: 0.625rem;
  line-height: 1.2;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-workload-more {
  font-size: 0.625rem;
  color: #948D82;
  padding: 0.125rem 0.3rem;
  font-weight: 500;
}

.sb-workload-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  border: 1px solid #D8D2C7;
  color: #716C64;
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.12s;
}

.sb-workload-nav-btn:hover {
  background: #FBFAF7;
  color: #202325;
}

.sb-workload-month-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #202325;
  min-width: 8rem;
  text-align: center;
}

.sb-workload-upcoming-header {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4F555A;
  border-bottom: 1px solid #D8D2C7;
  background: #FBFAF7;
  border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
}

.sb-workload-upcoming-list {
  display: flex;
  flex-direction: column;
}

.sb-workload-upcoming-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid #D8D2C7;
  text-decoration: none;
  color: inherit;
  font-size: 0.8125rem;
  transition: background 0.12s;
}

.sb-workload-upcoming-row:last-child {
  border-bottom: none;
}

.sb-workload-upcoming-row:hover {
  background: #FBFAF7;
}

.sb-workload-upcoming-date {
  color: #948D82;
  flex-shrink: 0;
  width: 4.5rem;
}

.sb-workload-upcoming-num {
  font-weight: 600;
  color: var(--sb-accent);
  flex-shrink: 0;
  width: 5rem;
}

.sb-workload-upcoming-customer {
  color: #716C64;
  flex-shrink: 0;
  width: 10rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sb-workload-upcoming-desc {
  color: #948D82;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ── Calendar filter toggles ── */
.sb-cal-toggle {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.1875rem 0.625rem;
  border-radius: 0.375rem;
  border: 1px solid #D8D2C7;
  background: transparent;
  color: #948D82;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  min-height: unset;
  line-height: 1.5;
}
.sb-cal-toggle.sb-cal-toggle--on {
  background: var(--sb-primary);
  border-color: var(--sb-primary);
  color: #fff;
}
.sb-cal-toggle:hover:not(.sb-cal-toggle--on) {
  background: #FBFAF7;
  color: #202325;
}

/* ── Mini next-month calendar ── */
.sb-mini-cal {
  text-align: center;
}
.sb-mini-cal-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #948D82;
  margin-bottom: 0.3125rem;
}
.sb-mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1.5rem);
  gap: 0;
}
.sb-mini-cal-dow {
  font-size: 0.5625rem;
  font-weight: 700;
  text-align: center;
  color: #B5AFA6;
  text-transform: uppercase;
  padding-bottom: 0.1875rem;
}
.sb-mini-cal-cell {
  text-align: center;
  font-size: 0.6875rem;
  color: #716C64;
  padding: 0.125rem 0;
  line-height: 1.3;
}
.sb-mini-cal-cell--other {
  color: #cbd5e1;
}
.sb-mini-cal-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  margin: 0.0625rem auto 0;
  background: transparent;
}
.sb-mini-cal-dot--active {
  background: var(--sb-active-accent);
}
.sb-mini-cal-dot--overdue {
  background: var(--sb-overdue-accent);
}

/* ── Activity Feed ── */
.sb-activity-job-ref {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.sb-activity-job-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sb-accent);
  text-decoration: none;
}

.sb-activity-job-link:hover {
  text-decoration: underline;
}

.sb-activity-job-customer {
  font-size: 0.75rem;
  color: #716C64;
  font-weight: 500;
}

.sb-activity-job-desc {
  font-size: 0.75rem;
  color: #B5AFA6;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 20rem;
}

/* ── Activity Feed: date groups & status transitions ── */
.sb-activity-date {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #948D82;
  margin: 1.5rem 0 0.75rem;
}

.sb-activity-date:first-child {
  margin-top: 0.25rem;
}

.sb-status-transition {
  font-weight: 600;
  color: #4F555A;
}

.sb-timeline-item {
  gap: 0.5rem;
}

.sb-timeline-content {
  padding-bottom: 0.625rem;
}

/* ── Workload counter ── */
.sb-workload-counter {
  display: inline-block;
  color: inherit;
}

.sb-workload-counter-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #202325;
  line-height: 1;
}

.sb-workload-counter-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #948D82;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sb-workload-counter:hover .sb-workload-counter-number {
  color: var(--sb-accent);
}

/* ── Calendar Events ── */
.sb-calendar-event-chip {
  display: block;
  border-radius: 4px;
  padding: 0.2rem 0.3rem;
  margin-bottom: 0.2rem;
  font-size: 0.6875rem;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sb-calendar-event-chip--company {
  background: #f3e8ff;
  color: #6b21a8;
  border-left: 3px solid #9333ea;
}

.sb-calendar-event-chip--personal {
  background: #f0fdf4;
  color: #166534;
  border-left: 3px solid #16a34a;
}

.sb-calendar-event-personal-icon {
  font-size: 0.6rem;
  margin-right: 0.2rem;
}

.sb-calendar-event-row {
  background: #faf5ff;
}

.sb-calendar-event-upcoming-title {
  font-weight: 500;
  color: #6b21a8;
  flex: 1;
}

.sb-calendar-event-link {
  font-size: 0.75rem;
  color: #2563eb;
  text-decoration: none;
  margin-right: 0.5rem;
}

.sb-calendar-event-link:hover {
  text-decoration: underline;
}

.sb-calendar-event-delete {
  font-size: 0.75rem;
  color: #dc2626;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.sb-calendar-event-delete:hover {
  text-decoration: underline;
}

.sb-calendar-event-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* ── Dashboard toggle ── */
.sb-dash-toggle {
  display: flex;
  background: #FBFAF7;
  border-radius: 0.375rem;
  padding: 0.2rem;
  gap: 0.2rem;
}

.sb-dash-toggle-btn {
  border: none;
  background: transparent;
  border-radius: 0.25rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #948D82;
  cursor: pointer;
  transition: all 0.15s;
}

.sb-dash-toggle-btn.active {
  background: #fff;
  color: #202325;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ── Dashboard panels ── */
.job-group-scroll {
  max-height: 360px;
  overflow-y: auto;
}

.sb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
}

.sb-panel-header--amber {
  background: #fef3c7;
  color: #92400e;
  border-bottom: 2px solid #d97706;
}

.sb-panel-header--green {
  background: #dcfce7;
  color: #14532d;
  border-bottom: 2px solid #16a34a;
}

.sb-panel-header--red {
  background: #fee2e2;
  color: #7f1d1d;
  border-bottom: 2px solid #dc2626;
}

.sb-panel-header--slate {
  background: #f8fafc;
  color: #334155;
  border-bottom: 2px solid #B5AFA6;
}

.sb-panel-count {
  font-weight: 400;
  opacity: 0.8;
  margin-left: 0.25rem;
}

.sb-panel-viewall {
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.75;
  color: inherit;
}

.sb-panel-viewall:hover {
  opacity: 1;
}

.sb-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid #D8D2C7;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}

.sb-panel-row:last-child {
  border-bottom: none;
}

.sb-panel-row:hover {
  background: #FBFAF7;
}

.sb-panel-cardnum {
  font-weight: 700;
  color: #2563eb;
  margin-right: 0.5rem;
  font-size: 0.875rem;
}

.sb-panel-desc {
  color: #4F555A;
  font-size: 0.875rem;
}

.sb-panel-customer {
  font-size: 0.8rem;
  color: #948D82;
  margin-top: 0.125rem;
}

.sb-panel-date {
  font-size: 0.75rem;
  color: #948D82;
}

.sb-panel-empty {
  padding: 1.25rem 1rem;
  color: #B5AFA6;
  font-size: 0.875rem;
  text-align: center;
}

/* ── Dashboard compact calendar ── */
.sb-dash-cal-grid {
  width: 100%;
}

.sb-dash-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #D8D2C7;
  margin-bottom: 0.25rem;
}

.sb-dash-cal-dow {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #B5AFA6;
  text-transform: uppercase;
  padding: 0.25rem 0;
}

.sb-dash-cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #D8D2C7;
}

.sb-dash-cal-week:last-child {
  border-bottom: none;
}

.sb-dash-cal-day {
  min-height: 4rem;
  padding: 0.25rem;
  border-right: 1px solid #D8D2C7;
}

.sb-dash-cal-day:last-child {
  border-right: none;
}

.sb-dash-cal-day--today {
  background: #eff6ff;
}

.sb-dash-cal-day--today .sb-dash-cal-date {
  color: #2563eb;
  font-weight: 700;
}

.sb-dash-cal-date {
  font-size: 0.6875rem;
  color: #B5AFA6;
  margin-bottom: 0.2rem;
}

.sb-dash-cal-chip {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  margin-bottom: 0.15rem;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sb-dash-cal-chip--active {
  background: #dbeafe;
  color: #1e40af;
}

.sb-dash-cal-chip--overdue {
  background: #fee2e2;
  color: #991b1b;
}

.sb-dash-cal-chip--ready {
  background: #dcfce7;
  color: #166534;
}

/* ── Dashboard calendar navigation ── */
.sb-dash-cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.sb-dash-cal-nav-btn {
  background: none;
  border: 1px solid #D8D2C7;
  border-radius: 0.375rem;
  width: 2rem;
  height: 2rem;
  font-size: 1.25rem;
  color: #716C64;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
  line-height: 1;
}

.sb-dash-cal-nav-btn:hover {
  background: #FBFAF7;
  color: #202325;
}

.sb-dash-cal-nav-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #202325;
  min-width: 8rem;
  text-align: center;
}

.sb-dash-cal-day--other {
  background: #FBFAF7;
  opacity: 0.5;
}

/* ── Core feature badge ── */
.sb-core-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #FAEEDA;
  color: #8A4A12;
  border-radius: 3px;
  padding: 0.1rem 0.3rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* ── Upgrade Modal ── */
.sb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.sb-modal-box {
  background: #fff;
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.sb-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #B5AFA6;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.sb-modal-close:hover {
  color: #4F555A;
}

.sb-modal-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.sb-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #202325;
  margin-bottom: 0.5rem;
}

.sb-modal-desc {
  font-size: 0.875rem;
  color: #716C64;
  margin-bottom: 1rem;
}

.sb-modal-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.sb-modal-features li {
  font-size: 0.875rem;
  color: #4F555A;
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.sb-modal-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 700;
}

.sb-modal-learn {
  display: block;
  text-align: center;
  font-size: 0.8125rem;
  color: #948D82;
  text-decoration: none;
  margin-top: 0.5rem;
}

.sb-modal-learn:hover {
  color: #4F555A;
}

/* ── Inline upgrade prompt ── */
.sb-upgrade-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #FBFAF7;
  border: 1px solid #D8D2C7;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
}

.sb-upgrade-inline-text {
  font-size: 0.875rem;
  color: #716C64;
  flex: 1;
}

.sb-upgrade-inline-text strong {
  color: #202325;
  display: block;
  margin-bottom: 0.125rem;
}

/* ── Dashboard toggle ── */
.sb-dash-toggle {
  display: flex;
  background: #FBFAF7;
  border-radius: 0.375rem;
  padding: 0.2rem;
  gap: 0.2rem;
}

.sb-dash-toggle-btn {
  border: none;
  background: transparent;
  border-radius: 0.25rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #948D82;
  cursor: pointer;
  transition: all 0.15s;
}

.sb-dash-toggle-btn.active {
  background: #fff;
  color: #202325;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ── Dashboard compact calendar ── */
.sb-dash-cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.sb-dash-cal-nav-btn {
  background: none;
  border: 1px solid #D8D2C7;
  border-radius: 0.375rem;
  width: 2rem;
  height: 2rem;
  font-size: 1.25rem;
  color: #716C64;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
  line-height: 1;
}

.sb-dash-cal-nav-btn:hover {
  background: #FBFAF7;
  color: #202325;
}

.sb-dash-cal-nav-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #202325;
  min-width: 8rem;
  text-align: center;
}

.sb-dash-cal-grid {
  width: 100%;
}

.sb-dash-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #D8D2C7;
  margin-bottom: 0.25rem;
}

.sb-dash-cal-dow {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #B5AFA6;
  text-transform: uppercase;
  padding: 0.25rem 0;
}

.sb-dash-cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #D8D2C7;
}

.sb-dash-cal-week:last-child {
  border-bottom: none;
}

.sb-dash-cal-day {
  min-height: 4rem;
  padding: 0.25rem;
  border-right: 1px solid #D8D2C7;
}

.sb-dash-cal-day:last-child {
  border-right: none;
}

.sb-dash-cal-day--other {
  background: #FBFAF7;
  opacity: 0.5;
}

.sb-dash-cal-day--today {
  background: #eff6ff;
}

.sb-dash-cal-day--today .sb-dash-cal-date {
  color: #2563eb;
  font-weight: 700;
}

.sb-dash-cal-date {
  font-size: 0.6875rem;
  color: #B5AFA6;
  margin-bottom: 0.2rem;
}

.sb-dash-cal-chip {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  margin-bottom: 0.15rem;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sb-dash-cal-chip--active {
  background: #dbeafe;
  color: #1e40af;
}

.sb-dash-cal-chip--overdue {
  background: #fee2e2;
  color: #991b1b;
}

.sb-dash-cal-chip--ready {
  background: #dcfce7;
  color: #166534;
}

.sb-dash-cal-more {
  font-size: 0.6rem;
  color: #B5AFA6;
  padding: 0.1rem 0.2rem;
}

/* ── Dashboard day click panel ── */
.sb-day-panel-box {
  max-width: 380px;
  padding: 0;
  overflow: hidden;
}

.sb-day-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #D8D2C7;
}

.sb-day-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: #202325;
}

.sb-day-panel-jobs {
  max-height: 320px;
  overflow-y: auto;
}

.sb-day-panel-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #D8D2C7;
  gap: 0.75rem;
}

.sb-day-panel-job:last-child {
  border-bottom: none;
}

.sb-day-panel-job-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.sb-day-panel-cardnum {
  font-weight: 700;
  color: #2563eb;
  font-size: 0.875rem;
  white-space: nowrap;
}

.sb-day-panel-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}

.sb-day-panel-badge--active {
  background: #dbeafe;
  color: #1e40af;
}

.sb-day-panel-badge--overdue {
  background: #fee2e2;
  color: #991b1b;
}

.sb-day-panel-badge--ready {
  background: #dcfce7;
  color: #166534;
}

.sb-day-panel-open {
  font-size: 0.8125rem;
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.sb-day-panel-open:hover {
  text-decoration: underline;
}

.sb-day-panel-empty {
  padding: 1.5rem 1.25rem;
  color: #B5AFA6;
  font-size: 0.875rem;
  text-align: center;
}

.sb-day-panel-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #D8D2C7;
  background: #FBFAF7;
}

.sb-dash-cal-day[data-date] {
  cursor: pointer;
}

.sb-dash-cal-day[data-date]:hover {
  background: #FBFAF7;
}

.sb-dash-cal-day--today[data-date]:hover {
  background: #dbeafe;
}

/* ── Activity Feed action types ── */
.sb-activity-action {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.sb-activity-action--ready {
  color: #16a34a;
}

.sb-activity-action--closed {
  color: #64748b;
}

.sb-activity-action--active {
  color: #2563eb;
}

.sb-activity-action--new {
  color: #2563eb;
}

.sb-activity-action--note {
  color: #7c3aed;
}

.sb-activity-action--edit {
  color: #948D82;
}

/* ── Calendar chip two-line layout ── */
.sb-dash-cal-chip-num {
  font-weight: 700;
  font-size: 0.625rem;
  line-height: 1.2;
}
.sb-dash-cal-chip-customer {
  font-size: 0.5625rem;
  opacity: 0.8;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
