:root {
  --ink: #1d2430;
  --muted: #667085;
  --line: #d9dee8;
  --soft: #f5f7fa;
  --panel: #ffffff;
  --accent: #0b6b75;
  --accent-soft: #e6f4f5;
  --warn: #a05a00;
  --bad: #a33131;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px 1fr;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
}

aside {
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
}

aside h1 {
  font-size: 20px;
  margin: 4px 8px 22px;
}

aside h1.brandSidebar {
  margin: 6px 6px 22px;
}

aside h1.brandSidebar img {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
}

button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
}

aside button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 6px 0;
}

button.active,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

button.danger {
  background: #ffffff;
  border-color: var(--bad);
  color: var(--bad);
}

main {
  min-width: 0;
}

header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.headerActions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

h2 {
  margin: 0;
  font-size: 24px;
}

p {
  margin: 4px 0 0;
  color: var(--muted);
}

#content {
  padding: 22px 24px 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric {
  font-size: 28px;
  font-weight: 700;
}

.progressBlock {
  display: grid;
  gap: 5px;
  min-width: 180px;
  margin-top: 8px;
}

.progressMeta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.progressMeta strong {
  color: var(--ink);
}

.progressTrack {
  height: 8px;
  border-radius: 999px;
  background: #e7edf3;
  overflow: hidden;
}

.progressTrack span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f7d68;
}

.label {
  color: var(--muted);
  font-size: 13px;
}

.dashboardHero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.2fr);
  gap: 16px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
}

.dashboardHero h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.1;
}

.dashboardHero p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.dashboardMini,
.dashboardMetricCard {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
}

.dashboardMini {
  padding: 14px;
}

.dashboardMini strong {
  font-size: 20px;
}

.dashboardMini span,
.dashboardMetricCard span,
.miniMetricList span {
  color: var(--muted);
  font-size: 12px;
}

.dashboardSection {
  margin-top: 16px;
}

.dashboardCardGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.dashboardMetricCard {
  padding: 14px;
}

.dashboardMetricCard strong {
  font-size: 24px;
}

.dashboardMini:hover,
.dashboardMetricCard:hover {
  border-color: var(--accent);
  background: #f0fdfa;
}

.miniMetricList {
  display: grid;
  gap: 10px;
}

.miniMetricList div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.miniMetricList div:last-child {
  border-bottom: 0;
}

.badCard {
  border-color: rgba(163, 49, 49, 0.35);
  background: #fff7f7;
}

.badCard .metric {
  color: var(--bad);
}

.row {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  width: 100%;
  background: #ffffff;
}

textarea {
  min-height: 72px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  min-width: 170px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: #eef1f5;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  margin: 2px 3px 2px 0;
}

.warn {
  color: var(--warn);
}

.bad {
  color: var(--bad);
}

.split {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 16px;
}

.stack {
  display: grid;
  gap: 14px;
}

.toolbar {
  margin-bottom: 14px;
}

.productTopbar {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.searchBox {
  flex: 1;
  max-width: 520px;
}

.filterBar {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filterBar label {
  min-width: 150px;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

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

.formGrid label:has(textarea) {
  grid-column: 1 / -1;
}

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

.financeTabs {
  flex-wrap: wrap;
}

.financeDashboardGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.compactList {
  display: grid;
  gap: 8px;
}

.compactRow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.compactRow:last-child {
  border-bottom: 0;
}

.compactRow span {
  color: var(--muted);
  font-size: 13px;
}

.attendanceGroup {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.attendanceGroup:last-child {
  border-bottom: 0;
}

.checkboxLine {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.checkboxLine input {
  width: auto;
}

.lockedCheck {
  color: var(--muted);
}

.sundayCheck {
  padding: 7px 8px;
  border: 1px solid rgba(163, 49, 49, 0.35);
  border-radius: 8px;
  background: #fff1f1;
  color: var(--bad);
}

.regularizationGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

tr.convertedRow td {
  background: #edf8ef;
}

tr.cancelledRow td {
  background: #fff1f1;
}

.statusBadge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.convertedBadge {
  color: #1f6b33;
  background: #dff3e4;
}

.cancelledBadge {
  color: #9d1d1d;
  background: #ffe1e1;
}

.warnPill {
  color: var(--warn);
  background: #fff3d8;
}

.documentUploadGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.requiredDoc {
  color: var(--ink);
}

.thumb {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  display: inline-block;
}

.thumbWrap {
  position: relative;
  display: inline-block;
}

#imageHoverZoom {
  position: fixed;
  display: none;
  width: 360px;
  min-height: 360px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 55px rgba(29, 36, 48, 0.24);
  pointer-events: none;
  z-index: 99999;
}

#imageHoverZoom.visible {
  display: grid;
  gap: 8px;
}

#imageHoverZoom img {
  width: 100%;
  height: 320px;
  object-fit: contain;
}

#imageHoverZoom div {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.thumb.missing,
.productPreview.missing {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.employeeThumb {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.employeeFormLayout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.employeePhotoPane {
  display: grid;
  gap: 10px;
}

.employeePreview {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.compactBtn {
  align-self: end;
  padding: 8px 14px;
  min-width: 70px;
}

.overtimeEntryRow {
  align-items: end;
}

.productPreview {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(29, 36, 48, 0.42);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 10;
}

.modal {
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.smallModal {
  width: min(680px, calc(100vw - 48px));
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.modalHeader h3 {
  margin: 0;
  font-size: 22px;
}

.productModal {
  padding: 18px;
}

.productDetailLayout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 18px;
  margin-top: 16px;
}

.productImagePane {
  display: grid;
  gap: 12px;
  align-content: start;
}

.productImagePane label {
  min-width: 0;
}

.productHeroImage {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.productInfoPane {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.detailGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.detailField {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcfd;
}

.detailField span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.detailField strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.sectionBlock {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.sectionBlock h4 {
  margin: 0 0 10px;
}

.innerTable {
  border-radius: 6px;
}

.innerTable th,
.innerTable td {
  font-size: 13px;
  padding: 8px 10px;
}

.innerTable input {
  min-width: 90px;
}

.modalActions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

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

.mutedText {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 0;
}

.quoteTotalRow td {
  border-top: 2px solid var(--ink);
  font-weight: 800;
  background: #fbfcfd;
}

.quoteTotalsBar {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.analyticsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 14px;
  align-items: start;
}

.analyticsTabs {
  flex-wrap: wrap;
}

.barChart {
  display: grid;
  gap: 10px;
}

.barRow {
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.barRow span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.barRow div {
  height: 10px;
  border-radius: 999px;
  background: #e8edf2;
  overflow: hidden;
}

.barRow i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.barRow strong {
  min-width: 70px;
  text-align: right;
}

.settingsLayout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settingsNav {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 96px;
}

.settingsNav button {
  width: 100%;
  text-align: left;
}

.settingsNav button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.settingsListPanel {
  overflow-x: auto;
}

.settingsListPanel .sectionHeader {
  margin-bottom: 12px;
}

.iconBtn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  text-align: center;
}

.emptyText {
  color: var(--muted);
  font-weight: 400;
}

.loadMorePanel {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 14px;
  color: var(--muted);
}

.topLeftBack {
  margin-bottom: 12px;
}

.topLeftBack button {
  min-width: 150px;
}

.searchPickerLabel {
  display: grid;
  gap: 5px;
}

.searchPicker {
  position: relative;
}

.searchPickerInput {
  width: 100%;
}

.searchPickerMenu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.searchPickerMenu button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
}

.searchPickerMenu button:hover {
  background: #f7fbfc;
}

.searchPickerMenu span,
.emptyPicker {
  color: var(--muted);
  font-size: 12px;
}

.emptyPicker {
  padding: 12px;
}

.crmLayout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(440px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.companyMasterDetail {
  align-items: start;
}

.companyListPanel {
  min-width: 0;
  padding: 14px;
}

.companyList {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.companyListRow {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.companyRowActions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.companyRowActions .miniAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.companyNameButton {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.companyNameButton:hover {
  color: var(--accent);
  text-decoration: underline;
}

.companyRowActions .miniAction:hover {
  border-color: var(--accent);
  background: #f7fbfc;
}

.companyRowActions .primaryMini {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.companyListRow:hover,
.companyListRow.active {
  border-color: var(--accent);
  background: #f7fbfc;
}

.companyListRow.active,
.companyListRow.active strong,
.companyListRow.active .companyNameButton {
  color: var(--ink);
}

.companyAvatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e9f4f5;
  color: var(--accent);
  font-weight: 800;
}

.companyListText {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.companyListText strong,
.companyListText em,
.companyListText small {
  overflow-wrap: anywhere;
}

.companyListText em,
.companyListText small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.companyContactCount {
  min-width: 32px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
}

.crmLeadLayout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(390px, 470px);
  gap: 16px;
  align-items: start;
}

.crmDashboardGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 14px;
}

.leadDashboardPanel {
  min-width: 0;
}

.leadDashboardPanel summary {
  cursor: pointer;
  list-style: none;
}

.leadDashboardPanel summary::-webkit-details-marker {
  display: none;
}

.leadCardList.compact .leadCard {
  padding: 10px;
}

.leadCardList.compact .leadCardActions {
  display: none;
}

.leadListPanel {
  min-width: 0;
}

.leadCardList {
  display: grid;
  gap: 10px;
}

.leadCard {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.leadCard:hover,
.leadCard.active {
  border-color: var(--accent);
  background: #f8fbff;
}

.leadCard.overdueLead {
  border-left: 4px solid #dc2626;
}

.leadCardTop,
.leadCardMeta,
.leadCardActions,
.leadDetailActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leadCardTop {
  justify-content: space-between;
}

.leadCardTop strong,
.leadCardTop span,
.leadCardBody span {
  display: block;
}

.leadCardTop span,
.leadCardBody,
.leadCardMeta {
  color: var(--muted);
  font-size: 13px;
}

.leadCardBody {
  display: grid;
  gap: 2px;
}

.leadCardMeta {
  flex-wrap: wrap;
}

.leadCardMeta span,
.leadStatus {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--ink);
  font-size: 12px;
}

.leadStatus.large {
  font-size: 13px;
  padding: 5px 9px;
}

.leadCardActions {
  justify-content: flex-end;
}

.leadDetailPanel {
  position: sticky;
  top: 96px;
  min-width: 0;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.leadDetailCard {
  min-width: 0;
}

.leadDetailHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.leadDetailHeader h3,
.leadDetailSection h4 {
  margin: 0;
}

.leadDetailHeader p {
  margin: 4px 0 0;
  color: var(--muted);
}

.leadDetailActions {
  justify-content: flex-end;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.leadDetailSection {
  border-bottom: 1px solid var(--line);
}

.leadDetailSection h4 {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.compactInfoGrid {
  border-bottom: 0;
}

.kanbanBoard {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanbanColumn {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.kanbanColumn.stageNew {
  background: #f8fafc;
  border-top: 4px solid #94a3b8;
}

.kanbanColumn.stageContacted {
  background: #f0f9ff;
  border-top: 4px solid #38bdf8;
}

.kanbanColumn.stageQuotation {
  background: #fffbeb;
  border-top: 4px solid #f59e0b;
}

.kanbanColumn.stageFollow {
  background: #f5f3ff;
  border-top: 4px solid #8b5cf6;
}

.kanbanColumn.stageWon {
  background: #ecfdf5;
  border-top: 4px solid #10b981;
}

.kanbanColumn.stageLost {
  background: #fef2f2;
  border-top: 4px solid #ef4444;
}

.kanbanColumn.stageDormant {
  background: #f8fafc;
  border-top: 4px solid #64748b;
}

.kanbanHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.kanbanHeader h3 {
  margin: 0;
  font-size: 15px;
}

.kanbanHeader span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef1f5;
  font-size: 12px;
}

.kanbanCards {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}

.kanbanLeadCard {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.kanbanLeadCard:hover {
  border-color: var(--accent);
  background: #f8fbff;
}

.kanbanLeadCard strong,
.kanbanLeadCard span {
  overflow-wrap: anywhere;
}

.kanbanLeadCard span {
  color: var(--muted);
  font-size: 13px;
}

.crmTabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.crmTabs button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.inlineSearchFilters {
  align-items: end;
}

.filterToggle {
  min-width: 78px;
}

.collapsibleFilters {
  margin-top: -6px;
}

.leadModal {
  gap: 14px;
}

.leadModal .modalHeader p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.formSection {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.sectionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sectionHeader h4 {
  margin: 0;
  font-size: 15px;
}

.leadFormGrid {
  display: grid;
  gap: 12px;
}

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

.leadFormGrid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.linkedContactPreview {
  display: grid;
  gap: 3px;
  margin: 0;
}

.linkedContactPreview strong,
.linkedContactPreview span {
  display: block;
}

.linkedContactPreview span {
  color: var(--muted);
  font-size: 13px;
}

#crmContactPanel {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  min-width: 0;
}

.companyDetailShell {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  min-width: 0;
}

.emptyDetail {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
}

.emptyDetail h3 {
  margin: 0 0 6px;
}

.smallEmpty {
  padding: 14px;
}

.companyDetailCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.companyDetailHeader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.companyDetailHeader h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.companyDetailHeader p {
  margin: 5px 0 0;
  color: var(--muted);
}

.recordBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.recordBadges span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.detailActions,
.contactActions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.detailActions button,
.contactActions button {
  min-width: 86px;
}

.companyInfoGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
  background: #ffffff;
}

.infoLine {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  min-width: 0;
}

.infoLine:nth-child(2n) {
  border-right: 1px solid var(--line);
}

.infoLine span,
.companyNotes span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.infoLine strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.companyNotes {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.companyContactsBlock {
  padding: 14px 18px 18px;
}

.companyContactsHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.companyContactsHeader h4 {
  margin: 0;
}

.contactCardList {
  display: grid;
  gap: 8px;
}

.salesforceContacts {
  gap: 10px;
}

.contactCard {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.salesforceContacts .contactCard {
  border-left: 4px solid var(--accent);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.contactAvatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e6f7f8;
  color: var(--accent);
  font-weight: 800;
}

.contactContent {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.contactCard .contactActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.salesforceContacts .contactCard .contactActions {
  align-self: center;
}

.contactMain,
.contactMeta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.contactMain strong,
.contactMeta span {
  overflow-wrap: anywhere;
}

.contactMain span,
.contactMeta span {
  color: var(--muted);
}

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

.contactActions .iconBtn,
.contactActions .dangerBtn {
  min-height: 36px;
  white-space: nowrap;
}

.contactMain span,
.contactMeta {
  color: var(--muted);
  font-size: 13px;
}

.quoteProductMeta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quoteSheet {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}

.quoteSheet > label,
.quoteSheet > .modalActions,
.quoteSheet > .quoteItemsHeader,
.quoteSheet > .quoteOutputTable {
  margin-left: 18px;
  margin-right: 18px;
}

.quoteSheetHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 2px solid var(--ink);
}

.quoteFirm {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.quoteNoBox {
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfd;
}

.quoteNoBox span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.quoteNoBox strong {
  font-size: 18px;
}

.quoteNoBox em {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
}

.quoteInfoGrid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(460px, 1.4fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.quotePartyBlock,
.quoteTermsBlock,
.quoteBankBlock {
  padding: 18px;
}

.quotePartyBlock {
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}

.quoteSheet h4 {
  margin: 0 0 10px;
}

.quoteAddressBox {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.quoteBankBlock {
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.quoteMiniGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.quoteMiniGrid .infoLine {
  border-bottom: 0;
}

.quoteItemsHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
}

.quoteItemsHeader h4 {
  margin: 0;
}

.quoteOutputTable {
  margin-bottom: 16px;
}

.quoteOutputTable th {
  background: #1d2430;
  color: #ffffff;
}

.quoteEmptyRow td {
  color: var(--muted);
  text-align: center;
  padding: 22px;
}

.hiddenOther {
  display: none;
}

.multiSelect {
  position: relative;
}

.multiSelectButton {
  width: 100%;
  min-height: 39px;
  text-align: left;
  overflow-wrap: anywhere;
}

.multiSelectMenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 8;
  width: min(320px, 80vw);
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(29, 36, 48, 0.16);
}

.multiSelectMenu .checkLabel {
  width: 100%;
  min-width: 0;
  padding: 7px 6px;
  border-radius: 6px;
}

.multiSelectMenu .checkLabel:hover {
  background: #f5f7fa;
}

.quoteProductModal {
  width: min(760px, calc(100vw - 48px));
}

.quotePreviewModal {
  width: min(1050px, calc(100vw - 48px));
}

.quotePreviewMeta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.quotePreviewMeta .infoLine {
  border-bottom: 1px solid var(--line);
}

.quoteProductModal .quoteProductMeta {
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.quoteProductModal .quoteProductMeta .thumb {
  width: 110px;
  height: 110px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.orderDetail {
  display: grid;
  gap: 16px;
}

.jobBoard {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}

.dashboardLists {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.productionDashboardLayout {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(300px, 380px);
  gap: 16px;
  align-items: start;
}

.productionAlertRail {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 96px;
}

.productionOrderList {
  display: grid;
  gap: 10px;
}

.productionOrderCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.productionOrderCard summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.9fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.productionOrderCard summary::-webkit-details-marker {
  display: none;
}

.productionOrderCard[open] summary {
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.productionOrderExpanded {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.productionOrderCard h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.miniJobList {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.miniJobProgress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.miniJobProgress span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.miniJobProgress strong {
  color: var(--ink);
}

.productionOrderMeta {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 13px;
}

.alertDropdown {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.busyOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(2px);
}

.busyBox {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.busyBox h3 {
  margin: 0 0 12px;
}

.busyBox p {
  margin: 10px 0 0;
  color: var(--muted);
}

.busyProgress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf3;
}

.busyProgress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: backupProgress 1.1s ease-in-out infinite;
}

@keyframes backupProgress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

.alertDropdown summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 11px 12px;
  font-weight: 700;
  background: #fbfcfd;
}

.alertDropdown summary span {
  min-width: 26px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
}

.alertList {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.alertRow {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  border-radius: 6px;
}

.alertRow span {
  color: var(--muted);
  font-size: 12px;
}

.inventoryTabs {
  margin-bottom: 14px;
}

.inventoryCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 10px;
  overflow: hidden;
}

.inventoryCard summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
}

.inventoryCard summary:has(.inventoryThumbCell) {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.inventoryCard summary span {
  display: grid;
  gap: 3px;
}

.inventoryCard summary em,
.inventoryCard summary small {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.inventoryCard table {
  margin: 0;
  border-top: 1px solid var(--line);
}

.inventoryThumb,
.inventoryThumbCell {
  width: 58px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
}

.inventoryThumb img,
.inventoryThumbCell .thumbWrap,
.inventoryThumbCell .thumb,
.inventoryThumbCell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inventoryThumbCell .thumbWrap {
  display: block;
}

.inventoryThumbCell .thumb {
  border: 0;
}

.kanbanLeadCard.stageNew {
  border-left: 4px solid #94a3b8;
}

.kanbanLeadCard.stageContacted {
  border-left: 4px solid #38bdf8;
}

.kanbanLeadCard.stageQuotation {
  border-left: 4px solid #f59e0b;
}

.kanbanLeadCard.stageFollow {
  border-left: 4px solid #8b5cf6;
}

.kanbanLeadCard.stageWon {
  border-left: 4px solid #10b981;
}

.kanbanLeadCard.stageLost {
  border-left: 4px solid #ef4444;
}

.kanbanLeadCard.stageDormant {
  border-left: 4px solid #64748b;
}

.payrollFormula {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.payrollFormula.lineFormula {
  display: grid;
  gap: 7px;
  color: var(--ink);
}

.payrollFormula.lineFormula p {
  margin: 0;
  color: var(--ink);
}

.payrollFormula.lineFormula strong {
  font-size: 15px;
}

.payrollCalcSheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.payrollCalcSheet label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.payrollCalcSheet label span {
  color: var(--muted);
  font-size: 13px;
}

.payrollCalcSheet input {
  text-align: right;
}

.payrollCalcSheet .readonlyCalc {
  background: #f8fafc;
}

.payrollCalcSheet .readonlyCalc input {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}

.payrollCalcSheet .editableCalc {
  border-color: rgba(13, 126, 132, 0.34);
  background: #f0fdfa;
}

.payrollCalcTotal {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
}

.payrollCalcTotal span {
  color: rgba(255, 255, 255, 0.72);
}

.inventoryQty {
  justify-self: end;
  font-size: 20px;
  font-weight: 800;
}

.inventoryNested {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.inventorySkuDetail {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.inventorySkuDetail summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.inventoryPickList {
  display: grid;
  gap: 8px;
}

.todoList {
  display: grid;
  gap: 10px;
}

.todoCard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.systemTodo {
  background: #fbfcfd;
}

.todoTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.todoTitle strong {
  font-size: 15px;
}

.todoCard p {
  margin: 6px 0 0;
  color: var(--muted);
}

.todoMeta,
.todoActions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.todoMeta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.inventoryLinePick {
  display: grid;
  grid-template-columns: auto 64px minmax(90px, 1fr) minmax(90px, 1fr) auto 110px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
}

.inventoryEntryRow {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr) 110px minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.negativeQty {
  color: #b42318;
}

.hidden {
  display: none !important;
}

.skuTaskList {
  display: grid;
  gap: 14px;
}

.skuTaskGroup {
  overflow: hidden;
}

.skuTaskGroup table {
  min-width: 1360px;
}

.skuTaskGroup input,
.skuTaskGroup select {
  min-width: 88px;
}

.skuTaskHeader {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.skuTaskHeader h3 {
  margin: 0 0 4px;
}

.skuTaskHeader p {
  margin: 0;
  color: var(--muted);
}

.skuTaskImage {
  width: 96px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: visible;
  color: var(--muted);
  font-size: 12px;
}

.skuTaskImage > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skuTaskImage .thumbWrap {
  width: 72px;
  height: 58px;
}

.skuTaskImage .thumb {
  width: 72px;
  height: 58px;
}

.skuSizeList {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.skuSizeBlock {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  background: #ffffff;
}

.skuSizeHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.skuSizeHeader span {
  color: var(--muted);
  font-size: 12px;
}

.skuUpdateLine.urgencyYellow {
  background: #fff8db;
}

.skuUpdateLine.urgencyRed {
  background: #ffe7e4;
}

.skuUpdateLine.urgencyHold {
  background: #f5f0ff;
}

.skuUpdateLine.urgencyYellow td:first-child {
  border-left: 4px solid #d99b00;
}

.skuUpdateLine.urgencyRed td:first-child {
  border-left: 4px solid #d73a2f;
}

.skuUpdateLine.urgencyHold td:first-child {
  border-left: 4px solid #7c3aed;
}

.wideModal {
  width: min(1180px, calc(100vw - 48px));
  max-height: calc(100vh - 60px);
  overflow: auto;
}

.updateHistoryTable {
  min-width: 1040px;
}

.dangerBtn {
  border-color: #d73a2f;
  color: #b42318;
}

.jobTypeBar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.jobTypeBar h3 {
  margin: 0;
}

.jobColumn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.jobColumn h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
  font-size: 15px;
}

.jobColumn h3 span {
  color: var(--muted);
  font-size: 13px;
}

.jobCardList {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.jobCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.jobCardTop {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.jobCard p {
  margin: 4px 0 8px;
}

.warnBadge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1d6;
  color: #8a4b00;
  font-size: 12px;
  font-weight: 700;
}

.jobQtyLine {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.jobQtyLine span {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef1f5;
  font-size: 12px;
}

.productionCopyModal {
  width: min(980px, calc(100vw - 48px));
}

.timeline {
  display: grid;
  gap: 8px;
}

.timelineEntry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
}

.timelineEntry strong,
.timelineEntry span {
  display: block;
}

.timelineEntry span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.productionSetupModal,
.productionUpdateModal {
  width: min(1180px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.productionSetupModal .modalActions,
.productionUpdateModal .modalActions {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.productionSetupModal .sectionBlock,
.productionUpdateModal .sectionBlock {
  overflow-x: auto;
}

.productionSetupModal table,
.productionUpdateModal table {
  min-width: 920px;
}

.productionCopyTable .thumb {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.compactSearch {
  max-width: 360px;
  margin-left: auto;
}

.tableActions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

.tableActions button {
  white-space: nowrap;
  padding: 7px 9px;
  font-size: 13px;
}

.hrToolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.hrToolbar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.hrToolbar label {
  min-width: 170px;
}

.variantRow {
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.checkLabel {
  display: flex;
  align-items: center;
  min-width: 120px;
  color: var(--ink);
}

.checkLabel input {
  width: auto;
  margin-right: 8px;
}

.priceGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
  min-width: 260px;
}

.priceGrid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
  background: #fbfcfd;
}

.priceGrid strong,
.priceGrid span {
  display: block;
  font-size: 12px;
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  aside {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  aside h1 {
    display: none;
  }

  aside button {
    width: auto;
    white-space: nowrap;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .productDetailLayout {
    grid-template-columns: 1fr;
  }

  .detailGrid {
    grid-template-columns: 1fr;
  }

  .crmLayout {
    grid-template-columns: 1fr;
  }

  .crmLeadLayout {
    grid-template-columns: 1fr;
  }

  .crmDashboardGrid {
    grid-template-columns: 1fr;
  }

  .analyticsGrid {
    grid-template-columns: 1fr;
  }

  .settingsLayout {
    grid-template-columns: 1fr;
  }

  .settingsNav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contactCard {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .contactCard .contactActions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .contactMeta {
    grid-template-columns: 1fr;
  }

  .leadFormGrid.two,
  .leadFormGrid.three {
    grid-template-columns: 1fr;
  }

  #crmContactPanel,
  .companyDetailShell,
  .leadDetailPanel {
    position: static;
    max-height: none;
  }

  .companyInfoGrid,
  .contactCard,
  .quoteInfoGrid,
  .quoteMiniGrid,
  .quotePreviewMeta {
    grid-template-columns: 1fr;
  }

  .companyDetailHeader {
    grid-template-columns: 1fr;
  }

  .detailActions {
    justify-content: flex-start;
  }

  .infoLine {
    border-right: 0;
  }

  .quotePartyBlock {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quoteSheetHeader {
    display: grid;
  }

  .jobBoard {
    grid-template-columns: 1fr;
  }

  .dashboardLists {
    grid-template-columns: 1fr;
  }

  .productionDashboardLayout,
  .productionOrderCard {
    grid-template-columns: 1fr;
  }

  .productionAlertRail {
    position: static;
  }
}

/* ===== CRM My Day / pipeline discipline (added) ===== */
.mutedHint {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 10px;
}
.coldBadge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fdecec;
  color: var(--bad);
  border: 1px solid #f3c8c8;
  font-size: 11px;
  font-weight: 600;
}
.myDayCard .quickLogRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.quickLogRow button {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 8px;
}
.quickLogRow .linkish {
  margin-left: auto;
  border-color: transparent;
  color: var(--accent);
  background: transparent;
}
.chipRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.chip {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--soft);
}
.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.fieldBlock {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fieldBlock .fieldLabel {
  font-size: 12px;
  color: var(--muted);
}

/* ===== Contact intelligence chips + duplicate warning (added) ===== */
.contactChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.intelChip {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #cfe6e8;
  white-space: nowrap;
}
.dupWarnSlot:empty {
  display: none;
}
.dupWarn {
  border: 1px solid #f0d38a;
  background: #fff8e6;
  color: var(--warn);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
.dupWarn ul {
  margin: 6px 0 4px;
  padding-left: 18px;
}
.dupWarn li {
  margin: 2px 0;
}
.dupWarn li span {
  color: var(--muted);
}
.dupHint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ===== Pricing intelligence hints (added) ===== */
.pricingIntel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.intelPill {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
}
.intelPill.strong {
  background: var(--accent-soft);
  border-color: #cfe6e8;
  color: var(--accent);
  font-weight: 600;
}
.intelPill.muted {
  color: var(--muted);
}

/* ===== Production: vendor + timeline views (added) ===== */
.linkish {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}
.simpleTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}
.simpleTable th, .simpleTable td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.simpleTable th {
  color: var(--muted);
  font-weight: 600;
}
.simpleTable tr.overdueLead td {
  background: #fdf3f3;
}
/* Gantt-lite */
.ganttRow {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.ganttLabel {
  display: flex;
  flex-direction: column;
  font-size: 12px;
}
.ganttLabel span { color: var(--muted); }
.ganttLabel em { color: var(--muted); font-style: normal; font-size: 11px; }
.ganttTrack {
  position: relative;
  height: 40px;
  background: repeating-linear-gradient(90deg, var(--soft), var(--soft) 1px, #fff 1px, #fff 64px);
  border-radius: 8px;
  overflow: hidden;
}
.ganttBar {
  position: absolute;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left-width: 4px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.08);
}
/* translucent completion fill behind the label */
.ganttFill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  opacity: 0.28;
}
.ganttBarLabel {
  position: relative;
  z-index: 1;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ganttPct {
  position: relative;
  z-index: 1;
  margin-left: auto;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
.ganttBar.stageNew { border-left-color: #8a94a6; }
.ganttBar.stageNew .ganttFill { background: #8a94a6; }
.ganttBar.stageQuotation { border-left-color: var(--accent); }
.ganttBar.stageQuotation .ganttFill { background: var(--accent); }
.ganttBar.stageWon { border-left-color: #2f8f5b; }
.ganttBar.stageWon .ganttFill { background: #2f8f5b; }
.ganttBar.stageLost { border-left-color: var(--bad); }
.ganttBar.stageLost .ganttFill { background: var(--bad); }
.ganttDeadline {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--bad);
}
.ganttDeadline::after {
  content: "▲";
  position: absolute;
  top: -2px;
  left: -4px;
  font-size: 9px;
  color: var(--bad);
}
.ganttToday {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: #667085;
  opacity: 0.6;
}

/* --- Stock Pullout report --- */
.pulloutControls { flex-wrap: wrap; gap: 8px; align-items: center; }
.pulloutControls .inlineToggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.pulloutControls .viewToggle { display: inline-flex; gap: 4px; margin-left: auto; }
.pulloutViewLabel { font-size: 13px; margin: 4px 0 8px; }
.pulloutTable { width: 100%; border-collapse: collapse; }
.pulloutTable th, .pulloutTable td { border: 1px solid #e2e5ea; padding: 8px; vertical-align: top; text-align: left; font-size: 13px; }
.pulloutTable th { background: #f2f4f7; }
.pulloutTable tr.pulloutShort td.shortCell, .pulloutTable tr.pulloutShort .warn { color: #c0392b; }
.pulloutItemCell { display: flex; gap: 8px; align-items: center; }
.pulloutCrate { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px dashed #eceef1; }
.pulloutCrate:last-child { border-bottom: none; }
.pulloutCrate.unlocated { background: #fff7ed; }
.pulloutCrate .crateNo { font-weight: 600; min-width: 48px; }
.pulloutCrate .crateLoc { color: #475467; min-width: 110px; }
.pulloutCrate .sugg { color: #1d6f42; font-size: 12px; }
.pulloutCrate .pulledInput { width: 70px; padding: 2px 6px; border: 1px solid #cbd2da; border-radius: 4px; }
.pulloutExport { flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Pullout crate selection (added) */
.pulloutCrate { cursor: pointer; }
.pulloutCrate.crateOff { opacity: 0.45; }
.pulloutCrate .pulloutCrateCheck { margin-right: 2px; }

/* Pullout: suggested-allocation highlight + in-page print (added) */
.pulloutCrate.crateSuggested {
  background: #e5f7ec;
  border-radius: 6px;
  padding-left: 6px;
  font-weight: 600;
  color: #1d6f42;
}
#pulloutPrintArea { display: none; }
.pl-print-table { border-collapse: collapse; width: 100%; }
.pl-print-table th, .pl-print-table td { border: 1px solid #999; padding: 6px 8px; font-size: 12px; text-align: center; vertical-align: middle; }
.pl-print-table th { background: #ededed; }
.pl-print-table td.short { color: #c0392b; font-weight: bold; }
.pl-print-table td.writein { min-width: 90px; }
.pl-print-table .pl-img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; }
.pl-print-table .pl-noimg { width: 56px; height: 56px; background: #f2f4f7; border-radius: 4px; margin: auto; }
@media print {
  body * { visibility: hidden; }
  #pulloutPrintArea, #pulloutPrintArea * { visibility: visible; }
  #pulloutPrintArea { display: block; position: absolute; left: 0; top: 0; width: 100%; padding: 12px; }
  #pulloutPrintArea h1 { font-size: 18px; margin: 0 0 4px; }
  #pulloutPrintArea .pl-sub { color: #555; margin: 0 0 12px; font-size: 13px; }
  .pl-print-table tr { page-break-inside: avoid; }
}

/* Product insights (added) */
.perfGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.perfCell { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.perfCell span { display: block; font-size: 11px; color: var(--muted); }
.perfCell strong { font-size: 15px; }
.sbsRow { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; padding: 4px 10px; }
.sbsRow > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 4px 0; list-style: none; }
.sbsRow > summary::-webkit-details-marker { display: none; }

/* General settings form (added) */
.settingsGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 8px; }
.settingField { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.settingField > span { font-weight: 600; color: var(--ink); }
.settingField.wide { grid-column: 1 / -1; }
.settingField input[type="checkbox"] { width: 18px; height: 18px; }
.settingField small { color: var(--muted); }

/* Auth gate + user label (added) */
.authGate { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
.authCard { width: 360px; max-width: 92vw; }
.authCard .authBrand { width: 96px; height: auto; display: block; margin: 4px auto 8px; }
.authCard h2 { margin: 0; text-align: center; }
.authCard > .muted { text-align: center; }
.authCard label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.authCard input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.userLabel { font-size: 12px; color: var(--muted); margin-left: 8px; }
#logoutBtn { font-size: 13px; }

/* Sales analytics — KPI deltas & filter bar */
.kpiDelta { margin-top: 6px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.deltaBadge { font-weight: 600; padding: 1px 6px; border-radius: 999px; font-size: 12px; }
.deltaUp { color: #047857; background: rgba(16,185,129,0.14); }
.deltaDown { color: #b91c1c; background: rgba(239,68,68,0.14); }
.deltaFlat { color: #6b7280; background: rgba(107,114,128,0.12); }
.salesFilterBar label { font-size: 13px; color: var(--muted, #555); display: flex; flex-direction: column; gap: 2px; }
.salesFilterBar input[type="date"] { padding: 5px 8px; }
.salesFilterBar button.ghost { background: transparent; border: 1px solid #d1d5db; color: inherit; }

/* new-ui.html dark header: keep user label + logout legible */
.functionalShell #userLabel { color: rgba(255, 255, 255, 0.82); }
.functionalShell #logoutBtn { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.13); color: #fff; }

.checkboxLabel { display:inline-flex; align-items:center; gap:6px; font-size:13px; white-space:nowrap; }
.checkboxLabel input { width:auto; margin:0; }

/* =========================================================================
   MOBILE + TABLET RESPONSIVE PASS (phone-first)  — added 2026-08-04
   CSS-only, layered on top of existing rules. Safe to remove this block
   to revert. Existing @media (max-width:900px) rules still apply.
   ========================================================================= */

/* Auto table-scroll wrapper: injected around every rendered <table> by JS
   in new-ui.html so wide tables scroll internally instead of stretching
   the page. Harmless on desktop (no scrollbar unless the table overflows). */
.tableScroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tableScroll > table {
  min-width: max-content;
}

/* Prevent CSS-grid "blowout": grid items default to min-width:auto, which lets
   a wide child (a big table) stretch the whole page instead of scrolling.
   Constraining the shell grid + main lets .tableScroll actually do its job.
   Applies at all widths (fixes desktop horizontal-scroll on wide tables too). */
.functionalShell {
  grid-template-columns: minmax(0, 1fr);
}
.functionalShell > main,
.functionalShell main,
main,
#content {
  min-width: 0;
  max-width: 100%;
}

/* Grid/flex items default to min-width:auto, so a wide table inside a panel
   stretches the whole layout. Zeroing min-width on the common item wrappers
   lets .tableScroll contain and scroll the table. min-width:0 is inert on
   ordinary block elements, so this is safe everywhere. */
.panel,
.card,
.stack > *,
.split > *,
.grid > *,
.dashboardLists > *,
.crmLayout > *,
.crmDashboardGrid > *,
.analyticsGrid > *,
.productionDashboardLayout > *,
#content > * {
  min-width: 0;
}

/* ---- Tablet (portrait iPad and below) ---------------------------------- */
@media (max-width: 1024px) {
  .split {
    grid-template-columns: 1fr;
  }
  .formGrid,
  .detailGrid,
  .twoCol {
    grid-template-columns: 1fr 1fr;
  }
  .productDetailLayout {
    grid-template-columns: 260px 1fr;
  }
  .dashboardHero {
    grid-template-columns: 1fr;
  }
  #content {
    padding: 20px 18px 36px;
  }
}

/* ---- Phone -------------------------------------------------------------- */
@media (max-width: 640px) {
  /* Header: stack into a clean column so title + actions never collide */
  header {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 10px;
    padding: 12px 14px;
  }
  header > div {
    order: -1;
  }
  #newBackHome,
  .newHomeButton {
    align-self: flex-start;
    order: -2;
  }
  .functionalShell header h2,
  #viewTitle {
    font-size: 20px;
  }
  #viewSubtitle {
    font-size: 12px;
  }
  .headerActions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  #viewActions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  #viewActions button {
    flex: 1 1 auto;
  }
  /* Dashboard hero: single column, smaller headline number */
  .dashboardHero {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .dashboardHero h2 {
    font-size: 30px;
  }
  .dashboardHeroStats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  /* Segmented tab bars (CRM / Inventory / HR): scroll horizontally as a strip
     instead of overflowing the page */
  .crmTabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 2px;
  }
  .crmTabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Tighter page padding */
  #content {
    padding: 14px 12px 32px;
  }

  /* Metric / card grids to a single readable column */
  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .metric {
    font-size: 24px;
  }

  /* All two-up form/detail grids collapse to one column */
  .formGrid,
  .detailGrid,
  .twoCol,
  .leadFormGrid.two,
  .leadFormGrid.three,
  .productDetailLayout {
    grid-template-columns: 1fr;
  }

  /* Filter / toolbar controls take full width so they're tappable */
  .filterBar,
  .productTopbar,
  .salesFilterBar {
    flex-direction: column;
    align-items: stretch;
  }
  .filterBar label,
  .searchBox {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  /* Modals: use nearly full screen with less chrome */
  .modalBackdrop {
    padding: 10px;
  }
  .modal,
  .smallModal,
  .leadModal,
  .productModal {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 20px);
  }
  .modalHeader h3 {
    font-size: 18px;
  }
  .modalActions {
    justify-content: stretch;
  }
  .modalActions button {
    flex: 1 1 auto;
  }

  /* Section headings scale down */
  h2 { font-size: 20px; }
}

/* ---- Small phones ------------------------------------------------------- */
@media (max-width: 420px) {
  .grid {
    grid-template-columns: 1fr;
  }
  #content {
    padding: 12px 10px 28px;
  }
}

/* ---- Touch devices: enlarge tap targets regardless of width ------------- */
@media (hover: none) and (pointer: coarse) {
  button,
  .newAppTile,
  select,
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="search"],
  input[type="email"],
  input[type="password"] {
    min-height: 44px;
  }
  button {
    padding: 11px 14px;
  }
  /* Table action buttons stay compact but remain finger-friendly */
  .tableActions button,
  td button {
    min-height: 38px;
  }
  /* Bigger horizontal-scroll affordance on nav strip */
  aside button {
    min-height: 42px;
  }
}

/* ===== Catalogue Builder ===== */
.catSettingsBar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 14px;
}
.catSettingsBar .catRef { font-size: 13px; opacity: 0.85; align-self: center; }
.catSettingsBar label { display: flex; flex-direction: column; font-size: 12px; gap: 4px; }
.catSettingsBar .catCheck { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; align-self: center; }
.catLayout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.catCartPane { position: sticky; top: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 90px); }
.catCartHeader { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.catCartBody { overflow-y: auto; flex: 1; min-height: 120px; }
.catCartEmpty { padding: 20px 6px; font-size: 13px; text-align: center; }
.catCartLine { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(128,128,128,0.18); }
.catCartLineMain { flex: 1; min-width: 0; }
.catCartLineMain strong { font-size: 13px; }
.catCartPrice { display: flex; align-items: center; gap: 2px; font-size: 12px; }
.catCartPrice input { width: 74px; padding: 4px 6px; }
.catCartRemove { border: none; background: transparent; cursor: pointer; font-size: 16px; opacity: 0.6; padding: 2px 6px; }
.catCartRemove:hover { opacity: 1; color: #c0392b; }
.catCartActions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.catCartActions button { flex: 1; min-width: 92px; }
.catClearBtn { color: #c0392b; }
.catProductRow { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid rgba(128,128,128,0.16); }
.catProductThumb .thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; }
.catProductInfo { flex: 1; min-width: 140px; }
.catProductSizes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 55%; }
.catSizeChip {
  border: 1px solid rgba(128,128,128,0.4);
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.catSizeChip:hover { border-color: #2d6cdf; }
.catSizeChip.active { background: #2d6cdf; border-color: #2d6cdf; color: #fff; }
.catAddAll { border: 1px dashed rgba(128,128,128,0.5); background: transparent; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.catAddAll:hover { border-color: #2d6cdf; color: #2d6cdf; }
.catSavedRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid rgba(128,128,128,0.2); border-radius: 8px; cursor: pointer; }
.catSavedRow:hover { border-color: #2d6cdf; }
@media (max-width: 900px) {
  .catLayout { grid-template-columns: 1fr; }
  .catCartPane { position: static; max-height: none; }
  .catProductSizes { max-width: none; justify-content: flex-start; }
}
