:root {
  --bg: #eef1f5;
  --panel: #ffffff;
  --ink: #111317;
  --muted: #566173;
  --line: #cfd6df;
  --line-strong: #aeb8c5;
  --nav: #ffffff;
  --nav-2: #f4f6f8;
  --accent: #d71920;
  --accent-dark: #a90f15;
  --accent-soft: #fff1f2;
  --accent-2: #b54708;
  --danger: #b42318;
  --ok: #067647;
  --shadow: 0 8px 22px rgba(10, 12, 16, 0.08);
  --shadow-soft: 0 1px 2px rgba(10, 12, 16, 0.08);
}

/* Dashboard production pass: replaces the earlier experimental dashboard locks. */
body[data-view="dashboard"] {
  background: #f5f7fb !important;
  color: #07142c !important;
}

body[data-view="dashboard"] .app-shell {
  grid-template-columns: 280px minmax(0, 1fr) !important;
  min-height: 100vh !important;
  background: #f5f7fb !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  min-width: 0 !important;
  background: #f5f7fb !important;
  overflow: auto !important;
}

body[data-view="dashboard"] .sidebar {
  width: 280px !important;
  min-width: 280px !important;
  background: linear-gradient(180deg, #07162b 0%, #061328 56%, #031022 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body[data-view="dashboard"] .sidebar .brand {
  padding: 24px 22px 18px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
}

body[data-view="dashboard"] .sidebar .brand-logo {
  width: 208px !important;
  height: 68px !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

body[data-view="dashboard"] .sidebar .brand-copy strong {
  color: #ffffff !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
}

body[data-view="dashboard"] .sidebar .brand-copy span {
  color: #cbd5e1 !important;
  font-size: 13px !important;
}

body[data-view="dashboard"] .nav {
  padding: 18px 16px 24px !important;
  gap: 4px !important;
}

body[data-view="dashboard"] .nav-group-label {
  margin: 18px 4px 8px !important;
  color: #8fb0d7 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: .16em !important;
}

body[data-view="dashboard"] .nav button,
body[data-view="dashboard"] .nav-item,
body[data-view="dashboard"] .nav-btn {
  min-height: 38px !important;
  padding: 9px 12px !important;
  border-radius: 6px !important;
  color: #f8fafc !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  background: transparent !important;
}

body[data-view="dashboard"] .nav button.active,
body[data-view="dashboard"] .nav-item.active,
body[data-view="dashboard"] .nav-btn.active {
  color: #ffffff !important;
  background: #ef1528 !important;
  box-shadow: none !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 100vh !important;
  padding: 28px 32px 18px !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  gap: 20px !important;
  background: #f5f7fb !important;
}

body[data-view="dashboard"] .erp-ref-header {
  display: grid !important;
  grid-template-columns: minmax(430px, 1fr) minmax(300px, 360px) 48px 116px 74px 178px 132px 150px !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 64px !important;
}

body[data-view="dashboard"] .erp-ref-title {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  color: #07142c !important;
  font-size: 28px !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin: 6px 0 0 !important;
  color: #475569 !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-menu {
  width: 48px !important;
  height: 48px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #eaf2ff !important;
  color: #2563eb !important;
  display: grid !important;
  place-items: center !important;
}

body[data-view="dashboard"] .erp-ref-search {
  height: 48px !important;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) 46px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 8px 0 16px !important;
  border: 1px solid #d8e2ef !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04) !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  min-width: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  font-size: 14px !important;
}

body[data-view="dashboard"] .erp-ref-search button {
  width: 38px !important;
  height: 34px !important;
  border: 1px solid #9ca3af !important;
  border-radius: 5px !important;
  background: #f8fafc !important;
  color: #334155 !important;
}

body[data-view="dashboard"] .erp-ref-bell,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick {
  height: 48px !important;
  border: 1px solid #d8e2ef !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: #07142c !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04) !important;
}

body[data-view="dashboard"] .erp-ref-bell {
  border-radius: 50% !important;
  color: #ef1528 !important;
  padding: 0 !important;
}

body[data-view="dashboard"] .erp-ref-cloud {
  color: #06944f !important;
  background: #e9fbf0 !important;
  border-color: #bdf3cf !important;
}

body[data-view="dashboard"] .erp-ref-user b {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  color: #ffffff !important;
  background: #07142c !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  color: #ffffff !important;
  background: #ef1528 !important;
  border-color: #ef1528 !important;
  box-shadow: 0 14px 28px rgba(239, 21, 40, 0.22) !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  min-height: 150px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 500px !important;
  gap: 20px !important;
  padding: 22px 24px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #06162d 0%, #061d3b 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16) !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  min-width: 0 !important;
  min-height: 106px !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 24px !important;
  column-gap: 16px !important;
  align-items: center !important;
  padding: 0 20px !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: transparent !important;
  color: #ffffff !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-kpi:last-child {
  border-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 11px !important;
  display: grid !important;
  place-items: center !important;
  color: #ffffff !important;
}

body[data-view="dashboard"] .erp-ref-kpi.red .erp-ref-kpi-icon { background: #ef1528 !important; }
body[data-view="dashboard"] .erp-ref-kpi.blue .erp-ref-kpi-icon { background: #2563eb !important; }
body[data-view="dashboard"] .erp-ref-kpi.green .erp-ref-kpi-icon { background: #12b981 !important; }
body[data-view="dashboard"] .erp-ref-kpi.orange .erp-ref-kpi-icon { background: #f59e0b !important; }

body[data-view="dashboard"] .erp-ref-kpi span:not(.erp-ref-kpi-icon) {
  min-width: 0 !important;
  display: grid !important;
  gap: 7px !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  color: #ffffff !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  color: #ffffff !important;
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  color: #cbd5e1 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi i {
  grid-column: 1 / -1 !important;
  color: #60a5fa !important;
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 850 !important;
}

body[data-view="dashboard"] .erp-ref-kpi.red i { color: #ff3142 !important; }
body[data-view="dashboard"] .erp-ref-kpi.green i { color: #22c55e !important; }
body[data-view="dashboard"] .erp-ref-kpi.orange i { color: #f59e0b !important; }

body[data-view="dashboard"] .erp-ref-glance {
  display: grid !important;
  grid-template-rows: 28px minmax(0, 1fr) !important;
  gap: 12px !important;
  padding-left: 18px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
}

body[data-view="dashboard"] .erp-ref-glance-head {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  color: #ffffff !important;
}

body[data-view="dashboard"] .erp-ref-glance-head b,
body[data-view="dashboard"] .erp-ref-glance-head strong {
  color: #ffffff !important;
  font-size: 14px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid button {
  min-width: 0 !important;
  min-height: 74px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.09) !important;
  color: #ffffff !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 7px !important;
  padding: 10px !important;
  text-align: center !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid span {
  color: #e2e8f0 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid b {
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  display: grid !important;
  grid-template-columns: minmax(520px, 1.55fr) minmax(300px, .8fr) minmax(300px, .8fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 16px !important;
  min-height: 0 !important;
}

body[data-view="dashboard"] .erp-ref-card {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 20px !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-operations { grid-area: operations !important; }
body[data-view="dashboard"] .erp-ref-compliance { grid-area: compliance !important; }
body[data-view="dashboard"] .erp-ref-pending { grid-area: pending !important; }
body[data-view="dashboard"] .erp-ref-actions { grid-area: actions !important; }
body[data-view="dashboard"] .erp-ref-activities { grid-area: activities !important; }
body[data-view="dashboard"] .erp-ref-upcoming { grid-area: upcoming !important; }

body[data-view="dashboard"] .erp-ref-card-head {
  min-height: 36px !important;
  margin: 0 0 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-card-head h2 {
  margin: 0 !important;
  color: #07142c !important;
  font-size: 18px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
}

body[data-view="dashboard"] .erp-ref-card-head button,
body[data-view="dashboard"] .erp-ref-wide {
  min-height: 36px !important;
  border: 1px solid #d8e2ef !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #ef1528 !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 44px !important;
  display: flex !important;
  align-items: stretch !important;
  gap: 0 !important;
  border: 1px solid #dbe5f0 !important;
  border-bottom: 0 !important;
  border-radius: 8px 8px 0 0 !important;
  background: #f8fafc !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-tab {
  min-width: 150px !important;
  border: 0 !important;
  border-right: 1px solid #e5edf6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #334155 !important;
  padding: 0 22px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-tab.active {
  color: #ef1528 !important;
  background: #ffffff !important;
  border-bottom: 3px solid #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: 232px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr) !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 0 0 8px 8px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row article {
  min-width: 0 !important;
  padding: 22px !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row article + article {
  border-left: 1px solid #dbe5f0 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row h3 {
  margin: 0 !important;
  color: #07142c !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row h3 small {
  color: #475569 !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-chart {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 22px !important;
}

body[data-view="dashboard"] .erp-ref-chart svg {
  width: 100% !important;
  height: 150px !important;
  overflow: visible !important;
}

body[data-view="dashboard"] .erp-ref-chart div {
  display: flex !important;
  justify-content: space-between !important;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

body[data-view="dashboard"] .erp-ref-donut-wrap {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 140px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  width: 140px !important;
  height: 140px !important;
  border-radius: 50% !important;
  background: conic-gradient(var(--segments)) !important;
  display: grid !important;
  place-items: center !important;
  position: relative !important;
  color: #07142c !important;
}

body[data-view="dashboard"] .erp-ref-donut::after {
  content: "" !important;
  position: absolute !important;
  inset: 38px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
}

body[data-view="dashboard"] .erp-ref-donut b,
body[data-view="dashboard"] .erp-ref-donut span {
  z-index: 1 !important;
  grid-area: 1 / 1 !important;
}

body[data-view="dashboard"] .erp-ref-donut b {
  margin-top: -12px !important;
  font-size: 28px !important;
  font-weight: 950 !important;
}

body[data-view="dashboard"] .erp-ref-donut span {
  margin-top: 26px !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-legend {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-legend span {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 10px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  color: #07142c !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

body[data-view="dashboard"] .erp-ref-legend i {
  width: 10px !important;
  height: 10px !important;
  border-radius: 3px !important;
}

body[data-view="dashboard"] .erp-ref-list {
  display: grid !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row,
body[data-view="dashboard"] .erp-ref-approval-row {
  min-width: 0 !important;
  min-height: 78px !important;
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 12px 14px !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #07142c !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-alert-row > span,
body[data-view="dashboard"] .erp-ref-activity-row > span {
  width: 48px !important;
  height: 48px !important;
  border-radius: 11px !important;
  display: grid !important;
  place-items: center !important;
  background: #fff1f2 !important;
  color: #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-activity-row > span {
  background: #eef4ff !important;
  color: #2563eb !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b,
body[data-view="dashboard"] .erp-ref-approval-row b {
  min-width: 0 !important;
  color: #07142c !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-alert-row small,
body[data-view="dashboard"] .erp-ref-alert-row u,
body[data-view="dashboard"] .erp-ref-activity-row small,
body[data-view="dashboard"] .erp-ref-approval-row small {
  min-width: 0 !important;
  color: #334155 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-alert-row em,
body[data-view="dashboard"] .status-badge {
  min-height: 32px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  color: #ef1528 !important;
  background: #ffe7eb !important;
  font-style: normal !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

body[data-view="dashboard"] .erp-ref-wide {
  width: 100% !important;
  margin-top: 10px !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  min-height: 228px !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 8px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 10px !important;
  text-align: center !important;
  color: #07142c !important;
  background: #ffffff !important;
}

body[data-view="dashboard"] .erp-ref-empty svg {
  width: 104px !important;
  height: 104px !important;
  padding: 26px !important;
  border-radius: 50% !important;
  background: #eef2f7 !important;
  color: #27446f !important;
}

body[data-view="dashboard"] .erp-ref-empty strong {
  font-size: 17px !important;
  font-weight: 950 !important;
}

body[data-view="dashboard"] .erp-ref-empty small {
  color: #64748b !important;
  font-size: 14px !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-action {
  min-width: 0 !important;
  min-height: 74px !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  column-gap: 12px !important;
  padding: 12px !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #07142c !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  grid-row: 1 / 3 !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  color: #2563eb !important;
  background: #eef4ff !important;
}

body[data-view="dashboard"] .erp-ref-action.red span { color: #ef1528 !important; background: #fff1f2 !important; }
body[data-view="dashboard"] .erp-ref-action.green span { color: #10b981 !important; background: #ecfdf5 !important; }
body[data-view="dashboard"] .erp-ref-action.orange span { color: #f59e0b !important; background: #fff7ed !important; }
body[data-view="dashboard"] .erp-ref-action.purple span { color: #7c3aed !important; background: #f3e8ff !important; }
body[data-view="dashboard"] .erp-ref-action.cyan span { color: #0891b2 !important; background: #ecfeff !important; }

body[data-view="dashboard"] .erp-ref-action b {
  min-width: 0 !important;
  color: #07142c !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-action small {
  min-width: 0 !important;
  color: #475569 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  display: flex !important;
  justify-content: space-between !important;
  color: #64748b !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

body[data-view="dashboard"] .erp-ref-dashboard svg,
body[data-view="dashboard"] .nav svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2.2 !important;
}

@media (max-width: 1540px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 238px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 238px !important;
    min-width: 238px !important;
  }

  body[data-view="dashboard"] .sidebar .brand-logo {
    width: 186px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 20px 24px 14px !important;
    gap: 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    grid-template-columns: minmax(260px, 1fr) minmax(290px, 390px) 44px 108px 70px 154px 120px 146px !important;
    gap: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-title h1 {
    font-size: 24px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    min-height: 136px !important;
    grid-template-columns: minmax(0, 1fr) 342px !important;
    padding: 18px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    grid-template-columns: 48px minmax(0, 1fr) !important;
    column-gap: 12px !important;
    padding: 0 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi-icon {
    width: 48px !important;
    height: 48px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi b {
    font-size: 22px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: minmax(440px, 1.35fr) minmax(270px, .82fr) minmax(270px, .82fr) !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-card {
    padding: 16px !important;
  }

  body[data-view="dashboard"] .erp-ref-analytics-row {
    height: 206px !important;
  }

  body[data-view="dashboard"] .erp-ref-chart svg {
    height: 126px !important;
  }

  body[data-view="dashboard"] .erp-ref-donut-wrap {
    grid-template-columns: 118px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .erp-ref-donut {
    width: 118px !important;
    height: 118px !important;
  }

  body[data-view="dashboard"] .erp-ref-donut::after {
    inset: 32px !important;
  }

  body[data-view="dashboard"] .erp-ref-actions-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-action {
    min-height: 66px !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .erp-ref-action span {
    width: 40px !important;
    height: 40px !important;
  }
}

@media (max-width: 1100px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 1fr !important;
  }

  body[data-view="dashboard"] .sidebar {
    display: none !important;
  }

  body[data-view="dashboard"] .erp-ref-header,
  body[data-view="dashboard"] .erp-ref-command-strip,
  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-areas: "operations" "compliance" "pending" "actions" "activities" "upcoming" !important;
  }

  body[data-view="dashboard"] .erp-ref-strip-metrics,
  body[data-view="dashboard"] .erp-ref-glance-grid,
  body[data-view="dashboard"] .erp-ref-actions-grid,
  body[data-view="dashboard"] .erp-ref-analytics-row {
    grid-template-columns: 1fr !important;
  }
}

/* ERP dashboard reference final lock - 2026-05-31 */
body[data-view="dashboard"] {
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

body[data-view="dashboard"] .app-shell {
  display: grid !important;
  grid-template-columns: 210px minmax(0, 1fr) !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .sidebar {
  width: 210px !important;
  min-width: 210px !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #071426 0%, #061426 100%) !important;
  padding: 18px 12px !important;
  color: #fff !important;
  border-right: 0 !important;
}

body[data-view="dashboard"] .sidebar-logo {
  width: 160px !important;
  height: 48px !important;
  max-height: 48px !important;
  object-fit: contain !important;
  background: #fff !important;
  border-radius: 7px !important;
  padding: 7px !important;
  margin: 0 0 12px !important;
  display: block !important;
}

body[data-view="dashboard"] .brand-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .brand-subtitle {
  font-size: 12px !important;
  color: #dbeafe !important;
  line-height: 1.25 !important;
}

body[data-view="dashboard"] .sidebar-section-title,
body[data-view="dashboard"] .nav-section-title {
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  color: #8fb0d2 !important;
  font-weight: 800 !important;
  margin: 18px 8px 8px !important;
}

body[data-view="dashboard"] .nav-item {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 7px !important;
  padding: 0 10px !important;
  gap: 10px !important;
  font-size: 12.5px !important;
  font-weight: 750 !important;
  color: #f8fafc !important;
  line-height: 1.1 !important;
}

body[data-view="dashboard"] .nav-item svg {
  width: 16px !important;
  height: 16px !important;
}

body[data-view="dashboard"] .nav-item.active {
  background: #ef1528 !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(239, 21, 40, 0.28) !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  box-sizing: border-box !important;
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 26px 28px 16px !important;
  display: grid !important;
  grid-template-rows: 66px 150px minmax(0, 1fr) 22px !important;
  gap: 16px !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .erp-ref-header {
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 460px) 42px 108px 80px 150px 112px 136px !important;
  align-items: center !important;
  gap: 12px !important;
  height: 66px !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-title {
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  font-size: 25px !important;
  line-height: 1.1 !important;
  font-weight: 850 !important;
  letter-spacing: -0.02em !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin: 6px 0 0 !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  color: #475569 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-title-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  display: grid !important;
  place-items: center !important;
}

body[data-view="dashboard"] .erp-ref-search {
  height: 42px !important;
  border-radius: 10px !important;
  border: 1px solid #d7e0ec !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  gap: 10px !important;
  box-shadow: none !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  font-size: 13px !important;
  color: #334155 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
}

body[data-view="dashboard"] .erp-ref-icon-btn,
body[data-view="dashboard"] .erp-ref-pill,
body[data-view="dashboard"] .erp-ref-admin,
body[data-view="dashboard"] .erp-ref-date-pill,
body[data-view="dashboard"] .erp-ref-quick {
  height: 42px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  background: #ef1528 !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 14px 28px rgba(239, 21, 40, 0.28) !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  min-height: 0 !important;
  height: 150px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 410px !important;
  gap: 18px !important;
  align-items: stretch !important;
  padding: 22px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #061426 0%, #0b2447 100%) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  height: 106px !important;
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 0 24px 0 0 !important;
  margin-right: 24px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi:last-child {
  margin-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 54px !important;
  height: 54px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon svg {
  width: 25px !important;
  height: 25px !important;
}

body[data-view="dashboard"] .erp-ref-kpi-text {
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  display: block !important;
  margin: 0 0 5px !important;
  font-size: 12.5px !important;
  line-height: 1.2 !important;
  font-style: normal !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  display: block !important;
  margin: 0 0 4px !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  color: #fff !important;
  letter-spacing: -0.02em !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  color: #dbeafe !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi i {
  display: block !important;
  margin-top: 15px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-style: normal !important;
  font-weight: 800 !important;
  color: #3b82f6 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  min-width: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.16) !important;
  padding-left: 18px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: 26px 78px !important;
  gap: 9px !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-header {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-card {
  height: 78px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  padding: 8px !important;
}

body[data-view="dashboard"] .erp-ref-glance-card span {
  font-size: 11.5px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  text-align: center !important;
}

body[data-view="dashboard"] .erp-ref-glance-card b {
  margin-top: 5px !important;
  font-size: 22px !important;
  line-height: 1 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.72fr) minmax(300px, 0.72fr) !important;
  grid-template-rows: minmax(0, 1fr) minmax(0, 0.78fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 16px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card {
  border: 1px solid #dbe5f0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06) !important;
  padding: 16px !important;
  overflow: hidden !important;
  min-height: 0 !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  height: 30px !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

body[data-view="dashboard"] .erp-ref-card-head h2 {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.1 !important;
  font-weight: 850 !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-card-head button,
body[data-view="dashboard"] .erp-ref-card-head .erp-ref-mini-btn {
  height: 30px !important;
  border-radius: 7px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-operations { grid-area: operations !important; }
body[data-view="dashboard"] .erp-ref-compliance { grid-area: compliance !important; }
body[data-view="dashboard"] .erp-ref-pending { grid-area: pending !important; }
body[data-view="dashboard"] .erp-ref-actions { grid-area: actions !important; }
body[data-view="dashboard"] .erp-ref-activities { grid-area: activities !important; }
body[data-view="dashboard"] .erp-ref-upcoming { grid-area: upcoming !important; }

body[data-view="dashboard"] .erp-ref-tabs {
  height: 36px !important;
  display: flex !important;
  align-items: flex-end !important;
  gap: 22px !important;
  border-bottom: 1px solid #e5edf6 !important;
  margin-bottom: 12px !important;
}

body[data-view="dashboard"] .erp-ref-tab {
  border: 0 !important;
  background: transparent !important;
  height: 36px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #334155 !important;
  border-bottom: 3px solid transparent !important;
}

body[data-view="dashboard"] .erp-ref-tab.active {
  color: #ef1528 !important;
  border-bottom-color: #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-chart-area {
  height: 180px !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 310px !important;
  gap: 16px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-chart-panel {
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-chart-title {
  font-size: 13px !important;
  font-weight: 850 !important;
  margin: 0 0 8px !important;
}

body[data-view="dashboard"] .erp-ref-line-chart {
  height: 134px !important;
}

body[data-view="dashboard"] .erp-ref-donut-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  height: 140px !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  width: 128px !important;
  height: 128px !important;
  min-width: 128px !important;
}

body[data-view="dashboard"] .erp-ref-donut-legend {
  flex: 1 !important;
  display: grid !important;
  gap: 9px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

body[data-view="dashboard"] .erp-ref-list {
  display: grid !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row {
  height: 72px !important;
  min-height: 72px !important;
  border: 1px solid #e1e9f3 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-row-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 11px !important;
  display: grid !important;
  place-items: center !important;
  background: #fff1f2 !important;
  color: #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b {
  font-size: 14px !important;
  line-height: 1.15 !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-alert-row span,
body[data-view="dashboard"] .erp-ref-activity-row span {
  font-size: 12.5px !important;
  line-height: 1.25 !important;
  color: #475569 !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  height: calc(100% - 42px) !important;
  min-height: 190px !important;
  border: 1px solid #e1e9f3 !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-empty-icon {
  width: 92px !important;
  height: 92px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  background: #f1f5f9 !important;
  color: #1e3a5f !important;
  margin: 0 auto 14px !important;
}

body[data-view="dashboard"] .erp-ref-empty h3 {
  margin: 0 0 8px !important;
  font-size: 15px !important;
  font-weight: 850 !important;
}

body[data-view="dashboard"] .erp-ref-empty p {
  margin: 0 !important;
  font-size: 13px !important;
  color: #64748b !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
  height: calc(100% - 42px) !important;
  min-height: 0 !important;
}

body[data-view="dashboard"] .erp-ref-action,
body[data-view="dashboard"] .erp-ref-action-tile {
  height: 124px !important;
  border: 1px solid #e1e9f3 !important;
  border-radius: 10px !important;
  background: #fff !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 8px !important;
  padding: 10px !important;
  text-align: center !important;
  cursor: pointer !important;
}

body[data-view="dashboard"] .erp-ref-action-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  display: grid !important;
  place-items: center !important;
}

body[data-view="dashboard"] .erp-ref-action b {
  font-size: 13px !important;
  line-height: 1.15 !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  font-size: 11.5px !important;
  line-height: 1.25 !important;
  color: #475569 !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12px !important;
  color: #64748b !important;
  height: 22px !important;
}

@media (max-height: 860px) {
  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 20px 24px 12px !important;
    grid-template-rows: 58px 128px minmax(0, 1fr) 20px !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    height: 58px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    height: 128px !important;
    padding: 18px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    height: 88px !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi-icon {
    width: 46px !important;
    height: 46px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi b {
    font-size: 24px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi em {
    font-size: 11.5px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance {
    grid-template-rows: 22px 62px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance-card {
    height: 62px !important;
  }

  body[data-view="dashboard"] .erp-ref-card {
    padding: 13px !important;
  }

  body[data-view="dashboard"] .erp-ref-chart-area {
    height: 150px !important;
  }

  body[data-view="dashboard"] .erp-ref-line-chart {
    height: 110px !important;
  }

  body[data-view="dashboard"] .erp-ref-donut {
    width: 106px !important;
    height: 106px !important;
    min-width: 106px !important;
  }

  body[data-view="dashboard"] .erp-ref-alert-row,
  body[data-view="dashboard"] .erp-ref-activity-row {
    height: 58px !important;
    min-height: 58px !important;
  }

  body[data-view="dashboard"] .erp-ref-actions-grid {
    gap: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-action,
  body[data-view="dashboard"] .erp-ref-action-tile {
    height: 94px !important;
  }
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 200px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 200px !important;
    min-width: 200px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 18px 22px 12px !important;
    grid-template-rows: 56px 122px minmax(0, 1fr) 20px !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    height: 56px !important;
    grid-template-columns: minmax(300px, 1fr) minmax(280px, 380px) 38px 102px 72px 132px 96px 120px !important;
    gap: 9px !important;
  }

  body[data-view="dashboard"] .erp-ref-title h1 {
    font-size: 22px !important;
  }

  body[data-view="dashboard"] .erp-ref-title p {
    font-size: 12.5px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    height: 122px !important;
    grid-template-columns: minmax(0, 1fr) 350px !important;
    padding: 16px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    height: 84px !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
    margin-right: 14px !important;
    padding-right: 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi-icon {
    width: 42px !important;
    height: 42px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi b {
    font-size: 22px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi em {
    font-size: 11px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi small,
  body[data-view="dashboard"] .erp-ref-kpi i {
    font-size: 10.5px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance {
    grid-template-rows: 20px 58px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance-card {
    height: 58px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance-card b {
    font-size: 19px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    gap: 12px !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.75fr) minmax(270px, 0.75fr) !important;
  }

  body[data-view="dashboard"] .erp-ref-card {
    padding: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-card-head {
    height: 28px !important;
    margin-bottom: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-card-head h2 {
    font-size: 15px !important;
  }

  body[data-view="dashboard"] .erp-ref-chart-area {
    height: 136px !important;
    grid-template-columns: minmax(0, 1fr) 250px !important;
  }

  body[data-view="dashboard"] .erp-ref-line-chart {
    height: 100px !important;
  }

  body[data-view="dashboard"] .erp-ref-donut {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px !important;
  }

  body[data-view="dashboard"] .erp-ref-alert-row,
  body[data-view="dashboard"] .erp-ref-activity-row {
    height: 56px !important;
    min-height: 56px !important;
  }

  body[data-view="dashboard"] .erp-ref-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-view="dashboard"] .erp-ref-action,
  body[data-view="dashboard"] .erp-ref-action-tile {
    height: 62px !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    justify-items: start !important;
    text-align: left !important;
    align-content: center !important;
  }

  body[data-view="dashboard"] .erp-ref-action-icon {
    width: 34px !important;
    height: 34px !important;
  }
}

/* Hard reset for the dashboard model layout. This overrides every older dashboard experiment above. */
body[data-view="dashboard"] {
  overflow: hidden !important;
}

body[data-view="dashboard"] .app-shell {
  width: 100vw !important;
  height: 100vh !important;
  display: grid !important;
  grid-template-columns: 224px minmax(0, 1fr) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .sidebar {
  width: 224px !important;
  min-width: 224px !important;
  height: 100vh !important;
  overflow: hidden auto !important;
}

body[data-view="dashboard"] .sidebar .brand {
  padding: 18px 16px 14px !important;
}

body[data-view="dashboard"] .sidebar .brand-logo {
  width: 164px !important;
  height: 50px !important;
}

body[data-view="dashboard"] .nav {
  padding: 14px 12px 18px !important;
}

body[data-view="dashboard"] .nav button {
  min-height: 34px !important;
  padding: 8px 10px !important;
  font-size: 12.5px !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  width: 100% !important;
  height: 100vh !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  width: 100% !important;
  height: 100vh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 62px 148px minmax(0, 1fr) 18px !important;
  gap: 10px !important;
  padding: 16px 18px 10px !important;
  overflow: hidden !important;
  background: #f5f7fb !important;
}

body[data-view="dashboard"] .erp-ref-header {
  height: 62px !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(300px, 1fr) minmax(260px, 330px) 42px 110px 76px 148px 118px 130px !important;
  gap: 10px !important;
  align-items: center !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-title {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
}

body[data-view="dashboard"] .erp-ref-menu {
  width: 42px !important;
  height: 42px !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  font-size: 22px !important;
  line-height: 1.1 !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  font-size: 13px !important;
  line-height: 1.2 !important;
}

body[data-view="dashboard"] .erp-ref-search,
body[data-view="dashboard"] .erp-ref-bell,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick {
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 10px !important;
  font-size: 12.5px !important;
  border-radius: 8px !important;
}

body[data-view="dashboard"] .erp-ref-bell {
  padding: 0 !important;
}

body[data-view="dashboard"] .erp-ref-search {
  grid-template-columns: 18px minmax(0, 1fr) 36px !important;
}

body[data-view="dashboard"] .erp-ref-search button {
  width: 32px !important;
  height: 30px !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  height: 148px !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 420px !important;
  gap: 14px !important;
  padding: 16px 18px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  height: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  grid-template-rows: 1fr 20px !important;
  column-gap: 10px !important;
  padding: 0 12px !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 46px !important;
  height: 46px !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  font-size: 11px !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  font-size: 22px !important;
}

body[data-view="dashboard"] .erp-ref-kpi small,
body[data-view="dashboard"] .erp-ref-kpi i {
  font-size: 10.5px !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  height: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-rows: 24px minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 0 0 0 14px !important;
  border-left: 1px solid rgba(255, 255, 255, .18) !important;
  border-top: 0 !important;
}

body[data-view="dashboard"] .erp-ref-glance-head {
  height: 24px !important;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) auto !important;
  gap: 7px !important;
}

body[data-view="dashboard"] .erp-ref-glance-head b,
body[data-view="dashboard"] .erp-ref-glance-head strong {
  font-size: 11.5px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid {
  min-width: 0 !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid button {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 78px !important;
  padding: 8px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid span {
  font-size: 9.5px !important;
  line-height: 1.15 !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid b {
  font-size: 18px !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.48fr) minmax(240px, .78fr) minmax(240px, .78fr) !important;
  grid-template-rows: minmax(250px, 1fr) minmax(210px, .72fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 12px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 14px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  min-height: 30px !important;
  margin-bottom: 10px !important;
}

body[data-view="dashboard"] .erp-ref-card-head h2 {
  font-size: 16px !important;
}

body[data-view="dashboard"] .erp-ref-card-head button,
body[data-view="dashboard"] .erp-ref-wide {
  min-height: 32px !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 38px !important;
}

body[data-view="dashboard"] .erp-ref-tab {
  min-width: 0 !important;
  flex: 1 1 0 !important;
  padding: 0 8px !important;
  font-size: 11.5px !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: calc(100% - 78px) !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .9fr) !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row article {
  padding: 14px !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row h3 {
  font-size: 13px !important;
}

body[data-view="dashboard"] .erp-ref-chart svg {
  height: 100px !important;
}

body[data-view="dashboard"] .erp-ref-donut-wrap {
  grid-template-columns: 98px minmax(0, 1fr) !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  width: 98px !important;
  height: 98px !important;
}

body[data-view="dashboard"] .erp-ref-donut::after {
  inset: 27px !important;
}

body[data-view="dashboard"] .erp-ref-list {
  gap: 8px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row,
body[data-view="dashboard"] .erp-ref-approval-row {
  min-height: 60px !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  padding: 8px 10px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row > span,
body[data-view="dashboard"] .erp-ref-activity-row > span {
  width: 40px !important;
  height: 40px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b,
body[data-view="dashboard"] .erp-ref-approval-row b {
  font-size: 13px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row small,
body[data-view="dashboard"] .erp-ref-alert-row u,
body[data-view="dashboard"] .erp-ref-activity-row small,
body[data-view="dashboard"] .erp-ref-approval-row small {
  font-size: 11px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row em,
body[data-view="dashboard"] .status-badge {
  min-height: 28px !important;
  font-size: 11px !important;
  padding: 0 10px !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  min-height: 0 !important;
  height: calc(100% - 42px) !important;
}

body[data-view="dashboard"] .erp-ref-empty svg {
  width: 84px !important;
  height: 84px !important;
  padding: 22px !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  height: calc(100% - 40px) !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-view="dashboard"] .erp-ref-action {
  min-height: 0 !important;
  height: 64px !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  column-gap: 10px !important;
  padding: 8px !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  width: 36px !important;
  height: 36px !important;
}

body[data-view="dashboard"] .erp-ref-action b {
  font-size: 11.5px !important;
}

body[data-view="dashboard"] .erp-ref-action small {
  font-size: 10.5px !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  height: 18px !important;
  font-size: 11px !important;
}

@media (max-width: 1350px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 200px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 200px !important;
    min-width: 200px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 280px) 40px 104px 68px 136px 104px 118px !important;
    gap: 8px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    grid-template-columns: minmax(0, 1fr) 310px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: minmax(0, 1.32fr) minmax(210px, .8fr) minmax(210px, .8fr) !important;
  }
}

/* Final dashboard override: keep this at the end so old experiments cannot override it. */
body[data-view="dashboard"] .app-shell {
  grid-template-columns: 280px minmax(0, 1fr) !important;
  background: #f5f7fb !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .sidebar {
  width: 280px !important;
  min-width: 280px !important;
  background: linear-gradient(180deg, #07162b 0%, #061328 56%, #031022 100%) !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  background: #f5f7fb !important;
  overflow: auto !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  min-height: 100vh !important;
  padding: 28px 32px 18px !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  gap: 20px !important;
  background: #f5f7fb !important;
}

body[data-view="dashboard"] .erp-ref-header {
  height: auto !important;
  min-height: 64px !important;
  display: grid !important;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 460px) 48px 116px 74px 178px 132px 160px !important;
  align-items: center !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-title {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  color: #07142c !important;
  font-size: 28px !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin: 6px 0 0 !important;
  color: #475569 !important;
  font-size: 15px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-search,
body[data-view="dashboard"] .erp-ref-bell,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick {
  height: 48px !important;
  border: 1px solid #d8e2ef !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #07142c !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04) !important;
}

body[data-view="dashboard"] .erp-ref-search {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) 46px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 8px 0 16px !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  min-width: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 14px !important;
}

body[data-view="dashboard"] .erp-ref-bell,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-bell {
  padding: 0 !important;
  border-radius: 50% !important;
  color: #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-cloud {
  color: #06944f !important;
  background: #e9fbf0 !important;
  border-color: #bdf3cf !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  color: #fff !important;
  background: #ef1528 !important;
  border-color: #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  height: auto !important;
  min-height: 150px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 380px !important;
  gap: 20px !important;
  padding: 22px 24px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #06162d 0%, #061d3b 100%) !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  height: auto !important;
  min-height: 106px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 24px !important;
  align-items: center !important;
  column-gap: 16px !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, .18) !important;
  background: transparent !important;
  color: #fff !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-kpi:last-child {
  border-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 11px !important;
  display: grid !important;
  place-items: center !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-kpi.red .erp-ref-kpi-icon { background: #ef1528 !important; }
body[data-view="dashboard"] .erp-ref-kpi.blue .erp-ref-kpi-icon { background: #2563eb !important; }
body[data-view="dashboard"] .erp-ref-kpi.green .erp-ref-kpi-icon { background: #12b981 !important; }
body[data-view="dashboard"] .erp-ref-kpi.orange .erp-ref-kpi-icon { background: #f59e0b !important; }

body[data-view="dashboard"] .erp-ref-kpi span:not(.erp-ref-kpi-icon) {
  min-width: 0 !important;
  display: grid !important;
  gap: 7px !important;
}

body[data-view="dashboard"] .erp-ref-kpi em,
body[data-view="dashboard"] .erp-ref-kpi b,
body[data-view="dashboard"] .erp-ref-kpi small {
  display: block !important;
  min-width: 0 !important;
  color: #fff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 850 !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  color: #cbd5e1 !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-kpi i {
  grid-column: 1 / -1 !important;
  font-style: normal !important;
  color: #60a5fa !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  display: grid !important;
  grid-template-rows: 28px minmax(0, 1fr) !important;
  gap: 12px !important;
  padding-left: 18px !important;
  border-left: 1px solid rgba(255, 255, 255, .18) !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid button {
  min-height: 74px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, .09) !important;
  color: #fff !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 7px !important;
  padding: 10px !important;
  text-align: center !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  display: grid !important;
  grid-template-columns: minmax(520px, 1.55fr) minmax(300px, .8fr) minmax(300px, .8fr) !important;
  grid-template-areas: "operations compliance pending" "actions activities upcoming" !important;
  gap: 16px !important;
}

body[data-view="dashboard"] .erp-ref-card {
  padding: 20px !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .05) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  height: auto !important;
  min-height: 36px !important;
  margin: 0 0 14px !important;
}

body[data-view="dashboard"] .erp-ref-card-head h2 {
  color: #07142c !important;
  font-size: 18px !important;
  font-weight: 950 !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 44px !important;
  display: flex !important;
  align-items: stretch !important;
  border: 1px solid #dbe5f0 !important;
  border-bottom: 0 !important;
  border-radius: 8px 8px 0 0 !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .erp-ref-tab {
  min-width: 150px !important;
  height: auto !important;
  border: 0 !important;
  border-right: 1px solid #e5edf6 !important;
  background: transparent !important;
  color: #334155 !important;
  padding: 0 22px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-tab.active {
  color: #ef1528 !important;
  background: #fff !important;
  border-bottom: 3px solid #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: 232px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr) !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 0 0 8px 8px !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row article {
  padding: 22px !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
}

body[data-view="dashboard"] .erp-ref-chart svg {
  width: 100% !important;
  height: 150px !important;
}

body[data-view="dashboard"] .erp-ref-donut-wrap {
  display: grid !important;
  grid-template-columns: 140px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  width: 140px !important;
  height: 140px !important;
  border-radius: 50% !important;
  background: conic-gradient(var(--segments)) !important;
  position: relative !important;
}

body[data-view="dashboard"] .erp-ref-donut::after {
  content: "" !important;
  position: absolute !important;
  inset: 38px !important;
  border-radius: 50% !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-donut b,
body[data-view="dashboard"] .erp-ref-donut span {
  position: relative !important;
  z-index: 1 !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row,
body[data-view="dashboard"] .erp-ref-approval-row {
  min-height: 78px !important;
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 12px 14px !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-alert-row > span,
body[data-view="dashboard"] .erp-ref-activity-row > span {
  width: 48px !important;
  height: 48px !important;
  border-radius: 11px !important;
  display: grid !important;
  place-items: center !important;
  background: #fff1f2 !important;
  color: #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b,
body[data-view="dashboard"] .erp-ref-approval-row b,
body[data-view="dashboard"] .erp-ref-alert-row small,
body[data-view="dashboard"] .erp-ref-alert-row u,
body[data-view="dashboard"] .erp-ref-activity-row small,
body[data-view="dashboard"] .erp-ref-approval-row small {
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-action {
  min-height: 74px !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  column-gap: 12px !important;
  padding: 12px !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  grid-row: 1 / 3 !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  color: #2563eb !important;
  background: #eef4ff !important;
}

body[data-view="dashboard"] .erp-ref-action.red span { color: #ef1528 !important; background: #fff1f2 !important; }
body[data-view="dashboard"] .erp-ref-action.green span { color: #10b981 !important; background: #ecfdf5 !important; }
body[data-view="dashboard"] .erp-ref-action.orange span { color: #f59e0b !important; background: #fff7ed !important; }
body[data-view="dashboard"] .erp-ref-action.purple span { color: #7c3aed !important; background: #f3e8ff !important; }
body[data-view="dashboard"] .erp-ref-action.cyan span { color: #0891b2 !important; background: #ecfeff !important; }

body[data-view="dashboard"] .erp-ref-action b,
body[data-view="dashboard"] .erp-ref-action small {
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 1540px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 238px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 238px !important;
    min-width: 238px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 20px 24px 14px !important;
    gap: 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    grid-template-columns: minmax(260px, 1fr) minmax(290px, 390px) 44px 108px 70px 154px 120px 146px !important;
    gap: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    min-height: 136px !important;
    grid-template-columns: minmax(0, 1fr) 342px !important;
    padding: 18px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: minmax(440px, 1.35fr) minmax(270px, .82fr) minmax(270px, .82fr) !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-card {
    padding: 16px !important;
  }

  body[data-view="dashboard"] .erp-ref-analytics-row {
    height: 206px !important;
  }

  body[data-view="dashboard"] .erp-ref-actions-grid {
    gap: 10px !important;
  }
}

/* Dashboard final reference lock - keeps the ERP screen aligned to the requested model. */
body[data-view="dashboard"] {
  height: 100vh !important;
  overflow: hidden !important;
  background: #f5f8fc !important;
  color: #07152b !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

body[data-view="dashboard"] .app-shell {
  display: grid !important;
  grid-template-columns: 212px minmax(0, 1fr) !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: #f5f8fc !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #f5f8fc !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .sidebar {
  width: 212px !important;
  min-width: 212px !important;
  height: 100vh !important;
  overflow: hidden !important;
  padding: 18px 14px !important;
  background: linear-gradient(180deg, #061426 0%, #071a31 100%) !important;
  border: 0 !important;
  color: #f8fafc !important;
}

body[data-view="dashboard"] .sidebar-logo {
  width: 166px !important;
  height: 48px !important;
  object-fit: contain !important;
  display: block !important;
  padding: 7px !important;
  margin: 0 0 14px 0 !important;
  background: #fff !important;
  border-radius: 7px !important;
}

body[data-view="dashboard"] .brand-title,
body[data-view="dashboard"] .sidebar-brand strong {
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .brand-subtitle,
body[data-view="dashboard"] .sidebar-brand span {
  font-size: 12px !important;
  line-height: 1.25 !important;
  color: #dbeafe !important;
}

body[data-view="dashboard"] .nav-section-title,
body[data-view="dashboard"] .sidebar-section-title {
  margin: 17px 8px 8px !important;
  color: #8fb0d2 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: .14em !important;
}

body[data-view="dashboard"] .nav-item {
  height: 35px !important;
  min-height: 35px !important;
  padding: 0 10px !important;
  gap: 10px !important;
  border-radius: 7px !important;
  color: #f8fafc !important;
  font-size: 12.5px !important;
  line-height: 1.15 !important;
  font-weight: 750 !important;
}

body[data-view="dashboard"] .nav-item svg {
  width: 17px !important;
  height: 17px !important;
  stroke-width: 2.2 !important;
}

body[data-view="dashboard"] .nav-item.active {
  background: #ef1528 !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(239, 21, 40, .28) !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  box-sizing: border-box !important;
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 28px 30px 16px !important;
  display: grid !important;
  grid-template-rows: 66px 150px minmax(0, 1fr) 22px !important;
  gap: 16px !important;
  background: #f5f8fc !important;
}

body[data-view="dashboard"] .erp-ref-header {
  display: grid !important;
  grid-template-columns: minmax(390px, 1fr) minmax(380px, 470px) 42px 112px 82px 154px 112px 138px !important;
  align-items: center !important;
  gap: 12px !important;
  height: 66px !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-title {
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  font-size: 25px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  color: #07152b !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin: 5px 0 0 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  color: #53617a !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-search {
  height: 44px !important;
  border-radius: 9px !important;
  border: 1px solid #d8e2ef !important;
  background: #fff !important;
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) 36px !important;
  align-items: center !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .04) !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  border: 0 !important;
  outline: 0 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-pill,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-sync,
body[data-view="dashboard"] .erp-ref-quick {
  height: 44px !important;
  min-width: 0 !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .04) !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  background: #e91125 !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 14px 28px rgba(233, 17, 37, .25) !important;
}

body[data-view="dashboard"] .erp-ref-bell {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  height: 150px !important;
  min-height: 150px !important;
  padding: 22px !important;
  border-radius: 10px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 410px !important;
  gap: 20px !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #061426 0%, #0b2546 100%) !important;
  color: #fff !important;
  box-shadow: 0 18px 34px rgba(6, 20, 38, .18) !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  height: 106px !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: center !important;
  padding: 0 22px 0 0 !important;
  margin-right: 22px !important;
  border-right: 1px solid rgba(255, 255, 255, .16) !important;
}

body[data-view="dashboard"] .erp-ref-kpi:last-child {
  border-right: 0 !important;
  margin-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 54px !important;
  height: 54px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon svg,
body[data-view="dashboard"] .erp-ref-kpi-icon i,
body[data-view="dashboard"] .erp-ref-kpi-icon span {
  width: 26px !important;
  height: 26px !important;
  font-size: 24px !important;
  color: #fff !important;
  line-height: 1 !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  display: block !important;
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  font-size: 12.5px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  font-style: normal !important;
  color: #fff !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  display: block !important;
  margin-top: 4px !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  color: #fff !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  display: block !important;
  margin-top: 6px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  color: rgba(255, 255, 255, .88) !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi a,
body[data-view="dashboard"] .erp-ref-kpi i {
  display: inline-flex !important;
  margin-top: 16px !important;
  color: #38a1ff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-content: center !important;
  gap: 9px !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-glance-head {
  grid-column: 1 / -1 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  height: 18px !important;
  font-size: 12.5px !important;
  font-weight: 850 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-card {
  height: 72px !important;
  border-radius: 7px !important;
  padding: 10px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  background: rgba(255, 255, 255, .08) !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-card span {
  font-size: 11px !important;
  line-height: 1.18 !important;
  font-weight: 750 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-card b {
  margin-top: 6px !important;
  font-size: 21px !important;
  line-height: 1 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .78fr) minmax(300px, .78fr) !important;
  grid-template-rows: minmax(0, 1fr) minmax(0, .78fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 16px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card {
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  border: 1px solid #dce5f0 !important;
  background: #fff !important;
  padding: 17px !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .05) !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  min-height: 32px !important;
  margin: 0 0 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-card h2,
body[data-view="dashboard"] .erp-ref-card h3 {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
  color: #07152b !important;
}

body[data-view="dashboard"] .erp-ref-card button,
body[data-view="dashboard"] .erp-ref-chip,
body[data-view="dashboard"] .erp-ref-open {
  height: 30px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 44px !important;
  display: flex !important;
  align-items: end !important;
  gap: 22px !important;
  border-bottom: 1px solid #dfe7f1 !important;
  margin-bottom: 12px !important;
}

body[data-view="dashboard"] .erp-ref-tab {
  padding: 0 0 10px !important;
  border: 0 !important;
  background: transparent !important;
  color: #42506a !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-tab.active {
  color: #ef1528 !important;
  border-bottom: 3px solid #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: calc(100% - 72px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 310px !important;
  gap: 18px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-chart-area {
  height: 100% !important;
  min-height: 180px !important;
  max-height: 230px !important;
  padding: 4px 0 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row,
body[data-view="dashboard"] .erp-ref-expiry-row {
  height: 72px !important;
  min-height: 72px !important;
  border-radius: 10px !important;
  padding: 11px 12px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  border: 1px solid #e0e8f2 !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-alert-row strong,
body[data-view="dashboard"] .erp-ref-activity-row strong,
body[data-view="dashboard"] .erp-ref-expiry-row strong {
  display: block !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  color: #07152b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-alert-row span,
body[data-view="dashboard"] .erp-ref-activity-row span,
body[data-view="dashboard"] .erp-ref-expiry-row span {
  display: block !important;
  margin-top: 3px !important;
  font-size: 12.5px !important;
  line-height: 1.2 !important;
  color: #475569 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
  height: calc(100% - 44px) !important;
  min-height: 0 !important;
}

body[data-view="dashboard"] .erp-ref-action-tile,
body[data-view="dashboard"] .erp-ref-action {
  height: 124px !important;
  min-height: 0 !important;
  border-radius: 10px !important;
  padding: 13px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 8px !important;
  border: 1px solid #e0e8f2 !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-action-tile strong,
body[data-view="dashboard"] .erp-ref-action strong {
  font-size: 13px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  color: #07152b !important;
}

body[data-view="dashboard"] .erp-ref-action-tile span,
body[data-view="dashboard"] .erp-ref-action span {
  font-size: 11.5px !important;
  line-height: 1.2 !important;
  color: #53617a !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  min-height: 0 !important;
  height: calc(100% - 46px) !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  border-radius: 12px !important;
  border: 1px solid #dfe7f1 !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  height: 22px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 12px !important;
  color: #66758f !important;
}

@media (max-width: 1500px), (max-height: 860px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 190px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 190px !important;
    min-width: 190px !important;
    padding: 12px 10px !important;
  }

  body[data-view="dashboard"] .sidebar-logo {
    width: 150px !important;
    height: 42px !important;
    margin-bottom: 10px !important;
  }

  body[data-view="dashboard"] .nav-item {
    height: 31px !important;
    min-height: 31px !important;
    font-size: 11.5px !important;
  }

  body[data-view="dashboard"] .nav-section-title,
  body[data-view="dashboard"] .sidebar-section-title {
    margin-top: 12px !important;
    font-size: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 18px 20px 12px !important;
    grid-template-rows: 54px 126px minmax(0, 1fr) 18px !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    height: 54px !important;
    grid-template-columns: minmax(320px, 1fr) minmax(280px, 390px) 38px 96px 70px 130px 98px 124px !important;
    gap: 8px !important;
  }

  body[data-view="dashboard"] .erp-ref-title h1 {
    font-size: 22px !important;
  }

  body[data-view="dashboard"] .erp-ref-title p {
    font-size: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-pill,
  body[data-view="dashboard"] .erp-ref-date,
  body[data-view="dashboard"] .erp-ref-user,
  body[data-view="dashboard"] .erp-ref-sync,
  body[data-view="dashboard"] .erp-ref-quick,
  body[data-view="dashboard"] .erp-ref-search {
    height: 38px !important;
    font-size: 11.5px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    height: 126px !important;
    min-height: 126px !important;
    padding: 16px !important;
    grid-template-columns: minmax(0, 1fr) 350px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    height: 92px !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding-right: 14px !important;
    margin-right: 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi-icon {
    width: 44px !important;
    height: 44px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi b {
    font-size: 22px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi em {
    font-size: 11px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi small,
  body[data-view="dashboard"] .erp-ref-kpi a,
  body[data-view="dashboard"] .erp-ref-kpi i {
    font-size: 10.5px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance-card {
    height: 58px !important;
  }

  body[data-view="dashboard"] .erp-ref-card {
    padding: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-analytics-row {
    grid-template-columns: minmax(0, 1fr) 250px !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-alert-row,
  body[data-view="dashboard"] .erp-ref-activity-row,
  body[data-view="dashboard"] .erp-ref-expiry-row {
    height: 62px !important;
    min-height: 62px !important;
  }

  body[data-view="dashboard"] .erp-ref-actions-grid {
    gap: 9px !important;
  }

  body[data-view="dashboard"] .erp-ref-action-tile,
  body[data-view="dashboard"] .erp-ref-action {
    height: 88px !important;
    padding: 9px 8px !important;
  }
}

/* Clean ERP dashboard reset */
.nav {
  gap: 14px;
}

.nav-section {
  display: grid;
  gap: 4px;
}

.nav-section-title {
  margin: 10px 12px 5px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
}

body[data-view="dashboard"] .view {
  padding: 0;
  background: #f8fafc;
  overflow-x: hidden;
}

.erp-dashboard-clean {
  --erp-navy: #0f172a;
  --erp-blue: #2563eb;
  --erp-muted: #64748b;
  --erp-line: #e2e8f0;
  --erp-panel: #ffffff;
  min-height: 100%;
  padding: 28px;
  display: grid;
  gap: 24px;
  color: #0f172a;
  background: #f8fafc;
}

.erp-dashboard-header,
.erp-card,
.erp-stat-card {
  background: var(--erp-panel);
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.erp-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.erp-dashboard-header p,
.erp-dashboard-header span {
  margin: 0;
  color: var(--erp-muted);
}

.erp-dashboard-header p {
  color: var(--erp-blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.erp-dashboard-header h2 {
  margin: 4px 0;
  font-size: clamp(1.7rem, 2.1vw, 2.35rem);
  line-height: 1.08;
}

.erp-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.erp-dashboard-actions > span {
  padding: 10px 14px;
  border: 1px solid var(--erp-line);
  border-radius: 10px;
  color: #334155;
  font-weight: 700;
}

.erp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.erp-stat-card {
  min-height: 128px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.erp-stat-card:hover,
.erp-timeline-row:hover,
.erp-alert-row:hover,
.erp-quick-list button:hover,
.erp-overview-grid button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.erp-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: var(--erp-blue);
  flex: 0 0 auto;
}

.erp-stat-icon svg,
.erp-timeline-row svg,
.erp-alert-row svg,
.erp-quick-list svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.erp-stat-copy {
  display: grid;
  gap: 4px;
}

.erp-stat-copy small,
.erp-stat-copy em {
  color: var(--erp-muted);
  font-style: normal;
}

.erp-stat-copy small {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.erp-stat-copy strong {
  font-size: 1.95rem;
  line-height: 1;
}

.erp-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.erp-left-column,
.erp-right-column {
  display: grid;
  gap: 24px;
}

.erp-card {
  padding: 22px;
}

.erp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.erp-section-head h3,
.erp-analytics-grid h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--erp-navy);
}

.erp-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.erp-overview-grid button {
  min-height: 96px;
  padding: 18px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
}

.erp-overview-grid strong {
  font-size: 1.7rem;
}

.erp-overview-grid span {
  color: var(--erp-muted);
  font-weight: 700;
}

.erp-timeline,
.erp-alert-list,
.erp-quick-list {
  display: grid;
  gap: 10px;
}

.erp-timeline-row,
.erp-alert-row,
.erp-quick-list button {
  width: 100%;
  padding: 14px;
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.erp-timeline-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.erp-alert-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.erp-quick-list button {
  grid-template-columns: 28px minmax(0, 1fr);
  font-weight: 800;
}

.erp-timeline-row > span,
.erp-alert-row > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--erp-blue);
}

.erp-timeline-row strong,
.erp-alert-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-timeline-row small,
.erp-alert-row small,
.erp-timeline-row time {
  color: var(--erp-muted);
}

.erp-table-wrap {
  overflow-x: auto;
}

.erp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.erp-table th,
.erp-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--erp-line);
  text-align: left;
  white-space: nowrap;
}

.erp-table th {
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.erp-empty-state {
  min-height: 118px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--erp-muted);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.erp-empty-state span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: var(--erp-blue);
}

.erp-empty-state svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
}

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

.erp-analytics-grid article {
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  background: #fff;
}

.erp-bar-chart {
  height: 155px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 10px;
  padding-top: 18px;
}

.erp-bar-chart span {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 8px;
}

.erp-bar-chart b {
  width: 100%;
  min-height: 8px;
  border-radius: 8px 8px 2px 2px;
  background: var(--erp-blue);
}

.erp-bar-chart em {
  color: var(--erp-muted);
  font-style: normal;
  font-size: 0.72rem;
  text-align: center;
}

.erp-donut {
  --value: 0;
  width: 148px;
  height: 148px;
  margin: 22px auto 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--erp-blue) calc(var(--value) * 1%), #e2e8f0 0);
  position: relative;
}

.erp-donut::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #fff;
}

.erp-donut strong,
.erp-donut span {
  position: relative;
  z-index: 1;
}

.erp-donut strong {
  max-width: 94px;
  text-align: center;
  line-height: 1.05;
}

.erp-donut span {
  align-self: start;
  margin-top: -54px;
  color: var(--erp-muted);
  font-size: 0.76rem;
}

.erp-distribution {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.erp-distribution span {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
}

.erp-distribution small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
  font-weight: 700;
}

.erp-distribution b {
  height: 8px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}

.erp-distribution i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--erp-blue);
}

.erp-distribution em {
  color: var(--erp-muted);
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .erp-stat-grid,
  .erp-overview-grid,
  .erp-analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-main-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard reference match v20: wide sidebar, dark KPI band, balanced one-screen grid */
body[data-view="dashboard"] {
  background: #f8fafc !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .app-shell {
  grid-template-columns: 240px minmax(0, 1fr) !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .sidebar {
  width: 240px !important;
  min-width: 240px !important;
  padding: 22px 18px !important;
  background: linear-gradient(180deg, #071426 0%, #0b1b31 55%, #071426 100%) !important;
  border-right: 0 !important;
  box-shadow: 18px 0 50px rgba(15, 23, 42, 0.08) !important;
}

body[data-view="dashboard"] .sidebar .brand {
  padding-bottom: 22px !important;
  margin-bottom: 20px !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.16) !important;
}

body[data-view="dashboard"] .sidebar .brand-logo {
  width: 184px !important;
  height: 54px !important;
  object-fit: contain !important;
  padding: 8px !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

body[data-view="dashboard"] .sidebar .brand-copy strong {
  margin-top: 12px !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .sidebar .brand-copy span {
  color: #cbd5e1 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body[data-view="dashboard"] .nav {
  gap: 4px !important;
}

body[data-view="dashboard"] .nav-group-label {
  margin: 18px 0 8px !important;
  color: #8aa0bd !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
}

body[data-view="dashboard"] .nav button {
  min-height: 40px !important;
  padding: 10px 12px !important;
  border-radius: 9px !important;
  color: #edf4ff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .nav button.active {
  background: linear-gradient(135deg, #ef1d2f, #b91c1c) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(225, 29, 46, 0.24) !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  min-width: 0 !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  height: 100vh !important;
  min-height: 100vh !important;
  width: 100% !important;
  padding: 28px 32px 18px !important;
  display: grid !important;
  grid-template-rows: 68px 180px minmax(0, 1fr) 22px !important;
  gap: 18px !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  font-family: Inter, Arial, Helvetica, sans-serif !important;
}

body[data-view="dashboard"] .erp-ref-header {
  height: 68px !important;
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 520px) 48px max-content max-content max-content max-content max-content !important;
  gap: 14px !important;
  align-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-view="dashboard"] .erp-ref-title {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

body[data-view="dashboard"] .erp-ref-menu {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  background: #eef5ff !important;
  color: #2563eb !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  color: #0f172a !important;
  font-size: 29px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin-top: 6px !important;
  color: #52627a !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

body[data-view="dashboard"] .erp-ref-search,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-user {
  height: 44px !important;
  border-radius: 10px !important;
  border: 1px solid #d9e3f0 !important;
  background: #ffffff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04) !important;
}

body[data-view="dashboard"] .erp-ref-search {
  padding: 0 16px !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  font-size: 13px !important;
  font-weight: 700 !important;
}

body[data-view="dashboard"] .erp-ref-bell {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid #fecaca !important;
  color: #e11d2e !important;
}

body[data-view="dashboard"] .erp-ref-cloud {
  padding: 0 16px !important;
  color: #047857 !important;
  background: #ecfdf5 !important;
  border-color: #bbf7d0 !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  height: 46px !important;
  padding: 0 20px !important;
  border-radius: 10px !important;
  background: #e11d2e !important;
  color: #ffffff !important;
  box-shadow: 0 16px 34px rgba(225, 29, 46, 0.28) !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  min-height: 180px !important;
  height: 180px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 450px !important;
  gap: 26px !important;
  padding: 24px 26px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #071426 0%, #0b2344 58%, #102a52 100%) !important;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  height: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-columns: 70px minmax(0, 1fr) !important;
  align-content: center !important;
  gap: 10px 16px !important;
  padding: 14px 24px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi:last-child {
  border-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 58px !important;
  height: 58px !important;
  border-radius: 14px !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  color: #ffffff !important;
  font-size: 32px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  color: #dbeafe !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi i {
  grid-column: 2 !important;
  margin-top: 10px !important;
  color: #38bdf8 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  height: 100% !important;
  display: grid !important;
  grid-template-rows: auto 1fr !important;
  align-content: center !important;
  gap: 16px !important;
  padding-left: 26px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
}

body[data-view="dashboard"] .erp-ref-glance h3 {
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-glance strong {
  color: #ffffff !important;
  font-size: 16px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid span {
  min-height: 76px !important;
  padding: 12px 8px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.09) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid b {
  font-size: 25px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid small {
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.32fr) minmax(330px, 0.78fr) minmax(330px, 0.78fr) !important;
  grid-template-rows: minmax(0, 1.08fr) minmax(0, 0.82fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 18px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card {
  min-height: 0 !important;
  padding: 18px !important;
  border: 1px solid #e3ebf5 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  min-height: 38px !important;
  margin-bottom: 12px !important;
}

body[data-view="dashboard"] .erp-ref-card h2 {
  color: #0f172a !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-card-head button,
body[data-view="dashboard"] .erp-ref-card-head span {
  height: 36px !important;
  padding: 0 14px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 46px !important;
  gap: 22px !important;
  padding: 0 6px !important;
  border-bottom: 1px solid #e5edf6 !important;
}

body[data-view="dashboard"] .erp-ref-tabs button {
  height: 46px !important;
  padding: 0 8px !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #52627a !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-tabs button.active {
  color: #e11d2e !important;
  border-bottom: 3px solid #e11d2e !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: calc(100% - 96px) !important;
  min-height: 230px !important;
  display: grid !important;
  grid-template-columns: 1.1fr 0.9fr !important;
  gap: 18px !important;
  padding-top: 18px !important;
}

body[data-view="dashboard"] .erp-ref-chart,
body[data-view="dashboard"] .erp-ref-donut {
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body[data-view="dashboard"] .erp-ref-line-chart {
  height: 180px !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 24px !important;
}

body[data-view="dashboard"] .erp-ref-donut svg {
  width: 145px !important;
  height: 145px !important;
}

body[data-view="dashboard"] .erp-ref-donut ul {
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-donut li {
  grid-template-columns: 12px minmax(0, 1fr) max-content !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-list {
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row {
  min-height: 74px !important;
  grid-template-columns: 52px minmax(0, 1fr) max-content !important;
  gap: 4px 14px !important;
  padding: 12px 14px !important;
  border-radius: 13px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row > span,
body[data-view="dashboard"] .erp-ref-activity-row > span {
  width: 48px !important;
  height: 48px !important;
  border-radius: 13px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b {
  font-size: 14px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row small,
body[data-view="dashboard"] .erp-ref-activity-row small,
body[data-view="dashboard"] .erp-ref-alert-row u {
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  min-height: 0 !important;
  height: calc(100% - 50px) !important;
  border-radius: 13px !important;
}

body[data-view="dashboard"] .erp-ref-empty svg {
  width: 96px !important;
  height: 96px !important;
  padding: 22px !important;
  color: #18315a !important;
  background: #f1f5f9 !important;
}

body[data-view="dashboard"] .erp-ref-empty strong {
  font-size: 15px !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  height: calc(100% - 52px) !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: 1fr !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-action {
  min-height: 0 !important;
  height: 100% !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 3px 14px !important;
  padding: 14px !important;
  border-radius: 12px !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
}

body[data-view="dashboard"] .erp-ref-action b {
  font-size: 13px !important;
}

body[data-view="dashboard"] .erp-ref-action small {
  font-size: 11.5px !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  height: 22px !important;
  padding: 0 4px !important;
  font-size: 12px !important;
}

@media (max-width: 1600px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 220px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 220px !important;
    min-width: 220px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 22px 24px 14px !important;
    gap: 14px !important;
    grid-template-rows: 62px 156px minmax(0, 1fr) 20px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    grid-template-columns: minmax(310px, 1fr) minmax(320px, 440px) 42px max-content max-content max-content max-content max-content !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    min-height: 156px !important;
    height: 156px !important;
    grid-template-columns: minmax(0, 1fr) 380px !important;
    padding: 18px 20px !important;
  }

  body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi {
    grid-template-columns: 56px minmax(0, 1fr) !important;
    padding: 10px 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi-icon {
    width: 48px !important;
    height: 48px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi b {
    font-size: 25px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    gap: 14px !important;
  }
}

@media (max-width: 720px) {
  .erp-dashboard-clean {
    padding: 16px;
  }

  .erp-dashboard-header,
  .erp-dashboard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .erp-stat-grid,
  .erp-overview-grid,
  .erp-analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* Final fit pass: ERP/CRM dashboards and Greenland quotation - 2026-05-30 */
body[data-view="dashboard"],
body[data-view="crm"] {
  overflow: hidden !important;
}

body[data-view="dashboard"] .app-shell,
body[data-view="crm"] .app-shell {
  height: 100vh !important;
  max-height: 100vh !important;
  grid-template-columns: 190px minmax(0, 1fr) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .sidebar,
body[data-view="crm"] .sidebar {
  width: 190px !important;
  min-width: 190px !important;
  height: 100vh !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .sidebar .brand,
body[data-view="crm"] .sidebar .brand {
  margin-bottom: 8px !important;
  padding: 8px 8px 10px !important;
}

body[data-view="dashboard"] .sidebar .brand-logo,
body[data-view="crm"] .sidebar .brand-logo {
  max-width: 150px !important;
  max-height: 52px !important;
}

body[data-view="dashboard"] .nav,
body[data-view="crm"] .nav {
  gap: 2px !important;
}

body[data-view="dashboard"] .nav button,
body[data-view="crm"] .nav button {
  min-height: 34px !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .main,
body[data-view="crm"] .main {
  height: 100vh !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .topbar,
body[data-view="crm"] .topbar {
  min-height: 46px !important;
  padding: 6px 12px !important;
}

body[data-view="dashboard"] .topbar h1,
body[data-view="crm"] .topbar h1 {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

body[data-view="dashboard"] .topbar-actions,
body[data-view="crm"] .topbar-actions {
  gap: 6px !important;
}

body[data-view="dashboard"] .topbar .pill,
body[data-view="crm"] .topbar .pill,
body[data-view="dashboard"] .topbar .ghost-button,
body[data-view="crm"] .topbar .ghost-button {
  min-height: 30px !important;
  padding: 6px 9px !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .view,
body[data-view="crm"] .view {
  height: calc(100vh - 46px) !important;
  min-height: 0 !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .ops-dashboard,
body[data-view="crm"] .pro-dashboard {
  display: grid !important;
  height: 100% !important;
  min-height: 0 !important;
  gap: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .ops-command-top {
  min-height: 50px !important;
  height: 50px !important;
  margin: 0 !important;
  padding: 6px 10px !important;
  grid-template-columns: minmax(250px, 0.75fr) minmax(430px, 1fr) auto !important;
  gap: 8px !important;
}

body[data-view="dashboard"] .ops-command-title {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 8px !important;
}

body[data-view="dashboard"] .ops-command-title > span {
  width: 32px !important;
  height: 32px !important;
}

body[data-view="dashboard"] .ops-command-title h2 {
  font-size: 16px !important;
}

body[data-view="dashboard"] .ops-command-title p {
  font-size: 10px !important;
}

body[data-view="dashboard"] .ops-market-strip {
  min-height: 40px !important;
  padding: 6px 10px !important;
  grid-template-columns: minmax(105px, 1fr) minmax(88px, auto) minmax(82px, auto) minmax(104px, auto) minmax(84px, auto) !important;
  gap: 8px !important;
}

body[data-view="dashboard"] .ops-market-strip span {
  max-width: 140px !important;
  font-size: 11px !important;
}

body[data-view="dashboard"] .ops-market-strip strong {
  font-size: 16px !important;
}

body[data-view="dashboard"] .ops-market-strip em {
  font-size: 9px !important;
}

body[data-view="dashboard"] .ops-top-actions {
  min-width: 218px !important;
  gap: 7px !important;
}

body[data-view="dashboard"] .dark-action,
body[data-view="crm"] .dark-action,
body[data-view="dashboard"] .date-chip,
body[data-view="crm"] .date-chip {
  min-height: 34px !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .ops-kpi-grid,
body[data-view="crm"] .pro-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-view="dashboard"] .ops-kpi-card,
body[data-view="crm"] .pro-kpi-card {
  min-height: 70px !important;
  padding: 9px 12px 13px !important;
  gap: 8px !important;
  border-radius: 9px !important;
}

body[data-view="dashboard"] .ops-kpi-card {
  grid-template-columns: 38px minmax(0, 1fr) 12px !important;
}

body[data-view="crm"] .pro-kpi-card {
  grid-template-columns: 38px minmax(0, 1fr) 48px !important;
}

body[data-view="dashboard"] .ops-kpi-icon,
body[data-view="crm"] .pro-kpi-icon {
  width: 38px !important;
  height: 38px !important;
}

body[data-view="dashboard"] .ops-kpi-card strong,
body[data-view="crm"] .pro-kpi-value {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

body[data-view="dashboard"] .ops-kpi-card small,
body[data-view="dashboard"] .ops-kpi-card em,
body[data-view="crm"] .pro-kpi-card small {
  font-size: 10px !important;
  line-height: 1.2 !important;
}

body[data-view="dashboard"] .ops-layout {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-template-rows: minmax(205px, 1.05fr) minmax(160px, 0.8fr) minmax(88px, 0.42fr) !important;
  grid-template-areas:
    "approval approval approval attendance attendance attendance"
    "compliance compliance compliance actions actions actions"
    "activity activity reminders reminders help help" !important;
  gap: 8px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .ops-panel,
body[data-view="crm"] .pro-panel {
  min-height: 0 !important;
  padding: 10px !important;
  border-radius: 9px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .ops-panel-head,
body[data-view="crm"] .pro-panel-head {
  margin-bottom: 7px !important;
}

body[data-view="dashboard"] .ops-panel-head h2,
body[data-view="crm"] .pro-panel-head h2 {
  font-size: 15px !important;
  line-height: 1.15 !important;
}

body[data-view="dashboard"] .ops-empty-state {
  min-height: 118px !important;
  padding: 12px !important;
}

body[data-view="dashboard"] .ops-empty-state span {
  width: 54px !important;
  height: 54px !important;
}

body[data-view="dashboard"] .ops-attendance-stats {
  gap: 7px !important;
}

body[data-view="dashboard"] .ops-attendance-stats button {
  min-height: 52px !important;
  padding: 8px !important;
}

body[data-view="dashboard"] .ops-attendance-body {
  grid-template-columns: 118px minmax(0, 1fr) !important;
  min-height: 112px !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .ops-donut {
  width: 104px !important;
  height: 104px !important;
}

body[data-view="dashboard"] .ops-compliance-row,
body[data-view="dashboard"] .ops-activity-row,
body[data-view="dashboard"] .ops-list-row {
  min-height: 44px !important;
  padding: 7px 9px !important;
}

body[data-view="dashboard"] .ops-actions-grid {
  gap: 7px !important;
}

body[data-view="dashboard"] .ops-action-card {
  min-height: 52px !important;
  padding: 8px !important;
}

body[data-view="dashboard"] .ops-action-card > span {
  width: 32px !important;
  height: 32px !important;
}

body[data-view="dashboard"] .ops-action-card strong,
body[data-view="dashboard"] .ops-action-card small {
  font-size: 11px !important;
}

body[data-view="dashboard"] .ops-help-panel {
  display: block !important;
}

body[data-view="crm"] .pro-market-bar {
  min-height: 54px !important;
  height: 54px !important;
  padding: 6px 14px !important;
  grid-template-columns: 126px minmax(240px, 1fr) minmax(132px, auto) minmax(148px, auto) minmax(172px, auto) !important;
  gap: 12px !important;
}

body[data-view="crm"] .market-price-card {
  min-height: 42px !important;
  padding: 8px 10px !important;
}

body[data-view="crm"] .market-title strong {
  font-size: 16px !important;
}

body[data-view="crm"] .market-quote strong {
  font-size: 16px !important;
}

body[data-view="crm"] .market-weather strong {
  font-size: 12px !important;
}

body[data-view="crm"] .pro-company-row {
  min-height: 48px !important;
  height: 48px !important;
  padding: 5px 18px !important;
  gap: 10px !important;
}

body[data-view="crm"] .pro-company-brand .greenland-logo-mark {
  transform: scale(0.72) !important;
  transform-origin: left center !important;
}

body[data-view="crm"] .pro-company-actions {
  gap: 7px !important;
}

body[data-view="crm"] .pro-dashboard-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.8fr) minmax(300px, 0.75fr) !important;
  grid-template-rows: minmax(242px, 1fr) minmax(145px, 0.58fr) !important;
  gap: 8px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="crm"] .pro-stage-grid {
  gap: 6px !important;
}

body[data-view="crm"] .pro-stage-tile {
  min-height: 48px !important;
  padding: 8px 9px !important;
}

body[data-view="crm"] .pipeline-stage-details {
  padding: 9px !important;
  max-height: 118px !important;
  overflow: hidden !important;
}

body[data-view="crm"] .crm-stage-table th,
body[data-view="crm"] .crm-stage-table td {
  padding: 7px 8px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="crm"] .recent-activity,
body[data-view="crm"] .quick-shortcuts-panel {
  overflow: hidden !important;
}

body[data-view="crm"] .pro-shortcut-grid {
  gap: 7px !important;
}

body[data-view="crm"] .pro-shortcut {
  min-height: 70px !important;
  padding: 9px !important;
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .app-shell,
  body[data-view="crm"] .app-shell {
    grid-template-columns: 176px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar,
  body[data-view="crm"] .sidebar {
    width: 176px !important;
    min-width: 176px !important;
  }

  body[data-view="dashboard"] .ops-command-top {
    grid-template-columns: minmax(220px, 0.72fr) minmax(360px, 1fr) auto !important;
  }

  body[data-view="dashboard"] .ops-kpi-card,
  body[data-view="crm"] .pro-kpi-card {
    min-height: 62px !important;
  }

  body[data-view="dashboard"] .ops-layout {
    grid-template-rows: minmax(190px, 1fr) minmax(146px, 0.75fr) minmax(78px, 0.4fr) !important;
  }

  body[data-view="crm"] .pro-market-bar {
    grid-template-columns: 112px minmax(190px, 1fr) minmax(116px, auto) minmax(128px, auto) !important;
  }

  body[data-view="crm"] .market-weather {
    display: none !important;
  }
}

.modal-body > .gs-quote-sheet,
.approval-screen-content + .gs-quote-sheet {
  width: min(1120px, 100%) !important;
  max-width: min(1120px, 100%) !important;
  margin: 0 auto !important;
}

.gs-quote-logo-block .greenland-logo-right {
  display: none !important;
}

.gs-quote-logo-block .greenland-logo-mark {
  grid-template-columns: 70px minmax(0, 1fr) !important;
  grid-template-areas: "symbol wordmark" !important;
  gap: 10px 14px !important;
}

.gs-quote-logo-block .greenland-logo-symbol {
  grid-area: symbol !important;
}

.gs-quote-logo-block .greenland-logo-left {
  grid-area: wordmark !important;
}

.gs-quote-parties {
  grid-template-columns: minmax(250px, 1.18fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(240px, 1.05fr) !important;
}

.gs-party-card {
  min-width: 0 !important;
  min-height: 78px !important;
  padding: 12px 14px !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  column-gap: 10px !important;
  align-items: center !important;
}

.gs-party-card i {
  width: 30px !important;
  height: 30px !important;
}

.gs-party-card span {
  font-size: 10px !important;
  white-space: nowrap !important;
}

.gs-party-card strong {
  font-size: 14px !important;
  line-height: 1.12 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

.gs-party-card small {
  font-size: 11px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.gs-party-card:nth-child(2) strong,
.gs-party-card:nth-child(2) small,
.gs-party-card:nth-child(4) small {
  font-size: 11px !important;
}

@media print {
  .gs-quote-logo-block .greenland-logo-right {
    display: none !important;
  }

  .gs-quote-logo-block .greenland-logo-mark {
    grid-template-columns: 13mm minmax(0, 1fr) !important;
    grid-template-areas: "symbol wordmark" !important;
    gap: 1.6mm 2.2mm !important;
  }

  .gs-quote-parties {
    grid-template-columns: 48mm 48mm 47mm 49mm !important;
  }

  .gs-party-card {
    min-height: 19mm !important;
    padding: 3mm 2.5mm !important;
    grid-template-columns: 5.5mm minmax(0, 1fr) !important;
    column-gap: 1.8mm !important;
  }

  .gs-party-card i {
    width: 5.3mm !important;
    height: 5.3mm !important;
  }

  .gs-party-card svg {
    width: 3mm !important;
    height: 3mm !important;
  }

  .gs-party-card span {
    font-size: 1.75mm !important;
    white-space: nowrap !important;
  }

  .gs-party-card strong {
    margin-top: 0.65mm !important;
    font-size: 2.45mm !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  .gs-party-card small {
    margin-top: 0.55mm !important;
    font-size: 2.05mm !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  .gs-party-card:nth-child(2) strong,
  .gs-party-card:nth-child(2) small,
  .gs-party-card:nth-child(4) small {
    font-size: 1.95mm !important;
  }
}

/* Definitive viewport fit and quotation polish - 2026-05-30 */
@media screen {
  body[data-view="dashboard"],
  body[data-view="crm"] {
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .app-shell,
  body[data-view="crm"] .app-shell {
    grid-template-columns: 176px minmax(0, 1fr) !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .sidebar,
  body[data-view="crm"] .sidebar {
    width: 176px !important;
    min-width: 176px !important;
    height: 100vh !important;
    padding: 7px 10px !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .sidebar .brand,
  body[data-view="crm"] .sidebar .brand {
    padding: 7px 6px 8px !important;
    margin-bottom: 6px !important;
  }

  body[data-view="dashboard"] .sidebar .brand-logo,
  body[data-view="crm"] .sidebar .brand-logo {
    max-width: 146px !important;
    max-height: 48px !important;
  }

  body[data-view="dashboard"] .nav,
  body[data-view="crm"] .nav {
    gap: 1px !important;
  }

  body[data-view="dashboard"] .nav button,
  body[data-view="crm"] .nav button {
    min-height: 32px !important;
    padding: 6px 9px !important;
    font-size: 11px !important;
  }

  body[data-view="dashboard"] .nav button svg,
  body[data-view="crm"] .nav button svg {
    width: 15px !important;
    height: 15px !important;
  }

  body[data-view="dashboard"] .main,
  body[data-view="crm"] .main {
    height: 100vh !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .topbar,
  body[data-view="crm"] .topbar {
    min-height: 42px !important;
    height: 42px !important;
    padding: 5px 10px !important;
  }

  body[data-view="dashboard"] .topbar h1,
  body[data-view="crm"] .topbar h1 {
    font-size: 17px !important;
    line-height: 1.05 !important;
  }

  body[data-view="dashboard"] .topbar .pill,
  body[data-view="crm"] .topbar .pill,
  body[data-view="dashboard"] .topbar .ghost-button,
  body[data-view="crm"] .topbar .ghost-button {
    min-height: 28px !important;
    padding: 5px 8px !important;
    font-size: 11px !important;
  }

  body[data-view="dashboard"] .view,
  body[data-view="crm"] .view {
    height: calc(100vh - 42px) !important;
    min-height: 0 !important;
    padding: 7px 10px !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .ops-dashboard,
  body[data-view="crm"] .pro-dashboard {
    display: grid !important;
    height: 100% !important;
    min-height: 0 !important;
    gap: 7px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .ops-command-top {
    grid-template-columns: minmax(248px, 0.78fr) minmax(430px, 1fr) auto !important;
    min-height: 46px !important;
    height: 46px !important;
    gap: 8px !important;
    padding: 5px 9px !important;
  }

  body[data-view="dashboard"] .ops-command-title {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  body[data-view="dashboard"] .ops-command-title > span {
    width: 28px !important;
    height: 28px !important;
  }

  body[data-view="dashboard"] .ops-command-title h2 {
    font-size: 15px !important;
  }

  body[data-view="dashboard"] .ops-command-title p {
    font-size: 10px !important;
  }

  body[data-view="dashboard"] .ops-market-strip {
    min-height: 36px !important;
    padding: 5px 9px !important;
    grid-template-columns: minmax(108px, 1fr) minmax(78px, auto) minmax(76px, auto) minmax(100px, auto) minmax(82px, auto) !important;
    gap: 7px !important;
  }

  body[data-view="dashboard"] .ops-market-strip span {
    max-width: 128px !important;
    font-size: 10px !important;
  }

  body[data-view="dashboard"] .ops-market-strip strong {
    font-size: 15px !important;
  }

  body[data-view="dashboard"] .ops-market-strip em {
    font-size: 9px !important;
  }

  body[data-view="dashboard"] .ops-top-actions {
    min-width: 206px !important;
    gap: 6px !important;
  }

  body[data-view="dashboard"] .dark-action,
  body[data-view="crm"] .dark-action,
  body[data-view="dashboard"] .date-chip,
  body[data-view="crm"] .date-chip {
    min-height: 31px !important;
    padding: 6px 11px !important;
    font-size: 11px !important;
  }

  body[data-view="dashboard"] .ops-kpi-grid,
  body[data-view="crm"] .pro-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body[data-view="dashboard"] .ops-kpi-card,
  body[data-view="crm"] .pro-kpi-card {
    min-height: 60px !important;
    padding: 7px 10px 10px !important;
    gap: 7px !important;
    border-radius: 8px !important;
  }

  body[data-view="dashboard"] .ops-kpi-card {
    grid-template-columns: 34px minmax(0, 1fr) 10px !important;
  }

  body[data-view="crm"] .pro-kpi-card {
    grid-template-columns: 34px minmax(0, 1fr) 44px !important;
  }

  body[data-view="dashboard"] .ops-kpi-icon,
  body[data-view="crm"] .pro-kpi-icon {
    width: 34px !important;
    height: 34px !important;
  }

  body[data-view="dashboard"] .ops-kpi-card strong,
  body[data-view="crm"] .pro-kpi-value {
    font-size: 17px !important;
    line-height: 1.05 !important;
  }

  body[data-view="dashboard"] .ops-kpi-card small,
  body[data-view="dashboard"] .ops-kpi-card em,
  body[data-view="crm"] .pro-kpi-card small {
    font-size: 9px !important;
    line-height: 1.15 !important;
  }

  body[data-view="dashboard"] .ops-layout {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(188px, 1fr) minmax(130px, 0.72fr) minmax(72px, 0.38fr) !important;
    grid-template-areas:
      "approval approval approval attendance attendance attendance"
      "compliance compliance compliance actions actions actions"
      "activity activity reminders reminders help help" !important;
    gap: 7px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .ops-panel,
  body[data-view="crm"] .pro-panel {
    min-height: 0 !important;
    padding: 9px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .ops-panel-head,
  body[data-view="crm"] .pro-panel-head {
    margin-bottom: 6px !important;
  }

  body[data-view="dashboard"] .ops-panel-head h2,
  body[data-view="crm"] .pro-panel-head h2 {
    font-size: 14px !important;
    line-height: 1.12 !important;
  }

  body[data-view="dashboard"] .ops-empty-state {
    min-height: 100px !important;
    padding: 10px !important;
  }

  body[data-view="dashboard"] .ops-empty-state span {
    width: 46px !important;
    height: 46px !important;
  }

  body[data-view="dashboard"] .ops-attendance-stats {
    gap: 6px !important;
  }

  body[data-view="dashboard"] .ops-attendance-stats button {
    min-height: 46px !important;
    padding: 7px !important;
  }

  body[data-view="dashboard"] .ops-attendance-body {
    grid-template-columns: 100px minmax(0, 1fr) !important;
    min-height: 96px !important;
    gap: 8px !important;
  }

  body[data-view="dashboard"] .ops-donut {
    width: 90px !important;
    height: 90px !important;
  }

  body[data-view="dashboard"] .ops-compliance-row,
  body[data-view="dashboard"] .ops-activity-row,
  body[data-view="dashboard"] .ops-list-row {
    min-height: 38px !important;
    padding: 6px 8px !important;
  }

  body[data-view="dashboard"] .ops-actions-grid {
    gap: 6px !important;
  }

  body[data-view="dashboard"] .ops-action-card {
    min-height: 45px !important;
    padding: 7px !important;
  }

  body[data-view="dashboard"] .ops-action-card > span {
    width: 28px !important;
    height: 28px !important;
  }

  body[data-view="dashboard"] .ops-action-card strong,
  body[data-view="dashboard"] .ops-action-card small {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  body[data-view="dashboard"] .ops-help-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 78px !important;
    min-height: 0 !important;
  }

  body[data-view="crm"] .pro-market-bar {
    grid-template-columns: 114px minmax(220px, 1fr) minmax(118px, auto) minmax(132px, auto) minmax(150px, auto) !important;
    min-height: 48px !important;
    height: 48px !important;
    padding: 5px 12px !important;
    gap: 10px !important;
  }

  body[data-view="crm"] .market-price-card {
    min-height: 38px !important;
    padding: 7px 9px !important;
  }

  body[data-view="crm"] .market-title strong,
  body[data-view="crm"] .market-quote strong {
    font-size: 15px !important;
  }

  body[data-view="crm"] .market-weather strong {
    font-size: 11px !important;
  }

  body[data-view="crm"] .pro-company-row {
    min-height: 42px !important;
    height: 42px !important;
    padding: 4px 16px !important;
    gap: 8px !important;
  }

  body[data-view="crm"] .pro-company-brand {
    min-width: 0 !important;
  }

  body[data-view="crm"] .pro-company-brand .greenland-logo-mark {
    transform: scale(0.66) !important;
    transform-origin: left center !important;
  }

  body[data-view="crm"] .pro-company-actions {
    gap: 6px !important;
  }

  body[data-view="crm"] .pro-dashboard-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.78fr) minmax(280px, 0.72fr) !important;
    grid-template-rows: minmax(220px, 1fr) minmax(120px, 0.52fr) !important;
    gap: 7px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-view="crm"] .pro-stage-grid {
    gap: 5px !important;
  }

  body[data-view="crm"] .pro-stage-tile {
    min-height: 42px !important;
    padding: 7px 8px !important;
  }

  body[data-view="crm"] .pro-stage-tile h3 {
    font-size: 12px !important;
  }

  body[data-view="crm"] .pro-stage-tile strong,
  body[data-view="crm"] .pro-stage-tile small {
    font-size: 9px !important;
  }

  body[data-view="crm"] .pipeline-stage-details {
    padding: 8px !important;
    max-height: 104px !important;
    overflow: hidden !important;
  }

  body[data-view="crm"] .crm-stage-table {
    table-layout: fixed !important;
  }

  body[data-view="crm"] .crm-stage-table th,
  body[data-view="crm"] .crm-stage-table td {
    padding: 6px 7px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body[data-view="crm"] .recent-activity,
  body[data-view="crm"] .quick-shortcuts-panel {
    overflow: hidden !important;
  }

  body[data-view="crm"] .pro-shortcut-grid {
    gap: 6px !important;
  }

  body[data-view="crm"] .pro-shortcut {
    min-height: 58px !important;
    padding: 7px !important;
  }
}

.modal-body > .gs-quote-sheet,
.approval-screen-content + .gs-quote-sheet {
  width: min(1040px, 100%) !important;
  max-width: min(1040px, 100%) !important;
  margin: 0 auto !important;
}

.gs-quote-logo-block .greenland-logo-right {
  display: none !important;
}

.gs-quote-logo-block .greenland-logo-mark {
  grid-template-columns: 58px minmax(0, 1fr) !important;
  grid-template-areas: "symbol wordmark" !important;
  gap: 8px 12px !important;
}

.gs-quote-logo-block .greenland-logo-symbol {
  grid-area: symbol !important;
}

.gs-quote-logo-block .greenland-logo-left {
  grid-area: wordmark !important;
}

.gs-quote-parties {
  grid-template-columns: minmax(270px, 1.18fr) minmax(210px, 1fr) minmax(210px, 1fr) minmax(220px, 1fr) !important;
}

.gs-party-card {
  min-width: 0 !important;
  min-height: 74px !important;
  padding: 10px 12px !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  column-gap: 9px !important;
  align-items: center !important;
}

.gs-party-card i {
  width: 28px !important;
  height: 28px !important;
}

.gs-party-card span {
  font-size: 9px !important;
  white-space: nowrap !important;
}

.gs-party-card strong {
  font-size: 13px !important;
  line-height: 1.08 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

.gs-party-card small {
  font-size: 10px !important;
  line-height: 1.12 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.gs-party-card:nth-child(2) strong,
.gs-party-card:nth-child(2) small,
.gs-party-card:nth-child(4) small {
  font-size: 10px !important;
}

@media print {
  .gs-quote-logo-block .greenland-logo-right {
    display: none !important;
  }

  .gs-quote-logo-block .greenland-logo-mark {
    grid-template-columns: 12mm minmax(0, 1fr) !important;
    grid-template-areas: "symbol wordmark" !important;
    gap: 1.4mm 2mm !important;
  }

  .gs-quote-parties {
    grid-template-columns: 52mm 47mm 47mm 47mm !important;
  }

  .gs-party-card {
    min-height: 18mm !important;
    padding: 2.6mm 2.2mm !important;
    grid-template-columns: 5mm minmax(0, 1fr) !important;
    column-gap: 1.6mm !important;
  }

  .gs-party-card i {
    width: 5mm !important;
    height: 5mm !important;
  }

  .gs-party-card svg {
    width: 2.8mm !important;
    height: 2.8mm !important;
  }

  .gs-party-card span {
    font-size: 1.65mm !important;
    white-space: nowrap !important;
  }

  .gs-party-card strong {
    margin-top: 0.45mm !important;
    font-size: 2.25mm !important;
    line-height: 1.04 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  .gs-party-card small {
    margin-top: 0.45mm !important;
    font-size: 1.85mm !important;
    line-height: 1.06 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .gs-party-card:nth-child(2) strong,
  .gs-party-card:nth-child(2) small,
  .gs-party-card:nth-child(4) small {
    font-size: 1.75mm !important;
  }
}

.pro-quotation-print {
  --quote-navy: #06172d;
  --quote-red: #e50914;
  --quote-ink: #07152b;
  width: min(1120px, 100%);
  margin: 0 auto;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
  color: var(--quote-ink);
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.pro-quotation-print .pro-quote-header {
  display: grid;
  grid-template-columns: 1fr 330px;
  min-height: 150px;
  border-bottom: 1px solid #e5eaf2;
}

.pro-quotation-print .pro-quote-brand {
  display: grid;
  grid-template-columns: 255px 1fr;
  align-items: center;
  gap: 24px;
  padding: 24px 30px;
}

.pro-quotation-print .pro-quote-brand .greenland-logo-mark {
  display: grid;
  grid-template-columns: 66px 1fr;
  grid-template-areas:
    "symbol left"
    "tag tag";
  align-items: center;
  gap: 8px 14px;
  width: 240px;
}

.pro-quotation-print .pro-quote-brand .greenland-logo-symbol {
  grid-area: symbol;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  background: var(--quote-red);
  color: #fff;
  font-size: 43px;
}

.pro-quotation-print .pro-quote-brand .greenland-logo-left {
  grid-area: left;
}

.pro-quotation-print .pro-quote-brand .greenland-logo-left strong {
  color: #111827;
  font-size: 28px;
  line-height: 0.95;
  font-weight: 500;
}

.pro-quotation-print .pro-quote-brand .greenland-logo-left b {
  color: var(--quote-red);
  font-size: 35px;
  line-height: 0.95;
  letter-spacing: 1px;
}

.pro-quotation-print .pro-quote-brand .greenland-logo-right {
  grid-area: tag;
  border: 0;
  padding: 10px 0 0 2px;
}

.pro-quotation-print .pro-quote-brand .greenland-logo-right strong {
  display: none;
}

.pro-quotation-print .pro-quote-brand .greenland-logo-right span {
  color: #9aa5b5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.pro-quotation-print .pro-quote-company {
  display: grid;
  gap: 7px;
  border-left: 1px solid #dbe4ef;
  padding-left: 26px;
}

.pro-quotation-print .pro-quote-company h1 {
  margin: 0 0 4px;
  color: var(--quote-ink);
  font-size: 25px;
  line-height: 1.1;
  font-weight: 900;
}

.pro-quotation-print .pro-quote-company strong,
.pro-quotation-print .pro-quote-company span {
  color: var(--quote-ink);
  font-size: 14px;
  font-weight: 800;
}

.pro-quotation-print .pro-quote-voucher {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: var(--quote-navy);
  color: #fff;
  padding: 24px 28px 24px 48px;
  text-align: center;
}

.pro-quotation-print .pro-quote-voucher::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 0;
  width: 46px;
  height: 100%;
  background: var(--quote-red);
  transform: skewX(-10deg);
}

.pro-quotation-print .pro-quote-voucher span {
  color: #fff;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pro-quotation-print .pro-quote-voucher strong {
  display: block;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-top: 18px;
  color: #fff;
  font-size: 41px;
  font-weight: 500;
  letter-spacing: 1px;
}

.pro-quotation-print .pro-quote-voucher small {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.pro-quotation-print .pro-quote-info-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 0;
  padding: 24px 30px;
  border-bottom: 1px solid #eef2f7;
}

.pro-quotation-print .pro-quote-info-card {
  position: relative;
  min-height: 70px;
  border-right: 1px solid #dbe4ef;
  padding: 4px 18px 4px 66px;
}

.pro-quotation-print .pro-quote-info-card:last-child {
  border-right: 0;
}

.pro-quotation-print .pro-quote-info-icon {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f1f3f6;
  color: #111827;
}

.pro-quotation-print .pro-quote-info-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.pro-quotation-print .pro-quote-info-card::before {
  display: none;
}

.pro-quotation-print .pro-quote-info-card span {
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pro-quotation-print .pro-quote-info-card strong {
  display: block;
  margin-top: 8px;
  color: var(--quote-ink);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.pro-quotation-print .pro-quote-info-card small {
  display: block;
  margin-top: 5px;
  color: var(--quote-ink);
  font-size: 13px;
  font-weight: 700;
}

.pro-quotation-print .pro-quote-lines {
  width: calc(100% - 60px);
  margin: 26px 30px 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  overflow: hidden;
}

.pro-quotation-print .pro-quote-lines th {
  background: var(--quote-navy);
  color: #fff;
  border-color: #233b5f;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.pro-quotation-print .pro-quote-lines td {
  border-color: #d7e0ec;
  padding: 22px 16px;
  color: var(--quote-ink);
  font-size: 18px;
  vertical-align: middle;
}

.pro-quotation-print .pro-quote-lines th:nth-child(1),
.pro-quotation-print .pro-quote-lines td:nth-child(1) {
  width: 74px;
  text-align: center;
}

.pro-quotation-print .pro-quote-lines th:nth-child(3),
.pro-quotation-print .pro-quote-lines td:nth-child(3) {
  width: 125px;
  text-align: center;
}

.pro-quotation-print .pro-quote-lines th:nth-child(4),
.pro-quotation-print .pro-quote-lines td:nth-child(4),
.pro-quotation-print .pro-quote-lines th:nth-child(5),
.pro-quotation-print .pro-quote-lines td:nth-child(5) {
  width: 95px;
  text-align: center;
}

.pro-quotation-print .pro-quote-lines th:nth-child(6),
.pro-quotation-print .pro-quote-lines td:nth-child(6) {
  width: 150px;
  text-align: right;
}

.pro-quotation-print .pro-quote-lines td:nth-child(2) strong {
  display: block;
  color: var(--quote-ink);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.pro-quotation-print .pro-quote-lines td:nth-child(2) small {
  display: block;
  margin-top: 6px;
  color: var(--quote-ink);
  font-size: 15px;
  font-weight: 500;
}

.pro-quotation-print .pro-quote-lines td:nth-child(6) strong {
  color: var(--quote-red);
  font-weight: 900;
}

.pro-quotation-print .pro-quote-line-no {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--quote-red);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
}

.pro-quotation-print .pro-quote-summary {
  display: grid;
  grid-template-columns: 1fr 455px;
  gap: 28px;
  align-items: end;
  padding: 26px 30px 22px;
}

.pro-quotation-print .pro-quote-words {
  display: grid;
  gap: 9px;
  padding-left: 78px;
  position: relative;
}

.pro-quotation-print .pro-quote-words::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f1f3f6;
}

.pro-quotation-print .pro-quote-words span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pro-quotation-print .pro-quote-words strong {
  color: var(--quote-ink);
  font-size: 16px;
  line-height: 1.45;
}

.pro-quotation-print .pro-quote-totals {
  display: grid;
  gap: 12px;
}

.pro-quotation-print .pro-quote-totals div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  color: var(--quote-ink);
  font-size: 16px;
}

.pro-quotation-print .pro-quote-totals span {
  text-align: right;
}

.pro-quotation-print .pro-quote-totals strong {
  min-width: 136px;
  text-align: right;
}

.pro-quotation-print .pro-quote-grand {
  grid-template-columns: 130px 110px 1fr !important;
  overflow: hidden;
  border-radius: 7px;
  background: var(--quote-navy);
  color: #fff;
  font-size: 19px;
  font-weight: 900;
}

.pro-quotation-print .pro-quote-grand span,
.pro-quotation-print .pro-quote-grand em,
.pro-quotation-print .pro-quote-grand strong {
  padding: 16px 18px;
  color: #fff;
  text-align: center;
}

.pro-quotation-print .pro-quote-grand em {
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  font-style: normal;
}

.pro-quotation-print .pro-quote-grand strong {
  position: relative;
  min-width: 188px;
  background: var(--quote-red);
  text-align: right;
}

.pro-quotation-print .pro-quote-grand strong::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0;
  width: 40px;
  height: 100%;
  background: var(--quote-red);
  transform: skewX(-10deg);
}

.pro-quotation-print .pro-quote-two-col {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 28px;
  padding: 0 30px 22px;
}

.pro-quotation-print .pro-quote-terms,
.pro-quotation-print .pro-quote-acceptance {
  min-height: 150px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  padding: 22px 26px;
}

.pro-quotation-print .pro-quote-terms h2,
.pro-quotation-print .pro-quote-acceptance h2 {
  margin: 0 0 14px;
  color: var(--quote-ink);
  font-size: 16px;
  text-transform: uppercase;
}

.pro-quotation-print .pro-quote-terms h2::before,
.pro-quotation-print .pro-quote-acceptance h2::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  vertical-align: -5px;
  border-radius: 5px;
  border: 2px solid var(--quote-red);
}

.pro-quotation-print .pro-quote-terms li,
.pro-quotation-print .pro-quote-terms p,
.pro-quotation-print .pro-quote-acceptance span,
.pro-quotation-print .pro-quote-acceptance strong {
  color: var(--quote-ink);
  font-size: 14px;
  line-height: 1.65;
}

.pro-quotation-print .pro-quote-signature-line {
  height: 70px;
  border-bottom: 2px solid var(--quote-navy);
  margin-bottom: 8px;
}

.pro-quotation-print .pro-quote-bottom {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 1fr;
  gap: 16px;
  padding: 0 30px 22px;
}

.pro-quotation-print .pro-quote-prepared,
.pro-quotation-print .pro-quote-thanks,
.pro-quotation-print .pro-quote-assist {
  min-height: 78px;
  border-radius: 9px;
  background: #f8fafc;
  padding: 16px 20px;
}

.pro-quotation-print .pro-quote-prepared span,
.pro-quotation-print .pro-quote-assist span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pro-quotation-print .pro-quote-prepared strong,
.pro-quotation-print .pro-quote-assist strong,
.pro-quotation-print .pro-quote-prepared small,
.pro-quotation-print .pro-quote-thanks span {
  color: var(--quote-ink);
  font-size: 14px;
}

.pro-quotation-print .pro-quote-thanks {
  display: grid;
  place-content: center;
  text-align: left;
}

.pro-quotation-print .pro-quote-thanks strong {
  display: block;
  color: var(--quote-red);
  font-size: 16px;
}

.pro-quotation-print .pro-quote-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 14px 14px;
  border-radius: 8px;
  background: var(--quote-navy);
  color: #fff;
  padding: 17px 86px;
  font-size: 14px;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.pro-quotation-print .pro-quote-footer::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 0;
  width: 90px;
  height: 100%;
  background: var(--quote-red);
  transform: skewX(-12deg);
}

.pro-quotation-print .pro-quote-footer span,
.pro-quotation-print .pro-quote-footer strong {
  color: #fff;
  font-size: 14px;
  position: relative;
}

@page {
  size: A4 landscape;
  margin: 6mm;
}

@media print {
  body.printing-quotation .pro-quotation-print {
    width: 100% !important;
    max-height: 197mm !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.printing-quotation .pro-quote-header {
    grid-template-columns: 1fr 260px !important;
    min-height: 31mm !important;
  }

  body.printing-quotation .pro-quote-brand {
    grid-template-columns: 200px 1fr !important;
    gap: 16px !important;
    padding: 12px 16px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-mark {
    grid-template-columns: 50px 1fr !important;
    gap: 5px 10px !important;
    width: 190px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-symbol {
    width: 46px !important;
    height: 46px !important;
    border-radius: 9px !important;
    font-size: 31px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-left strong {
    font-size: 20px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-left b {
    font-size: 26px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-right span {
    font-size: 8px !important;
    letter-spacing: 4px !important;
  }

  body.printing-quotation .pro-quote-company {
    gap: 3px !important;
    padding-left: 18px !important;
  }

  body.printing-quotation .pro-quote-company h1 {
    font-size: 18px !important;
  }

  body.printing-quotation .pro-quote-company strong,
  body.printing-quotation .pro-quote-company span {
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-voucher {
    gap: 6px !important;
    padding: 12px 16px 12px 30px !important;
  }

  body.printing-quotation .pro-quote-voucher span {
    font-size: 20px !important;
  }

  body.printing-quotation .pro-quote-voucher strong {
    padding-top: 10px !important;
    font-size: 30px !important;
  }

  body.printing-quotation .pro-quote-voucher small {
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-info-grid {
    padding: 12px 18px !important;
  }

  body.printing-quotation .pro-quote-info-card {
    min-height: 43px !important;
    padding: 1px 12px 1px 44px !important;
  }

  body.printing-quotation .pro-quote-info-icon {
    width: 31px !important;
    height: 31px !important;
  }

  body.printing-quotation .pro-quote-info-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  body.printing-quotation .pro-quote-info-card span {
    font-size: 7px !important;
  }

  body.printing-quotation .pro-quote-info-card strong {
    margin-top: 4px !important;
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-info-card small {
    margin-top: 2px !important;
    font-size: 8px !important;
  }

  body.printing-quotation .pro-quote-lines {
    width: calc(100% - 36px) !important;
    margin: 12px 18px 0 !important;
    font-size: 9px !important;
  }

  body.printing-quotation .pro-quote-lines th {
    padding: 8px 9px !important;
    font-size: 8px !important;
  }

  body.printing-quotation .pro-quote-lines td {
    padding: 12px 9px !important;
    font-size: 12px !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(1),
  body.printing-quotation .pro-quote-lines td:nth-child(1) {
    width: 50px !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(3),
  body.printing-quotation .pro-quote-lines td:nth-child(3) {
    width: 88px !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(4),
  body.printing-quotation .pro-quote-lines td:nth-child(4),
  body.printing-quotation .pro-quote-lines th:nth-child(5),
  body.printing-quotation .pro-quote-lines td:nth-child(5) {
    width: 72px !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(6),
  body.printing-quotation .pro-quote-lines td:nth-child(6) {
    width: 115px !important;
  }

  body.printing-quotation .pro-quote-lines td:nth-child(2) strong {
    font-size: 13px !important;
  }

  body.printing-quotation .pro-quote-lines td:nth-child(2) small {
    font-size: 9px !important;
  }

  body.printing-quotation .pro-quote-line-no {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
  }

  body.printing-quotation .pro-quote-summary {
    grid-template-columns: 1fr 330px !important;
    gap: 18px !important;
    padding: 14px 18px 12px !important;
  }

  body.printing-quotation .pro-quote-words {
    gap: 4px !important;
    padding-left: 52px !important;
  }

  body.printing-quotation .pro-quote-words::before {
    width: 34px !important;
    height: 34px !important;
  }

  body.printing-quotation .pro-quote-words span {
    font-size: 8px !important;
  }

  body.printing-quotation .pro-quote-words strong {
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-totals {
    gap: 5px !important;
  }

  body.printing-quotation .pro-quote-totals div {
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-grand {
    grid-template-columns: 82px 68px 1fr !important;
    font-size: 13px !important;
  }

  body.printing-quotation .pro-quote-grand span,
  body.printing-quotation .pro-quote-grand em,
  body.printing-quotation .pro-quote-grand strong {
    padding: 9px 10px !important;
  }

  body.printing-quotation .pro-quote-grand strong {
    min-width: 126px !important;
  }

  body.printing-quotation .pro-quote-two-col {
    gap: 18px !important;
    padding: 0 18px 12px !important;
  }

  body.printing-quotation .pro-quote-terms,
  body.printing-quotation .pro-quote-acceptance {
    min-height: 36mm !important;
    padding: 11px 14px !important;
  }

  body.printing-quotation .pro-quote-terms h2,
  body.printing-quotation .pro-quote-acceptance h2 {
    margin-bottom: 8px !important;
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-terms li,
  body.printing-quotation .pro-quote-terms p,
  body.printing-quotation .pro-quote-acceptance span,
  body.printing-quotation .pro-quote-acceptance strong {
    font-size: 8px !important;
    line-height: 1.45 !important;
  }

  body.printing-quotation .pro-quote-signature-line {
    height: 22mm !important;
  }

  body.printing-quotation .pro-quote-bottom {
    gap: 10px !important;
    padding: 0 18px 10px !important;
  }

  body.printing-quotation .pro-quote-prepared,
  body.printing-quotation .pro-quote-thanks,
  body.printing-quotation .pro-quote-assist {
    min-height: 15mm !important;
    padding: 8px 12px !important;
  }

  body.printing-quotation .pro-quote-prepared span,
  body.printing-quotation .pro-quote-assist span {
    font-size: 7px !important;
  }

  body.printing-quotation .pro-quote-prepared strong,
  body.printing-quotation .pro-quote-assist strong,
  body.printing-quotation .pro-quote-prepared small,
  body.printing-quotation .pro-quote-thanks span,
  body.printing-quotation .pro-quote-thanks strong {
    font-size: 9px !important;
  }

  body.printing-quotation .pro-quote-footer {
    margin: 0 9px 9px !important;
    padding: 9px 58px !important;
  }

  body.printing-quotation .pro-quote-footer span,
  body.printing-quotation .pro-quote-footer strong {
    font-size: 8px !important;
  }
}

@media print {
  body.printing-quotation .pro-quotation-print {
    width: 100% !important;
    max-height: 284mm !important;
    border: 1px solid #d8e1ec !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    color: #0b172d !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    overflow: hidden !important;
  }

  body.printing-quotation .pro-quote-header {
    display: grid !important;
    grid-template-columns: 1fr 285px !important;
    min-height: 38mm !important;
    border-bottom: 1px solid #e5e7eb !important;
    overflow: hidden !important;
  }

  body.printing-quotation .pro-quote-brand {
    display: grid !important;
    grid-template-columns: 225px 1fr !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 12px 16px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-mark {
    display: grid !important;
    grid-template-columns: 52px 150px !important;
    grid-template-areas:
      "symbol left"
      "tag tag" !important;
    align-items: center !important;
    gap: 6px 10px !important;
    width: 220px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-symbol {
    grid-area: symbol !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 9px !important;
    background: #e50914 !important;
    color: #ffffff !important;
    font-size: 34px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-left {
    grid-area: left !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-left strong {
    color: #111827 !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-left b {
    color: #dc111b !important;
    font-size: 26px !important;
    line-height: 1 !important;
    letter-spacing: 1px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-right {
    grid-area: tag !important;
    border: 0 !important;
    padding: 5px 0 0 2px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-right strong {
    display: none !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-right span {
    color: #94a3b8 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 4px !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-company {
    display: grid !important;
    gap: 4px !important;
    border-left: 1px solid #e5e7eb !important;
    padding-left: 18px !important;
  }

  body.printing-quotation .pro-quote-company h1 {
    margin: 0 0 2px !important;
    color: #0b172d !important;
    font-size: 18px !important;
    line-height: 1.15 !important;
  }

  body.printing-quotation .pro-quote-company strong,
  body.printing-quotation .pro-quote-company span {
    color: #0f172a !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  body.printing-quotation .pro-quote-voucher {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    align-content: center !important;
    gap: 8px !important;
    background: #07182f !important;
    color: #ffffff !important;
    padding: 12px 18px 12px 30px !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-voucher::before {
    content: "" !important;
    position: absolute !important;
    left: -18px !important;
    top: 0 !important;
    width: 32px !important;
    height: 100% !important;
    background: #e50914 !important;
    transform: skewX(-10deg) !important;
  }

  body.printing-quotation .pro-quote-voucher span {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-voucher strong {
    display: block !important;
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.35) !important;
    padding-top: 13px !important;
    color: #ffffff !important;
    font-size: 30px !important;
    font-weight: 500 !important;
    letter-spacing: 1px !important;
  }

  body.printing-quotation .pro-quote-voucher small {
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-info-grid {
    display: grid !important;
    grid-template-columns: 1.35fr 1fr 1fr 1fr !important;
    gap: 0 !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #eef2f7 !important;
  }

  body.printing-quotation .pro-quote-info-card {
    position: relative !important;
    min-height: 48px !important;
    border-right: 1px solid #e5e7eb !important;
    padding: 2px 14px 2px 42px !important;
  }

  body.printing-quotation .pro-quote-info-card::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
  }

  body.printing-quotation .pro-quote-info-card:last-child {
    border-right: 0 !important;
  }

  body.printing-quotation .pro-quote-info-card span {
    color: #334155 !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    letter-spacing: .5px !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-info-card strong {
    display: block !important;
    margin-top: 5px !important;
    color: #0f172a !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-info-card small {
    display: block !important;
    margin-top: 3px !important;
    color: #0f172a !important;
    font-size: 10px !important;
    font-weight: 700 !important;
  }

  body.printing-quotation .pro-quote-lines {
    width: calc(100% - 34px) !important;
    margin: 14px 17px 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
    border: 1px solid #d7e0ec !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-lines th {
    background: #07182f !important;
    color: #ffffff !important;
    border-color: #1e314d !important;
    padding: 9px 10px !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    text-align: center !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-lines td {
    border-color: #d7e0ec !important;
    padding: 13px 10px !important;
    color: #0f172a !important;
    font-size: 13px !important;
    vertical-align: middle !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(1),
  body.printing-quotation .pro-quote-lines td:nth-child(1) {
    width: 54px !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(2),
  body.printing-quotation .pro-quote-lines td:nth-child(2) {
    width: auto !important;
    text-align: left !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(3),
  body.printing-quotation .pro-quote-lines td:nth-child(3) {
    width: 98px !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(4),
  body.printing-quotation .pro-quote-lines td:nth-child(4),
  body.printing-quotation .pro-quote-lines th:nth-child(5),
  body.printing-quotation .pro-quote-lines td:nth-child(5) {
    width: 74px !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(6),
  body.printing-quotation .pro-quote-lines td:nth-child(6) {
    width: 108px !important;
    text-align: right !important;
  }

  body.printing-quotation .pro-quote-lines td:nth-child(2) strong {
    display: block !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
  }

  body.printing-quotation .pro-quote-lines td:nth-child(2) small {
    display: block !important;
    margin-top: 4px !important;
    color: #0f172a !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
  }

  body.printing-quotation .pro-quote-line-no {
    display: inline-grid !important;
    place-items: center !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 6px !important;
    background: #e50914 !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 900 !important;
  }

  body.printing-quotation .pro-quote-summary {
    display: grid !important;
    grid-template-columns: 1fr 290px !important;
    gap: 18px !important;
    align-items: end !important;
    padding: 14px 18px 12px !important;
  }

  body.printing-quotation .pro-quote-words {
    display: grid !important;
    gap: 5px !important;
  }

  body.printing-quotation .pro-quote-words span {
    color: #334155 !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-words strong {
    color: #0f172a !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
  }

  body.printing-quotation .pro-quote-totals {
    display: grid !important;
    gap: 7px !important;
  }

  body.printing-quotation .pro-quote-totals div {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 14px !important;
    color: #0f172a !important;
    font-size: 11px !important;
  }

  body.printing-quotation .pro-quote-totals span {
    text-align: right !important;
  }

  body.printing-quotation .pro-quote-totals strong {
    min-width: 100px !important;
    text-align: right !important;
  }

  body.printing-quotation .pro-quote-grand {
    grid-template-columns: 90px 72px 1fr !important;
    overflow: hidden !important;
    border-radius: 5px !important;
    background: #07182f !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 900 !important;
  }

  body.printing-quotation .pro-quote-grand span,
  body.printing-quotation .pro-quote-grand em,
  body.printing-quotation .pro-quote-grand strong {
    padding: 10px 12px !important;
    color: #ffffff !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-grand strong {
    min-width: 142px !important;
    background: #e50914 !important;
    text-align: right !important;
  }

  body.printing-quotation .pro-quote-two-col {
    display: grid !important;
    grid-template-columns: 1fr 1.05fr !important;
    gap: 18px !important;
    padding: 0 18px 12px !important;
  }

  body.printing-quotation .pro-quote-terms,
  body.printing-quotation .pro-quote-acceptance {
    min-height: 46mm !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    padding: 14px 16px !important;
  }

  body.printing-quotation .pro-quote-terms h2,
  body.printing-quotation .pro-quote-acceptance h2 {
    margin: 0 0 10px !important;
    color: #0f172a !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-terms li,
  body.printing-quotation .pro-quote-terms p,
  body.printing-quotation .pro-quote-acceptance span,
  body.printing-quotation .pro-quote-acceptance strong {
    color: #0f172a !important;
    font-size: 10px !important;
    line-height: 1.55 !important;
  }

  body.printing-quotation .pro-quote-signature-line {
    height: 28mm !important;
    border-bottom: 1px solid #0f172a !important;
    margin-bottom: 7px !important;
  }

  body.printing-quotation .pro-quote-bottom {
    display: grid !important;
    grid-template-columns: 1.1fr 1.2fr 1fr !important;
    gap: 10px !important;
    padding: 0 18px 12px !important;
  }

  body.printing-quotation .pro-quote-prepared,
  body.printing-quotation .pro-quote-thanks,
  body.printing-quotation .pro-quote-assist {
    min-height: 20mm !important;
    border-radius: 6px !important;
    background: #f8fafc !important;
    padding: 10px 14px !important;
  }

  body.printing-quotation .pro-quote-thanks strong {
    display: block !important;
    margin-top: 6px !important;
    color: #e50914 !important;
    font-size: 12px !important;
  }

  body.printing-quotation .pro-quote-prepared span,
  body.printing-quotation .pro-quote-assist span {
    color: #334155 !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-prepared strong,
  body.printing-quotation .pro-quote-assist strong,
  body.printing-quotation .pro-quote-prepared small,
  body.printing-quotation .pro-quote-thanks span {
    color: #0f172a !important;
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 10px 10px !important;
    border-radius: 6px !important;
    background: #07182f !important;
    color: #ffffff !important;
    padding: 10px 70px 10px 74px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  body.printing-quotation .pro-quote-footer span,
  body.printing-quotation .pro-quote-footer strong {
    color: #ffffff !important;
    font-size: 10px !important;
  }
}

@media print {
  body.printing-quotation .pro-quotation-print {
    position: relative;
    display: block !important;
    width: 100%;
    max-height: 284mm;
    overflow: hidden !important;
    border: 1px solid #d8e1ec;
    border-radius: 7px;
    background: #ffffff;
    color: #0f172a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9px;
    line-height: 1.25;
  }

  .pro-quote-header {
    display: grid;
    grid-template-columns: 1fr 285px;
    min-height: 38mm;
    border-bottom: 1px solid #e5e7eb;
    overflow: hidden;
  }

  .pro-quote-brand {
    display: grid;
    grid-template-columns: 230px 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
  }

  .pro-quote-brand .quotation-print-brand-gs,
  .pro-quote-brand .quotation-print-brand {
    display: block;
  }

  .pro-quote-brand .greenland-logo-mark {
    display: grid;
    grid-template-columns: 52px 150px;
    grid-template-areas:
      "symbol left"
      "tag tag";
    align-items: center;
    gap: 6px 10px;
    width: 220px;
  }

  .pro-quote-brand .greenland-logo-symbol {
    grid-area: symbol;
    width: 48px;
    height: 48px;
    border-radius: 9px;
    font-size: 34px;
  }

  .pro-quote-brand .greenland-logo-left {
    grid-area: left;
  }

  .pro-quote-brand .greenland-logo-left strong {
    color: #111827;
    font-size: 18px;
    line-height: 1;
  }

  .pro-quote-brand .greenland-logo-left b {
    color: #dc111b;
    font-size: 26px;
    line-height: 1;
    letter-spacing: 1px;
  }

  .pro-quote-brand .greenland-logo-right {
    grid-area: tag;
    border: 0;
    padding: 5px 0 0 2px;
  }

  .pro-quote-brand .greenland-logo-right strong {
    display: none;
  }

  .pro-quote-brand .greenland-logo-right span {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
  }

  .pro-quote-company {
    display: grid;
    gap: 4px;
    border-left: 1px solid #e5e7eb;
    padding-left: 18px;
  }

  .pro-quote-company h1 {
    margin: 0 0 2px;
    color: #0b172d;
    font-size: 18px;
    line-height: 1.15;
  }

  .pro-quote-company strong,
  .pro-quote-company span {
    color: #0f172a;
    font-size: 10px;
    font-weight: 800;
  }

  .pro-quote-voucher {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    background: #07182f;
    color: #ffffff;
    padding: 12px 18px 12px 30px;
    text-align: center;
  }

  .pro-quote-voucher::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 0;
    width: 32px;
    height: 100%;
    background: #e50914;
    transform: skewX(-10deg);
  }

  .pro-quote-voucher span {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  .pro-quote-voucher strong {
    display: block;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    padding-top: 13px;
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 1px;
  }

  .pro-quote-voucher small {
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .pro-quote-info-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 0;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f7;
  }

  .pro-quote-info-card {
    position: relative;
    min-height: 48px;
    border-right: 1px solid #e5e7eb;
    padding: 2px 14px 2px 42px;
  }

  .pro-quote-info-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
  }

  .pro-quote-info-card:last-child {
    border-right: 0;
  }

  .pro-quote-info-card span {
    display: block;
    color: #334155;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .5px;
    text-transform: uppercase;
  }

  .pro-quote-info-card strong {
    display: block;
    margin-top: 5px;
    color: #0f172a;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .pro-quote-info-card small {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    font-size: 10px;
    font-weight: 700;
  }

  .pro-quote-lines {
    width: calc(100% - 34px);
    margin: 14px 17px 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    border: 1px solid #d7e0ec;
    border-radius: 5px;
    overflow: hidden;
  }

  .pro-quote-lines th {
    background: #07182f;
    color: #ffffff;
    border-color: #1e314d;
    padding: 9px 10px;
    font-size: 9px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
  }

  .pro-quote-lines td {
    border-color: #d7e0ec;
    padding: 13px 10px;
    font-size: 13px;
    vertical-align: middle;
  }

  .pro-quote-lines th:nth-child(1),
  .pro-quote-lines td:nth-child(1) {
    width: 54px;
    text-align: center;
  }

  .pro-quote-lines th:nth-child(2),
  .pro-quote-lines td:nth-child(2) {
    width: auto;
    text-align: left;
  }

  .pro-quote-lines th:nth-child(3),
  .pro-quote-lines td:nth-child(3) {
    width: 98px;
    text-align: center;
  }

  .pro-quote-lines th:nth-child(4),
  .pro-quote-lines td:nth-child(4),
  .pro-quote-lines th:nth-child(5),
  .pro-quote-lines td:nth-child(5) {
    width: 74px;
    text-align: center;
  }

  .pro-quote-lines th:nth-child(6),
  .pro-quote-lines td:nth-child(6) {
    width: 108px;
    text-align: right;
  }

  .pro-quote-lines td:nth-child(2) strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
  }

  .pro-quote-lines td:nth-child(2) small {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
  }

  .pro-quote-line-no {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #e50914;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
  }

  .pro-quote-summary {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 18px;
    align-items: end;
    padding: 14px 18px 12px;
  }

  .pro-quote-words {
    display: grid;
    gap: 5px;
  }

  .pro-quote-words span {
    color: #334155;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .3px;
    text-transform: uppercase;
  }

  .pro-quote-words strong {
    color: #0f172a;
    font-size: 11px;
    line-height: 1.45;
  }

  .pro-quote-totals {
    display: grid;
    gap: 7px;
  }

  .pro-quote-totals div {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    font-size: 11px;
  }

  .pro-quote-totals span {
    text-align: right;
  }

  .pro-quote-totals strong {
    min-width: 100px;
    text-align: right;
  }

  .pro-quote-grand {
    grid-template-columns: 90px 72px 1fr !important;
    overflow: hidden;
    border-radius: 5px;
    background: #07182f;
    color: #ffffff;
    font-size: 14px !important;
    font-weight: 900;
  }

  .pro-quote-grand span,
  .pro-quote-grand em,
  .pro-quote-grand strong {
    padding: 10px 12px;
    text-align: center;
  }

  .pro-quote-grand em {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    font-style: normal;
  }

  .pro-quote-grand strong {
    position: relative;
    min-width: 142px;
    background: #e50914;
    text-align: right;
  }

  .pro-quote-two-col {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 18px;
    padding: 0 18px 12px;
  }

  .pro-quote-terms,
  .pro-quote-acceptance {
    min-height: 46mm;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px 16px;
  }

  .pro-quote-terms h2,
  .pro-quote-acceptance h2 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 12px;
    text-transform: uppercase;
  }

  .pro-quote-terms ul {
    margin: 0;
    padding-left: 16px;
  }

  .pro-quote-terms li,
  .pro-quote-terms p,
  .pro-quote-acceptance span,
  .pro-quote-acceptance strong {
    color: #0f172a;
    font-size: 10px;
    line-height: 1.55;
  }

  .pro-quote-signature-line {
    height: 28mm;
    border-bottom: 1px solid #0f172a;
    margin-bottom: 7px;
  }

  .pro-quote-bottom {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 1fr;
    gap: 10px;
    padding: 0 18px 12px;
  }

  .pro-quote-prepared,
  .pro-quote-thanks,
  .pro-quote-assist {
    min-height: 20mm;
    border-radius: 6px;
    background: #f8fafc;
    padding: 10px 14px;
  }

  .pro-quote-prepared span,
  .pro-quote-assist span {
    display: block;
    color: #334155;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .pro-quote-prepared strong,
  .pro-quote-assist strong {
    display: block;
    margin-top: 5px;
    color: #0f172a;
    font-size: 11px;
  }

  .pro-quote-prepared small,
  .pro-quote-thanks span {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    font-size: 10px;
  }

  .pro-quote-thanks strong {
    display: block;
    margin-top: 6px;
    color: #e50914;
    font-size: 12px;
  }

  .pro-quote-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 10px 10px;
    border-radius: 6px;
    background: #07182f;
    color: #ffffff;
    padding: 10px 70px 10px 74px;
    font-size: 10px;
    font-weight: 800;
  }

  .pro-quote-footer::before {
    content: "";
    position: absolute;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.35;
}

.hidden {
  display: none !important;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(244, 245, 247, 0.96));
  padding: 18px;
}

.login-panel {
  width: min(440px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.login-brand {
  color: var(--ink);
  border-bottom-color: var(--line);
  margin-bottom: 18px;
  justify-content: center;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form h1 {
  margin: 0;
}

.app-locked {
  filter: blur(2px);
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--nav);
  color: var(--ink);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.brand-logo {
  display: block;
  width: 210px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.login-brand .brand-logo {
  width: 210px;
  max-height: 82px;
  padding: 10px;
  border-color: var(--line);
}

.brand-copy {
  min-width: 0;
}

.sidebar .brand {
  flex-direction: column;
  align-items: flex-start;
}

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

.login-brand span {
  color: var(--muted);
}

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

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  color: #252a32;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.nav button:hover,
.nav button.active {
  background: var(--nav-2);
  color: var(--ink);
  box-shadow: inset 4px 0 0 var(--accent);
}

.nav .nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.nav .nav-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.view {
  padding: 24px 26px 42px;
}

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

.stats {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}

.module-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.module-hero span {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-hero h2 {
  margin: 3px 0;
  font-size: 24px;
}

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

.module-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.module-kpis {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.crm-kpis {
  grid-template-columns: repeat(4, minmax(150px, 240px));
}

.crm-kpis .dashboard-kpi {
  min-height: auto;
  padding: 10px 12px;
}

.crm-kpis .dashboard-kpi strong {
  margin: 5px 0 3px;
  font-size: 20px;
}

.crmgs-brand-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
}

.crmgs-brand-header img {
  display: block;
  width: min(760px, 100%);
  height: auto;
}

.greenland-logo-mark {
  display: inline-grid;
  grid-template-columns: 62px auto auto;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  color: #111827;
  background: #ffffff;
}

.greenland-logo-symbol {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #df1b22;
  color: #ffffff;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
}

.greenland-logo-left,
.greenland-logo-right {
  display: grid;
  line-height: 1.05;
}

.greenland-logo-left strong {
  font-size: 28px;
  font-weight: 500;
}

.greenland-logo-left b {
  color: #df1b22;
  font-size: 30px;
  font-weight: 900;
}

.greenland-logo-right {
  border-left: 2px solid #e5e7eb;
  padding-left: 14px;
  gap: 5px;
}

.greenland-logo-right strong {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

.greenland-logo-right span {
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.quotation-print-brand-gs {
  flex: 1;
}

.quotation-print-brand-gs img {
  width: 100%;
  max-width: 520px;
  height: auto;
}

.module-grid {
  display: grid;
  gap: 16px;
}

.module-card {
  box-shadow: var(--shadow-soft);
}

.module-card .section-title,
.module-card .toolbar {
  margin-top: 0;
}

.crm-command-center {
  margin-bottom: 14px;
}

.crm-command-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 220px));
  gap: 10px;
}

.crm-command-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 5px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.crm-command-card:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
  background: #fffafa;
}

.crm-command-card.primary {
  border-left-color: var(--accent);
  background: linear-gradient(180deg, #ffffff, #fff5f5);
}

.crm-command-card span {
  justify-self: start;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
}

.crm-command-card strong {
  font-size: 15px;
}

.crm-command-card small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-price-notice {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 10px 0 14px;
  border: 1px solid #f59e0b;
  border-left: 6px solid #b45309;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 247, 237, 0.98), rgba(255, 251, 235, 0.95)),
    linear-gradient(90deg, rgba(220, 38, 38, 0.12), rgba(245, 158, 11, 0.18), rgba(22, 163, 74, 0.12));
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.12);
  animation: priceNoticePulse 2.8s ease-in-out infinite;
}

.crm-price-notice::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -35%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: skewX(-18deg);
  animation: priceNoticeShine 3.6s ease-in-out infinite;
  pointer-events: none;
}

.price-notice-badge {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 7px 10px;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.22);
}

.price-notice-marquee {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.price-notice-marquee > span {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  max-width: 100%;
  animation: priceNoticeNudge 4.5s ease-in-out infinite;
}

.price-notice-marquee strong {
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.price-notice-marquee small {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.crm-price-notice b {
  min-width: 86px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  padding: 8px 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

@keyframes priceNoticePulse {
  0%,
  100% {
    border-color: #f59e0b;
  }
  50% {
    border-color: #dc2626;
    box-shadow: 0 14px 34px rgba(220, 38, 38, 0.16);
  }
}

@keyframes priceNoticeShine {
  0%,
  40% {
    left: -35%;
  }
  75%,
  100% {
    left: 115%;
  }
}

@keyframes priceNoticeNudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px);
  }
}

.crm-items-form {
  align-items: start;
}

.crm-stock-import,
.crm-stock-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.crm-stock-import strong,
.crm-stock-summary strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.crm-stock-import small,
.crm-stock-summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.crm-stock-upload-button {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.crm-stock-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.crm-item-list {
  display: grid;
  gap: 6px;
}

.crm-item-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) minmax(120px, 0.8fr) minmax(110px, 0.7fr) 90px 90px 90px;
  gap: 8px;
  align-items: center;
}

.crm-item-row input {
  min-width: 0;
}

.crm-item-head {
  padding: 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-hero span,
.dashboard-date small {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-hero h2 {
  margin: 3px 0;
  font-size: 25px;
}

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

.dashboard-date {
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  text-align: right;
}

.dashboard-date strong {
  display: block;
  font-size: 17px;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: var(--shadow-soft);
  border-top: 3px solid var(--line-strong);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.dashboard-kpi.ok {
  border-top-color: var(--ok);
}

.dashboard-kpi.warn {
  border-top-color: var(--accent-2);
}

.dashboard-kpi.danger {
  border-top-color: var(--accent);
}

.dashboard-kpi span,
.dashboard-kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-kpi strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.1;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.dashboard-card {
  box-shadow: var(--shadow-soft);
}

.approval-card {
  min-height: 300px;
}

.dashboard-list {
  display: grid;
  gap: 8px;
}

.dashboard-list.compact {
  margin-top: 12px;
}

.dashboard-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.dashboard-row:hover {
  border-color: var(--accent);
  background: #fff7f7;
}

.dashboard-row span:first-child {
  min-width: 0;
}

.dashboard-row strong,
.dashboard-row small {
  display: block;
}

.dashboard-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-row {
  padding: 8px 10px;
}

.dashboard-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  padding: 22px;
  text-align: center;
}

.compact-empty {
  padding: 12px;
  font-size: 12px;
}

.crm-pipeline-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.crm-followup-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid #f7c56b;
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  padding: 9px 11px;
  margin-bottom: 12px;
  text-align: left;
  cursor: pointer;
}

.crm-followup-notice:hover {
  border-color: var(--accent-2);
  background: #fff7e6;
}

.crm-followup-notice strong {
  white-space: nowrap;
}

.crm-followup-notice small {
  color: var(--muted);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-column {
  --stage: var(--accent);
  --stage-soft: var(--accent-soft);
  display: grid;
  gap: 8px;
  min-width: 0;
}

.pipeline-column.selected .pipeline-stage-button {
  box-shadow: 0 0 0 2px var(--stage-soft), var(--shadow);
}

.pipeline-column.stage-draft {
  --stage: #64748b;
  --stage-soft: #f1f5f9;
}

.pipeline-column.stage-sent {
  --stage: #2563eb;
  --stage-soft: #eff6ff;
}

.pipeline-column.stage-follow {
  --stage: #b54708;
  --stage-soft: #fff7ed;
}

.pipeline-column.stage-won {
  --stage: var(--ok);
  --stage-soft: #ecfdf3;
}

.pipeline-column.stage-lost,
.pipeline-column.stage-cancelled {
  --stage: var(--danger);
  --stage-soft: #fff1f2;
}

.pipeline-stage-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--stage);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.pipeline-stage-button:hover {
  border-color: var(--stage);
  background: var(--stage-soft);
}

.pipeline-title {
  min-width: 0;
}

.pipeline-title strong,
.pipeline-title small {
  display: block;
}

.pipeline-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.pipeline-note {
  display: none;
}

.pipeline-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--stage);
  background: var(--stage-soft);
  flex: 0 0 auto;
}

.pipeline-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pipeline-count {
  min-width: 28px;
  border-radius: 999px;
  background: var(--stage-soft);
  color: var(--stage);
  font-weight: 800;
  text-align: center;
  padding: 3px 8px;
  justify-self: end;
}

.pipeline-list {
  display: grid;
  gap: 8px;
}

.pipeline-stage-details {
  --stage: var(--accent);
  --stage-soft: var(--accent-soft);
  gap: 10px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--stage);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.pipeline-stage-open {
  display: grid;
}

.pipeline-stage-empty {
  display: flex;
  align-items: center;
}

.pipeline-stage-details.stage-draft {
  --stage: #64748b;
  --stage-soft: #f1f5f9;
}

.pipeline-stage-details.stage-sent {
  --stage: #2563eb;
  --stage-soft: #eff6ff;
}

.pipeline-stage-details.stage-follow {
  --stage: #b54708;
  --stage-soft: #fff7ed;
}

.pipeline-stage-details.stage-won {
  --stage: var(--ok);
  --stage-soft: #ecfdf3;
}

.pipeline-stage-details.stage-lost,
.pipeline-stage-details.stage-cancelled {
  --stage: var(--danger);
  --stage-soft: #fff1f2;
}

.pipeline-stage-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.pipeline-stage-detail-head strong,
.pipeline-stage-details strong,
.pipeline-stage-details small {
  display: block;
}

.pipeline-stage-details small {
  color: var(--muted);
  font-weight: 700;
}

.pipeline-stage-deals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.crm-stage-table {
  margin-top: 4px;
}

.crm-stage-table table {
  box-shadow: none;
}

.crm-stage-table td,
.crm-stage-table th {
  white-space: nowrap;
}

.pipeline-deal-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--stage);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.pipeline-deal-card:hover {
  border-color: var(--stage);
  background: var(--stage-soft);
}

.delivery-area-grid {
  display: grid;
  gap: 12px;
}

.delivery-area-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--ok);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

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

.delivery-area-head strong,
.delivery-area-head small {
  display: block;
}

.delivery-area-head small {
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
}

.deal-main strong,
.deal-main small {
  display: block;
}

.deal-main small,
.deal-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.deal-value {
  font-weight: 800;
  white-space: nowrap;
}

.deal-date {
  grid-column: 1 / -1;
}

.pipeline-empty-line {
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 9px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pipeline-empty-line:hover {
  border-color: var(--stage);
  background: var(--stage-soft);
  color: var(--stage);
}

.table-action-button {
  min-width: 72px;
  padding: 7px 10px;
}

.attendance-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
  margin-bottom: 12px;
}

.attendance-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ok);
}

.dashboard-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dashboard-mini-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.dashboard-mini-grid strong,
.dashboard-mini-grid span {
  display: block;
}

.dashboard-mini-grid strong {
  font-size: 20px;
}

.dashboard-mini-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.quick-action-grid button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  padding: 9px 10px;
}

.quick-action-grid button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

body[data-view="crm"] {
  background: #f4f7fb;
}

body[data-view="crm"] .sidebar {
  background: linear-gradient(180deg, #071327 0%, #0b1f38 58%, #071221 100%);
  color: #ffffff;
  border-right: 0;
}

body[data-view="crm"] .sidebar .brand {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body[data-view="crm"] .sidebar .brand-copy strong,
body[data-view="crm"] .sidebar .brand-copy span {
  color: #ffffff;
}

body[data-view="crm"] .nav button {
  color: #e5edf7;
  border-radius: 10px;
}

body[data-view="crm"] .nav .nav-icon {
  color: #ffffff;
}

body[data-view="crm"] .nav button:hover,
body[data-view="crm"] .nav button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #e11d2e, #8f1d39);
  box-shadow: 0 12px 28px rgba(225, 29, 46, 0.28);
}

body[data-view="crm"] .topbar {
  border-bottom: 0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body[data-view="crm"] .view {
  padding: 0 26px 28px;
}

body[data-view="dashboard"] {
  background: #eef3f8;
}

body[data-view="dashboard"] .sidebar {
  background: linear-gradient(180deg, #071327 0%, #0b1f38 58%, #071221 100%);
  color: #ffffff;
  border-right: 0;
}

body[data-view="dashboard"] .sidebar .brand {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body[data-view="dashboard"] .sidebar .brand-copy strong,
body[data-view="dashboard"] .sidebar .brand-copy span {
  color: #ffffff;
}

body[data-view="dashboard"] .nav button {
  color: #e5edf7;
  border-radius: 10px;
}

body[data-view="dashboard"] .nav .nav-icon {
  color: #ffffff;
}

body[data-view="dashboard"] .nav button:hover,
body[data-view="dashboard"] .nav button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #e11d2e, #8f1d39);
  box-shadow: 0 12px 28px rgba(225, 29, 46, 0.28);
}

body[data-view="dashboard"] .topbar {
  border-bottom: 0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body[data-view="dashboard"] .view {
  padding: 0 26px 28px;
}

.ops-dashboard {
  display: grid;
  gap: 18px;
  color: #0f172a;
}

.ops-command-top {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(520px, 1.5fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 -26px;
  padding: 14px 26px;
  background: #ffffff;
  border-bottom: 1px solid #d7e1ec;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.ops-command-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ops-menu-pill,
.ops-kpi-icon,
.ops-action-card > span,
.ops-activity-row > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ops-menu-pill {
  width: 42px;
  height: 42px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
}

.ops-command-title h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.ops-command-title p {
  margin: 3px 0 0;
  color: #53647a;
  font-size: 13px;
  font-weight: 700;
}

.ops-market-strip {
  display: grid;
  grid-template-columns: minmax(185px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  color: #0f172a;
  text-align: left;
  background: linear-gradient(90deg, #ffffff, #f8fbff);
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  box-shadow: inset 4px 0 0 #e11d2e;
  cursor: pointer;
}

.ops-market-strip span,
.ops-market-strip strong,
.ops-market-strip em {
  white-space: nowrap;
}

.ops-market-strip span {
  color: #1e2d43;
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-market-strip span b {
  color: #53647a;
  font-size: 11px;
}

.ops-market-strip strong {
  color: #0f172a;
  font-size: 19px;
  font-weight: 900;
}

.ops-market-strip small {
  color: #64748b;
  font-size: 11px;
}

.ops-market-strip em {
  color: #0f9f6e;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.ops-market-strip em.down {
  color: #e11d2e;
}

.ops-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dark-action {
  min-height: 42px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #e11d2e, #9f1239);
  border: 0;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(225, 29, 46, 0.22);
}

.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 16px;
}

.ops-kpi-card {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 118px;
  padding: 18px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #d9e3ee;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.ops-kpi-card::before,
.ops-kpi-card b {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.ops-kpi-card::before {
  opacity: 0.14;
}

.ops-kpi-card:hover,
.ops-action-card:hover,
.ops-list-row:hover,
.ops-compliance-row:hover,
.ops-activity-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

.ops-kpi-icon {
  width: 58px;
  height: 58px;
  color: currentColor;
  background: color-mix(in srgb, currentColor 14%, #ffffff);
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px color-mix(in srgb, currentColor 7%, #ffffff);
}

.ops-kpi-icon svg {
  width: 26px;
  height: 26px;
}

.ops-kpi-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.ops-dashboard svg,
.pro-dashboard svg,
.pro-quotation-print svg,
.nav .nav-icon svg,
.notification-bell svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ops-kpi-card small {
  color: #53647a;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-kpi-card strong {
  color: #0f172a;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.ops-kpi-card em {
  color: #475569;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.ops-kpi-chevron {
  color: #94a3b8;
  font-size: 26px;
  font-weight: 400;
  align-self: start;
}

.ops-kpi-card.green,
.ops-action-card.green,
.ops-activity-row.green {
  color: #16a34a;
}

.ops-kpi-card.blue,
.ops-action-card.blue,
.ops-activity-row.blue {
  color: #2563eb;
}

.ops-kpi-card.orange,
.ops-action-card.orange,
.ops-activity-row.orange {
  color: #f97316;
}

.ops-kpi-card.red,
.ops-action-card.red,
.ops-activity-row.red {
  color: #e11d2e;
}

.ops-kpi-card.purple,
.ops-action-card.purple,
.ops-activity-row.purple {
  color: #7c3aed;
}

.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 18px;
}

.ops-panel {
  background: #ffffff;
  border: 1px solid #d9e3ee;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
  padding: 18px;
}

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

.ops-panel-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
}

.ops-panel-head h2 svg {
  width: 20px;
  height: 20px;
  color: #e11d2e;
}

.ops-panel-head button,
.ops-panel-head span,
.ops-wide-button {
  min-height: 34px;
  padding: 0 12px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #d5e0ec;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.ops-list {
  display: grid;
  gap: 10px;
}

.ops-list-row,
.ops-compliance-row,
.ops-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px;
  text-align: left;
  background: #fbfdff;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  cursor: pointer;
}

.ops-list-row span,
.ops-compliance-row div,
.ops-activity-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ops-list-row strong,
.ops-compliance-row strong,
.ops-activity-row strong {
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-list-row small,
.ops-compliance-row small,
.ops-activity-row small {
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-empty-state,
.ops-empty-small {
  display: grid;
  place-items: center;
  min-height: 210px;
  gap: 8px;
  text-align: center;
  color: #475569;
  background:
    radial-gradient(circle at center, rgba(226, 232, 240, 0.75), transparent 34%),
    #fbfdff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.ops-empty-state span {
  display: inline-flex;
  width: 70px;
  height: 70px;
  align-items: center;
  justify-content: center;
  color: #e11d2e;
  background: #fff1f2;
  border-radius: 50%;
}

.ops-empty-state strong {
  color: #0f172a;
}

.ops-attendance-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ops-attendance-stats button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 4px;
  padding: 12px;
  text-align: left;
  background: #fbfdff;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  cursor: pointer;
}

.ops-attendance-stats strong {
  color: #0f172a;
  font-size: 23px;
}

.ops-attendance-stats small {
  color: #64748b;
  text-transform: uppercase;
  font-weight: 900;
}

.ops-attendance-stats svg {
  align-self: center;
  width: 32px;
  height: 32px;
  color: #16a34a;
}

.ops-attendance-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.ops-donut {
  display: grid;
  place-items: center;
  align-content: center;
  width: 160px;
  height: 160px;
  margin: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 47%, transparent 48%),
    conic-gradient(#16a34a calc(var(--progress) * 1%), #64748b 0);
}

.ops-donut strong {
  color: #0f172a;
  font-size: 34px;
}

.ops-donut small {
  color: #64748b;
  font-weight: 900;
}

.ops-staff-preview {
  display: grid;
  align-content: center;
  gap: 8px;
}

.ops-staff-preview button {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: #fbfdff;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.ops-compliance-list {
  display: grid;
  gap: 10px;
}

.ops-compliance-row {
  border-left: 4px solid #f97316;
}

.ops-compliance-row.expired {
  border-left-color: #e11d2e;
  background: #fff7f7;
}

.ops-compliance-row > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #e11d2e;
  background: #fff1f2;
  border-radius: 10px;
}

.ops-compliance-row em {
  padding: 7px 12px;
  color: #e11d2e;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.ops-wide-button {
  width: 100%;
  margin-top: 14px;
}

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

.ops-action-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px;
  text-align: left;
  background: #fbfdff;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  cursor: pointer;
}

.ops-action-card > span {
  width: 42px;
  height: 42px;
  color: currentColor;
  background: color-mix(in srgb, currentColor 12%, #ffffff);
  border-radius: 10px;
}

.ops-action-card strong {
  color: #0f172a;
  font-size: 13px;
}

.ops-action-card small {
  grid-column: 2;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.ops-activity-panel,
.ops-reminders-panel,
.ops-help-panel {
  min-height: 142px;
}

.ops-activity-row {
  margin-top: 10px;
  justify-content: flex-start;
}

.ops-activity-row > span {
  width: 46px;
  height: 46px;
  color: currentColor;
  background: color-mix(in srgb, currentColor 13%, #ffffff);
  border-radius: 10px;
}

.ops-reminders {
  display: grid;
  gap: 12px;
}

.ops-reminders span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  font-weight: 800;
}

.ops-reminders b {
  width: 9px;
  height: 9px;
  background: #e11d2e;
  border-radius: 50%;
}

.ops-reminders span:nth-child(2) b {
  background: #f97316;
}

.ops-help-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.ops-help-panel h2 {
  margin: 0 0 8px;
}

.ops-help-panel p {
  color: #64748b;
}

.ops-help-panel > span {
  display: inline-flex;
  width: 90px;
  height: 90px;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  background: #eef2ff;
  border-radius: 50%;
}

.ops-help-panel svg {
  width: 42px;
  height: 42px;
}

.pro-dashboard {
  display: grid;
  gap: 20px;
}

.pro-market-bar {
  display: grid;
  grid-template-columns: 170px minmax(220px, 1fr) minmax(200px, 0.8fr) minmax(200px, 0.8fr) minmax(190px, 0.7fr);
  align-items: stretch;
  gap: 0;
  min-height: 84px;
  margin: 0 -26px;
  padding: 8px 26px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 40%, rgba(43, 78, 130, 0.46), transparent 32%),
    linear-gradient(90deg, #081326, #0d1d36 58%, #071225);
  box-shadow: 0 16px 28px rgba(9, 18, 35, 0.2);
}

.market-price-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #ef2331, #a90f1b);
  color: #ffffff;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(239, 35, 49, 0.28);
}

.market-price-card span {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.market-price-card b,
.market-price-card svg {
  width: 38px;
  height: 38px;
}

.market-price-card svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
}

.market-title,
.market-quote,
.market-weather {
  display: grid;
  align-content: center;
  padding: 0 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.market-title strong {
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-title small,
.market-quote span,
.market-weather small {
  color: #c8d4e7;
  font-weight: 800;
}

.market-quote span {
  color: #ff5361;
  font-size: 13px;
  text-transform: uppercase;
}

.market-quote strong {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}

.market-quote strong small {
  font-size: 11px;
  color: #c8d4e7;
}

.market-quote em {
  margin-top: 5px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.market-quote.up em {
  color: #22c55e;
}

.market-quote.down em {
  color: #ef4444;
}

.market-weather {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  border-right: 0;
}

.market-weather > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fbbf24;
  font-size: 22px;
}

.market-weather strong {
  font-size: 13px;
}

.market-weather b {
  font-size: 18px;
}

.pro-company-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 18px 4px;
}

.pro-company-brand .greenland-logo-mark {
  grid-template-columns: 58px auto auto;
}

.pro-company-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dark-action,
.date-chip {
  border: 1px solid #d8e1ed;
  border-radius: 8px;
  background: #101c31;
  color: #ffffff;
  font-weight: 900;
  padding: 11px 16px;
}

.dark-action {
  cursor: pointer;
}

.date-chip {
  background: #ffffff;
  color: #334155;
  box-shadow: var(--shadow-soft);
}

.pro-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
}

.pro-kpi-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid #d9e2ee;
  border-radius: 10px;
  background: #ffffff;
  padding: 18px;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.pro-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--card-tone, #2563eb);
}

.pro-kpi-card.blue { --card-tone: #2563eb; }
.pro-kpi-card.purple { --card-tone: #7c3aed; }
.pro-kpi-card.green { --card-tone: #16a34a; }
.pro-kpi-card.orange { --card-tone: #f97316; }
.pro-kpi-card.red { --card-tone: #dc2626; }

.pro-kpi-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-tone) 12%, #ffffff);
  color: var(--card-tone);
}

.pro-kpi-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.pro-kpi-card small,
.pro-kpi-card em {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.pro-kpi-card strong {
  display: block;
  margin: 6px 0 7px;
  font-size: 24px;
  line-height: 1.05;
}

.pro-kpi-card > b {
  position: absolute;
  right: 18px;
  bottom: 15px;
  width: 76px;
  height: 24px;
}

.pro-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.95fr) minmax(330px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.pro-panel {
  min-width: 0;
  border: 1px solid #d9e2ee;
  border-radius: 10px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.pro-pipeline-panel {
  grid-column: span 1;
}

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

.pro-panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.pro-panel-head button,
.pro-panel-head span {
  border: 1px solid #d8e1ed;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.pro-stage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.pro-stage-tile {
  --stage: #64748b;
  --stage-soft: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 72px;
  border: 1px solid #d9e2ee;
  border-left: 4px solid var(--stage);
  border-radius: 9px;
  background: var(--stage-soft);
  color: #0f172a;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
}

.pro-stage-tile.stage-sent { --stage: #2563eb; --stage-soft: #eff6ff; }
.pro-stage-tile.stage-follow { --stage: #f97316; --stage-soft: #fff7ed; }
.pro-stage-tile.stage-won { --stage: #16a34a; --stage-soft: #ecfdf5; }
.pro-stage-tile.stage-lost,
.pro-stage-tile.stage-cancelled { --stage: #dc2626; --stage-soft: #fff1f2; }

.pro-stage-tile strong,
.pro-stage-tile small {
  display: block;
}

.pro-stage-tile small {
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.pro-stage-tile b {
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--stage);
  font-size: 16px;
}

.pro-dashboard .pipeline-stage-details {
  margin-top: 12px;
  padding: 12px;
}

.pro-dashboard .crm-stage-table th,
.pro-dashboard .crm-stage-table td {
  white-space: nowrap;
}

.sales-overview-body {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.8fr);
  align-items: center;
  gap: 18px;
}

.sales-donut {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#16a34a calc(var(--won) * 1%), #e5e7eb 0);
  margin: 8px auto;
}

.sales-donut > div {
  width: 68%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  background: #ffffff;
}

.sales-donut strong {
  display: block;
  font-size: 20px;
}

.sales-donut small {
  color: #64748b;
  font-weight: 800;
}

.sales-legend {
  display: grid;
  gap: 12px;
}

.sales-legend span {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  color: #475569;
  font-weight: 800;
}

.sales-legend b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 5px;
}

.sales-legend .green b { background: #16a34a; }
.sales-legend .orange b { background: #f97316; }
.sales-legend .red b { background: #dc2626; }
.sales-legend strong {
  grid-column: 2;
  color: #64748b;
  font-size: 12px;
}

.pro-activity-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 8px;
}

.pro-activity-row + .pro-activity-row {
  border-top: 1px solid #eef2f7;
}

.pro-activity-row > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: var(--activity-soft, #eff6ff);
  color: var(--activity, #2563eb);
}

.pro-activity-row.blue { --activity: #2563eb; --activity-soft: #eff6ff; }
.pro-activity-row.orange { --activity: #f97316; --activity-soft: #fff7ed; }
.pro-activity-row.green { --activity: #16a34a; --activity-soft: #ecfdf5; }
.pro-activity-row.purple { --activity: #7c3aed; --activity-soft: #f5f3ff; }
.pro-activity-row.red { --activity: #dc2626; --activity-soft: #fff1f2; }

.pro-activity-row svg,
.pro-shortcut svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.pro-activity-row strong,
.pro-activity-row small {
  display: block;
}

.pro-activity-row small {
  color: #64748b;
  font-weight: 700;
  margin-top: 3px;
}

.delivery-status-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.delivery-status-strip span {
  display: grid;
  gap: 4px;
  border: 1px solid #d9e2ee;
  border-radius: 9px;
  background: var(--soft, #f8fafc);
  padding: 10px 12px;
}

.delivery-status-strip .orange { --soft: #fff7ed; color: #c2410c; }
.delivery-status-strip .blue { --soft: #eff6ff; color: #2563eb; }
.delivery-status-strip .green { --soft: #ecfdf5; color: #047857; }
.delivery-status-strip .cyan { --soft: #ecfeff; color: #0891b2; }

.delivery-status-strip b {
  font-size: 12px;
}

.delivery-status-strip strong {
  color: #0f172a;
  font-size: 18px;
}

.pro-empty-visual {
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  color: #64748b;
  text-align: center;
}

.pro-empty-visual > span {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #eef2f7;
  color: #94a3b8;
}

.pro-empty-visual svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.top-items-list {
  display: grid;
  gap: 8px;
}

.top-item-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
  color: #0f172a;
  text-align: left;
}

.pro-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pro-shortcut {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  min-height: 108px;
  border: 1px solid #d9e2ee;
  border-radius: 10px;
  background: var(--shortcut-soft, #f8fafc);
  color: #0f172a;
  cursor: pointer;
  text-align: center;
  padding: 12px 8px;
}

.pro-shortcut span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #ffffff;
  color: var(--shortcut, #2563eb);
  box-shadow: var(--shadow-soft);
}

.pro-shortcut small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.pro-shortcut.blue { --shortcut: #2563eb; --shortcut-soft: #eff6ff; }
.pro-shortcut.purple { --shortcut: #7c3aed; --shortcut-soft: #f5f3ff; }
.pro-shortcut.green { --shortcut: #16a34a; --shortcut-soft: #ecfdf5; }
.pro-shortcut.orange { --shortcut: #f97316; --shortcut-soft: #fff7ed; }
.pro-shortcut.red { --shortcut: #dc2626; --shortcut-soft: #fff1f2; }
.pro-shortcut.cyan { --shortcut: #0891b2; --shortcut-soft: #ecfeff; }

.two-col {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card-body {
  padding: 18px;
}

.stat {
  min-height: 116px;
}

.stat strong {
  display: block;
  font-size: 25px;
  margin-top: 10px;
}

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

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

.toolbar h2,
.card h2,
.card h3 {
  margin: 0;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

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

.button:hover {
  background: var(--accent-dark);
}

.ghost-button,
.icon-button {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

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

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

.danger-button:hover,
.ghost-button.danger-button:hover {
  color: #ffffff;
  background: #8f1d16;
  border-color: #8f1d16;
}

button:disabled,
.button:disabled,
.ghost-button:disabled,
.danger-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  color: #64748b;
  background: #eef1f5;
  border-color: #cfd6df;
  opacity: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cloud-status.saved {
  border-color: #b7e4c7;
  background: #ecfdf3;
  color: #067647;
}

.cloud-status.syncing {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.cloud-status.offline {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.status {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  background: #eef4ff;
  color: #175cd3;
}

.status.ok {
  background: #ecfdf3;
  color: var(--ok);
}

.status.warn {
  background: #fffaeb;
  color: var(--accent-2);
}

.status.danger {
  background: #fef3f2;
  color: var(--danger);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap table {
  table-layout: fixed;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.28;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #fbfcfe;
}

tbody tr:hover {
  background: #f8fafc;
}

.table-wrap tbody tr:nth-child(even) {
  background: #fbfcfe;
}

.table-wrap tbody tr:hover {
  background: #fff7f7;
}

.table-wrap tbody td {
  min-height: 52px;
}

.table-wrap td:first-child,
.table-wrap th:first-child {
  overflow-wrap: normal;
  white-space: nowrap;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  overflow: visible;
  background: #ffffff;
  box-shadow: -1px 0 0 var(--line);
  white-space: nowrap;
}

.table-wrap th:last-child {
  z-index: 3;
  background: #fbfcfe;
}

.table-wrap tbody tr:nth-child(even) td:last-child {
  background: #fbfcfe;
}

.table-wrap tbody tr:hover td:last-child {
  background: #fff7f7;
}

.table-wrap td:last-child .split-actions {
  flex-wrap: nowrap;
}

.compact-register table {
  min-width: 1040px;
  table-layout: fixed;
}

.compact-register th,
.compact-register td {
  padding: 9px 10px;
  white-space: nowrap;
}

.compact-register td {
  font-size: 13px;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-register .status {
  white-space: nowrap;
}

.compact-register .split-actions {
  gap: 5px;
}

.compact-register th:last-child,
.compact-register td:last-child {
  width: 300px;
  min-width: 300px;
  overflow-wrap: normal;
}

.compact-register td:last-child .split-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  width: max-content;
}

.table-action-button {
  min-height: 31px;
  padding: 6px 9px;
  font-size: 13px;
  white-space: nowrap;
}

.locked-display-field {
  pointer-events: none;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
  user-select: none;
}

.fit-register table {
  min-width: 1060px;
  table-layout: fixed;
}

.fit-register th,
.fit-register td {
  padding: 9px 10px;
  line-height: 1.22;
}

.fit-register td:first-child,
.fit-register th:first-child {
  white-space: nowrap;
  overflow-wrap: normal;
}

.fit-register td:last-child,
.fit-register th:last-child {
  white-space: nowrap;
  overflow-wrap: normal;
}

.fit-register .split-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.crm-customer-table table {
  min-width: 1120px;
}

.crm-customer-table th:nth-child(1),
.crm-customer-table td:nth-child(1) {
  width: 78px;
  white-space: nowrap;
}

.crm-customer-table th:nth-child(2),
.crm-customer-table td:nth-child(2) {
  width: 220px;
}

.crm-customer-table th:nth-child(3),
.crm-customer-table td:nth-child(3) {
  width: 76px;
  white-space: nowrap;
}

.crm-customer-table th:nth-child(4),
.crm-customer-table td:nth-child(4) {
  width: 128px;
}

.crm-customer-table th:nth-child(5),
.crm-customer-table td:nth-child(5) {
  width: 120px;
}

.crm-customer-table th:nth-child(6),
.crm-customer-table td:nth-child(6) {
  width: 132px;
}

.crm-customer-table th:nth-child(7),
.crm-customer-table td:nth-child(7) {
  width: 126px;
}

.crm-customer-table th:nth-child(8),
.crm-customer-table td:nth-child(8) {
  width: 140px;
}

.crm-customer-table th:nth-child(9),
.crm-customer-table td:nth-child(9) {
  width: 154px;
}

.crm-customer-table .split-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(56px, 1fr));
  gap: 6px;
}

.crm-quotation-table table {
  min-width: 1380px;
}

.crm-quotation-table th:nth-child(1),
.crm-quotation-table td:nth-child(1) {
  width: 84px;
}

.crm-quotation-table th:nth-child(2),
.crm-quotation-table td:nth-child(2),
.crm-quotation-table th:nth-child(6),
.crm-quotation-table td:nth-child(6),
.crm-quotation-table th:nth-child(7),
.crm-quotation-table td:nth-child(7) {
  width: 108px;
}

.crm-quotation-table th:nth-child(3),
.crm-quotation-table td:nth-child(3) {
  width: 190px;
}

.crm-quotation-table th:nth-child(4),
.crm-quotation-table td:nth-child(4) {
  width: 126px;
}

.crm-quotation-table th:nth-child(5),
.crm-quotation-table td:nth-child(5) {
  width: 118px;
  white-space: nowrap;
}

.crm-quotation-table th:nth-child(8),
.crm-quotation-table td:nth-child(8) {
  width: 94px;
  white-space: nowrap;
}

.crm-quotation-table th:nth-child(9),
.crm-quotation-table td:nth-child(9) {
  width: 100px;
}

.crm-quotation-table th:nth-child(10),
.crm-quotation-table td:nth-child(10) {
  width: 316px;
  min-width: 316px;
}

.compact-register .table-action-button {
  min-width: 54px;
  padding: 7px 9px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  color: var(--accent);
}

.clickable-card,
.clickable-list-item {
  cursor: pointer;
}

.clickable-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.clickable-list-item:hover {
  color: var(--accent);
}

tbody tr.row-warning,
tbody tr.row-warning:hover {
  background: #fffbeb;
}

tbody tr.row-expired,
tbody tr.row-expired:hover {
  background: #fef3f2;
}

tbody tr.row-warning td:first-child {
  border-left: 4px solid var(--accent-2);
}

tbody tr.row-expired td:first-child {
  border-left: 4px solid var(--danger);
}

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

.form-grid.full {
  grid-template-columns: 1fr;
}

.quotation-entry-form {
  gap: 14px 12px;
}

.quotation-entry-form > label {
  padding: 10px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #fbfdff;
}

.quotation-entry-form > label.span-2 {
  padding: 10px;
}

.quotation-entry-form input,
.quotation-entry-form select,
.quotation-entry-form textarea {
  border-radius: 6px;
  background: #ffffff;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.form-section {
  margin: 22px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.form-section:first-of-type {
  margin-top: 4px;
  padding-top: 0;
  border-top: 0;
}

.required-star {
  color: var(--accent);
  font-weight: 800;
}

.document-line-grid {
  display: grid;
  gap: 10px;
}

.document-line {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(160px, 0.75fr) minmax(210px, 1fr);
  gap: 10px;
  align-items: end;
}

.document-line-two {
  grid-template-columns: minmax(190px, 1fr) minmax(210px, 1fr);
}

.document-line label {
  min-width: 0;
}

.document-line input[type="file"] {
  padding: 8px;
}

.span-2 {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.whatsapp-send-note {
  border: 1px solid #f7c56b;
  border-left: 4px solid var(--accent-2);
  border-radius: 6px;
  background: #fffaf0;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  padding: 10px 12px;
}

.compact-field {
  max-width: 180px;
}

.compact-field input {
  text-align: center;
  font-weight: 800;
}

.ot-input {
  max-width: 84px;
}

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

.detail-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
  min-height: 72px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-item strong {
  display: block;
  overflow-wrap: anywhere;
}

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

.employee-popup-title h3 {
  margin: 0;
  font-size: 24px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
}

.modal-panel {
  position: absolute;
  inset: 28px;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal[data-mode="whatsapp-form"] .modal-panel {
  inset: 50% auto auto 50%;
  width: min(440px, calc(100vw - 32px));
  max-width: 440px;
  min-height: 0;
  transform: translate(-50%, -50%);
}

.modal[data-mode="whatsapp-form"] .modal-body {
  padding: 16px 18px 18px;
}

.modal[data-mode="whatsapp-form"] .modal-header {
  padding: 14px 18px;
}

.compact-whatsapp-form {
  grid-template-columns: 1fr;
  gap: 10px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 2px 0 0;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.section-title {
  margin: 26px 0 12px;
  font-size: 18px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #17252b;
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 340px;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.notification-center {
  position: relative;
  z-index: 60;
}

.notification-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  cursor: pointer;
  font-weight: 800;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.notification-toggle:hover,
.notification-center.open .notification-toggle {
  background: #fff5f5;
  border-color: rgba(220, 38, 38, 0.28);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.notification-bell {
  display: grid;
  place-items: center;
  color: var(--danger);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-toggle strong {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--muted);
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 11px;
  line-height: 1;
}

.notification-center.has-alerts .notification-toggle {
  border-color: rgba(220, 38, 38, 0.32);
}

.notification-center.has-alerts .notification-toggle strong {
  background: var(--danger);
}

.notification-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(390px, calc(100vw - 32px));
  max-height: 420px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.24);
}

.notification-center.open .notification-panel {
  display: block;
}

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

.notification-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.notification-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notification-close {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.notification-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.notification-item:hover {
  background: #f8fafc;
}

.notification-item.warning {
  border-left: 4px solid var(--accent-2);
}

.notification-item.expired {
  border-left: 4px solid var(--danger);
}

.notification-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.notification-item strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.urgent-warning-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 6px;
  background: #fff5f5;
}

.urgent-warning-summary strong {
  color: var(--danger);
  font-size: 18px;
}

.urgent-warning-summary span {
  color: var(--muted);
}

.urgent-warning-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.urgent-warning-item {
  display: grid;
  gap: 5px;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
}

.urgent-warning-item:hover {
  background: #f8fafc;
}

.urgent-warning-item.expired {
  border-left-color: var(--danger);
  background: #fff7f7;
}

.urgent-warning-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.urgent-warning-item strong {
  color: var(--ink);
  font-size: 16px;
}

.urgent-warning-item em {
  color: var(--danger);
  font-style: normal;
  font-weight: 700;
}

.notification-empty {
  padding: 18px 14px;
  color: var(--muted);
}

.approval-flow {
  --approval-steps: 3;
  display: grid;
  grid-template-columns: repeat(var(--approval-steps), minmax(150px, 1fr));
  gap: 12px;
  position: relative;
  margin: 14px 0 16px;
}

.approval-flow::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 21px;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.approval-flow-step {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.approval-flow-marker {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 0 0 6px #f8fafc;
}

.approval-flow-card {
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.approval-flow-card span,
.approval-flow-card strong,
.approval-flow-card small {
  display: block;
}

.approval-flow-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.approval-flow-card strong {
  margin-top: 6px;
  color: var(--ink);
  font-size: 15px;
}

.approval-flow-card small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.approval-flow-step.complete .approval-flow-marker {
  border-color: #22c55e;
  background: #dcfce7;
  color: #047857;
}

.approval-flow-step.current .approval-flow-marker {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.approval-flow-step.current .approval-flow-card {
  border-color: rgba(220, 38, 38, 0.32);
  background: #fff7f7;
}

.approval-flow-step.rejected .approval-flow-marker,
.approval-flow-step.returned .approval-flow-marker {
  border-color: var(--danger);
  background: #fee2e2;
  color: var(--danger);
}

.approval-flow-step.rejected .approval-flow-card,
.approval-flow-step.returned .approval-flow-card {
  border-color: #fecaca;
  background: #fff7f7;
}

.approval-flow-step.pending .approval-flow-marker {
  background: #f8fafc;
}

.note-box {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  padding: 12px;
  margin-bottom: 12px;
}

.note-box p {
  margin: 6px 0 0;
}

.vacation-request-form {
  display: grid;
  gap: 16px;
}

.vacation-form-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--danger);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.vacation-form-note strong {
  color: var(--ink);
  font-size: 18px;
}

.vacation-form-note span {
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.vacation-form-grid {
  align-items: start;
}

.vacation-form-grid label {
  min-width: 0;
}

.vacation-form-grid textarea {
  min-height: 92px;
}

.vacation-form-actions {
  justify-content: flex-end;
}

.vacation-approval-screen .detail-grid {
  margin-bottom: 16px;
}

.vacation-approval-screen .approval-flow {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.vacation-approval-screen .approval-flow::before {
  display: none;
}

.vacation-approval-screen .approval-flow-step {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
}

.vacation-approval-screen .approval-flow-card {
  min-height: 0;
}

.signature-preview,
.signature-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.signature-preview img,
.signature-card img {
  width: 160px;
  height: 64px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.signature-preview span,
.signature-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

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

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

.approval-signature-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.electronic-approval-seal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 8px;
  background: #f0fdf4;
  padding: 14px;
  margin-bottom: 12px;
}

.electronic-approval-seal span,
.electronic-approval-seal small,
.electronic-approval-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.electronic-approval-seal strong {
  display: block;
  margin: 4px 0;
  color: #047857;
  font-size: 17px;
}

.electronic-stamp {
  flex: 0 0 auto;
  border: 2px solid #16a34a;
  border-radius: 6px;
  color: #047857;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  transform: rotate(-2deg);
}

.electronic-approval-line {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.print-actions {
  justify-content: flex-end;
}

.approval-print-sheet {
  display: none;
}

.quotation-print-sheet {
  display: none;
}

.inline-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.inline-section-head strong,
.quotation-detail-lines h4 {
  color: var(--ink);
  font-size: 15px;
}

.inline-section-head small {
  color: var(--muted);
  font-weight: 700;
}

.quotation-line-editor {
  border: 1px solid #d8e1ec;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.quotation-lines {
  display: grid;
  gap: 7px;
}

.quotation-line-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.6fr) 78px 80px 120px 120px 140px;
  gap: 8px;
  align-items: center;
}

.quotation-line-row:not(.quotation-line-head) {
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.quotation-line-row select,
.quotation-line-row input {
  min-width: 0;
}

.quotation-item-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 6px;
  align-items: center;
}

.stock-picker-button {
  height: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: var(--accent);
}

.stock-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 18, 34, 0.36);
  backdrop-filter: blur(4px);
}

.stock-picker-shell {
  width: min(760px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #d7e2f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.stock-picker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5edf6;
  background: #f8fbff;
}

.stock-picker-title span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-picker-title strong {
  color: var(--ink);
  font-size: 16px;
}

.stock-picker {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.stock-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.stock-picker-search-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-picker-head > span {
  align-self: center;
  color: var(--muted);
  font-weight: 800;
}

.stock-picker-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
  align-items: center;
}

.stock-picker-head .stock-picker-search-row {
  color: inherit;
  font-weight: inherit;
}

.stock-picker-search-button {
  min-height: 44px;
  box-shadow: none;
}

.stock-picker-list {
  display: grid;
  gap: 8px;
}

.stock-picker-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 90px 90px;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid #dce7f3;
  border-radius: 9px;
  background: #ffffff;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.stock-picker-row:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.stock-picker-row:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  border-color: #2563eb;
  background: #f8fbff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.stock-picker-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #eef5ff;
  color: var(--accent);
  font-weight: 900;
}

.stock-picker-row strong,
.stock-picker-row small,
.stock-picker-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-picker-row small {
  color: var(--muted);
  font-weight: 700;
}

.quotation-line-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.quotation-line-total {
  background: #f8fafc;
  font-weight: 800;
}

.quotation-charge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.quotation-charge-grid label {
  padding: 8px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #fbfdff;
}

.quotation-detail-lines {
  margin-top: 14px;
}

.quotation-items-table table {
  min-width: 820px;
  table-layout: fixed;
}

.quotation-items-table th,
.quotation-items-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quotation-items-table th:nth-child(1),
.quotation-items-table td:nth-child(1) {
  width: 260px;
}

.quotation-items-table th:nth-child(2),
.quotation-items-table td:nth-child(2) {
  width: 160px;
}

.quotation-items-table th:nth-child(3),
.quotation-items-table td:nth-child(3),
.quotation-items-table th:nth-child(4),
.quotation-items-table td:nth-child(4),
.quotation-items-table th:nth-child(5),
.quotation-items-table td:nth-child(5) {
  width: 92px;
  text-align: center;
}

.quotation-items-table th:nth-child(6),
.quotation-items-table td:nth-child(6),
.quotation-items-table th:nth-child(7),
.quotation-items-table td:nth-child(7) {
  width: 130px;
  text-align: right;
}

.download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 14px;
  margin-top: 18px;
  background: var(--accent-soft);
}

.doc-thumb,
.inline-file-preview {
  display: inline-grid;
  grid-template-columns: 44px minmax(80px, 1fr);
  align-items: center;
  gap: 8px;
  max-width: 240px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 6px;
  cursor: pointer;
  text-align: left;
}

.inline-file-preview {
  margin-top: 8px;
  width: 100%;
}

.doc-thumb img,
.inline-file-preview img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.doc-thumb span,
.inline-file-preview span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #eef4ff;
  color: #175cd3;
  font-weight: 800;
  font-size: 11px;
}

.doc-thumb small,
.inline-file-preview small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-preview-box {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 18px;
  overflow: hidden;
}

.document-preview-box img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.document-preview-box iframe {
  width: 100%;
  height: 440px;
  border: 0;
}

.document-preview-box span {
  font-size: 32px;
  font-weight: 800;
  color: var(--muted);
}

.mobile-only {
  display: none;
}

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

.amount {
  font-weight: 800;
  white-space: nowrap;
}

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

.document-table th,
.document-table td {
  vertical-align: middle;
}

.document-table td {
  height: 74px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.document-table td:nth-child(1),
.document-table td:nth-child(2),
.document-table td:nth-child(3),
.document-table td:nth-child(5) {
  white-space: nowrap;
}

.document-table td:nth-child(4) {
  width: 280px;
}

.document-table td:nth-child(6) {
  width: 170px;
}

.document-table .doc-thumb {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  width: 100%;
  max-width: 260px;
  min-height: 58px;
}

.document-table .split-actions {
  flex-wrap: nowrap;
  align-items: center;
}

.compact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.compact-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Accounting / operations style */
.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  box-shadow: 1px 0 0 rgba(17, 19, 23, 0.04);
}

.sidebar .brand {
  gap: 8px;
  padding: 6px 6px 14px;
  margin-bottom: 10px;
}

.sidebar .brand-logo {
  width: 198px;
  max-height: 52px;
  border-radius: 6px;
  padding: 7px;
}

.brand strong {
  font-size: 14px;
  line-height: 1.1;
}

.nav {
  gap: 2px;
}

.nav button {
  min-height: 36px;
  border-radius: 4px;
  padding: 7px 9px;
  font-size: 14px;
}

.nav button:hover,
.nav button.active {
  background: #fff5f5;
}

.nav .nav-icon {
  width: 30px;
  height: 30px;
}

.topbar {
  min-height: 72px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.topbar h1 {
  font-size: 22px;
}

.view {
  padding: 18px 20px 32px;
}

.grid {
  gap: 12px;
}

.card {
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
}

.card-body {
  padding: 14px 16px;
}

.stat {
  min-height: 96px;
}

.stat strong {
  font-size: 24px;
  margin-top: 6px;
}

.toolbar {
  min-height: 40px;
  gap: 10px;
  margin: 18px 0 8px;
  padding: 0 2px;
}

.toolbar:first-child {
  margin-top: 0;
}

.toolbar h2,
.card h2 {
  font-size: 20px;
}

.section-title {
  margin: 20px 0 8px;
}

.button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 34px;
  border-radius: 4px;
  padding: 7px 11px;
  font-size: 14px;
}

.ghost-button,
.icon-button {
  background: #f8fafc;
}

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

.ghost-button:hover,
.icon-button:hover {
  background: #eef1f5;
  border-color: var(--line-strong);
}

.ghost-button.danger-button:hover {
  color: #ffffff;
  background: #8f1d16;
  border-color: #8f1d16;
}

.pill {
  min-height: 26px;
  border-radius: 4px;
  background: #f8fafc;
  padding: 4px 8px;
}

.status {
  border-radius: 4px;
  padding: 4px 7px;
}

.table-wrap {
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
}

th,
td {
  padding: 8px 10px;
  font-size: 14px;
  vertical-align: middle;
}

th {
  color: #435064;
  background: #f1f4f8;
  border-bottom: 1px solid var(--line-strong);
}

tbody tr:nth-child(even) {
  background: #fbfcfe;
}

tbody tr:hover {
  background: #fff7f7;
}

input,
select,
textarea {
  min-height: 34px;
  border-radius: 4px;
  padding: 7px 9px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(215, 25, 32, 0.18);
  border-color: var(--accent);
}

.form-grid {
  gap: 10px;
}

.form-section {
  margin: 18px 0 10px;
  padding-top: 12px;
}

.detail-grid {
  gap: 10px;
}

.detail-item {
  border-radius: 4px;
  background: #f8fafc;
  min-height: 64px;
  padding: 10px;
}

.modal-panel {
  border-radius: 4px;
}

.modal-header {
  background: #f8fafc;
  padding: 14px 18px;
}

.modal-body {
  padding: 16px 18px;
}

.notification-panel,
.doc-thumb,
.inline-file-preview,
.document-preview-box,
.toast,
.login-panel,
.brand-logo {
  border-radius: 4px;
}

@media (max-width: 1040px) {
  .ops-command-top,
  .ops-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .pro-market-bar,
  .pro-kpi-grid,
  .pro-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-title,
  .market-quote,
  .market-weather {
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px;
  }

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

  .stats,
  .dashboard-kpi-grid,
  .three-col,
  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .crm-command-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .crm-pipeline-board {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-view="dashboard"] .view {
    padding: 0 14px 20px;
  }

  .ops-command-top {
    margin: 0 -14px;
    padding: 12px 14px;
  }

  .ops-kpi-grid,
  .ops-attendance-stats,
  .ops-actions-grid,
  .ops-market-strip,
  .ops-attendance-body {
    grid-template-columns: 1fr;
  }

  .pro-market-bar,
  .pro-kpi-grid,
  .pro-dashboard-grid,
  .pro-stage-grid,
  .pro-shortcut-grid,
  .delivery-status-strip,
  .sales-overview-body {
    grid-template-columns: 1fr;
  }

  .pro-company-row,
  .pro-company-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pro-company-brand .greenland-logo-mark {
    grid-template-columns: 50px 1fr;
  }

  .pro-company-brand .greenland-logo-right {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #e5e7eb;
    padding: 8px 0 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 30;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-only {
    display: inline-flex;
  }

  .topbar {
    align-items: flex-start;
    padding: 16px;
    flex-wrap: wrap;
  }

  .topbar-actions {
    display: flex;
    width: 100%;
    justify-content: flex-start;
  }

  .view {
    padding: 16px;
  }

  .crm-pipeline-board {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
  }

  .crm-command-grid {
    grid-template-columns: 1fr;
  }

  .greenland-logo-mark {
    grid-template-columns: 46px 1fr;
    gap: 10px;
  }

  .greenland-logo-symbol {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 28px;
  }

  .greenland-logo-left strong {
    font-size: 22px;
  }

  .greenland-logo-left b {
    font-size: 23px;
  }

  .greenland-logo-right {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #e5e7eb;
    padding: 8px 0 0;
  }

  .crm-price-notice,
  .crm-item-row {
    grid-template-columns: 1fr;
  }

  .crm-item-head {
    display: none;
  }

  .crm-followup-notice {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .stats,
  .dashboard-kpi-grid,
  .three-col,
  .two-col,
  .detail-grid,
  .form-grid,
  .document-line,
  .document-line-two,
  .approval-flow,
  .quotation-line-row,
  .quotation-charge-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .module-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .module-hero-actions,
  .dashboard-date {
    text-align: left;
    min-width: 0;
  }

  .quick-action-grid,
  .dashboard-mini-grid {
    grid-template-columns: 1fr;
  }

  .approval-flow::before {
    top: 22px;
    bottom: 22px;
    left: 21px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .approval-flow-step {
    grid-template-columns: 44px 1fr;
    align-items: start;
  }

  .span-2 {
    grid-column: span 1;
  }

  .modal-panel {
    inset: 12px;
  }

  .modal-header,
  .employee-popup-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar-actions,
  .toolbar-actions > * {
    width: 100%;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 6mm;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 10px;
    margin: 0 !important;
    min-height: 0 !important;
  }

  .sidebar,
  .topbar,
  .modal-backdrop,
  .modal-header button,
  .print-actions,
  .toast,
  body.printing-approval #view,
  body.printing-quotation #view {
    display: none !important;
  }

  html,
  body,
  .app-shell {
    display: block;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .main,
  .view {
    padding: 0;
    margin: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .modal {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #ffffff;
  }

  .modal-panel {
    position: static !important;
    inset: auto !important;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none;
    overflow: visible !important;
    border: 0;
    box-shadow: none;
  }

  .modal-header {
    display: block;
    padding: 0 0 6px;
    border-bottom: 1px solid #cbd5e1;
  }

  body.printing-approval .modal-header,
  body.printing-approval .approval-screen-content {
    display: none !important;
  }

  body.printing-approval .approval-print-sheet {
    display: block;
  }

  body.printing-quotation .modal-header,
  body.printing-quotation .approval-screen-content {
    display: none !important;
  }

  body.printing-quotation .quotation-print-sheet {
    display: block;
  }

  body.printing-approval .modal-body,
  body.printing-quotation .modal-body {
    padding: 0;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.printing-approval .modal-body > *:not(.approval-print-sheet) {
    display: none !important;
  }

  body.printing-quotation .modal-body > *:not(.quotation-print-sheet) {
    display: none !important;
  }

  .approval-print-sheet {
    width: 100%;
    height: auto;
    max-height: 268mm;
    overflow: hidden !important;
    font-size: 9px;
    line-height: 1.25;
    page-break-after: avoid;
    break-after: avoid;
  }

  .quotation-print-sheet {
    width: 100%;
    height: auto;
    max-height: 268mm;
    overflow: hidden !important;
    border: 1px solid #111827;
    font-size: 9.2px;
    line-height: 1.2;
    page-break-after: avoid;
    break-after: avoid;
  }

  .quotation-print-header {
    display: grid;
    grid-template-columns: 1fr 150px;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #111827;
    padding: 6px 8px;
    margin-bottom: 0;
  }

  .quotation-print-brand {
    display: grid;
    grid-template-columns: 132px 1fr;
    align-items: center;
    gap: 10px;
  }

  .quotation-print-brand img {
    width: 126px;
    height: auto;
  }

  .quotation-print-brand-gs {
    display: block;
  }

  .quotation-print-brand-gs .greenland-logo-mark {
    display: grid;
    grid-template-columns: 30px 86px 1fr;
    align-items: center;
    gap: 7px;
    width: 100%;
  }

  .quotation-print-brand-gs .greenland-logo-symbol {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    font-size: 20px;
  }

  .quotation-print-brand-gs .greenland-logo-left strong {
    font-size: 13px;
  }

  .quotation-print-brand-gs .greenland-logo-left b {
    font-size: 14px;
  }

  .quotation-print-brand-gs .greenland-logo-right {
    border-left: 1px solid #cbd5e1;
    padding-left: 7px;
    gap: 2px;
  }

  .quotation-print-brand-gs .greenland-logo-right strong {
    font-size: 10px;
  }

  .quotation-print-brand-gs .greenland-logo-right span {
    font-size: 7px;
  }

  .quotation-print-brand h1 {
    margin: 0 0 3px;
    color: #111827;
    font-size: 15px;
    text-transform: uppercase;
  }

  .quotation-print-brand p {
    margin: 1px 0;
    color: #475569;
    font-size: 8px;
    font-weight: 700;
  }

  .quotation-print-voucher {
    border: 1px solid #111827;
    text-align: center;
  }

  .quotation-print-voucher span {
    display: block;
    background: #111827;
    color: #ffffff;
    font-size: 8px;
    font-weight: 900;
    padding: 4px;
    text-transform: uppercase;
  }

  .quotation-print-voucher strong {
    display: block;
    padding: 6px 4px 2px;
    font-size: 16px;
  }

  .quotation-print-voucher small {
    display: block;
    padding: 0 4px 6px;
    color: #dc2626;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .quotation-print-meta small,
  .quotation-print-notes p,
  .quotation-print-footer {
    color: #475569;
    font-size: 8px;
    font-weight: 700;
  }

  .quotation-print-meta {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid #111827;
    margin-bottom: 0;
  }

  .quotation-print-orderbar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-bottom: 1px solid #111827;
  }

  .quotation-print-orderbar div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-right: 1px solid #cbd5e1;
    padding: 5px 7px;
  }

  .quotation-print-orderbar div:last-child {
    border-right: 0;
  }

  .quotation-print-orderbar span {
    color: #475569;
    font-size: 8px;
    font-weight: 900;
  }

  .quotation-print-orderbar strong {
    color: #111827;
    font-size: 8px;
    font-weight: 900;
  }

  .quotation-print-meta div {
    border-right: 1px solid #cbd5e1;
    border-radius: 0;
    padding: 6px;
    min-height: 42px;
  }

  .quotation-print-meta div:last-child {
    border-right: 0;
  }

  .quotation-print-meta span {
    display: block;
    color: #111827;
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .quotation-print-meta strong,
  .quotation-print-meta small {
    display: block;
    margin-top: 2px;
  }

  .quotation-print-rate {
    display: grid;
    grid-template-columns: 120px 130px 1fr;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #111827;
    border-radius: 0;
    padding: 5px 6px;
    margin-bottom: 0;
    background: #f8fafc;
  }

  .quotation-print-rate span {
    color: #475569;
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .quotation-print-rate strong {
    font-size: 10px;
  }

  .quotation-print-rate small {
    color: #475569;
    font-size: 8px;
    font-weight: 700;
  }

  .quotation-print-lines {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 0;
  }

  .quotation-print-lines th,
  .quotation-print-lines td {
    border: 1px solid #cbd5e1;
    padding: 4px 5px;
    text-align: left;
  }

  .quotation-print-lines th {
    background: #e5e7eb;
    color: #111827;
    font-size: 8px;
    text-transform: uppercase;
  }

  .quotation-print-lines td:nth-child(1),
  .quotation-print-lines td:nth-child(3),
  .quotation-print-lines td:nth-child(4),
  .quotation-print-lines td:nth-child(6),
  .quotation-print-lines th:nth-child(1),
  .quotation-print-lines th:nth-child(3),
  .quotation-print-lines th:nth-child(4),
  .quotation-print-lines th:nth-child(6) {
    text-align: right;
    white-space: nowrap;
  }

  .quotation-print-lines td:nth-child(2) strong,
  .quotation-print-lines td:nth-child(2) small {
    display: block;
  }

  .quotation-print-lines td:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
  }

  .quotation-print-lines td:nth-child(2) strong {
    white-space: nowrap;
    font-size: 10.5px;
    line-height: 1.1;
  }

  .quotation-print-lines td:nth-child(2) small {
    margin-top: 2px;
    color: #475569;
    font-size: 7px;
    font-weight: 700;
    white-space: nowrap;
  }

  .quotation-print-lines th:nth-child(1),
  .quotation-print-lines td:nth-child(1) {
    width: 25px;
  }

  .quotation-print-lines th:nth-child(3),
  .quotation-print-lines td:nth-child(3) {
    width: 72px;
  }

  .quotation-print-lines th:nth-child(4),
  .quotation-print-lines td:nth-child(4) {
    width: 48px;
  }

  .quotation-print-lines th:nth-child(5),
  .quotation-print-lines td:nth-child(5) {
    width: 44px;
    overflow: visible;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
  }

  .quotation-print-lines th:nth-child(6),
  .quotation-print-lines td:nth-child(6) {
    width: 68px;
  }

  .quotation-print-lines tfoot td {
    background: #f8fafc;
    font-size: 10px;
    font-weight: 900;
  }

  .quotation-print-lines tfoot tr:last-child td {
    background: #111827;
    color: #ffffff;
    font-size: 12px;
  }

  .quotation-print-amount-words {
    display: grid;
    gap: 2px;
    border-top: 1px solid #111827;
    padding: 6px 7px;
  }

  .quotation-print-amount-words span {
    color: #475569;
    font-size: 7px;
    font-weight: 900;
  }

  .quotation-print-amount-words strong {
    color: #111827;
    font-size: 9px;
  }

  .quotation-print-notes {
    display: grid;
    gap: 3px;
    border: 0;
    border-top: 1px solid #111827;
    border-radius: 0;
    padding: 7px;
    margin-bottom: 0;
    break-inside: avoid;
  }

  .quotation-print-notes strong {
    font-size: 9px;
    text-transform: uppercase;
  }

  .quotation-print-notes p {
    margin: 0;
  }

  .quotation-print-signoff {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid #111827;
  }

  .quotation-print-signoff div {
    min-height: 46px;
    padding: 7px;
    border-right: 1px solid #cbd5e1;
  }

  .quotation-print-signoff div:last-child {
    border-right: 0;
  }

  .quotation-print-signoff span {
    display: block;
    color: #475569;
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .quotation-print-signoff strong {
    display: block;
    margin-top: 14px;
    font-size: 9px;
  }

  .quotation-print-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #111827;
    padding: 6px 8px;
  }

  .quotation-print-footer strong {
    color: #111827;
    font-size: 14px;
  }

  .approval-print-header {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #dc2626;
    padding-bottom: 7px;
    margin-bottom: 7px;
  }

  .approval-print-header img {
    width: 126px;
    height: auto;
  }

  .approval-print-header span {
    color: #dc2626;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .approval-print-header h1 {
    margin: 1px 0;
    color: #111827;
    font-size: 18px;
  }

  .approval-print-header p {
    margin: 0;
    color: #475569;
    font-size: 8px;
    font-weight: 700;
  }

  .approval-print-header > strong {
    border: 1px solid #16a34a;
    color: #047857;
    padding: 5px 9px;
    border-radius: 4px;
    font-size: 10px;
  }

  .approval-print-summary {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 7px;
  }

  .approval-print-summary th {
    width: 18%;
    background: #f8fafc;
    color: #334155;
    font-size: 8px;
    text-align: left;
    text-transform: uppercase;
  }

  .approval-print-summary td {
    width: 32%;
    font-size: 9px;
    font-weight: 800;
  }

  .approval-print-block {
    margin-top: 7px;
    break-inside: avoid;
  }

  .approval-print-block h2 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 11px;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 3px;
  }

  .approval-print-route,
  .approval-print-signatures {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .approval-print-route div,
  .approval-print-signatures div {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 5px;
    min-height: 46px;
  }

  .approval-print-route span {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #dcfce7;
    color: #047857;
    font-size: 8px;
    font-weight: 900;
  }

  .approval-print-route strong,
  .approval-print-signatures strong {
    display: block;
    margin-top: 3px;
    font-size: 9px;
  }

  .approval-print-route small,
  .approval-print-signatures small,
  .approval-print-signatures span {
    display: block;
    margin-top: 2px;
    color: #475569;
    font-size: 7px;
    font-weight: 700;
  }

  .approval-print-signatures img {
    width: 86px;
    height: 28px;
    object-fit: contain;
    display: block;
    margin: 3px 0;
  }

  .approval-print-signatures em,
  .approval-print-documents p {
    color: #475569;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
  }

  .approval-print-documents table {
    width: 100%;
    border-collapse: collapse;
  }

  .approval-print-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    border-top: 1px solid #cbd5e1;
    padding-top: 5px;
    color: #475569;
    font-size: 8px;
    font-weight: 700;
  }

  .approval-print-footer strong {
    border: 2px solid #16a34a;
    color: #047857;
    border-radius: 4px;
    padding: 5px 8px;
    transform: rotate(-2deg);
  }

  .modal-header small {
    font-size: 9px;
  }

  .modal-header h2 {
    margin-top: 1px;
    font-size: 16px;
  }

  .modal-body {
    padding: 6px 0 0;
  }

  .employee-popup-title {
    margin-bottom: 6px;
  }

  .employee-popup-title h3 {
    font-size: 16px;
  }

  .detail-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .detail-item {
    min-height: 38px;
    padding: 5px 7px;
    border-radius: 3px;
  }

  .detail-item span {
    font-size: 8px;
  }

  .detail-item strong {
    margin-top: 2px;
    font-size: 10px;
  }

  .form-section {
    margin: 8px 0 5px;
    padding-top: 6px;
    font-size: 11px;
  }

  .approval-flow {
    gap: 5px;
    margin: 6px 0 8px;
  }

  .approval-flow::before {
    left: 13px;
    right: 13px;
    top: 12px;
  }

  .approval-flow-step {
    gap: 4px;
  }

  .approval-flow-marker {
    width: 26px;
    height: 26px;
    font-size: 10px;
    box-shadow: 0 0 0 3px #ffffff;
  }

  .approval-flow-card {
    min-height: 52px;
    padding: 5px;
    border-radius: 4px;
  }

  .approval-flow-card span {
    font-size: 7px;
  }

  .approval-flow-card strong {
    margin-top: 2px;
    font-size: 9px;
  }

  .approval-flow-card small {
    margin-top: 2px;
    font-size: 8px;
  }

  .note-box {
    margin-bottom: 6px;
    padding: 6px;
    border-radius: 4px;
  }

  .approval-signature-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .approval-signature-card,
  .signature-card,
  .electronic-approval-seal {
    padding: 6px;
    border-radius: 4px;
  }

  .approval-signature-header {
    margin-bottom: 4px;
  }

  .signature-card {
    gap: 6px;
  }

  .signature-card img {
    width: 96px;
    height: 36px;
  }

  .electronic-approval-seal {
    margin-bottom: 6px;
  }

  .electronic-approval-seal strong {
    font-size: 11px;
  }

  .electronic-stamp {
    padding: 5px 7px;
    font-size: 9px;
  }

  .electronic-approval-line {
    margin-top: 4px;
    padding-top: 4px;
    font-size: 8px;
  }

  table {
    font-size: 8px;
  }

  th,
  td {
    padding: 4px 5px;
  }

  .doc-thumb {
    grid-template-columns: 28px minmax(60px, 1fr);
    min-height: 34px;
    max-width: 170px;
    padding: 3px;
    gap: 4px;
  }

  .doc-thumb span {
    min-height: 26px;
    font-size: 8px;
  }

  .doc-thumb small {
    font-size: 8px;
  }

  .status {
    padding: 2px 5px;
    font-size: 8px;
  }

  * {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/* 2026-06-05: Dense CRM follow-up register, v45. */
html body .modal[data-mode="crm-followups"] .modal-header {
  padding: 12px 18px !important;
  min-height: 76px !important;
}

html body .modal[data-mode="crm-followups"] .modal-header h2 {
  font-size: 26px !important;
  line-height: 1.1 !important;
  margin: 0 !important;
}

html body .modal[data-mode="crm-followups"] .modal-body {
  padding: 14px 18px 18px !important;
}

html body .modal[data-mode="crm-followups"] .crm-followup-register {
  gap: 7px !important;
  padding: 0 !important;
}

html body .modal[data-mode="crm-followups"] .crm-followup-register-head,
html body .modal[data-mode="crm-followups"] .crm-followup-register-row {
  grid-template-columns: minmax(180px, 1.45fr) 120px 120px 105px minmax(130px, .75fr) !important;
  gap: 10px !important;
}

html body .modal[data-mode="crm-followups"] .crm-followup-register-head {
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  letter-spacing: .035em !important;
}

html body .modal[data-mode="crm-followups"] .crm-followup-register-row {
  min-height: 44px !important;
  padding: 7px 13px !important;
  border-radius: 10px !important;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .035) !important;
}

html body .modal[data-mode="crm-followups"] .crm-followup-register-row span {
  font-size: 13px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
}

html body .modal[data-mode="crm-followups"] .crm-followup-register-row .crm-followup-customer,
html body .modal[data-mode="crm-followups"] .crm-followup-register-row .crm-followup-amount {
  font-size: 14px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
}

html body .modal[data-mode="crm-followups"] .crm-followup-register-row .badge {
  min-height: 24px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

@media (max-width: 900px) {
  html body .modal[data-mode="crm-followups"] .modal-header {
    min-height: 68px !important;
  }

  html body .modal[data-mode="crm-followups"] .modal-header h2 {
    font-size: 22px !important;
  }

  html body .modal[data-mode="crm-followups"] .crm-followup-register-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    min-height: 58px !important;
    padding: 10px 12px !important;
  }
}

@media print {
  body.printing-quotation .pro-quotation-print {
    width: 100% !important;
    max-height: 284mm !important;
    border: 1px solid #d8e1ec !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    color: #0b172d !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    overflow: hidden !important;
  }

  body.printing-quotation .pro-quote-header {
    display: grid !important;
    grid-template-columns: 1fr 285px !important;
    min-height: 38mm !important;
    border-bottom: 1px solid #e5e7eb !important;
    overflow: hidden !important;
  }

  body.printing-quotation .pro-quote-brand {
    display: grid !important;
    grid-template-columns: 225px 1fr !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 12px 16px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-mark {
    display: grid !important;
    grid-template-columns: 52px 150px !important;
    grid-template-areas:
      "symbol left"
      "tag tag" !important;
    align-items: center !important;
    gap: 6px 10px !important;
    width: 220px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-symbol {
    grid-area: symbol !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 9px !important;
    background: #e50914 !important;
    color: #ffffff !important;
    font-size: 34px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-left {
    grid-area: left !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-left strong {
    color: #111827 !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-left b {
    color: #dc111b !important;
    font-size: 26px !important;
    line-height: 1 !important;
    letter-spacing: 1px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-right {
    grid-area: tag !important;
    border: 0 !important;
    padding: 5px 0 0 2px !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-right strong {
    display: none !important;
  }

  body.printing-quotation .pro-quote-brand .greenland-logo-right span {
    color: #94a3b8 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 4px !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-company {
    display: grid !important;
    gap: 4px !important;
    border-left: 1px solid #e5e7eb !important;
    padding-left: 18px !important;
  }

  body.printing-quotation .pro-quote-company h1 {
    margin: 0 0 2px !important;
    color: #0b172d !important;
    font-size: 18px !important;
    line-height: 1.15 !important;
  }

  body.printing-quotation .pro-quote-company strong,
  body.printing-quotation .pro-quote-company span {
    color: #0f172a !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  body.printing-quotation .pro-quote-voucher {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    align-content: center !important;
    gap: 8px !important;
    background: #07182f !important;
    color: #ffffff !important;
    padding: 12px 18px 12px 30px !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-voucher::before {
    content: "" !important;
    position: absolute !important;
    left: -18px !important;
    top: 0 !important;
    width: 32px !important;
    height: 100% !important;
    background: #e50914 !important;
    transform: skewX(-10deg) !important;
  }

  body.printing-quotation .pro-quote-voucher span {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-voucher strong {
    display: block !important;
    width: 100% !important;
    border-top: 1px solid rgba(255, 255, 255, 0.35) !important;
    padding-top: 13px !important;
    color: #ffffff !important;
    font-size: 30px !important;
    font-weight: 500 !important;
    letter-spacing: 1px !important;
  }

  body.printing-quotation .pro-quote-voucher small {
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-info-grid {
    display: grid !important;
    grid-template-columns: 1.35fr 1fr 1fr 1fr !important;
    gap: 0 !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #eef2f7 !important;
  }

  body.printing-quotation .pro-quote-info-card {
    position: relative !important;
    min-height: 48px !important;
    border-right: 1px solid #e5e7eb !important;
    padding: 2px 14px 2px 42px !important;
  }

  body.printing-quotation .pro-quote-info-card::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
  }

  body.printing-quotation .pro-quote-info-card:last-child {
    border-right: 0 !important;
  }

  body.printing-quotation .pro-quote-info-card span {
    color: #334155 !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    letter-spacing: .5px !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-info-card strong {
    display: block !important;
    margin-top: 5px !important;
    color: #0f172a !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-info-card small {
    display: block !important;
    margin-top: 3px !important;
    color: #0f172a !important;
    font-size: 10px !important;
    font-weight: 700 !important;
  }

  body.printing-quotation .pro-quote-lines {
    width: calc(100% - 34px) !important;
    margin: 14px 17px 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
    border: 1px solid #d7e0ec !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-lines th {
    background: #07182f !important;
    color: #ffffff !important;
    border-color: #1e314d !important;
    padding: 9px 10px !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    text-align: center !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-lines td {
    border-color: #d7e0ec !important;
    padding: 13px 10px !important;
    color: #0f172a !important;
    font-size: 13px !important;
    vertical-align: middle !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(1),
  body.printing-quotation .pro-quote-lines td:nth-child(1) {
    width: 54px !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(2),
  body.printing-quotation .pro-quote-lines td:nth-child(2) {
    width: auto !important;
    text-align: left !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(3),
  body.printing-quotation .pro-quote-lines td:nth-child(3) {
    width: 98px !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(4),
  body.printing-quotation .pro-quote-lines td:nth-child(4),
  body.printing-quotation .pro-quote-lines th:nth-child(5),
  body.printing-quotation .pro-quote-lines td:nth-child(5) {
    width: 74px !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-lines th:nth-child(6),
  body.printing-quotation .pro-quote-lines td:nth-child(6) {
    width: 108px !important;
    text-align: right !important;
  }

  body.printing-quotation .pro-quote-lines td:nth-child(2) strong {
    display: block !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
  }

  body.printing-quotation .pro-quote-lines td:nth-child(2) small {
    display: block !important;
    margin-top: 4px !important;
    color: #0f172a !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
  }

  body.printing-quotation .pro-quote-line-no {
    display: inline-grid !important;
    place-items: center !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 6px !important;
    background: #e50914 !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 900 !important;
  }

  body.printing-quotation .pro-quote-summary {
    display: grid !important;
    grid-template-columns: 1fr 290px !important;
    gap: 18px !important;
    align-items: end !important;
    padding: 14px 18px 12px !important;
  }

  body.printing-quotation .pro-quote-words {
    display: grid !important;
    gap: 5px !important;
  }

  body.printing-quotation .pro-quote-words span {
    color: #334155 !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-words strong {
    color: #0f172a !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
  }

  body.printing-quotation .pro-quote-totals {
    display: grid !important;
    gap: 7px !important;
  }

  body.printing-quotation .pro-quote-totals div {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 14px !important;
    color: #0f172a !important;
    font-size: 11px !important;
  }

  body.printing-quotation .pro-quote-totals span {
    text-align: right !important;
  }

  body.printing-quotation .pro-quote-totals strong {
    min-width: 100px !important;
    text-align: right !important;
  }

  body.printing-quotation .pro-quote-grand {
    grid-template-columns: 90px 72px 1fr !important;
    overflow: hidden !important;
    border-radius: 5px !important;
    background: #07182f !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 900 !important;
  }

  body.printing-quotation .pro-quote-grand span,
  body.printing-quotation .pro-quote-grand em,
  body.printing-quotation .pro-quote-grand strong {
    padding: 10px 12px !important;
    color: #ffffff !important;
    text-align: center !important;
  }

  body.printing-quotation .pro-quote-grand strong {
    min-width: 142px !important;
    background: #e50914 !important;
    text-align: right !important;
  }

  body.printing-quotation .pro-quote-two-col {
    display: grid !important;
    grid-template-columns: 1fr 1.05fr !important;
    gap: 18px !important;
    padding: 0 18px 12px !important;
  }

  body.printing-quotation .pro-quote-terms,
  body.printing-quotation .pro-quote-acceptance {
    min-height: 46mm !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    padding: 14px 16px !important;
  }

  body.printing-quotation .pro-quote-terms h2,
  body.printing-quotation .pro-quote-acceptance h2 {
    margin: 0 0 10px !important;
    color: #0f172a !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-terms li,
  body.printing-quotation .pro-quote-terms p,
  body.printing-quotation .pro-quote-acceptance span,
  body.printing-quotation .pro-quote-acceptance strong {
    color: #0f172a !important;
    font-size: 10px !important;
    line-height: 1.55 !important;
  }

  body.printing-quotation .pro-quote-signature-line {
    height: 28mm !important;
    border-bottom: 1px solid #0f172a !important;
    margin-bottom: 7px !important;
  }

  body.printing-quotation .pro-quote-bottom {
    display: grid !important;
    grid-template-columns: 1.1fr 1.2fr 1fr !important;
    gap: 10px !important;
    padding: 0 18px 12px !important;
  }

  body.printing-quotation .pro-quote-prepared,
  body.printing-quotation .pro-quote-thanks,
  body.printing-quotation .pro-quote-assist {
    min-height: 20mm !important;
    border-radius: 6px !important;
    background: #f8fafc !important;
    padding: 10px 14px !important;
  }

  body.printing-quotation .pro-quote-thanks strong {
    display: block !important;
    margin-top: 6px !important;
    color: #e50914 !important;
    font-size: 12px !important;
  }

  body.printing-quotation .pro-quote-prepared span,
  body.printing-quotation .pro-quote-assist span {
    color: #334155 !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
  }

  body.printing-quotation .pro-quote-prepared strong,
  body.printing-quotation .pro-quote-assist strong,
  body.printing-quotation .pro-quote-prepared small,
  body.printing-quotation .pro-quote-thanks span {
    color: #0f172a !important;
    font-size: 10px !important;
  }

  body.printing-quotation .pro-quote-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 10px 10px !important;
    border-radius: 6px !important;
    background: #07182f !important;
    color: #ffffff !important;
    padding: 10px 70px 10px 74px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  body.printing-quotation .pro-quote-footer span,
  body.printing-quotation .pro-quote-footer strong {
    color: #ffffff !important;
    font-size: 10px !important;
  }
}

/* Final Greenland quotation model: keep this block at the end so older print styles cannot override it. */
.pro-quotation-print.greenland-quote-model {
  --quote-navy: #061a33;
  --quote-navy-2: #0b2342;
  --quote-red: #e50914;
  --quote-ink: #07182f;
  --quote-muted: #64748b;
  --quote-line: #dbe5f0;
  width: min(1180px, 100%);
  margin: 18px auto;
  overflow: hidden;
  border: 1px solid var(--quote-line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  color: var(--quote-ink);
  font-family: Arial, "Segoe UI", sans-serif;
}

.greenland-quote-model .pro-quote-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 174px;
  border-bottom: 1px solid #e7edf5;
  background: #ffffff;
}

.greenland-quote-model .pro-quote-brand {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 30px 34px;
}

.greenland-quote-model .pro-quote-brand .greenland-logo-mark {
  display: grid;
  grid-template-columns: 82px 1fr;
  grid-template-rows: auto auto;
  column-gap: 18px;
  align-items: center;
  width: 260px;
}

.greenland-quote-model .pro-quote-brand .greenland-logo-symbol {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 14px;
  background: var(--quote-red);
  color: #ffffff;
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 25px rgba(229, 9, 20, 0.22);
}

.greenland-quote-model .pro-quote-brand .greenland-logo-left {
  display: grid;
  gap: 0;
  align-self: end;
}

.greenland-quote-model .pro-quote-brand .greenland-logo-left strong {
  color: #111827;
  font-size: 34px;
  font-weight: 500;
  line-height: 0.95;
}

.greenland-quote-model .pro-quote-brand .greenland-logo-left b {
  color: var(--quote-red);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 0.95;
}

.greenland-quote-model .pro-quote-brand .greenland-logo-right {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-left: 8px;
}

.greenland-quote-model .pro-quote-brand .greenland-logo-right strong {
  display: none;
}

.greenland-quote-model .pro-quote-brand .greenland-logo-right span {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.greenland-quote-model .pro-quote-company {
  display: grid;
  gap: 8px;
  padding-left: 28px;
  border-left: 1px solid #dbe5f0;
}

.greenland-quote-model .pro-quote-company h1 {
  margin: 0 0 4px;
  max-width: 460px;
  color: var(--quote-ink);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.08;
}

.greenland-quote-model .pro-quote-company strong,
.greenland-quote-model .pro-quote-company span {
  color: var(--quote-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
}

.greenland-quote-model .pro-quote-company span::before {
  display: inline-block;
  width: 20px;
  margin-right: 8px;
  color: var(--quote-ink);
  font-weight: 900;
  text-align: center;
}

.greenland-quote-model .pro-quote-company span:nth-of-type(1)::before {
  content: "?";
}

.greenland-quote-model .pro-quote-company span:nth-of-type(2)::before {
  content: "?";
}

.greenland-quote-model .pro-quote-company span:nth-of-type(3)::before {
  content: "?";
}

.greenland-quote-model .pro-quote-voucher {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 20px;
  overflow: hidden;
  padding: 24px 34px;
  background: linear-gradient(135deg, var(--quote-navy), #020b18);
  color: #ffffff;
  text-align: center;
}

.greenland-quote-model .pro-quote-voucher::before {
  content: "";
  position: absolute;
  left: -24px;
  top: -25px;
  width: 58px;
  height: 210px;
  transform: rotate(8deg);
  background: var(--quote-red);
}

.greenland-quote-model .pro-quote-voucher span {
  display: block;
  width: 100%;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.greenland-quote-model .pro-quote-voucher strong {
  color: #ffffff;
  font-size: 46px;
  font-weight: 500;
  line-height: 1;
}

.greenland-quote-model .pro-quote-voucher small {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.greenland-quote-model .pro-quote-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 28px 30px 26px;
  border-bottom: 1px solid #edf2f7;
}

.greenland-quote-model .pro-quote-info-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: start;
  column-gap: 14px;
  min-height: 90px;
  padding: 0 28px;
  border-right: 1px solid #dbe5f0;
}

.greenland-quote-model .pro-quote-info-card:first-child {
  padding-left: 0;
}

.greenland-quote-model .pro-quote-info-card:last-child {
  border-right: 0;
  padding-right: 0;
}

.greenland-quote-model .pro-quote-info-icon {
  grid-row: 1 / span 4;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--quote-ink);
}

.greenland-quote-model .pro-quote-info-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.1;
}

.greenland-quote-model .pro-quote-info-card span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.greenland-quote-model .pro-quote-info-card strong {
  margin-top: 8px;
  color: var(--quote-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.greenland-quote-model .pro-quote-info-card small {
  margin-top: 8px;
  color: var(--quote-ink);
  font-size: 14px;
  line-height: 1.25;
}

.greenland-quote-model .pro-quote-lines {
  width: calc(100% - 60px);
  margin: 22px 30px 0;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
}

.greenland-quote-model .pro-quote-lines th {
  padding: 17px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(180deg, var(--quote-navy-2), #020b18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-align: center;
  text-transform: uppercase;
}

.greenland-quote-model .pro-quote-lines th:nth-child(1),
.greenland-quote-model .pro-quote-lines td:nth-child(1) {
  width: 80px;
  text-align: center;
}

.greenland-quote-model .pro-quote-lines th:nth-child(2),
.greenland-quote-model .pro-quote-lines td:nth-child(2) {
  width: auto;
  text-align: left;
}

.greenland-quote-model .pro-quote-lines th:nth-child(3),
.greenland-quote-model .pro-quote-lines td:nth-child(3) {
  width: 140px;
}

.greenland-quote-model .pro-quote-lines th:nth-child(4),
.greenland-quote-model .pro-quote-lines td:nth-child(4),
.greenland-quote-model .pro-quote-lines th:nth-child(5),
.greenland-quote-model .pro-quote-lines td:nth-child(5) {
  width: 110px;
}

.greenland-quote-model .pro-quote-lines th:nth-child(6),
.greenland-quote-model .pro-quote-lines td:nth-child(6) {
  width: 170px;
  text-align: right;
}

.greenland-quote-model .pro-quote-lines td {
  padding: 21px 18px;
  border-top: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  color: var(--quote-ink);
  font-size: 20px;
  text-align: center;
  vertical-align: middle;
}

.greenland-quote-model .pro-quote-lines td:last-child,
.greenland-quote-model .pro-quote-lines th:last-child {
  border-right: 0;
}

.greenland-quote-model .pro-quote-lines td:nth-child(2) strong {
  display: block;
  color: var(--quote-ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  white-space: normal;
}

.greenland-quote-model .pro-quote-lines td:nth-child(2) small {
  display: block;
  margin-top: 7px;
  color: var(--quote-ink);
  font-size: 16px;
  font-weight: 500;
}

.greenland-quote-model .pro-quote-lines td:nth-child(6) strong {
  color: var(--quote-red);
  font-size: 22px;
  font-weight: 900;
}

.greenland-quote-model .pro-quote-line-no {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--quote-red);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(229, 9, 20, 0.25);
}

.greenland-quote-model .pro-quote-summary {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 34px;
  align-items: end;
  padding: 34px 38px 22px;
}

.greenland-quote-model .pro-quote-words {
  position: relative;
  display: grid;
  gap: 9px;
  padding-left: 76px;
}

.greenland-quote-model .pro-quote-words::before {
  content: "?";
  position: absolute;
  left: 6px;
  top: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--quote-ink);
  font-size: 28px;
}

.greenland-quote-model .pro-quote-words span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.greenland-quote-model .pro-quote-words strong {
  color: var(--quote-ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
}

.greenland-quote-model .pro-quote-totals {
  display: grid;
  gap: 13px;
}

.greenland-quote-model .pro-quote-totals div {
  display: grid;
  grid-template-columns: 1fr 160px;
  align-items: center;
  gap: 22px;
  color: #0f172a;
  font-size: 19px;
}

.greenland-quote-model .pro-quote-totals span {
  text-align: right;
}

.greenland-quote-model .pro-quote-totals strong {
  text-align: right;
  font-weight: 900;
}

.greenland-quote-model .pro-quote-grand {
  grid-template-columns: 160px 130px 1fr !important;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--quote-navy-2), #020b18);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.greenland-quote-model .pro-quote-grand span,
.greenland-quote-model .pro-quote-grand em,
.greenland-quote-model .pro-quote-grand strong {
  padding: 17px 20px;
  color: #ffffff;
  text-align: center;
}

.greenland-quote-model .pro-quote-grand em {
  border-left: 1px solid rgba(255, 255, 255, 0.26);
  border-right: 1px solid rgba(255, 255, 255, 0.26);
  font-style: normal;
}

.greenland-quote-model .pro-quote-grand strong {
  position: relative;
  min-width: 200px;
  background: var(--quote-red);
  text-align: right;
}

.greenland-quote-model .pro-quote-grand strong::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 0;
  width: 46px;
  height: 100%;
  transform: skewX(-10deg);
  background: var(--quote-red);
}

.greenland-quote-model .pro-quote-two-col {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 30px;
  padding: 0 30px 22px;
}

.greenland-quote-model .pro-quote-terms,
.greenland-quote-model .pro-quote-acceptance {
  min-height: 176px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 24px 28px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.greenland-quote-model .pro-quote-terms h2,
.greenland-quote-model .pro-quote-acceptance h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 15px;
  color: var(--quote-ink);
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
}

.greenland-quote-model .pro-quote-terms h2::before,
.greenland-quote-model .pro-quote-acceptance h2::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid var(--quote-red);
  border-radius: 5px;
}

.greenland-quote-model .pro-quote-terms li,
.greenland-quote-model .pro-quote-terms p,
.greenland-quote-model .pro-quote-acceptance span,
.greenland-quote-model .pro-quote-acceptance strong {
  color: var(--quote-ink);
  font-size: 14px;
  line-height: 1.65;
}

.greenland-quote-model .pro-quote-signature-line {
  height: 72px;
  margin-top: 26px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--quote-ink);
}

.greenland-quote-model .pro-quote-bottom {
  display: grid;
  grid-template-columns: 1.1fr 1.35fr 1fr;
  gap: 18px;
  padding: 0 30px 22px;
}

.greenland-quote-model .pro-quote-prepared,
.greenland-quote-model .pro-quote-thanks,
.greenland-quote-model .pro-quote-assist {
  min-height: 92px;
  border-radius: 10px;
  background: #f8fafc;
  padding: 18px 22px;
}

.greenland-quote-model .pro-quote-thanks {
  text-align: center;
}

.greenland-quote-model .pro-quote-thanks strong {
  display: block;
  margin-bottom: 8px;
  color: var(--quote-red);
  font-size: 18px;
  font-weight: 900;
}

.greenland-quote-model .pro-quote-prepared span,
.greenland-quote-model .pro-quote-assist span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.greenland-quote-model .pro-quote-prepared strong,
.greenland-quote-model .pro-quote-assist strong,
.greenland-quote-model .pro-quote-prepared small,
.greenland-quote-model .pro-quote-thanks span {
  display: block;
  color: var(--quote-ink);
  font-size: 15px;
  line-height: 1.35;
}

.greenland-quote-model .pro-quote-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 18px 18px;
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(180deg, var(--quote-navy-2), #020b18);
  color: #ffffff;
  padding: 18px 70px 18px 110px;
  font-size: 14px;
  font-weight: 800;
}

.greenland-quote-model .pro-quote-footer::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 0;
  width: 92px;
  height: 100%;
  transform: skewX(-12deg);
  background: var(--quote-red);
}

.greenland-quote-model .pro-quote-footer span,
.greenland-quote-model .pro-quote-footer strong {
  position: relative;
  z-index: 1;
  color: #ffffff;
}

@media (max-width: 1100px) {
  .greenland-quote-model .pro-quote-header,
  .greenland-quote-model .pro-quote-brand,
  .greenland-quote-model .pro-quote-info-grid,
  .greenland-quote-model .pro-quote-summary,
  .greenland-quote-model .pro-quote-two-col,
  .greenland-quote-model .pro-quote-bottom {
    grid-template-columns: 1fr;
  }

  .greenland-quote-model .pro-quote-voucher {
    min-height: 170px;
  }

  .greenland-quote-model .pro-quote-info-card {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
    padding: 18px 0;
  }

  .greenland-quote-model .pro-quote-lines {
    display: block;
    overflow-x: auto;
  }
}

@media print {
  body.printing-quotation .greenland-quote-model {
    --quote-navy: #061a33;
    --quote-navy-2: #0b2342;
    --quote-red: #e50914;
    display: block !important;
    width: 200mm !important;
    max-width: 200mm !important;
    min-height: auto !important;
    max-height: none !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 3mm !important;
    background: #ffffff !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-header {
    display: grid !important;
    grid-template-columns: 1fr 56mm !important;
    min-height: 43mm !important;
    border-bottom: 1px solid #e7edf5 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-brand {
    display: grid !important;
    grid-template-columns: 54mm 1fr !important;
    gap: 8mm !important;
    padding: 8mm 9mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-brand .greenland-logo-mark {
    grid-template-columns: 17mm 1fr !important;
    width: 52mm !important;
    column-gap: 4mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-brand .greenland-logo-symbol {
    width: 16mm !important;
    height: 16mm !important;
    border-radius: 3mm !important;
    font-size: 10mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-brand .greenland-logo-left strong {
    font-size: 7.2mm !important;
    line-height: 0.92 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-brand .greenland-logo-left b {
    font-size: 7mm !important;
    letter-spacing: 0.2mm !important;
    line-height: 0.92 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-brand .greenland-logo-right span {
    font-size: 2.6mm !important;
    letter-spacing: 1.75mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-company {
    gap: 1.4mm !important;
    padding-left: 7mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-company h1 {
    font-size: 5.4mm !important;
    line-height: 1.07 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-company strong,
  body.printing-quotation .greenland-quote-model .pro-quote-company span {
    font-size: 3mm !important;
    line-height: 1.12 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-voucher {
    gap: 4mm !important;
    padding: 7mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-voucher::before {
    left: -7mm !important;
    width: 13mm !important;
    height: 58mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-voucher span {
    padding-bottom: 4mm !important;
    font-size: 7mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-voucher strong {
    font-size: 10mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-voucher small {
    font-size: 3.1mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-info-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    padding: 7mm 8mm 6mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-info-card {
    grid-template-columns: 11mm 1fr !important;
    column-gap: 3mm !important;
    min-height: 22mm !important;
    padding: 0 5mm !important;
    border-right: 1px solid #dbe5f0 !important;
    border-bottom: 0 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-info-card:first-child {
    padding-left: 0 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-info-card:last-child {
    border-right: 0 !important;
    padding-right: 0 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-info-icon {
    width: 10mm !important;
    height: 10mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-info-icon svg {
    width: 5.5mm !important;
    height: 5.5mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-info-card span {
    font-size: 2.35mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-info-card strong {
    margin-top: 1.8mm !important;
    font-size: 3.05mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-info-card small {
    margin-top: 1.7mm !important;
    font-size: 2.75mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines {
    width: calc(100% - 16mm) !important;
    margin: 6mm 8mm 0 !important;
    border-radius: 1.6mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines th {
    padding: 4mm 3mm !important;
    font-size: 2.5mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines th:nth-child(1),
  body.printing-quotation .greenland-quote-model .pro-quote-lines td:nth-child(1) {
    width: 13mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines th:nth-child(3),
  body.printing-quotation .greenland-quote-model .pro-quote-lines td:nth-child(3) {
    width: 24mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines th:nth-child(4),
  body.printing-quotation .greenland-quote-model .pro-quote-lines td:nth-child(4),
  body.printing-quotation .greenland-quote-model .pro-quote-lines th:nth-child(5),
  body.printing-quotation .greenland-quote-model .pro-quote-lines td:nth-child(5) {
    width: 19mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines th:nth-child(6),
  body.printing-quotation .greenland-quote-model .pro-quote-lines td:nth-child(6) {
    width: 29mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines td {
    padding: 5mm 3mm !important;
    font-size: 4mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines td:nth-child(2) strong {
    font-size: 4.1mm !important;
    line-height: 1.1 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines td:nth-child(2) small {
    margin-top: 1.5mm !important;
    font-size: 3mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-lines td:nth-child(6) strong {
    font-size: 4.2mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-line-no {
    width: 9mm !important;
    height: 9mm !important;
    border-radius: 1.6mm !important;
    font-size: 4.5mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-summary {
    display: grid !important;
    grid-template-columns: 1fr 78mm !important;
    gap: 8mm !important;
    padding: 8mm 9mm 5mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-words {
    gap: 1.8mm !important;
    padding-left: 15mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-words::before {
    width: 10mm !important;
    height: 10mm !important;
    font-size: 5mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-words span {
    font-size: 2.4mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-words strong {
    font-size: 3.2mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-totals {
    gap: 2.5mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-totals div {
    grid-template-columns: 1fr 26mm !important;
    gap: 4mm !important;
    font-size: 3.2mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-grand {
    grid-template-columns: 26mm 22mm 1fr !important;
    margin-top: 3mm !important;
    border-radius: 1.6mm !important;
    font-size: 3.8mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-grand span,
  body.printing-quotation .greenland-quote-model .pro-quote-grand em,
  body.printing-quotation .greenland-quote-model .pro-quote-grand strong {
    padding: 3.7mm 4mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-grand strong {
    min-width: 34mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-two-col {
    display: grid !important;
    grid-template-columns: 1fr 1.08fr !important;
    gap: 8mm !important;
    padding: 0 8mm 5mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-terms,
  body.printing-quotation .greenland-quote-model .pro-quote-acceptance {
    min-height: 40mm !important;
    border-radius: 2mm !important;
    padding: 6mm 7mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-terms h2,
  body.printing-quotation .greenland-quote-model .pro-quote-acceptance h2 {
    gap: 3mm !important;
    margin-bottom: 3mm !important;
    font-size: 3.2mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-terms h2::before,
  body.printing-quotation .greenland-quote-model .pro-quote-acceptance h2::before {
    width: 4.2mm !important;
    height: 4.2mm !important;
    border-width: 0.6mm !important;
    border-radius: 1mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-terms li,
  body.printing-quotation .greenland-quote-model .pro-quote-terms p,
  body.printing-quotation .greenland-quote-model .pro-quote-acceptance span,
  body.printing-quotation .greenland-quote-model .pro-quote-acceptance strong {
    font-size: 2.55mm !important;
    line-height: 1.45 !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-signature-line {
    height: 18mm !important;
    margin-top: 8mm !important;
    margin-bottom: 2mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-bottom {
    display: grid !important;
    grid-template-columns: 1.1fr 1.35fr 1fr !important;
    gap: 5mm !important;
    padding: 0 8mm 5mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-prepared,
  body.printing-quotation .greenland-quote-model .pro-quote-thanks,
  body.printing-quotation .greenland-quote-model .pro-quote-assist {
    min-height: 22mm !important;
    border-radius: 2mm !important;
    padding: 4mm 5mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-thanks strong {
    margin-bottom: 1.6mm !important;
    font-size: 3.4mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-prepared span,
  body.printing-quotation .greenland-quote-model .pro-quote-assist span {
    font-size: 2.3mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-prepared strong,
  body.printing-quotation .greenland-quote-model .pro-quote-assist strong,
  body.printing-quotation .greenland-quote-model .pro-quote-prepared small,
  body.printing-quotation .greenland-quote-model .pro-quote-thanks span {
    font-size: 2.65mm !important;
  }

  body.printing-quotation .greenland-quote-model .pro-quote-footer {
    margin: 0 4mm 4mm !important;
    border-radius: 1.8mm !important;
    padding: 4mm 16mm 4mm 24mm !important;
    font-size: 2.8mm !important;
  }

body.printing-quotation .greenland-quote-model .pro-quote-footer::before {
    left: -7mm !important;
    width: 21mm !important;
  }
}

/* Emergency stabilization after dashboard and quotation visual refresh. */
.ops-dashboard .ops-command-top {
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 1.2fr) auto;
}

.ops-dashboard .ops-market-strip {
  overflow: hidden;
}

.ops-dashboard .ops-market-strip span,
.ops-dashboard .ops-market-strip strong,
.ops-dashboard .ops-market-strip em {
  min-width: 0;
}

.ops-dashboard .ops-kpi-card,
.ops-dashboard .ops-panel,
.ops-dashboard .ops-action-card,
.ops-dashboard .ops-list-row,
.ops-dashboard .ops-compliance-row {
  overflow: hidden;
}

.ops-dashboard .ops-kpi-icon,
.ops-dashboard .ops-empty-state span,
.ops-dashboard .ops-compliance-row > span,
.ops-dashboard .ops-help-panel > span,
.ops-dashboard .ops-action-card > span,
.ops-dashboard .ops-activity-row > span {
  color: currentColor;
}

.ops-dashboard .ops-kpi-icon svg,
.ops-dashboard .ops-empty-state svg,
.ops-dashboard .ops-compliance-row svg,
.ops-dashboard .ops-help-panel svg,
.ops-dashboard .ops-action-card svg,
.ops-dashboard .ops-activity-row svg {
  width: 24px;
  height: 24px;
  fill: none !important;
  stroke: currentColor !important;
}

.ops-dashboard .ops-attendance-stats button {
  align-items: center;
  min-width: 0;
}

.ops-dashboard .ops-attendance-stats svg {
  opacity: 0.75;
}

.ops-dashboard .ops-empty-state span {
  background: #fff1f2;
  border-radius: 999px;
}

@media (max-width: 1500px) {
  .ops-dashboard .ops-command-top,
  .ops-dashboard .ops-layout {
    grid-template-columns: 1fr;
  }

  .ops-dashboard .ops-kpi-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

/* Final ERP command-center dashboard, scoped to Dashboard only. */
body[data-view="dashboard"] {
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .app-shell {
  grid-template-columns: 210px minmax(0, 1fr) !important;
  height: 100vh !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .sidebar {
  width: 210px !important;
  background: #0f172a !important;
  border-right: 0 !important;
  box-shadow: 14px 0 40px rgba(15, 23, 42, .14);
}

body[data-view="dashboard"] .sidebar .logo-box img {
  max-height: 48px;
  object-fit: contain;
}

body[data-view="dashboard"] .nav-section-title {
  color: #8da0ba !important;
  font-size: 10px !important;
  letter-spacing: .12em !important;
}

body[data-view="dashboard"] .nav button {
  min-height: 34px !important;
  color: #e5edf6 !important;
  border-radius: 8px !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .nav button.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #ef233c, #be123c) !important;
  box-shadow: 0 12px 22px rgba(190, 18, 60, .22);
}

body[data-view="dashboard"] .view {
  height: 100vh !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

.erp-ref-dashboard,
.erp-ref-dashboard * {
  box-sizing: border-box;
}

.erp-ref-dashboard {
  --navy: #0f172a;
  --blue: #2563eb;
  --red: #ef233c;
  height: 100vh;
  max-height: 100vh;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 54px 104px minmax(0, 1fr) 20px;
  gap: 12px;
  padding: 14px 18px 10px;
  color: #0f172a;
  background: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.erp-ref-header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(260px, 520px) 42px max-content max-content max-content max-content max-content;
  gap: 12px;
  align-items: center;
}

.erp-ref-title {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.erp-ref-menu,
.erp-ref-kpi-icon,
.erp-ref-mini span,
.erp-ref-action span,
.erp-ref-alert-row > span,
.erp-ref-activity-row > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #eef4ff;
  border: 0;
  border-radius: 12px;
}

.erp-ref-menu svg,
.erp-ref-kpi-icon svg,
.erp-ref-mini svg,
.erp-ref-action svg,
.erp-ref-alert-row svg,
.erp-ref-activity-row svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.erp-ref-title h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}

.erp-ref-title p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.erp-ref-search {
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.erp-ref-search svg {
  width: 16px;
  height: 16px;
  stroke: #64748b;
  stroke-width: 2;
  fill: none;
}

.erp-ref-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f172a;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.erp-ref-bell {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ef233c;
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 999px;
  font-weight: 900;
}

.erp-ref-cloud,
.erp-ref-date,
.erp-ref-lite-btn,
.erp-ref-user,
.erp-ref-quick,
.erp-ref-card-head button,
.erp-ref-wide {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid #dbe5f0;
  border-radius: 9px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.erp-ref-cloud {
  color: #047857;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.erp-ref-user {
  padding: 0 10px;
}

.erp-ref-user b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #0f172a;
  border-radius: 999px;
  font-size: 10px;
}

.erp-ref-quick {
  color: #ffffff;
  background: #ef233c;
  border-color: #ef233c;
  box-shadow: 0 12px 24px rgba(239, 35, 60, .22);
}

.erp-ref-kpi-row {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.erp-ref-kpi {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 12px;
  align-items: center;
  padding: 16px 18px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.erp-ref-kpi span:last-of-type {
  min-width: 0;
}

.erp-ref-kpi b {
  display: block;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-ref-kpi em {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.erp-ref-kpi small,
.erp-ref-kpi i {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.erp-ref-kpi i {
  grid-column: 2;
  color: #ef233c;
}

.erp-ref-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .78fr) minmax(300px, .74fr);
  grid-template-rows: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 14px;
}

.erp-ref-card {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}

.erp-ref-operations {
  grid-column: span 1;
}

.erp-ref-card-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.erp-ref-card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 950;
}

.erp-ref-card-head button {
  height: 30px;
  padding-inline: 11px;
  font-size: 11px;
}

.erp-ref-mini-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.erp-ref-mini {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
}

.erp-ref-mini span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.erp-ref-mini b,
.erp-ref-mini small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-ref-mini b {
  font-size: 18px;
  font-weight: 950;
}

.erp-ref-mini small {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
}

.erp-ref-analytics-row {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.erp-ref-analytics-row article {
  min-width: 0;
  min-height: 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.erp-ref-analytics-row h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 950;
}

.erp-ref-analytics-row h3 small {
  color: #64748b;
  font-weight: 700;
}

.erp-ref-chart svg {
  width: 100%;
  height: 104px;
}

.erp-ref-chart div {
  display: flex;
  justify-content: space-between;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
}

.erp-ref-donut-wrap {
  min-height: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.erp-ref-donut {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #fff 0 51%, transparent 52%), conic-gradient(var(--segments));
  border-radius: 999px;
}

.erp-ref-donut b,
.erp-ref-donut span {
  grid-area: 1 / 1;
}

.erp-ref-donut b {
  font-size: 22px;
  font-weight: 950;
}

.erp-ref-donut span {
  align-self: end;
  margin-bottom: 24px;
  color: #64748b;
  font-size: 9px;
  font-weight: 850;
}

.erp-ref-legend {
  display: grid;
  gap: 6px;
}

.erp-ref-legend span {
  min-width: 0;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) max-content;
  gap: 6px;
  align-items: center;
  color: #475569;
  font-size: 10px;
  font-weight: 850;
}

.erp-ref-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.erp-ref-legend b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-ref-list,
.erp-ref-approval-list {
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.erp-ref-alert-row,
.erp-ref-activity-row,
.erp-ref-approval-row {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 8px 10px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.erp-ref-alert-row,
.erp-ref-activity-row {
  grid-template-columns: 42px minmax(0, 1fr) max-content;
  padding: 10px;
}

.erp-ref-alert-row > span,
.erp-ref-activity-row > span {
  width: 34px;
  height: 34px;
  color: #ef233c;
  background: #fff1f2;
}

.erp-ref-alert-row b,
.erp-ref-alert-row small,
.erp-ref-alert-row u,
.erp-ref-activity-row b,
.erp-ref-activity-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-ref-alert-row b,
.erp-ref-activity-row b {
  font-size: 12px;
  font-weight: 950;
}

.erp-ref-alert-row small,
.erp-ref-activity-row small {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.erp-ref-alert-row em {
  grid-column: 3;
  grid-row: 1 / span 2;
  padding: 7px 10px;
  color: #ef233c;
  background: #fff7ed;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.erp-ref-alert-row u {
  grid-column: 2;
  color: #64748b;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.erp-ref-wide {
  width: 100%;
  margin-top: auto;
  height: 30px;
}

.erp-ref-empty {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #dbe5f0;
  border-radius: 14px;
  text-align: center;
}

.erp-ref-empty svg {
  width: 46px;
  height: 46px;
  padding: 10px;
  color: #64748b;
  background: #eef4ff;
  border-radius: 999px;
}

.erp-ref-empty strong {
  color: #0f172a;
  font-size: 13px;
}

.erp-ref-approval-row {
  grid-template-columns: 76px 80px minmax(0, 1fr) max-content;
  padding: 10px 12px;
}

.erp-ref-approval-row b,
.erp-ref-approval-row span,
.erp-ref-approval-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-ref-approval-row b {
  font-size: 12px;
}

.erp-ref-approval-row span,
.erp-ref-approval-row small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.erp-ref-actions-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.erp-ref-action {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.erp-ref-action span {
  width: 34px;
  height: 34px;
}

.erp-ref-action b,
.erp-ref-action small {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-ref-action b {
  font-size: 12px;
  font-weight: 950;
}

.erp-ref-action small {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.erp-ref-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

@media (max-height: 790px) {
  .erp-ref-dashboard {
    grid-template-rows: 48px 88px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 14px;
  }

  .erp-ref-footer {
    display: none;
  }

  .erp-ref-kpi {
    padding: 12px 14px;
  }

  .erp-ref-kpi-icon {
    width: 36px;
    height: 36px;
  }

  .erp-ref-kpi b {
    font-size: 20px;
  }

  .erp-ref-card {
    padding: 12px;
  }

  .erp-ref-mini-row {
    gap: 8px;
    margin-bottom: 8px;
  }

  .erp-ref-analytics-row {
    gap: 8px;
  }

  .erp-ref-chart svg {
    height: 84px;
  }
}

@media (max-width: 1360px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 184px minmax(0, 1fr) !important;
  }

  .erp-ref-dashboard {
    padding: 10px 12px;
    gap: 10px;
  }

  .erp-ref-header {
    grid-template-columns: minmax(270px, 1fr) minmax(220px, 360px) 38px max-content max-content max-content max-content;
  }

  .erp-ref-cloud {
    display: none;
  }

  .erp-ref-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .75fr) minmax(260px, .68fr);
    gap: 10px;
  }

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

@media (max-width: 760px) {
  .ops-dashboard .ops-kpi-grid,
  .ops-dashboard .ops-actions-grid,
  .ops-dashboard .ops-attendance-stats {
    grid-template-columns: 1fr;
  }
}

/* ERP dashboard reference fit: single-screen corporate command center. */
body[data-view="dashboard"] {
  overflow: hidden !important;
}

body[data-view="dashboard"] .app-shell {
  grid-template-columns: 176px minmax(0, 1fr) !important;
  height: 100vh !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .sidebar {
  width: 176px !important;
  padding: 12px 10px !important;
  background: #0b1728 !important;
  box-shadow: none !important;
}

body[data-view="dashboard"] .brand {
  margin-bottom: 12px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid rgba(148, 163, 184, .24) !important;
}

body[data-view="dashboard"] .brand-logo {
  width: 138px !important;
  max-height: 44px !important;
  object-fit: contain !important;
  background: #fff !important;
  border-radius: 8px !important;
}

body[data-view="dashboard"] .brand-copy strong {
  font-size: 12px !important;
}

body[data-view="dashboard"] .brand-copy span {
  font-size: 10px !important;
}

body[data-view="dashboard"] .nav {
  gap: 3px !important;
}

body[data-view="dashboard"] .nav-section-title {
  margin: 12px 8px 5px !important;
  font-size: 9px !important;
  color: #8ba0ba !important;
  letter-spacing: .13em !important;
}

body[data-view="dashboard"] .nav button {
  min-height: 30px !important;
  padding: 7px 9px !important;
  gap: 8px !important;
  border-radius: 7px !important;
  color: #dbeafe !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

body[data-view="dashboard"] .nav button svg {
  width: 15px !important;
  height: 15px !important;
}

body[data-view="dashboard"] .nav button.active {
  background: #e11d2e !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(225, 29, 46, .22) !important;
}

body[data-view="dashboard"] .view {
  height: 100vh !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

.erp-ref-dashboard {
  height: 100vh !important;
  width: 100% !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-rows: 50px 92px minmax(0, 1fr) 18px !important;
  gap: 10px !important;
  padding: 12px 14px 8px !important;
  background: #f8fafc !important;
}

.erp-ref-header {
  height: 50px !important;
  display: grid !important;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 420px) 34px 82px 52px 122px 72px 112px !important;
  gap: 8px !important;
  align-items: center !important;
}

.erp-ref-title {
  gap: 10px !important;
}

.erp-ref-title h1 {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

.erp-ref-title p {
  margin-top: 3px !important;
  font-size: 11px !important;
}

.erp-ref-menu {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
}

.erp-ref-search {
  height: 34px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.erp-ref-bell {
  width: 34px !important;
  height: 34px !important;
  font-size: 11px !important;
}

.erp-ref-cloud,
.erp-ref-date,
.erp-ref-lite-btn,
.erp-ref-user,
.erp-ref-quick,
.erp-ref-card-head button,
.erp-ref-wide {
  height: 34px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

.erp-ref-user {
  gap: 5px !important;
}

.erp-ref-user b {
  width: 22px !important;
  height: 22px !important;
}

.erp-ref-quick {
  background: #e11d2e !important;
  border-color: #e11d2e !important;
}

.erp-ref-kpi-row {
  height: 92px !important;
  gap: 12px !important;
}

.erp-ref-kpi {
  height: 92px !important;
  min-height: 92px !important;
  padding: 12px 16px !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  column-gap: 10px !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .055) !important;
}

.erp-ref-kpi-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
}

.erp-ref-kpi b {
  font-size: 22px !important;
}

.erp-ref-kpi em {
  font-size: 11px !important;
}

.erp-ref-kpi small,
.erp-ref-kpi i {
  font-size: 10px !important;
}

.erp-ref-grid {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .72fr) minmax(260px, .66fr) !important;
  grid-template-rows: minmax(0, 1.05fr) minmax(0, .82fr) !important;
  gap: 10px !important;
}

.erp-ref-card {
  padding: 12px !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05) !important;
}

.erp-ref-card-head {
  min-height: 28px !important;
  margin-bottom: 8px !important;
}

.erp-ref-card-head h2 {
  font-size: 13px !important;
}

.erp-ref-card-head button {
  height: 28px !important;
}

.erp-ref-mini-row {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.erp-ref-mini {
  min-height: 58px !important;
  padding: 8px !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  gap: 7px !important;
  border-radius: 10px !important;
}

.erp-ref-mini span {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
}

.erp-ref-mini b {
  font-size: 16px !important;
}

.erp-ref-mini small {
  font-size: 9px !important;
}

.erp-ref-analytics-row {
  gap: 8px !important;
}

.erp-ref-analytics-row article {
  padding: 9px !important;
  border-radius: 10px !important;
}

.erp-ref-analytics-row h3 {
  font-size: 10px !important;
  margin-bottom: 6px !important;
}

.erp-ref-chart svg {
  height: 82px !important;
}

.erp-ref-chart div {
  font-size: 8px !important;
}

.erp-ref-donut-wrap {
  grid-template-columns: 86px minmax(0, 1fr) !important;
  gap: 8px !important;
}

.erp-ref-donut {
  width: 82px !important;
  height: 82px !important;
}

.erp-ref-donut b {
  font-size: 18px !important;
}

.erp-ref-donut span {
  margin-bottom: 18px !important;
  font-size: 8px !important;
}

.erp-ref-legend {
  gap: 5px !important;
}

.erp-ref-legend span {
  font-size: 9px !important;
}

.erp-ref-list,
.erp-ref-approval-list {
  gap: 8px !important;
}

.erp-ref-alert-row,
.erp-ref-activity-row {
  min-height: 56px !important;
  grid-template-columns: 36px minmax(0, 1fr) max-content !important;
  padding: 8px !important;
  border-radius: 10px !important;
}

.erp-ref-alert-row > span,
.erp-ref-activity-row > span {
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
}

.erp-ref-alert-row b,
.erp-ref-activity-row b {
  font-size: 11px !important;
}

.erp-ref-alert-row small,
.erp-ref-activity-row small {
  font-size: 10px !important;
}

.erp-ref-alert-row em {
  padding: 5px 8px !important;
  font-size: 10px !important;
}

.erp-ref-alert-row u {
  font-size: 9px !important;
}

.erp-ref-empty {
  min-height: 0 !important;
  gap: 6px !important;
  border-radius: 12px !important;
}

.erp-ref-empty svg {
  width: 40px !important;
  height: 40px !important;
}

.erp-ref-empty strong {
  font-size: 12px !important;
}

.erp-ref-approval-row {
  min-height: 46px !important;
  padding: 8px 10px !important;
  grid-template-columns: 68px 64px minmax(0, 1fr) max-content !important;
}

.erp-ref-actions-grid {
  gap: 8px !important;
}

.erp-ref-action {
  min-height: 54px !important;
  padding: 9px !important;
  grid-template-columns: 32px minmax(0, 1fr) !important;
  border-radius: 10px !important;
}

.erp-ref-action span {
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
}

.erp-ref-action b {
  font-size: 11px !important;
}

.erp-ref-action small {
  font-size: 9px !important;
}

.erp-ref-footer {
  height: 18px !important;
  font-size: 9px !important;
}

@media (max-height: 820px) {
  .erp-ref-dashboard {
    grid-template-rows: 44px 78px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  .erp-ref-footer {
    display: none !important;
  }

  .erp-ref-header {
    height: 44px !important;
  }

  .erp-ref-kpi-row {
    height: 78px !important;
  }

  .erp-ref-kpi {
    height: 78px !important;
    min-height: 78px !important;
    padding: 9px 12px !important;
  }

  .erp-ref-kpi-icon {
    width: 34px !important;
    height: 34px !important;
  }

  .erp-ref-kpi b {
    font-size: 19px !important;
  }

  .erp-ref-card {
    padding: 10px !important;
  }

  .erp-ref-chart svg {
    height: 66px !important;
  }

  .erp-ref-mini {
    min-height: 50px !important;
  }
}

@media (max-width: 1280px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 154px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 154px !important;
  }

  .erp-ref-header {
    grid-template-columns: minmax(240px, 1fr) 32px 74px 48px 108px 68px 100px !important;
  }

  .erp-ref-search {
    display: none !important;
  }

  .erp-ref-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(250px, .75fr) minmax(230px, .68fr) !important;
  }
}

@media screen {
  .pro-quotation-print.greenland-quote-model {
    width: 1180px !important;
    max-width: none !important;
    min-width: 1180px !important;
  }

  .greenland-quote-model .pro-quote-header {
    grid-template-columns: minmax(0, 1fr) 360px !important;
  }

  .greenland-quote-model .pro-quote-brand {
    grid-template-columns: 290px minmax(0, 1fr) !important;
  }

  .greenland-quote-model .pro-quote-info-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .greenland-quote-model .pro-quote-summary {
    grid-template-columns: minmax(0, 1fr) 420px !important;
  }

  .greenland-quote-model .pro-quote-two-col {
    grid-template-columns: 1fr 1.08fr !important;
  }

  .greenland-quote-model .pro-quote-bottom {
    grid-template-columns: 1.1fr 1.35fr 1fr !important;
  }

  .greenland-quote-model .pro-quote-info-card {
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 0 !important;
  }
}

/* Greenland quotation v2 - isolated from legacy quotation styles. */
.gs-quote-sheet {
  --gs-navy: #06182e;
  --gs-navy-2: #0b2340;
  --gs-red: #ed111b;
  --gs-ink: #071427;
  --gs-muted: #667085;
  --gs-line: #e3e8ef;
  width: 1160px;
  max-width: 100%;
  margin: 18px auto 0;
  border: 1px solid var(--gs-line);
  border-radius: 10px;
  background: #fff;
  color: var(--gs-ink);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.gs-quote-sheet * {
  box-sizing: border-box;
}

.gs-quote-sheet svg {
  width: 22px;
  height: 22px;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2;
}

.gs-quote-head {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 330px;
  min-height: 165px;
  border-bottom: 1px solid var(--gs-line);
}

.gs-quote-logo-block,
.gs-quote-company-block {
  display: flex;
  align-items: center;
  padding: 26px 28px;
}

.gs-quote-logo-block {
  border-right: 1px solid var(--gs-line);
}

.gs-quote-logo-block .greenland-logo-mark {
  display: grid;
  grid-template-columns: 74px 1fr;
  grid-template-areas: "symbol left" "tag tag";
  gap: 10px 16px;
  align-items: center;
}

.gs-quote-logo-block .greenland-logo-symbol {
  grid-area: symbol;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--gs-red);
  color: #fff;
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}

.gs-quote-logo-block .greenland-logo-left {
  grid-area: left;
  display: grid;
  gap: 0;
}

.gs-quote-logo-block .greenland-logo-left strong {
  color: #111827;
  font-size: 31px;
  line-height: 0.94;
  font-weight: 500;
}

.gs-quote-logo-block .greenland-logo-left b {
  color: var(--gs-red);
  font-size: 37px;
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 1px;
}

.gs-quote-logo-block .greenland-logo-right {
  grid-area: tag;
  padding-top: 10px;
}

.gs-quote-logo-block .greenland-logo-right strong {
  display: none;
}

.gs-quote-logo-block .greenland-logo-right span {
  color: #98a2b3;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 7px;
  text-transform: uppercase;
}

.gs-quote-company-block {
  display: grid;
  align-content: center;
  gap: 8px;
}

.gs-quote-company-block h1 {
  margin: 0 0 6px;
  color: var(--gs-ink);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
}

.gs-quote-company-block strong,
.gs-quote-company-block span {
  color: var(--gs-ink);
  font-size: 15px;
  font-weight: 800;
}

.gs-quote-title-block {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 15px;
  padding: 28px 30px 28px 54px;
  background: linear-gradient(135deg, var(--gs-navy), #020b18);
  color: #fff;
  text-align: center;
}

.gs-quote-title-block::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 0;
  width: 50px;
  height: 100%;
  background: var(--gs-red);
  transform: skewX(-10deg);
}

.gs-quote-title-block span {
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gs-quote-title-block strong {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-top: 18px;
  color: #fff;
  font-size: 44px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.gs-quote-title-block small {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.gs-quote-parties {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  border-bottom: 1px solid var(--gs-line);
}

.gs-party-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-rows: auto auto auto auto;
  column-gap: 16px;
  min-height: 124px;
  padding: 26px 28px;
  border-right: 1px solid var(--gs-line);
}

.gs-party-card:last-child {
  border-right: 0;
}

.gs-party-card i {
  grid-row: 1 / 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #111827;
}

.gs-party-card span {
  color: #243650;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gs-party-card strong {
  margin-top: 8px;
  color: var(--gs-ink);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
  text-transform: uppercase;
}

.gs-party-card small {
  margin-top: 5px;
  color: var(--gs-ink);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
}

.gs-quote-lines {
  width: calc(100% - 48px);
  margin: 28px 24px 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  overflow: hidden;
  border: 1px solid var(--gs-line);
  border-radius: 7px;
}

.gs-quote-lines th {
  padding: 16px 16px;
  background: linear-gradient(135deg, var(--gs-navy), #020b18);
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.gs-quote-lines th:nth-child(1),
.gs-quote-lines td:nth-child(1) {
  width: 72px;
  text-align: center;
}

.gs-quote-lines th:nth-child(3),
.gs-quote-lines td:nth-child(3) {
  width: 140px;
  text-align: center;
}

.gs-quote-lines th:nth-child(4),
.gs-quote-lines td:nth-child(4),
.gs-quote-lines th:nth-child(5),
.gs-quote-lines td:nth-child(5) {
  width: 110px;
  text-align: center;
}

.gs-quote-lines th:nth-child(6),
.gs-quote-lines td:nth-child(6) {
  width: 160px;
  text-align: right;
}

.gs-quote-lines td {
  min-height: 78px;
  padding: 18px 16px;
  border-right: 1px solid var(--gs-line);
  border-top: 1px solid var(--gs-line);
  color: var(--gs-ink);
  font-size: 18px;
  vertical-align: middle;
}

.gs-quote-lines td:last-child,
.gs-quote-lines th:last-child {
  border-right: 0;
}

.gs-quote-lines td:nth-child(1) b {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: var(--gs-red);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.gs-quote-lines td:nth-child(2) strong {
  display: block;
  color: var(--gs-ink);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
}

.gs-quote-lines td:nth-child(2) small {
  display: block;
  margin-top: 8px;
  color: #25344a;
  font-size: 14px;
  font-weight: 600;
}

.gs-quote-lines td:nth-child(6) {
  color: var(--gs-red);
  font-weight: 900;
}

.gs-quote-amounts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 490px;
  gap: 34px;
  padding: 32px 28px 22px;
}

.gs-quote-words {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 18px;
}

.gs-quote-words i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--gs-ink);
}

.gs-quote-words span {
  display: block;
  margin-bottom: 7px;
  color: #243650;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gs-quote-words strong {
  display: block;
  color: var(--gs-ink);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 900;
}

.gs-quote-totals {
  display: grid;
  gap: 14px;
}

.gs-quote-totals > div:not(.gs-grand-row) {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 20px;
  align-items: center;
  color: #111827;
  font-size: 18px;
}

.gs-quote-totals > div:not(.gs-grand-row) span {
  text-align: right;
}

.gs-quote-totals > div:not(.gs-grand-row) strong {
  text-align: right;
  font-weight: 900;
}

.gs-grand-row {
  display: grid;
  grid-template-columns: 150px 120px max-content;
  justify-content: end;
  margin-top: 8px;
  overflow: visible;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--gs-navy), #020b18);
  color: #fff;
}

.gs-grand-row span,
.gs-grand-row em,
.gs-grand-row strong {
  padding: 15px 18px;
  color: #fff;
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.gs-grand-row strong {
  position: relative;
  width: max-content;
  min-width: 235px;
  background: var(--gs-red);
  font-size: 21px;
  text-align: right;
  white-space: nowrap;
}

.gs-grand-row strong::before {
  display: none;
}

.gs-quote-boxes {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 28px;
  padding: 0 28px 20px;
}

.gs-terms-box,
.gs-accept-box {
  min-height: 170px;
  border: 1px solid var(--gs-line);
  border-radius: 9px;
  padding: 24px 26px;
}

.gs-terms-box h2,
.gs-accept-box h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--gs-ink);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gs-terms-box h2 i,
.gs-accept-box h2 i {
  color: var(--gs-red);
}

.gs-terms-box ul {
  margin: 0;
  padding-left: 19px;
}

.gs-terms-box li,
.gs-terms-box p,
.gs-accept-box span,
.gs-accept-box strong {
  color: var(--gs-ink);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

.gs-sign-line {
  height: 64px;
  margin: 22px 0 10px;
  border-bottom: 2px solid var(--gs-navy);
}

.gs-quote-bottom {
  display: grid;
  grid-template-columns: 1.1fr 1.35fr 1fr;
  gap: 18px;
  padding: 0 28px 20px;
}

.gs-quote-bottom > div {
  display: grid;
  align-content: center;
  min-height: 80px;
  border-radius: 8px;
  background: #fff;
  padding: 16px 22px;
}

.gs-quote-bottom span {
  color: #243650;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gs-quote-bottom strong,
.gs-quote-bottom small {
  color: var(--gs-ink);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
}

.gs-thanks {
  text-align: center;
}

.gs-thanks strong {
  color: var(--gs-red);
  font-size: 18px;
}

.gs-quote-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 14px 14px;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--gs-navy), #020b18);
  padding: 16px 42px 16px 86px;
}

.gs-quote-footer::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 0;
  width: 72px;
  height: 100%;
  background: var(--gs-red);
  transform: skewX(-10deg);
}

.gs-quote-footer span,
.gs-quote-footer strong {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

@media print {
  body.printing-quotation .modal-shell > *:not(.modal-body),
  body.printing-quotation .modal-body > *:not(.gs-quote-sheet),
  body.printing-quotation .app-shell,
  body.printing-quotation .modal-title,
  body.printing-quotation .modal-actions {
    display: none !important;
  }

  body.printing-quotation .modal-overlay,
  body.printing-quotation .modal-shell,
  body.printing-quotation .modal-body {
    position: static !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  body.printing-quotation .gs-quote-sheet {
    width: 287mm !important;
    max-width: 287mm !important;
    min-height: 200mm !important;
    margin: 0 auto !important;
    border-radius: 2mm !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    transform: scale(0.72);
    transform-origin: top center;
  }
}

/* Final fit-to-window pass for CRM and quotation screens. */
.crm-record-searchbar {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-record-searchbar input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 9px 12px;
  font-weight: 700;
}

.crm-record-search-button {
  flex: 0 0 42px;
  width: 42px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
}

.crm-record-search-button:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #f8fbff;
}

.crm-record-search-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.crm-search-result-note {
  min-height: 18px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.crm-searchable-list .fit-register {
  max-width: 100%;
}

.crm-searchable-list .fit-register table {
  table-layout: auto;
  min-width: 980px;
}

.crm-searchable-list th,
.crm-searchable-list td {
  max-width: 220px;
}

.pro-dashboard {
  padding: 14px 16px 18px !important;
  gap: 14px !important;
}

.pro-header-strip {
  min-height: 66px !important;
  padding: 10px 16px !important;
  gap: 14px !important;
}

.pro-price-strip {
  min-height: 58px !important;
  padding: 10px 16px !important;
  gap: 18px !important;
  grid-template-columns: 150px minmax(220px, 1fr) minmax(140px, auto) minmax(140px, auto) minmax(170px, auto) !important;
}

.pro-price-strip strong {
  font-size: 18px !important;
  white-space: nowrap !important;
}

.pro-price-strip b {
  font-size: 20px !important;
  white-space: nowrap !important;
}

.pro-price-strip span,
.pro-price-strip small,
.pro-price-strip em {
  white-space: nowrap !important;
}

.pro-brand-row {
  padding: 18px 22px !important;
  gap: 14px !important;
}

.pro-kpi-grid {
  gap: 14px !important;
}

.pro-kpi-card {
  min-height: 100px !important;
  padding: 16px 18px !important;
  grid-template-columns: 48px minmax(0, 1fr) 74px !important;
}

.pro-kpi-card strong {
  font-size: 24px !important;
}

.pro-kpi-card small,
.pro-kpi-card span {
  font-size: 12px !important;
}

.pro-dashboard-grid {
  grid-template-columns: minmax(440px, 1.15fr) minmax(320px, 0.85fr) minmax(310px, 0.8fr) !important;
  gap: 14px !important;
}

.pro-panel {
  padding: 16px !important;
  border-radius: 9px !important;
}

.pro-panel-head {
  margin-bottom: 12px !important;
}

.pro-stage-grid {
  gap: 8px !important;
}

.pro-stage-tile {
  min-height: 58px !important;
  padding: 9px 10px !important;
}

.pro-stage-tile small {
  font-size: 11px !important;
}

.pro-dashboard .pipeline-stage-details {
  padding: 10px !important;
}

.sales-donut {
  width: 170px !important;
}

.pro-activity-row {
  grid-template-columns: 42px minmax(0, 1fr) !important;
  padding: 9px 6px !important;
}

.pro-activity-row > span {
  width: 42px !important;
  height: 42px !important;
}

.delivery-status-strip {
  gap: 8px !important;
}

.pro-empty-visual {
  min-height: 126px !important;
}

.pro-shortcut-grid {
  gap: 10px !important;
}

.pro-shortcut {
  min-height: 88px !important;
  padding: 10px 8px !important;
}

.pro-shortcut span {
  width: 38px !important;
  height: 38px !important;
}

.modal-body > .gs-quote-sheet {
  zoom: 0.72;
  max-width: none;
  transform-origin: top center;
}

.approval-screen-content + .gs-quote-sheet {
  margin-top: 10px;
}

.modal-body:has(> .gs-quote-sheet) {
  overflow: auto;
}

.quotation-form-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.quotation-form-topline .ghost-button {
  flex: 0 0 auto;
  padding: 8px 12px;
}

.crm-empty-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 96px;
}

.crm-page .pro-dashboard,
.crm-dashboard .pro-dashboard {
  max-width: 100%;
  overflow-x: hidden;
}

.crm-page .pro-panel,
.crm-dashboard .pro-panel {
  min-width: 0;
}

.crm-page .table-wrap,
.crm-dashboard .table-wrap {
  max-width: 100%;
}

.pro-market-bar {
  grid-template-columns: 136px minmax(190px, 1fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) minmax(150px, 0.7fr) !important;
  min-height: 64px !important;
  border-radius: 0 !important;
}

.market-price-card {
  min-height: 64px !important;
  padding: 10px 12px !important;
}

.market-price-card span {
  font-size: 10px !important;
}

.market-price-card b,
.market-price-card svg {
  width: 28px !important;
  height: 28px !important;
}

.market-title,
.market-quote,
.market-weather {
  padding: 0 14px !important;
  min-width: 0 !important;
}

.market-title strong {
  font-size: 17px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.market-quote strong {
  font-size: 20px !important;
}

.market-quote em {
  font-size: 10px !important;
}

.market-weather > span {
  width: 34px !important;
  height: 34px !important;
}

.market-weather b {
  font-size: 15px !important;
}

.pro-company-row {
  padding: 14px 16px !important;
}

.pro-company-brand .greenland-logo-mark {
  transform: scale(0.9);
  transform-origin: left center;
}

.pro-company-actions .button,
.pro-company-actions .dark-action,
.pro-company-actions .date-chip {
  padding: 9px 12px !important;
}

@media (max-width: 1500px) {
  .pro-dashboard-grid {
    grid-template-columns: minmax(430px, 1.1fr) minmax(310px, 0.9fr) !important;
  }

  .recent-activity {
    grid-column: span 2;
  }
}

@media (max-width: 1180px) {
  .pro-price-strip,
  .pro-dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  .pro-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Final fit and print overrides - 2026-05-25 */
:root {
  --fit-sidebar: 210px;
}

.app-shell {
  grid-template-columns: var(--fit-sidebar) minmax(0, 1fr) !important;
}

.sidebar {
  width: var(--fit-sidebar) !important;
  min-width: var(--fit-sidebar) !important;
}

.main,
.view,
.modal-body,
.table-scroll {
  min-width: 0 !important;
}

.view {
  padding: 12px 14px !important;
}

.topbar {
  min-height: 52px !important;
  padding: 8px 14px !important;
}

.topbar h1 {
  font-size: 20px !important;
  line-height: 1.12 !important;
}

.topbar .button,
.topbar .ghost-button,
.topbar .date-chip,
.topbar .role-chip,
.topbar .save-chip {
  min-height: 32px !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
}

.ops-dashboard,
.pro-dashboard {
  max-width: 100% !important;
  overflow-x: hidden !important;
  padding: 10px 12px 14px !important;
  gap: 10px !important;
}

.ops-command-top,
.pro-company-row {
  padding: 8px 10px !important;
  gap: 10px !important;
}

.pro-market-bar,
.ops-market-strip {
  min-height: 54px !important;
  height: auto !important;
  grid-template-columns: 112px minmax(170px, 1fr) minmax(130px, .7fr) minmax(130px, .7fr) minmax(120px, .55fr) !important;
  gap: 8px !important;
  padding: 7px 10px !important;
  overflow: hidden !important;
}

.market-price-card {
  min-height: 50px !important;
  padding: 7px 10px !important;
  border-radius: 7px !important;
}

.market-price-card span,
.market-title small,
.market-quote span,
.market-quote em,
.market-weather small {
  font-size: 9px !important;
  line-height: 1.1 !important;
}

.market-title strong {
  max-width: 250px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 15px !important;
}

.market-quote strong {
  font-size: 17px !important;
  line-height: 1.05 !important;
}

.market-weather > span {
  width: 28px !important;
  height: 28px !important;
}

.market-weather strong {
  font-size: 11px !important;
}

.market-weather b {
  font-size: 13px !important;
}

.pro-company-brand .greenland-logo-mark {
  transform: scale(.78) !important;
  transform-origin: left center !important;
}

.pro-company-name strong,
.ops-command-title h2 {
  font-size: 17px !important;
  line-height: 1.15 !important;
}

.pro-company-actions .button,
.pro-company-actions .dark-action,
.pro-company-actions .date-chip {
  padding: 7px 10px !important;
  min-height: 32px !important;
  font-size: 12px !important;
}

.pro-kpi-grid,
.ops-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.pro-kpi-card,
.ops-kpi-card {
  min-height: 78px !important;
  padding: 10px 12px !important;
  grid-template-columns: 36px minmax(0, 1fr) 54px !important;
}

.pro-kpi-card > span,
.ops-kpi-icon {
  width: 36px !important;
  height: 36px !important;
}

.pro-kpi-card strong,
.ops-kpi-card strong {
  font-size: 19px !important;
  line-height: 1.05 !important;
}

.pro-kpi-card small,
.pro-kpi-card b,
.ops-kpi-card span,
.ops-kpi-card small {
  font-size: 10px !important;
  line-height: 1.15 !important;
}

.pro-dashboard-grid,
.ops-layout {
  grid-template-columns: minmax(360px, 1.15fr) minmax(280px, .85fr) minmax(260px, .75fr) !important;
  gap: 10px !important;
}

.pro-panel,
.ops-panel {
  padding: 12px !important;
  border-radius: 8px !important;
}

.pro-panel-head,
.ops-panel-head {
  margin-bottom: 8px !important;
}

.pro-panel-head h2,
.ops-panel-head h2 {
  font-size: 16px !important;
}

.pro-stage-grid {
  gap: 7px !important;
}

.pro-stage-tile {
  min-height: 48px !important;
  padding: 7px 9px !important;
}

.pro-stage-tile strong {
  font-size: 14px !important;
}

.pro-stage-tile small {
  font-size: 10px !important;
}

.pro-dashboard .pipeline-stage-details {
  padding: 8px !important;
}

.sales-donut {
  width: 132px !important;
  max-width: 132px !important;
}

.pro-activity-row,
.ops-activity-row {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  padding: 7px 4px !important;
}

.pro-activity-row > span,
.ops-activity-row > span {
  width: 34px !important;
  height: 34px !important;
}

.pro-shortcut,
.ops-action-card {
  min-height: 74px !important;
  padding: 8px 6px !important;
}

.pro-shortcut span,
.ops-action-card > span {
  width: 32px !important;
  height: 32px !important;
}

.crm-stage-table,
.crm-record-table,
.data-table {
  table-layout: auto !important;
  width: 100% !important;
}

.crm-stage-table th,
.crm-stage-table td,
.crm-record-table th,
.crm-record-table td,
.data-table th,
.data-table td {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
}

.crm-stage-table .action-cell,
.crm-record-table .action-cell,
.data-table .action-cell {
  white-space: nowrap !important;
  overflow: visible !important;
}

.modal-body > .gs-quote-sheet {
  transform: scale(.695) !important;
  transform-origin: top center !important;
  margin: 0 auto !important;
}

@media (max-width: 1500px) {
  .pro-dashboard-grid,
  .ops-layout {
    grid-template-columns: minmax(360px, 1fr) minmax(300px, .9fr) !important;
  }

  .recent-activity,
  .pro-shortcuts-panel,
  .ops-actions-panel {
    grid-column: auto !important;
  }
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr) !important;
  }

  .sidebar {
    width: 190px !important;
    min-width: 190px !important;
  }

  .pro-kpi-grid,
  .ops-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .pro-dashboard-grid,
  .ops-layout {
    grid-template-columns: 1fr !important;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 5mm;
  }

  body.printing-quotation {
    width: 210mm !important;
    height: 297mm !important;
    overflow: hidden !important;
  }

  body.printing-quotation .gs-quote-sheet {
    width: 286mm !important;
    max-width: 286mm !important;
    min-height: 200mm !important;
    margin: 0 !important;
    transform: scale(.695) !important;
    transform-origin: top left !important;
    box-shadow: none !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}
/* Quotation preview fit correction - 2026-05-25 */
.modal-body > .gs-quote-sheet,
.approval-screen-content + .gs-quote-sheet {
  transform: none !important;
  zoom: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 10px auto 0 !important;
}

.modal-body:has(> .gs-quote-sheet) {
  overflow-x: hidden !important;
}

@media screen {
  .gs-quote-sheet {
    max-width: min(1160px, 100%) !important;
  }
}

@media print {
  body.printing-quotation .modal-body > .gs-quote-sheet,
  body.printing-quotation .approval-screen-content + .gs-quote-sheet,
  body.printing-quotation .gs-quote-sheet {
    width: 286mm !important;
    max-width: 286mm !important;
    margin: 0 !important;
    transform: scale(.695) !important;
    transform-origin: top left !important;
    zoom: 1 !important;
  }
}
/* Professional ERP/CRM dashboard layout correction - 2026-05-25 */
html,
body {
  overflow-x: hidden !important;
}

:root {
  --fit-sidebar: 190px;
}

.app-shell {
  grid-template-columns: var(--fit-sidebar) minmax(0, 1fr) !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

.sidebar {
  width: var(--fit-sidebar) !important;
  min-width: var(--fit-sidebar) !important;
}

.sidebar .brand {
  padding: 10px 12px !important;
}

.sidebar .brand-logo {
  max-width: 150px !important;
}

.nav button {
  min-height: 38px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
}

.main {
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body[data-view="dashboard"] .view,
.view:has(.pro-dashboard) {
  padding: 0 18px 22px !important;
  overflow-x: hidden !important;
}

.ops-dashboard,
.pro-dashboard {
  width: 100% !important;
  max-width: 100% !important;
  gap: 14px !important;
  padding: 0 0 16px !important;
  overflow-x: hidden !important;
}

.ops-command-top {
  grid-template-columns: minmax(340px, .9fr) minmax(540px, 1.35fr) minmax(260px, auto) !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 -18px 12px !important;
  padding: 12px 18px !important;
}

.ops-command-title {
  min-width: 0 !important;
}

.ops-command-title h2 {
  font-size: 20px !important;
  line-height: 1.12 !important;
  white-space: nowrap !important;
}

.ops-command-title p {
  font-size: 12px !important;
  white-space: nowrap !important;
}

.ops-market-strip {
  display: grid !important;
  grid-template-columns: minmax(150px, 1fr) minmax(112px, auto) minmax(96px, auto) minmax(126px, auto) minmax(106px, auto) !important;
  min-width: 0 !important;
  min-height: 54px !important;
  padding: 9px 12px !important;
  gap: 12px !important;
  overflow: hidden !important;
}

.ops-market-strip span,
.ops-market-strip strong,
.ops-market-strip em {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ops-market-strip span {
  font-size: 13px !important;
}

.ops-market-strip strong {
  font-size: 18px !important;
}

.ops-market-strip em {
  font-size: 11px !important;
}

.ops-top-actions {
  min-width: 250px !important;
}

.ops-kpi-grid {
  grid-template-columns: repeat(5, minmax(170px, 1fr)) !important;
  gap: 14px !important;
}

.ops-kpi-card {
  min-height: 112px !important;
  padding: 16px 18px 20px !important;
  grid-template-columns: 54px minmax(0, 1fr) 18px !important;
  gap: 12px !important;
  overflow: hidden !important;
}

.ops-kpi-card::before,
.ops-kpi-card b {
  left: 18px !important;
  right: 18px !important;
  bottom: 12px !important;
}

.ops-kpi-icon {
  width: 54px !important;
  height: 54px !important;
}

.ops-kpi-body {
  gap: 6px !important;
}

.ops-kpi-card small {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.ops-kpi-card strong {
  font-size: 23px !important;
  line-height: 1.1 !important;
}

.ops-kpi-card em {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.ops-layout {
  grid-template-columns: minmax(500px, 1.05fr) minmax(420px, .95fr) !important;
  grid-template-areas:
    "approval attendance"
    "compliance actions"
    "activity reminders"
    "help help" !important;
  gap: 14px !important;
}

.ops-approval-panel { grid-area: approval !important; }
.ops-attendance-panel { grid-area: attendance !important; }
.ops-compliance-panel { grid-area: compliance !important; }
.ops-actions-panel { grid-area: actions !important; }
.ops-activity-panel { grid-area: activity !important; }
.ops-reminders-panel { grid-area: reminders !important; }
.ops-help-panel { grid-area: help !important; }

.ops-panel {
  padding: 16px !important;
  border-radius: 12px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.ops-panel-head h2 {
  font-size: 18px !important;
  line-height: 1.2 !important;
}

.ops-empty-state {
  min-height: 190px !important;
}

.ops-attendance-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.ops-attendance-stats button {
  min-height: 72px !important;
  padding: 12px !important;
  overflow: hidden !important;
}

.ops-attendance-body {
  grid-template-columns: 210px minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
}

.ops-donut {
  width: 148px !important;
  height: 148px !important;
  margin: 0 auto !important;
}

.ops-compliance-row {
  min-height: 70px !important;
  padding: 12px 14px !important;
}

.ops-compliance-row > div,
.ops-list-row > span,
.ops-activity-row > div {
  min-width: 0 !important;
}

.ops-compliance-row strong,
.ops-compliance-row small,
.ops-list-row strong,
.ops-list-row small,
.ops-activity-row strong,
.ops-activity-row small {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ops-actions-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.ops-action-card {
  min-height: 84px !important;
  padding: 12px !important;
  align-items: center !important;
}

.ops-action-card > span {
  width: 38px !important;
  height: 38px !important;
}

.ops-action-card strong {
  font-size: 13px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.ops-action-card small {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

/* CRM dashboard should not overlap either. */
.pro-dashboard {
  padding: 0 0 18px !important;
}

.pro-market-bar {
  display: grid !important;
  grid-template-columns: 128px minmax(250px, 1fr) minmax(165px, auto) minmax(180px, auto) minmax(210px, auto) !important;
  min-height: 72px !important;
  gap: 16px !important;
  padding: 10px 20px !important;
}

.pro-company-row {
  grid-template-columns: minmax(440px, 1fr) auto !important;
  padding: 14px 18px !important;
  gap: 14px !important;
}

.pro-company-brand .greenland-logo-mark {
  transform: none !important;
}

.pro-kpi-grid {
  grid-template-columns: repeat(5, minmax(170px, 1fr)) !important;
  gap: 14px !important;
}

.pro-kpi-card {
  min-height: 104px !important;
  padding: 14px 16px !important;
  grid-template-columns: 46px minmax(0, 1fr) 74px !important;
}

.pro-dashboard-grid {
  grid-template-columns: minmax(470px, 1fr) minmax(340px, .78fr) minmax(330px, .72fr) !important;
  gap: 14px !important;
}

.pro-panel {
  padding: 16px !important;
  overflow: hidden !important;
}

.pro-stage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.pro-stage-tile {
  min-height: 64px !important;
  padding: 11px 13px !important;
}

.pro-dashboard .pipeline-stage-details {
  padding: 12px !important;
  overflow: hidden !important;
}

.pro-dashboard .crm-stage-table {
  table-layout: fixed !important;
}

.pro-dashboard .crm-stage-table th,
.pro-dashboard .crm-stage-table td {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.pro-dashboard .crm-stage-table th:last-child,
.pro-dashboard .crm-stage-table td:last-child {
  width: 92px !important;
  overflow: visible !important;
}

@media (max-width: 1500px) {
  .ops-command-top {
    grid-template-columns: 1fr !important;
  }

  .ops-top-actions {
    justify-content: flex-start !important;
  }

  .ops-kpi-grid,
  .pro-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .ops-layout,
  .pro-dashboard-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
  }

  .ops-approval-panel,
  .ops-attendance-panel,
  .ops-compliance-panel,
  .ops-actions-panel,
  .ops-activity-panel,
  .ops-reminders-panel,
  .ops-help-panel {
    grid-area: auto !important;
  }

  .pro-market-bar {
    grid-template-columns: 120px 1fr 150px 150px !important;
  }

  .market-weather {
    display: none !important;
  }
}

/* ERP/CRM command-center final sizing pass - 2026-05-25 */
:root {
  --command-sidebar: 192px;
  --command-gap: 12px;
  --command-card-radius: 10px;
}

html,
body,
.app-shell,
.main,
.view {
  max-width: 100vw !important;
}

body {
  overflow-x: hidden !important;
}

.app-shell {
  grid-template-columns: var(--command-sidebar) minmax(0, 1fr) !important;
}

.sidebar {
  width: var(--command-sidebar) !important;
  min-width: var(--command-sidebar) !important;
}

.main,
.view {
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body[data-view="dashboard"] .topbar,
body[data-view="crm"] .topbar {
  min-height: 50px !important;
  padding: 7px 14px !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .topbar h1,
body[data-view="crm"] .topbar h1 {
  font-size: 20px !important;
  line-height: 1.1 !important;
}

body[data-view="dashboard"] .view,
body[data-view="crm"] .view,
.view:has(.pro-dashboard) {
  padding: 0 12px 18px !important;
}

body[data-view="dashboard"] .ops-dashboard,
body[data-view="crm"] .pro-dashboard,
.view:has(.pro-dashboard) .pro-dashboard {
  gap: var(--command-gap) !important;
  padding-bottom: 14px !important;
}

body[data-view="dashboard"] .ops-command-top {
  grid-template-columns: minmax(280px, .82fr) minmax(500px, 1.35fr) minmax(250px, auto) !important;
  gap: var(--command-gap) !important;
  margin: 0 -12px 10px !important;
  padding: 10px 14px !important;
  min-height: 68px !important;
}

body[data-view="dashboard"] .ops-command-title {
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .ops-command-title > span {
  width: 40px !important;
  height: 40px !important;
}

body[data-view="dashboard"] .ops-command-title h2 {
  font-size: 18px !important;
}

body[data-view="dashboard"] .ops-command-title p {
  font-size: 11px !important;
}

body[data-view="dashboard"] .ops-market-strip {
  grid-template-columns: minmax(150px, 1fr) minmax(122px, auto) minmax(118px, auto) minmax(138px, auto) minmax(118px, auto) !important;
  min-height: 48px !important;
  padding: 8px 12px !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .ops-market-strip span {
  max-width: 185px !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .ops-market-strip strong {
  font-size: 18px !important;
  letter-spacing: 0 !important;
}

body[data-view="dashboard"] .ops-market-strip em {
  font-size: 10px !important;
}

body[data-view="dashboard"] .ops-top-actions {
  min-width: 250px !important;
  gap: 8px !important;
}

body[data-view="dashboard"] .ops-top-actions .primary,
body[data-view="dashboard"] .ops-top-actions .ghost {
  height: 38px !important;
  padding: 0 14px !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .ops-kpi-grid,
body[data-view="crm"] .pro-kpi-grid,
.view:has(.pro-dashboard) .pro-kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr)) !important;
  gap: var(--command-gap) !important;
}

body[data-view="dashboard"] .ops-kpi-card {
  min-height: 96px !important;
  padding: 12px 14px 18px !important;
  grid-template-columns: 46px minmax(0, 1fr) 14px !important;
  border-radius: var(--command-card-radius) !important;
}

body[data-view="dashboard"] .ops-kpi-card::before,
body[data-view="dashboard"] .ops-kpi-card b {
  left: 14px !important;
  right: 14px !important;
  bottom: 10px !important;
}

body[data-view="dashboard"] .ops-kpi-icon {
  width: 46px !important;
  height: 46px !important;
}

body[data-view="dashboard"] .ops-kpi-card small,
body[data-view="dashboard"] .ops-kpi-card em {
  font-size: 10px !important;
  line-height: 1.25 !important;
}

body[data-view="dashboard"] .ops-kpi-card strong {
  font-size: 21px !important;
  line-height: 1.05 !important;
}

body[data-view="dashboard"] .ops-layout {
  display: grid !important;
  grid-template-columns: minmax(470px, 1.1fr) minmax(420px, .9fr) !important;
  grid-template-areas:
    "approval attendance"
    "compliance actions"
    "activity reminders"
    "help help" !important;
  gap: var(--command-gap) !important;
}

body[data-view="dashboard"] .ops-panel {
  padding: 14px !important;
  border-radius: var(--command-card-radius) !important;
}

body[data-view="dashboard"] .ops-panel-head {
  margin-bottom: 10px !important;
}

body[data-view="dashboard"] .ops-panel-head h2 {
  font-size: 17px !important;
}

body[data-view="dashboard"] .ops-empty-state {
  min-height: 170px !important;
}

body[data-view="dashboard"] .ops-attendance-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-view="dashboard"] .ops-attendance-stats button {
  min-height: 64px !important;
  padding: 10px !important;
}

body[data-view="dashboard"] .ops-attendance-stats strong {
  font-size: 19px !important;
}

body[data-view="dashboard"] .ops-attendance-stats small {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .ops-attendance-body {
  grid-template-columns: 160px minmax(0, 1fr) !important;
  gap: 12px !important;
  min-height: 150px !important;
}

body[data-view="dashboard"] .ops-donut {
  width: 130px !important;
  height: 130px !important;
}

body[data-view="dashboard"] .ops-actions-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 9px !important;
}

body[data-view="dashboard"] .ops-action-card {
  min-height: 78px !important;
  padding: 10px !important;
}

body[data-view="dashboard"] .ops-action-card strong,
body[data-view="dashboard"] .ops-action-card small {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .ops-compliance-row,
body[data-view="dashboard"] .ops-activity-row,
body[data-view="dashboard"] .ops-list-row {
  min-width: 0 !important;
}

body[data-view="crm"] .pro-market-bar,
.view:has(.pro-dashboard) .pro-market-bar {
  grid-template-columns: 118px minmax(260px, 1fr) minmax(140px, auto) minmax(160px, auto) minmax(190px, auto) !important;
  min-height: 66px !important;
  padding: 9px 16px !important;
  gap: 14px !important;
}

body[data-view="crm"] .pro-company-row,
.view:has(.pro-dashboard) .pro-company-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  padding: 12px 16px !important;
  gap: 12px !important;
}

body[data-view="crm"] .pro-company-brand,
.view:has(.pro-dashboard) .pro-company-brand {
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-view="crm"] .pro-company-brand strong,
.view:has(.pro-dashboard) .pro-company-brand strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="crm"] .pro-kpi-card,
.view:has(.pro-dashboard) .pro-kpi-card {
  min-height: 92px !important;
  padding: 12px 14px !important;
  grid-template-columns: 42px minmax(0, 1fr) 58px !important;
  border-radius: var(--command-card-radius) !important;
}

body[data-view="crm"] .pro-dashboard-grid,
.view:has(.pro-dashboard) .pro-dashboard-grid {
  grid-template-columns: minmax(470px, 1.1fr) minmax(360px, .9fr) minmax(330px, .8fr) !important;
  gap: var(--command-gap) !important;
}

body[data-view="crm"] .pro-panel,
.view:has(.pro-dashboard) .pro-panel {
  padding: 14px !important;
  border-radius: var(--command-card-radius) !important;
}

body[data-view="crm"] .pro-stage-grid,
.view:has(.pro-dashboard) .pro-stage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-view="crm"] .pro-stage-tile,
.view:has(.pro-dashboard) .pro-stage-tile {
  min-height: 58px !important;
  padding: 10px 12px !important;
}

body[data-view="crm"] .crm-stage-table,
.view:has(.pro-dashboard) .crm-stage-table {
  width: 100% !important;
  table-layout: fixed !important;
}

body[data-view="crm"] .crm-stage-table th,
body[data-view="crm"] .crm-stage-table td,
.view:has(.pro-dashboard) .crm-stage-table th,
.view:has(.pro-dashboard) .crm-stage-table td {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 1680px) {
  :root {
    --command-sidebar: 178px;
  }

  body[data-view="dashboard"] .ops-command-top {
    grid-template-columns: minmax(250px, .7fr) minmax(460px, 1.2fr) minmax(220px, auto) !important;
  }

  body[data-view="dashboard"] .ops-market-strip {
    grid-template-columns: minmax(120px, 1fr) minmax(98px, auto) minmax(90px, auto) minmax(112px, auto) minmax(90px, auto) !important;
    gap: 8px !important;
  }

  body[data-view="dashboard"] .ops-market-strip span {
    max-width: 150px !important;
  }

  body[data-view="dashboard"] .ops-kpi-card {
    min-height: 90px !important;
  }

  body[data-view="dashboard"] .ops-layout,
  body[data-view="crm"] .pro-dashboard-grid,
  .view:has(.pro-dashboard) .pro-dashboard-grid {
    grid-template-columns: minmax(430px, 1fr) minmax(360px, .9fr) !important;
  }

  body[data-view="crm"] .recent-activity,
  .view:has(.pro-dashboard) .recent-activity {
    grid-column: auto !important;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body[data-view="dashboard"] .ops-command-top,
  body[data-view="dashboard"] .ops-layout,
  body[data-view="crm"] .pro-dashboard-grid,
  .view:has(.pro-dashboard) .pro-dashboard-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
  }

  body[data-view="dashboard"] .ops-kpi-grid,
  body[data-view="crm"] .pro-kpi-grid,
  .view:has(.pro-dashboard) .pro-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* A4 print fit and quotation alignment pass - 2026-05-26 */
.modal-body > .gs-quote-sheet,
.approval-screen-content + .gs-quote-sheet {
  width: min(980px, 100%) !important;
  max-width: min(980px, 100%) !important;
  transform: none !important;
  zoom: 1 !important;
}

.gs-quote-parties {
  grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr)) !important;
}

.gs-party-card {
  min-width: 0 !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  column-gap: 12px !important;
  padding: 18px 20px !important;
}

.gs-party-card strong,
.gs-party-card small {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

.gs-party-card:nth-child(2) strong,
.gs-party-card:nth-child(2) small,
.gs-party-card:nth-child(3) small,
.gs-party-card:nth-child(4) small {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.gs-party-card:nth-child(3) strong,
.gs-party-card:nth-child(4) strong {
  line-height: 1.15 !important;
}

.gs-quote-lines th,
.gs-quote-lines td {
  vertical-align: middle !important;
}

.gs-quote-lines td:nth-child(2) strong {
  overflow-wrap: anywhere !important;
}

.gs-quote-lines td:nth-child(3),
.gs-quote-lines td:nth-child(4),
.gs-quote-lines td:nth-child(5),
.gs-quote-lines td:nth-child(6) {
  white-space: nowrap !important;
}

@page {
  size: A4 portrait;
  margin: 6mm;
}

@media print {
  html,
  body {
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  body {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .app-shell,
  .topbar,
  .sidebar,
  .modal-header,
  .modal-actions,
  .toast,
  .notification-panel {
    display: none !important;
  }

  .modal,
  .modal-panel,
  .modal-body,
  .approval-screen-content,
  .print-area,
  .quotation-print-sheet,
  .pro-quotation-print,
  .gs-quote-sheet {
    overflow: visible !important;
    box-shadow: none !important;
  }

  .gs-quote-sheet {
    width: 198mm !important;
    max-width: 198mm !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 285mm !important;
    margin: 0 auto !important;
    border-radius: 3mm !important;
    transform: none !important;
    zoom: 1 !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .gs-quote-head {
    grid-template-columns: 42mm minmax(0, 1fr) 54mm !important;
    min-height: 34mm !important;
  }

  .gs-quote-logo-block,
  .gs-quote-company-block {
    padding: 7mm 6mm !important;
  }

  .gs-quote-logo-block .greenland-logo-mark {
    grid-template-columns: 13mm 1fr !important;
    gap: 1.8mm 2.6mm !important;
  }

  .gs-quote-logo-block .greenland-logo-symbol {
    width: 12mm !important;
    height: 12mm !important;
    border-radius: 2.3mm !important;
    font-size: 8mm !important;
  }

  .gs-quote-logo-block .greenland-logo-left strong {
    font-size: 5.3mm !important;
    line-height: 0.95 !important;
  }

  .gs-quote-logo-block .greenland-logo-left b {
    font-size: 5.9mm !important;
    line-height: 0.95 !important;
  }

  .gs-quote-logo-block .greenland-logo-right {
    padding-top: 1.6mm !important;
  }

  .gs-quote-logo-block .greenland-logo-right span {
    font-size: 1.9mm !important;
    letter-spacing: 1.1mm !important;
  }

  .gs-quote-company-block {
    gap: 1.2mm !important;
  }

  .gs-quote-company-block h1 {
    margin-bottom: 1.5mm !important;
    font-size: 5mm !important;
    line-height: 1.05 !important;
  }

  .gs-quote-company-block strong,
  .gs-quote-company-block span {
    font-size: 2.45mm !important;
    line-height: 1.2 !important;
  }

  .gs-quote-title-block {
    gap: 3mm !important;
    padding: 6mm 5mm 6mm 10mm !important;
  }

  .gs-quote-title-block span {
    font-size: 6mm !important;
  }

  .gs-quote-title-block strong {
    padding-top: 4mm !important;
    font-size: 9mm !important;
  }

  .gs-quote-title-block small {
    font-size: 2.8mm !important;
  }

  .gs-quote-parties {
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)) !important;
  }

  .gs-party-card {
    grid-template-columns: 7mm minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    column-gap: 2.2mm !important;
    min-height: 23mm !important;
    padding: 4.4mm 3.6mm !important;
  }

  .gs-party-card i {
    width: 6.2mm !important;
    height: 6.2mm !important;
  }

  .gs-party-card svg {
    width: 3.4mm !important;
    height: 3.4mm !important;
  }

  .gs-party-card span {
    font-size: 1.95mm !important;
    line-height: 1.1 !important;
    letter-spacing: 0.04em !important;
  }

  .gs-party-card strong {
    margin-top: 1mm !important;
    font-size: 2.75mm !important;
    line-height: 1.16 !important;
    overflow-wrap: normal !important;
  }

  .gs-party-card small {
    margin-top: 0.8mm !important;
    font-size: 2.35mm !important;
    line-height: 1.18 !important;
  }

  .gs-party-card:nth-child(2) strong,
  .gs-party-card:nth-child(2) small,
  .gs-party-card:nth-child(3) small,
  .gs-party-card:nth-child(4) small {
    white-space: nowrap !important;
  }

  .gs-quote-lines {
    width: calc(100% - 9mm) !important;
    margin: 7mm 4.5mm 0 !important;
    border-radius: 2mm !important;
  }

  .gs-quote-lines th {
    padding: 3mm 3mm !important;
    font-size: 2.2mm !important;
    line-height: 1.1 !important;
  }

  .gs-quote-lines td {
    min-height: 15mm !important;
    padding: 4mm 3mm !important;
    font-size: 3.3mm !important;
    line-height: 1.2 !important;
  }

  .gs-quote-lines th:nth-child(1),
  .gs-quote-lines td:nth-child(1) {
    width: 13mm !important;
  }

  .gs-quote-lines th:nth-child(3),
  .gs-quote-lines td:nth-child(3) {
    width: 26mm !important;
  }

  .gs-quote-lines th:nth-child(4),
  .gs-quote-lines td:nth-child(4),
  .gs-quote-lines th:nth-child(5),
  .gs-quote-lines td:nth-child(5) {
    width: 20mm !important;
  }

  .gs-quote-lines th:nth-child(6),
  .gs-quote-lines td:nth-child(6) {
    width: 29mm !important;
  }

  .gs-quote-lines td:nth-child(1) b {
    width: 7mm !important;
    height: 7mm !important;
    border-radius: 1.4mm !important;
    font-size: 3.7mm !important;
  }

  .gs-quote-lines td:nth-child(2) strong {
    font-size: 3.9mm !important;
    line-height: 1.12 !important;
  }

  .gs-quote-lines td:nth-child(2) small {
    margin-top: 1.3mm !important;
    font-size: 2.55mm !important;
    line-height: 1.15 !important;
  }

  .gs-quote-amounts {
    grid-template-columns: minmax(0, 1fr) 72mm !important;
    gap: 8mm !important;
    padding: 7mm 5mm 5mm !important;
  }

  .gs-quote-words {
    grid-template-columns: 8mm minmax(0, 1fr) !important;
    gap: 3mm !important;
  }

  .gs-quote-words i {
    width: 6.2mm !important;
    height: 6.2mm !important;
  }

  .gs-quote-words span {
    margin-bottom: 1.3mm !important;
    font-size: 2.15mm !important;
  }

  .gs-quote-words strong {
    font-size: 2.8mm !important;
    line-height: 1.22 !important;
  }

  .gs-quote-totals {
    gap: 2.4mm !important;
  }

  .gs-quote-totals > div:not(.gs-grand-row) {
    grid-template-columns: 1fr 30mm !important;
    gap: 4mm !important;
    font-size: 3mm !important;
  }

  .gs-grand-row {
    grid-template-columns: 28mm 22mm max-content !important;
    justify-content: end !important;
    margin-top: 1.5mm !important;
    border-radius: 1.7mm !important;
    overflow: visible !important;
  }

  .gs-grand-row span,
  .gs-grand-row em,
  .gs-grand-row strong {
    padding: 3.2mm 3.8mm !important;
    font-size: 3.45mm !important;
  }

  .gs-grand-row strong {
    width: max-content !important;
    min-width: 48mm !important;
    font-size: 4mm !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  .gs-quote-boxes {
    grid-template-columns: 1fr 1.08fr !important;
    gap: 6mm !important;
    padding: 0 5mm 4.8mm !important;
  }

  .gs-terms-box,
  .gs-accept-box {
    min-height: 38mm !important;
    border-radius: 2mm !important;
    padding: 5mm !important;
  }

  .gs-terms-box h2,
  .gs-accept-box h2 {
    gap: 2mm !important;
    margin-bottom: 3mm !important;
    font-size: 3mm !important;
  }

  .gs-terms-box li,
  .gs-terms-box p,
  .gs-accept-box span,
  .gs-accept-box strong {
    font-size: 2.35mm !important;
    line-height: 1.35 !important;
  }

  .gs-sign-line {
    height: 17mm !important;
    margin: 5mm 0 2mm !important;
  }

  .gs-quote-bottom {
    grid-template-columns: 1.1fr 1.35fr 1fr !important;
    gap: 4mm !important;
    padding: 0 5mm 4mm !important;
  }

  .gs-quote-bottom > div {
    min-height: 18mm !important;
    padding: 3.5mm 4mm !important;
  }

  .gs-quote-bottom span {
    font-size: 2.2mm !important;
  }

  .gs-quote-bottom strong,
  .gs-quote-bottom small {
    font-size: 2.6mm !important;
    line-height: 1.25 !important;
  }

  .gs-thanks strong {
    font-size: 2.9mm !important;
  }

  .gs-quote-footer {
    margin: 0 3mm 3mm !important;
    border-radius: 1.7mm !important;
    padding: 3.5mm 10mm 3.5mm 18mm !important;
  }

  .gs-quote-footer::before {
    width: 16mm !important;
  }

  .gs-quote-footer span,
  .gs-quote-footer strong {
    font-size: 2.6mm !important;
  }

  .pro-quotation-print,
  .quotation-print-sheet,
  .approval-print-sheet,
  .report-print-sheet,
  .wps-print-sheet {
    max-width: 198mm !important;
    margin: 0 auto !important;
    transform: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  table {
    page-break-inside: auto !important;
  }

  tr,
  .document-row,
  .detail-grid,
  .summary-card {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* Last word layout patch: keep command dashboards inside one viewport. */
@media screen {
  body[data-view="dashboard"],
  body[data-view="crm"] {
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .app-shell,
  body[data-view="crm"] .app-shell {
    grid-template-columns: 176px minmax(0, 1fr) !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .main,
  body[data-view="crm"] .main,
  body[data-view="dashboard"] .view,
  body[data-view="crm"] .view {
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .view,
  body[data-view="crm"] .view {
    height: calc(100vh - 42px) !important;
    padding: 7px 10px !important;
  }

  body[data-view="dashboard"] .sidebar,
  body[data-view="crm"] .sidebar {
    width: 176px !important;
    min-width: 176px !important;
    height: 100vh !important;
    padding: 7px 10px !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .brand-logo,
  body[data-view="crm"] .brand-logo {
    max-width: 146px !important;
    max-height: 48px !important;
  }

  body[data-view="dashboard"] .nav button,
  body[data-view="crm"] .nav button {
    min-height: 32px !important;
    padding: 6px 9px !important;
    font-size: 11px !important;
  }

  body[data-view="dashboard"] .topbar,
  body[data-view="crm"] .topbar {
    height: 42px !important;
    min-height: 42px !important;
    padding: 5px 10px !important;
  }

  body[data-view="dashboard"] .ops-dashboard,
  body[data-view="crm"] .pro-dashboard {
    display: grid !important;
    height: 100% !important;
    min-height: 0 !important;
    gap: 7px !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .ops-command-top {
    grid-template-columns: minmax(235px, 0.75fr) minmax(380px, 1fr) auto !important;
    min-height: 45px !important;
    height: 45px !important;
    padding: 5px 9px !important;
  }

  body[data-view="dashboard"] .ops-kpi-grid,
  body[data-view="crm"] .pro-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body[data-view="dashboard"] .ops-kpi-card,
  body[data-view="crm"] .pro-kpi-card {
    min-height: 58px !important;
    padding: 7px 10px 9px !important;
  }

  body[data-view="dashboard"] .ops-kpi-card {
    grid-template-columns: 34px minmax(0, 1fr) 10px !important;
  }

  body[data-view="dashboard"] .ops-kpi-icon,
  body[data-view="crm"] .pro-kpi-icon {
    width: 34px !important;
    height: 34px !important;
  }

  body[data-view="dashboard"] .ops-layout {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(178px, 1fr) minmax(120px, 0.68fr) minmax(70px, 0.38fr) !important;
    grid-template-areas:
      "approval approval approval attendance attendance attendance"
      "compliance compliance compliance actions actions actions"
      "activity activity reminders reminders help help" !important;
    gap: 7px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .ops-panel,
  body[data-view="crm"] .pro-panel {
    min-height: 0 !important;
    padding: 9px !important;
    overflow: hidden !important;
  }

  body[data-view="dashboard"] .ops-empty-state {
    min-height: 96px !important;
  }

  body[data-view="dashboard"] .ops-donut {
    width: 88px !important;
    height: 88px !important;
  }

  body[data-view="dashboard"] .ops-attendance-body {
    grid-template-columns: 96px minmax(0, 1fr) !important;
    min-height: 92px !important;
  }

  body[data-view="dashboard"] .ops-compliance-row,
  body[data-view="dashboard"] .ops-activity-row,
  body[data-view="dashboard"] .ops-list-row,
  body[data-view="dashboard"] .ops-action-card {
    min-height: 38px !important;
    padding: 6px 8px !important;
  }

  body[data-view="crm"] .pro-market-bar {
    grid-template-columns: 112px minmax(220px, 1fr) minmax(116px, auto) minmax(130px, auto) minmax(150px, auto) !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 5px 12px !important;
    gap: 10px !important;
  }

  body[data-view="crm"] .pro-company-row {
    height: 42px !important;
    min-height: 42px !important;
    padding: 4px 16px !important;
  }

  body[data-view="crm"] .pro-company-brand .greenland-logo-mark {
    transform: scale(0.66) !important;
    transform-origin: left center !important;
  }

  body[data-view="crm"] .pro-dashboard-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.78fr) minmax(280px, 0.72fr) !important;
    grid-template-rows: minmax(220px, 1fr) minmax(120px, 0.52fr) !important;
    gap: 7px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-view="crm"] .pro-stage-tile {
    min-height: 42px !important;
    padding: 7px 8px !important;
  }

  body[data-view="crm"] .pipeline-stage-details {
    max-height: 104px !important;
    overflow: hidden !important;
  }

  body[data-view="crm"] .crm-stage-table {
    table-layout: fixed !important;
  }

  body[data-view="crm"] .crm-stage-table th,
  body[data-view="crm"] .crm-stage-table td {
    padding: 6px 7px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

.gs-quote-logo-block .greenland-logo-right {
  display: none !important;
}

.gs-quote-logo-block .greenland-logo-mark {
  grid-template-columns: 58px minmax(0, 1fr) !important;
  grid-template-areas: "symbol wordmark" !important;
}

.gs-quote-logo-block .greenland-logo-symbol {
  grid-area: symbol !important;
}

.gs-quote-logo-block .greenland-logo-left {
  grid-area: wordmark !important;
}

.gs-quote-parties {
  grid-template-columns: minmax(270px, 1.18fr) minmax(210px, 1fr) minmax(210px, 1fr) minmax(220px, 1fr) !important;
}

.gs-party-card {
  min-height: 74px !important;
  padding: 10px 12px !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  column-gap: 9px !important;
}

.gs-party-card i {
  width: 28px !important;
  height: 28px !important;
}

.gs-party-card span,
.gs-party-card strong,
.gs-party-card small {
  white-space: nowrap !important;
}

.gs-party-card strong {
  font-size: 13px !important;
  line-height: 1.08 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

.gs-party-card small {
  font-size: 10px !important;
  line-height: 1.12 !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

@media print {
  .gs-quote-logo-block .greenland-logo-right {
    display: none !important;
  }

  .gs-quote-parties {
    grid-template-columns: 52mm 47mm 47mm 47mm !important;
  }

  .gs-party-card {
    min-height: 18mm !important;
    padding: 2.6mm 2.2mm !important;
    grid-template-columns: 5mm minmax(0, 1fr) !important;
    column-gap: 1.6mm !important;
  }

  .gs-party-card i {
    width: 5mm !important;
    height: 5mm !important;
  }

  .gs-party-card span {
    font-size: 1.65mm !important;
  }

  .gs-party-card strong {
    margin-top: 0.45mm !important;
    font-size: 2.25mm !important;
    line-height: 1.04 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  .gs-party-card small {
    margin-top: 0.45mm !important;
    font-size: 1.85mm !important;
    line-height: 1.06 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }
}

/* Final print correction: A4 quotation must print exactly inside the page. */
@page {
  size: A4 portrait;
  margin: 5mm;
}

@media print {
  html,
  body {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .modal,
  .modal-panel,
  .modal-body,
  .approval-screen-content {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .modal-header,
  .modal-actions,
  .toast,
  .notification-panel,
  .app-shell,
  .topbar,
  .sidebar {
    display: none !important;
  }

  .gs-quote-sheet,
  .gs-quote-sheet * {
    box-sizing: border-box !important;
  }

  .gs-quote-sheet {
    position: relative !important;
    display: block !important;
    width: 200mm !important;
    max-width: 200mm !important;
    height: 287mm !important;
    max-height: 287mm !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    transform: none !important;
    zoom: 1 !important;
    border-radius: 2mm !important;
    box-shadow: none !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .gs-quote-head {
    grid-template-columns: 41mm minmax(0, 96mm) 63mm !important;
    min-height: 32mm !important;
  }

  .gs-quote-logo-block,
  .gs-quote-company-block {
    padding: 5mm 4mm !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .gs-quote-logo-block .greenland-logo-mark {
    grid-template-columns: 10mm minmax(0, 1fr) !important;
    grid-template-areas: "symbol wordmark" !important;
    gap: 1.2mm 2mm !important;
    min-width: 0 !important;
  }

  .gs-quote-logo-block .greenland-logo-right {
    display: none !important;
  }

  .gs-quote-logo-block .greenland-logo-symbol {
    width: 9.5mm !important;
    height: 9.5mm !important;
    border-radius: 2mm !important;
    font-size: 6.5mm !important;
  }

  .gs-quote-logo-block .greenland-logo-left {
    min-width: 0 !important;
  }

  .gs-quote-logo-block .greenland-logo-left strong {
    font-size: 4.1mm !important;
    line-height: 0.95 !important;
    white-space: nowrap !important;
  }

  .gs-quote-logo-block .greenland-logo-left b {
    font-size: 4.6mm !important;
    line-height: 0.95 !important;
    white-space: nowrap !important;
  }

  .gs-quote-company-block {
    gap: 0.85mm !important;
  }

  .gs-quote-company-block h1 {
    margin: 0 0 1mm !important;
    font-size: 4.2mm !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }

  .gs-quote-company-block strong,
  .gs-quote-company-block span {
    font-size: 2mm !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  .gs-quote-title-block {
    min-width: 0 !important;
    padding: 5mm 5mm 5mm 9mm !important;
    gap: 2mm !important;
    overflow: hidden !important;
  }

  .gs-quote-title-block span {
    font-size: 5.8mm !important;
    white-space: nowrap !important;
  }

  .gs-quote-title-block strong {
    padding-top: 3mm !important;
    font-size: 8.2mm !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .gs-quote-title-block small {
    font-size: 2.45mm !important;
    white-space: nowrap !important;
  }

  .gs-quote-parties {
    grid-template-columns: 50mm 50mm 50mm 50mm !important;
  }

  .gs-party-card {
    min-height: 17mm !important;
    padding: 2.4mm 2.1mm !important;
    grid-template-columns: 5mm minmax(0, 1fr) !important;
    column-gap: 1.45mm !important;
    overflow: hidden !important;
  }

  .gs-party-card i {
    width: 5mm !important;
    height: 5mm !important;
  }

  .gs-party-card svg {
    width: 3mm !important;
    height: 3mm !important;
  }

  .gs-party-card span {
    font-size: 1.6mm !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .gs-party-card strong {
    margin-top: 0.45mm !important;
    font-size: 2.2mm !important;
    line-height: 1.04 !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  .gs-party-card small {
    margin-top: 0.45mm !important;
    font-size: 1.75mm !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  .gs-quote-lines {
    table-layout: fixed !important;
    width: calc(100% - 8mm) !important;
    margin: 5mm 4mm 0 !important;
    border-radius: 1.6mm !important;
  }

  .gs-quote-lines th {
    padding: 2.2mm 2.2mm !important;
    font-size: 1.8mm !important;
    line-height: 1.05 !important;
  }

  .gs-quote-lines td {
    min-height: 13mm !important;
    padding: 3mm 2.2mm !important;
    font-size: 2.65mm !important;
    line-height: 1.15 !important;
  }

  .gs-quote-lines th:nth-child(1),
  .gs-quote-lines td:nth-child(1) {
    width: 13mm !important;
  }

  .gs-quote-lines th:first-child {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .gs-quote-lines th:nth-child(3),
  .gs-quote-lines td:nth-child(3) {
    width: 24mm !important;
  }

  .gs-quote-lines th:nth-child(4),
  .gs-quote-lines td:nth-child(4),
  .gs-quote-lines th:nth-child(5),
  .gs-quote-lines td:nth-child(5) {
    width: 19mm !important;
  }

  .gs-quote-lines th:nth-child(6),
  .gs-quote-lines td:nth-child(6) {
    width: 31mm !important;
  }

  .gs-quote-lines td:nth-child(1) b {
    width: 6mm !important;
    height: 6mm !important;
    border-radius: 1.2mm !important;
    font-size: 3mm !important;
  }

  .gs-quote-lines td:nth-child(2) strong {
    font-size: 3.2mm !important;
    line-height: 1.08 !important;
  }

  .gs-quote-lines td:nth-child(2) small {
    margin-top: 1mm !important;
    font-size: 2.1mm !important;
    line-height: 1.1 !important;
  }

  .gs-quote-amounts {
    grid-template-columns: minmax(0, 1fr) 65mm !important;
    gap: 6mm !important;
    padding: 6mm 5mm 4mm !important;
  }

  .gs-quote-words {
    grid-template-columns: 6mm minmax(0, 1fr) !important;
    gap: 2mm !important;
  }

  .gs-quote-words i {
    width: 5mm !important;
    height: 5mm !important;
  }

  .gs-quote-words span {
    font-size: 1.85mm !important;
    margin-bottom: 1mm !important;
  }

  .gs-quote-words strong {
    font-size: 2.45mm !important;
    line-height: 1.18 !important;
  }

  .gs-quote-totals {
    gap: 1.6mm !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .gs-quote-totals > div:not(.gs-grand-row) {
    grid-template-columns: minmax(0, 1fr) 30mm !important;
    gap: 3mm !important;
    font-size: 2.6mm !important;
  }

  .gs-quote-totals > div:not(.gs-grand-row) strong {
    white-space: nowrap !important;
  }

  .gs-grand-row {
    grid-template-columns: 21mm 18mm max-content !important;
    width: max-content !important;
    min-width: 0 !important;
    justify-content: end !important;
    margin-top: 1.5mm !important;
    border-radius: 1.5mm !important;
    overflow: visible !important;
  }

  .gs-grand-row span,
  .gs-grand-row em,
  .gs-grand-row strong {
    min-width: 0 !important;
    padding: 2.6mm 2.4mm !important;
    font-size: 2.75mm !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  .gs-grand-row strong {
    width: max-content !important;
    min-width: 42mm !important;
    font-size: 3mm !important;
    text-align: right !important;
  }

  .gs-quote-boxes {
    grid-template-columns: 1fr 1fr !important;
    gap: 5mm !important;
    padding: 0 5mm 4mm !important;
  }

  .gs-terms-box,
  .gs-accept-box {
    min-height: 34mm !important;
    border-radius: 1.7mm !important;
    padding: 4mm !important;
  }

  .gs-terms-box h2,
  .gs-accept-box h2 {
    gap: 1.6mm !important;
    margin-bottom: 2.4mm !important;
    font-size: 2.65mm !important;
  }

  .gs-terms-box li,
  .gs-terms-box p,
  .gs-accept-box span,
  .gs-accept-box strong {
    font-size: 2.05mm !important;
    line-height: 1.25 !important;
  }

  .gs-sign-line {
    height: 15mm !important;
    margin: 4mm 0 2mm !important;
  }

  .gs-quote-bottom {
    grid-template-columns: 1.05fr 1.18fr 0.9fr !important;
    gap: 4mm !important;
    padding: 0 5mm 3.2mm !important;
  }

  .gs-quote-bottom > div {
    min-height: 16mm !important;
    padding: 3mm 3.5mm !important;
  }

  .gs-quote-bottom span {
    font-size: 1.9mm !important;
  }

  .gs-quote-bottom strong,
  .gs-quote-bottom small {
    font-size: 2.2mm !important;
    line-height: 1.18 !important;
  }

  .gs-thanks strong {
    font-size: 2.45mm !important;
  }

  .gs-quote-footer {
    margin: 0 4mm 3mm !important;
    border-radius: 1.5mm !important;
    padding: 2.7mm 8mm 2.7mm 15mm !important;
  }

  .gs-quote-footer::before {
    width: 13mm !important;
  }

  .gs-quote-footer span,
  .gs-quote-footer strong {
    font-size: 2.2mm !important;
  }
}

/* Final dashboard priority rules, kept at file end so old dashboard CSS cannot override it. */
body[data-view="dashboard"] .view:has(.erp-dashboard-clean),
body[data-view="dashboard"] .view {
  padding: 0 !important;
  background: #f8fafc !important;
  overflow-x: hidden !important;
}

body[data-view="dashboard"] .erp-dashboard-clean {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 28px !important;
  transform: none !important;
}

body[data-view="dashboard"] .erp-dashboard-clean *,
body[data-view="dashboard"] .erp-dashboard-clean *::before,
body[data-view="dashboard"] .erp-dashboard-clean *::after {
  box-sizing: border-box;
}

body[data-view="dashboard"] .erp-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body[data-view="dashboard"] .erp-main-grid {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr) !important;
}

body[data-view="dashboard"] .erp-dashboard-actions .button {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16) !important;
}

@media (max-width: 1180px) {
  body[data-view="dashboard"] .erp-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-view="dashboard"] .erp-main-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  body[data-view="dashboard"] .erp-dashboard-clean {
    padding: 16px !important;
  }

  body[data-view="dashboard"] .erp-stat-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Compact command-center dashboards. These rules are intentionally last so old dashboard styles cannot override them. */
body[data-view="dashboard"],
body[data-view="crm"] {
  overflow: hidden !important;
}

body[data-view="dashboard"] .app-shell,
body[data-view="crm"] .app-shell {
  height: 100vh !important;
  overflow: hidden !important;
  grid-template-columns: 176px minmax(0, 1fr) !important;
}

body[data-view="dashboard"] .sidebar,
body[data-view="crm"] .sidebar {
  width: 176px !important;
  min-width: 176px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .topbar,
body[data-view="crm"] .topbar {
  height: 44px !important;
  min-height: 44px !important;
  padding: 5px 12px !important;
}

body[data-view="dashboard"] .view,
body[data-view="crm"] .view {
  height: calc(100vh - 44px) !important;
  overflow: hidden !important;
  padding: 10px 12px !important;
  background: #f8fafc !important;
}

.screen-dashboard {
  --screen-navy: #0f172a;
  --screen-blue: #2563eb;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 9px;
  color: var(--screen-navy);
  overflow: hidden;
}

.screen-hero {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.screen-hero p,
.screen-hero h1,
.screen-hero span {
  margin: 0;
}

.screen-hero p {
  color: var(--screen-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.screen-hero h1 {
  margin-top: 2px;
  font-size: clamp(20px, 1.6vw, 27px);
  line-height: 1.05;
}

.screen-hero span {
  display: block;
  margin-top: 5px;
  color: #52627a;
  font-size: 13px;
}

.screen-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.screen-hero-actions > span {
  min-width: max-content;
  padding: 9px 12px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.screen-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  min-height: 78px;
}

.screen-kpi-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.screen-kpi-card:hover,
.screen-panel button:hover {
  border-color: #b9c9df;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.screen-kpi-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--screen-blue);
  background: #eff6ff;
  border-radius: 11px;
}

.screen-kpi-card b {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: clamp(20px, 1.6vw, 28px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-kpi-card em,
.screen-kpi-card small {
  display: block;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-kpi-card em {
  margin-top: 2px;
  color: #53627a;
  font-size: 12px;
  font-weight: 800;
}

.screen-kpi-card small {
  margin-top: 4px;
  color: #52627a;
  font-size: 12px;
}

.screen-grid {
  min-height: 0;
  display: grid;
  gap: 9px;
  overflow: hidden;
}

.screen-erp-grid,
.screen-crm-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr) minmax(0, .85fr);
  grid-template-rows: minmax(0, 1.05fr) minmax(0, .82fr);
}

.screen-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 13px;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.screen-panel-large {
  grid-row: span 1;
}

.screen-panel-head,
.screen-panel-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.screen-panel-head h2,
.screen-panel-subhead b {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
}

.screen-panel-head button,
.screen-panel-subhead span {
  min-width: max-content;
  padding: 7px 10px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.screen-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.screen-metric-strip.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-metric-strip button {
  min-width: 0;
  padding: 11px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
}

.screen-metric-strip b {
  display: block;
  font-size: 21px;
}

.screen-metric-strip span {
  display: block;
  overflow: hidden;
  color: #53627a;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-height: 0;
}

.screen-split article {
  min-height: 132px;
  padding: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e1e8f2;
  border-radius: 10px;
}

.screen-split h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.screen-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.screen-list-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(84px, .65fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
}

.screen-list-row.passive {
  cursor: default;
}

.screen-list-row > span:first-child {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--screen-blue);
  background: #eff6ff;
  border-radius: 9px;
}

.screen-list-row b,
.screen-list-row small,
.screen-list-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-list-row b {
  color: #0f172a;
  font-size: 13px;
}

.screen-list-row small,
.screen-list-row em {
  color: #52627a;
  font-size: 12px;
  font-style: normal;
}

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

.screen-action-grid button {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 8px;
  padding: 9px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
}

.screen-action-grid svg {
  grid-row: span 2;
  color: var(--screen-blue);
}

.screen-action-grid b,
.screen-action-grid small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-action-grid b {
  font-size: 12px;
}

.screen-action-grid small {
  color: #52627a;
  font-size: 11px;
}

.screen-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  overflow: hidden;
}

.screen-table th,
.screen-table td {
  padding: 8px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1px solid #e1e8f2;
  font-size: 12px;
}

.screen-table th {
  color: #334155;
  background: #f1f5f9;
  font-weight: 900;
  text-transform: uppercase;
}

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

.crm-price-strip {
  min-height: 44px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  text-align: left;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.crm-price-strip span {
  padding: 6px 10px;
  color: #ffffff;
  background: #0f172a;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-price-strip b {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-price-strip strong {
  font-size: 19px;
}

.crm-stage-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.crm-stage-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 2px 8px;
  padding: 9px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
}

.crm-stage-chip.active {
  border-color: #2563eb;
  background: #eff6ff;
}

.crm-stage-chip b,
.crm-stage-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-stage-chip b {
  font-size: 13px;
}

.crm-stage-chip span {
  color: #52627a;
  font-size: 11px;
  font-weight: 800;
}

.crm-stage-chip em {
  grid-row: span 2;
  align-self: center;
  justify-self: end;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: #ffffff;
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
}

.screen-summary-ring {
  width: min(160px, 70%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 6px auto 12px;
  text-align: center;
  background: radial-gradient(circle at center, #ffffff 0 48%, transparent 49%), conic-gradient(#2563eb 0 18%, #e2e8f0 18% 100%);
  border-radius: 999px;
}

.screen-summary-ring strong,
.screen-summary-ring span {
  grid-area: 1 / 1;
}

.screen-summary-ring strong {
  align-self: center;
  font-size: 17px;
}

.screen-summary-ring span {
  align-self: end;
  margin-bottom: 34%;
  color: #52627a;
  font-size: 11px;
  font-weight: 800;
}

.screen-mini-stack {
  display: grid;
  gap: 7px;
}

.screen-mini-stack span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
}

.screen-mini-stack b,
.screen-mini-stack em {
  overflow: hidden;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-note {
  margin: 8px 0 0;
  color: #52627a;
  font-size: 12px;
  line-height: 1.45;
}

.screen-dashboard .empty-state,
.screen-dashboard .empty {
  min-height: 82px !important;
  padding: 14px !important;
  display: grid !important;
  place-items: center !important;
  color: #64748b !important;
  background: #f8fafc !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

@media (max-width: 1180px) {
  body[data-view="dashboard"],
  body[data-view="crm"] {
    overflow: auto !important;
  }

  body[data-view="dashboard"] .view,
  body[data-view="crm"] .view {
    height: auto !important;
    min-height: calc(100vh - 44px);
    overflow: auto !important;
  }

  .screen-dashboard {
    height: auto;
    overflow: visible;
  }

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

  .screen-erp-grid,
  .screen-crm-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}

@media (max-width: 720px) {
  body[data-view="dashboard"] .app-shell,
  body[data-view="crm"] .app-shell {
    grid-template-columns: 1fr !important;
  }

  .screen-hero,
  .screen-hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .screen-kpi-row,
  .screen-metric-strip,
  .screen-split,
  .screen-action-grid,
  .crm-stage-row {
    grid-template-columns: 1fr;
  }
}

/* Greenland CRM dashboard theme */
body[data-view="crm"] {
  overflow: hidden !important;
  background: #eef3f9;
}

body[data-view="crm"] .view {
  height: calc(100vh - 44px) !important;
  overflow: hidden !important;
  padding: 10px 12px 12px !important;
  background: #eef3f9 !important;
}

.crm-gs-dashboard,
.crm-gs-dashboard * {
  box-sizing: border-box;
}

.crm-gs-dashboard {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 62px 54px 86px minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  color: #0f172a;
}

.crm-gs-topbar {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 520px) minmax(300px, 420px) max-content;
  gap: 14px;
  align-items: center;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.crm-gs-title {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.crm-gs-title strong,
.crm-gs-brand-row b {
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-gs-title span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.crm-gs-title svg,
.crm-gs-kpi svg,
.crm-gs-stage svg {
  width: 16px;
  height: 16px;
}

.crm-gs-price {
  height: 48px;
  min-width: 0;
  display: grid;
  grid-template-columns: 104px 1fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 8px 14px;
  text-align: left;
  color: #ffffff;
  background: #0f172a;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  cursor: pointer;
}

.crm-gs-price b {
  padding: 6px 10px;
  color: #ffffff;
  background: #dc2626;
  border-radius: 8px;
  font-size: 10px;
  line-height: 1.05;
  text-transform: uppercase;
}

.crm-gs-price span {
  min-width: 0;
  display: grid;
  grid-template-columns: min-content min-content minmax(44px, max-content);
  gap: 3px 6px;
  align-items: baseline;
}

.crm-gs-price small {
  grid-column: 1 / -1;
  color: #ef4444;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-gs-price strong {
  font-size: 20px;
  letter-spacing: 0;
}

.crm-gs-price em {
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.crm-gs-price u {
  grid-column: 1 / -1;
  color: #22c55e;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

.crm-gs-price u.down,
.crm-gs-steel-card em.down {
  color: #ef4444;
}

.crm-gs-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.crm-gs-top-actions > span {
  padding: 9px 12px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.crm-gs-top-actions .button,
.crm-gs-top-actions .ghost-button {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
}

.crm-gs-search {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 74px;
  align-items: center;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.01);
}

.crm-gs-search svg {
  width: 16px;
  height: 16px;
  margin: 0 auto;
  color: #64748b;
}

.crm-gs-search input {
  min-width: 0;
  height: 100%;
  padding: 0 8px;
  color: #0f172a;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
  font-weight: 800;
}

.crm-gs-search button {
  height: 30px;
  margin-right: 4px;
  color: #ffffff;
  background: #0f172a;
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.crm-search-results {
  display: grid;
  gap: 12px;
}

.crm-search-results h3 {
  margin: 8px 0 0;
  font-size: 16px;
}

.crm-search-summary,
.crm-search-empty {
  padding: 12px 14px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  font-weight: 800;
}

.crm-gs-brand-row {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.crm-gs-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
  border-right: 1px solid #dbe5f0;
}

.crm-gs-logo span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #dc2626;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 900;
}

.crm-gs-logo strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 500;
  line-height: 0.95;
}

.crm-gs-logo b {
  display: block;
  color: #dc2626;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.crm-gs-brand-row small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
}

.crm-gs-kpis {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.crm-gs-kpi {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 76px;
  grid-template-rows: 18px 28px 18px;
  gap: 2px 12px;
  padding: 14px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.crm-gs-kpi > span {
  grid-row: 1 / 4;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 12px;
}

.crm-gs-kpi i {
  grid-column: 3;
  grid-row: 1 / 4;
  align-self: end;
  height: 22px;
  background: linear-gradient(135deg, transparent 0 20%, #2563eb 20% 25%, transparent 25% 45%, #2563eb 45% 50%, transparent 50% 70%, #2563eb 70% 75%, transparent 75%);
  opacity: .9;
}

.crm-gs-kpi strong,
.crm-gs-kpi b,
.crm-gs-kpi small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-gs-kpi strong {
  grid-column: 2;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-gs-kpi b {
  grid-column: 2;
  font-size: 24px;
  line-height: 1;
}

.crm-gs-kpi small {
  grid-column: 2;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.crm-gs-main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.14fr .92fr .82fr;
  grid-template-rows: 130px minmax(172px, 1fr) 142px;
  gap: 10px;
  overflow: hidden;
}

.crm-gs-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.crm-gs-panel-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crm-gs-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.crm-gs-panel-head button,
.crm-gs-panel-head span {
  padding: 6px 9px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
}

.crm-gs-pipeline {
  grid-column: 1;
}

.crm-gs-delivery {
  grid-column: 2 / 4;
}

.crm-gs-latest {
  grid-column: 1 / 3;
  grid-row: 2;
}

.crm-gs-steel,
.crm-gs-followups {
  grid-column: 3;
}

.crm-gs-steel {
  grid-row: 2;
  max-height: 84px;
}

.crm-gs-followups {
  grid-row: 2;
  margin-top: 94px;
}

.crm-gs-summary {
  grid-column: 1;
  grid-row: 3;
}

.crm-gs-customers {
  grid-column: 2 / 4;
  grid-row: 3;
}

.crm-gs-stage-row {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.crm-gs-stage {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  grid-template-rows: 24px 12px 4px 15px;
  gap: 2px 7px;
  align-items: center;
  padding: 10px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  cursor: pointer;
}

.crm-gs-stage.active {
  background: #eff6ff;
  border-color: #2563eb;
}

.crm-gs-stage > span {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #eaf1ff;
  border-radius: 8px;
}

.crm-gs-stage b,
.crm-gs-stage small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-gs-stage b {
  font-size: 12px;
  font-weight: 900;
}

.crm-gs-stage strong {
  justify-self: end;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #ffffff;
  border-radius: 999px;
  font-size: 13px;
}

.crm-gs-stage em {
  grid-column: 2 / 4;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.crm-gs-stage i {
  grid-column: 1 / 4;
  height: 4px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
}

.crm-gs-stage u {
  display: block;
  height: 100%;
  background: #2563eb;
  border-radius: inherit;
}

.crm-gs-stage small {
  grid-column: 1 / 4;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
}

.crm-gs-delivery-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.crm-gs-delivery-metrics button {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 9px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 9px;
}

.crm-gs-delivery-metrics b {
  font-size: 20px;
}

.crm-gs-delivery-metrics span {
  overflow: hidden;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-gs-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid #dbe5f0;
  border-radius: 9px;
}

.crm-gs-table th,
.crm-gs-table td {
  padding: 7px 9px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1px solid #e5edf6;
  font-size: 11px;
}

.crm-gs-table th {
  color: #475569;
  background: #f1f5f9;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-gs-table tr:last-child td {
  border-bottom: 0;
}

.crm-gs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.crm-gs-badge.open {
  color: #1d4ed8;
  background: #dbeafe;
}

.crm-gs-badge.sent {
  color: #5b21b6;
  background: #ede9fe;
}

.crm-gs-badge.follow {
  color: #c2410c;
  background: #ffedd5;
}

.crm-gs-badge.won {
  color: #047857;
  background: #d1fae5;
}

.crm-gs-badge.lost {
  color: #b91c1c;
  background: #fee2e2;
}

.icon-only {
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #dbe5f0;
  border-radius: 7px;
  font-weight: 900;
}

.crm-gs-steel-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  color: #ffffff;
  background: #0f172a;
  border-radius: 10px;
}

.crm-gs-steel-card span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.crm-gs-steel-card b {
  font-size: 22px;
}

.crm-gs-steel-card small {
  color: #cbd5e1;
  font-weight: 900;
}

.crm-gs-steel-card em {
  color: #22c55e;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.crm-gs-follow-list {
  min-height: 0;
  display: grid;
  gap: 7px;
  overflow: hidden;
}

.crm-gs-follow-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 80px max-content;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e5edf6;
  border-radius: 8px;
}

.crm-gs-follow-row span,
.crm-gs-follow-row b,
.crm-gs-follow-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-gs-follow-row span,
.crm-gs-follow-row small {
  color: #475569;
  font-size: 10px;
  font-weight: 900;
}

.crm-gs-donut {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: radial-gradient(circle at center, #ffffff 0 47%, transparent 48%), conic-gradient(#2563eb 0 54%, #8b5cf6 54% 78%, #f59e0b 78% 90%, #22c55e 90% 100%);
  border-radius: 999px;
}

.crm-gs-donut b,
.crm-gs-donut span {
  grid-area: 1 / 1;
}

.crm-gs-donut b {
  align-self: center;
  font-size: 24px;
}

.crm-gs-donut span {
  align-self: end;
  margin-bottom: 27px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}

.crm-gs-legend {
  display: grid;
  gap: 5px;
  overflow: hidden;
}

.crm-gs-legend span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) max-content;
  gap: 7px;
  align-items: center;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
}

.crm-gs-legend i {
  width: 8px;
  height: 8px;
  background: #2563eb;
  border-radius: 99px;
}

.crm-gs-bar-list {
  min-height: 0;
  display: grid;
  gap: 8px;
}

.crm-gs-bar-row {
  display: grid;
  grid-template-columns: 28px 160px minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e5edf6;
  border-radius: 9px;
}

.crm-gs-bar-row span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.crm-gs-bar-row b,
.crm-gs-bar-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-gs-bar-row i {
  height: 6px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
}

.crm-gs-bar-row u {
  display: block;
  height: 100%;
  background: #2563eb;
  border-radius: inherit;
}

.crm-gs-empty {
  min-height: 58px;
  display: grid;
  place-items: center;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  font-weight: 800;
}

@media (max-width: 1280px) {
  body[data-view="crm"] {
    overflow: auto !important;
  }

  body[data-view="crm"] .view {
    height: auto !important;
    overflow: auto !important;
  }

  .crm-gs-dashboard {
    height: auto;
    overflow: visible;
  }

  .crm-gs-topbar,
  .crm-gs-main-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .crm-gs-pipeline,
  .crm-gs-delivery,
  .crm-gs-latest,
  .crm-gs-steel,
  .crm-gs-followups,
  .crm-gs-summary,
  .crm-gs-customers {
    grid-column: auto;
    grid-row: auto;
    margin-top: 0;
    max-height: none;
  }

  .crm-gs-kpis,
  .crm-gs-stage-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final CRM dashboard fit pass: compact, readable, and no clipping. */
body[data-view="crm"] .main {
  overflow: hidden !important;
}

body[data-view="crm"] .view {
  height: calc(100vh - 44px) !important;
  overflow: auto !important;
  padding: 8px 10px !important;
  background: #eef3f8 !important;
}

.crm-gs-dashboard {
  min-height: calc(100vh - 62px) !important;
  height: auto !important;
  grid-template-rows: 48px 42px 68px minmax(0, 1fr) !important;
  gap: 8px !important;
  overflow: visible !important;
  font-size: 12px !important;
}

.crm-gs-topbar,
.crm-gs-brand-row,
.crm-gs-kpi,
.crm-gs-panel {
  border-radius: 12px !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
}

.crm-gs-topbar {
  min-height: 0 !important;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 520px) minmax(260px, 360px) max-content !important;
  gap: 8px !important;
  padding: 5px 10px !important;
}

.crm-gs-title {
  min-width: 0 !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  gap: 8px !important;
}

.crm-gs-title h1 {
  overflow: hidden !important;
  font-size: 15px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.crm-gs-title p {
  font-size: 11px !important;
}

.crm-gs-price {
  height: 38px !important;
  grid-template-columns: 82px 1fr 1fr !important;
  gap: 10px !important;
  padding: 5px 10px !important;
  overflow: hidden !important;
}

.crm-gs-price b {
  min-width: 0 !important;
  padding: 4px 8px !important;
  font-size: 9px !important;
}

.crm-gs-price strong {
  font-size: 17px !important;
  line-height: 1 !important;
}

.crm-gs-price small,
.crm-gs-price em {
  font-size: 9px !important;
}

.crm-gs-search {
  height: 34px !important;
  grid-template-columns: 26px minmax(0, 1fr) 62px !important;
  gap: 6px !important;
  padding: 3px !important;
}

.crm-gs-search input {
  min-width: 0 !important;
}

.crm-gs-search .button,
.crm-gs-top-actions .button,
.crm-gs-top-actions .ghost-button {
  height: 30px !important;
  min-height: 0 !important;
  padding: 0 10px !important;
  white-space: nowrap !important;
}

.crm-gs-brand-row {
  height: 42px !important;
  min-height: 0 !important;
  padding: 5px 10px !important;
  overflow: hidden !important;
}

.crm-gs-logo {
  min-width: 0 !important;
  grid-template-columns: 30px max-content 1px minmax(0, 1fr) !important;
  gap: 8px !important;
}

.crm-gs-logo span {
  width: 30px !important;
  height: 30px !important;
  font-size: 18px !important;
}

.crm-gs-logo strong,
.crm-gs-logo b {
  font-size: 18px !important;
  line-height: .92 !important;
}

.crm-gs-logo h2 {
  overflow: hidden !important;
  font-size: 15px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.crm-gs-logo small {
  font-size: 10px !important;
}

.crm-gs-kpis {
  height: 68px !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.crm-gs-kpi {
  min-height: 0 !important;
  grid-template-columns: 34px minmax(0, 1fr) 46px !important;
  grid-template-rows: 14px 20px 14px !important;
  gap: 2px 8px !important;
  padding: 8px 10px !important;
  overflow: hidden !important;
}

.crm-gs-kpi > span {
  width: 32px !important;
  height: 32px !important;
}

.crm-gs-kpi h3,
.crm-gs-kpi p {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.crm-gs-kpi b {
  font-size: 20px !important;
  line-height: 1 !important;
}

.crm-gs-kpi svg {
  width: 42px !important;
}

.crm-gs-main-grid {
  min-height: 0 !important;
  grid-template-columns: minmax(440px, 1.05fr) minmax(330px, .8fr) minmax(340px, .82fr) !important;
  grid-template-rows: 110px minmax(168px, 1fr) 108px !important;
  gap: 8px !important;
  overflow: hidden !important;
}

.crm-gs-panel {
  min-height: 0 !important;
  gap: 6px !important;
  padding: 10px !important;
  overflow: hidden !important;
}

.crm-gs-panel-head {
  min-height: 28px !important;
}

.crm-gs-panel-head h2 {
  font-size: 14px !important;
}

.crm-gs-stage-row {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.crm-gs-stage {
  min-height: 0 !important;
  grid-template-columns: 24px minmax(0, 1fr) 22px !important;
  grid-template-rows: 20px 10px 3px 13px !important;
  gap: 1px 6px !important;
  padding: 7px !important;
}

.crm-gs-stage > span {
  width: 24px !important;
  height: 24px !important;
}

.crm-gs-stage b,
.crm-gs-stage small,
.crm-gs-stage em {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.crm-gs-stage b {
  font-size: 11px !important;
}

.crm-gs-stage strong {
  width: 21px !important;
  height: 21px !important;
  font-size: 11px !important;
}

.crm-gs-delivery-metrics {
  gap: 6px !important;
}

.crm-gs-delivery-metrics button {
  padding: 7px !important;
}

.crm-gs-latest {
  grid-column: 1 / 3 !important;
  grid-row: 2 !important;
}

.crm-gs-followups {
  grid-column: 3 !important;
  grid-row: 2 !important;
  margin-top: 0 !important;
}

.crm-gs-summary {
  grid-column: 1 !important;
  grid-row: 3 !important;
}

.crm-gs-customers {
  grid-column: 2 / 4 !important;
  grid-row: 3 !important;
}

.crm-gs-steel {
  display: none !important;
}

.crm-gs-table {
  table-layout: fixed !important;
}

.crm-gs-table th,
.crm-gs-table td {
  padding: 5px 7px !important;
  overflow: hidden !important;
  font-size: 10.5px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.crm-gs-table .icon-only {
  min-width: 26px !important;
  height: 24px !important;
}

.crm-gs-follow-list {
  gap: 6px !important;
}

.crm-gs-follow-row {
  grid-template-columns: 58px minmax(0, 1fr) 68px max-content !important;
  gap: 7px !important;
  padding: 6px 7px !important;
}

.crm-gs-donut {
  width: 68px !important;
  height: 68px !important;
}

.crm-gs-donut b {
  font-size: 18px !important;
}

.crm-gs-donut span {
  margin-bottom: 16px !important;
  font-size: 9px !important;
}

.crm-gs-legend {
  gap: 3px !important;
}

.crm-gs-bar-list {
  gap: 6px !important;
}

.crm-gs-bar-row {
  grid-template-columns: 24px 150px minmax(0, 1fr) 105px !important;
  gap: 8px !important;
  padding: 6px 8px !important;
}

@media (max-width: 1500px) {
  body[data-view="crm"] .view {
    overflow: auto !important;
  }

  .crm-gs-dashboard {
    min-height: 0 !important;
    grid-template-rows: auto !important;
  }

  .crm-gs-topbar {
    grid-template-columns: 1fr minmax(360px, 520px) !important;
  }

  .crm-gs-search,
  .crm-gs-top-actions {
    grid-column: auto !important;
  }

  .crm-gs-kpis {
    height: auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .crm-gs-main-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    overflow: visible !important;
  }

  .crm-gs-pipeline,
  .crm-gs-delivery,
  .crm-gs-latest,
  .crm-gs-followups,
  .crm-gs-summary,
  .crm-gs-customers {
    grid-column: auto !important;
    grid-row: auto !important;
    margin-top: 0 !important;
  }
}

/* 2026-05-30: hard reset for stale login rendering and CRM dashboard fit */
#loginScreen.login-screen:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: grid !important;
  place-items: center !important;
  overflow: auto !important;
  padding: 24px !important;
  background:
    radial-gradient(circle at 18% 12%, rgba(220, 38, 38, 0.18), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #111827 50%, #020617 100%) !important;
}

#loginScreen:not(.hidden) ~ .app-shell {
  display: none !important;
}

#loginScreen .login-panel {
  width: min(430px, calc(100vw - 36px)) !important;
  margin: auto !important;
  padding: 28px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28) !important;
}

#loginScreen .login-brand .brand-logo,
#loginScreen img.brand-logo {
  display: block !important;
  width: min(260px, 78vw) !important;
  max-width: 260px !important;
  height: auto !important;
  max-height: 88px !important;
  object-fit: contain !important;
}

body[data-view="crm"] .app-shell,
body[data-view="crm"] .main {
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="crm"] .topbar {
  min-height: 44px !important;
  height: 44px !important;
  padding: 6px 12px !important;
}

body[data-view="crm"] .topbar h1 {
  font-size: 20px !important;
  line-height: 1.05 !important;
}

body[data-view="crm"] .topbar .eyebrow {
  font-size: 10px !important;
  letter-spacing: .06em !important;
}

body[data-view="crm"] .view {
  height: calc(100vh - 44px) !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 12px 14px !important;
  background: #f8fafc !important;
}

body[data-view="crm"] .crm-gs-dashboard {
  width: 100% !important;
  max-width: 1720px !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-rows: auto auto auto auto !important;
  gap: 12px !important;
  overflow: visible !important;
  color: #0f172a !important;
}

body[data-view="crm"] .crm-gs-topbar {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(520px, 680px) minmax(280px, 380px) max-content !important;
  gap: 12px !important;
  align-items: center !important;
  min-height: 58px !important;
  padding: 10px 14px !important;
  overflow: hidden !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

body[data-view="crm"] .crm-gs-title,
body[data-view="crm"] .crm-gs-price,
body[data-view="crm"] .crm-gs-search,
body[data-view="crm"] .crm-gs-top-actions {
  min-width: 0 !important;
}

body[data-view="crm"] .crm-gs-title strong {
  display: block !important;
  overflow: hidden !important;
  max-width: 100% !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="crm"] .crm-gs-title span {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 4px !important;
  font-size: 13px !important;
  color: #475569 !important;
}

body[data-view="crm"] .crm-gs-price {
  height: 48px !important;
  display: grid !important;
  grid-template-columns: 96px 1fr 1fr !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 7px 12px !important;
  border-radius: 10px !important;
  background: #0f172a !important;
  color: #ffffff !important;
}

body[data-view="crm"] .crm-gs-price b {
  font-size: 10px !important;
  line-height: 1.05 !important;
  text-transform: uppercase !important;
}

body[data-view="crm"] .crm-gs-price span {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto auto 1fr !important;
  column-gap: 5px !important;
  align-items: baseline !important;
}

body[data-view="crm"] .crm-gs-price strong {
  font-size: 21px !important;
  line-height: 1 !important;
}

body[data-view="crm"] .crm-gs-price em,
body[data-view="crm"] .crm-gs-price u {
  overflow: hidden !important;
  font-size: 10px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="crm"] .crm-gs-search {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) 78px !important;
  align-items: center !important;
  height: 40px !important;
  padding: 0 6px 0 10px !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
}

body[data-view="crm"] .crm-gs-search input {
  min-width: 0 !important;
  height: 36px !important;
  border: 0 !important;
  background: transparent !important;
}

body[data-view="crm"] .crm-gs-search button,
body[data-view="crm"] .crm-gs-top-actions button,
body[data-view="crm"] .crm-gs-panel-head button {
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
}

body[data-view="crm"] .crm-gs-top-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 8px !important;
}

body[data-view="crm"] .crm-gs-top-actions span {
  white-space: nowrap !important;
}

body[data-view="crm"] .crm-gs-brand-row {
  min-height: 50px !important;
  padding: 8px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  overflow: hidden !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
}

body[data-view="crm"] .crm-gs-brand-row > div:last-child {
  min-width: 0 !important;
}

body[data-view="crm"] .crm-gs-brand-row > div:last-child b {
  display: block !important;
  overflow: hidden !important;
  font-size: 15px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="crm"] .crm-gs-logo {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

body[data-view="crm"] .crm-gs-logo span {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  font-size: 24px !important;
}

body[data-view="crm"] .crm-gs-logo strong {
  font-size: 19px !important;
  line-height: .95 !important;
}

body[data-view="crm"] .crm-gs-kpis {
  height: auto !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body[data-view="crm"] .crm-gs-kpi {
  min-height: 82px !important;
  padding: 14px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) 54px !important;
  grid-template-rows: auto auto auto !important;
  gap: 2px 12px !important;
  overflow: hidden !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
}

body[data-view="crm"] .crm-gs-kpi > span {
  width: 42px !important;
  height: 42px !important;
  grid-row: 1 / 4 !important;
}

body[data-view="crm"] .crm-gs-kpi strong,
body[data-view="crm"] .crm-gs-kpi small {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="crm"] .crm-gs-kpi b {
  font-size: 24px !important;
  line-height: 1 !important;
}

body[data-view="crm"] .crm-gs-main-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr) minmax(360px, .9fr) !important;
  grid-template-areas:
    "pipeline delivery followups"
    "latest latest followups"
    "summary customers customers" !important;
  grid-auto-rows: minmax(0, auto) !important;
  gap: 12px !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body[data-view="crm"] .crm-gs-panel {
  min-height: 0 !important;
  padding: 14px !important;
  overflow: hidden !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
}

body[data-view="crm"] .crm-gs-pipeline { grid-area: pipeline !important; }
body[data-view="crm"] .crm-gs-delivery { grid-area: delivery !important; }
body[data-view="crm"] .crm-gs-latest { grid-area: latest !important; }
body[data-view="crm"] .crm-gs-followups { grid-area: followups !important; }
body[data-view="crm"] .crm-gs-summary { grid-area: summary !important; }
body[data-view="crm"] .crm-gs-customers { grid-area: customers !important; }
body[data-view="crm"] .crm-gs-steel { display: none !important; }

body[data-view="crm"] .crm-gs-stage-row {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-view="crm"] .crm-gs-stage {
  min-height: 72px !important;
  padding: 10px !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) 26px !important;
  grid-template-rows: auto auto 4px auto !important;
  gap: 2px 8px !important;
}

body[data-view="crm"] .crm-gs-stage b,
body[data-view="crm"] .crm-gs-stage small,
body[data-view="crm"] .crm-gs-stage em {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="crm"] .crm-gs-delivery-metrics {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-view="crm"] .crm-gs-delivery .crm-gs-table {
  display: none !important;
}

body[data-view="crm"] .crm-gs-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body[data-view="crm"] .crm-gs-table th,
body[data-view="crm"] .crm-gs-table td {
  height: 32px !important;
  padding: 7px 9px !important;
  overflow: hidden !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="crm"] .crm-gs-table th:nth-child(4),
body[data-view="crm"] .crm-gs-table td:nth-child(4) {
  display: none !important;
}

body[data-view="crm"] .crm-gs-table th:last-child,
body[data-view="crm"] .crm-gs-table td:last-child {
  width: 54px !important;
}

body[data-view="crm"] .crm-gs-follow-list {
  max-height: 310px !important;
  overflow-y: auto !important;
}

body[data-view="crm"] .crm-gs-follow-row {
  grid-template-columns: 64px minmax(0, 1fr) 78px max-content !important;
  gap: 8px !important;
}

body[data-view="crm"] .crm-gs-summary {
  min-height: 150px !important;
  grid-template-columns: 110px minmax(0, 1fr) !important;
}

body[data-view="crm"] .crm-gs-donut {
  width: 96px !important;
  height: 96px !important;
}

body[data-view="crm"] .crm-gs-customers {
  min-height: 150px !important;
}

body[data-view="crm"] .crm-gs-bar-row {
  grid-template-columns: 28px minmax(150px, 220px) minmax(0, 1fr) 130px !important;
  gap: 10px !important;
}

@media (max-width: 1600px) {
  body[data-view="crm"] .crm-gs-topbar {
    grid-template-columns: minmax(220px, 1fr) minmax(420px, 560px) minmax(240px, 340px) max-content !important;
  }

  body[data-view="crm"] .crm-gs-main-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, .8fr) minmax(320px, .85fr) !important;
  }
}

@media (max-width: 1320px) {
  body[data-view="crm"] .view {
    overflow-y: auto !important;
  }

  body[data-view="crm"] .crm-gs-topbar,
  body[data-view="crm"] .crm-gs-main-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
  }

  body[data-view="crm"] .crm-gs-pipeline,
  body[data-view="crm"] .crm-gs-delivery,
  body[data-view="crm"] .crm-gs-latest,
  body[data-view="crm"] .crm-gs-followups,
  body[data-view="crm"] .crm-gs-summary,
  body[data-view="crm"] .crm-gs-customers {
    grid-area: auto !important;
  }

  body[data-view="crm"] .crm-gs-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ERP dashboard command-center layout, final override */
body[data-view="dashboard"] {
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .app-shell {
  grid-template-columns: 176px minmax(0, 1fr) !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .sidebar {
  width: 176px !important;
  min-width: 176px !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] main {
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .view {
  height: 100vh !important;
  padding: 18px 22px !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .erp-ref-dashboard,
body[data-view="dashboard"] .erp-ref-dashboard * {
  box-sizing: border-box !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  width: 100% !important;
  max-width: none !important;
  height: calc(100vh - 36px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 14px !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: #0f172a !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
}

body[data-view="dashboard"] .erp-ref-header {
  min-height: 52px !important;
  display: grid !important;
  grid-template-columns: minmax(310px, 1fr) minmax(360px, 520px) 38px max-content max-content max-content max-content max-content !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-view="dashboard"] .erp-ref-title {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-menu {
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #eef5ff !important;
  color: #2563eb !important;
  box-shadow: none !important;
}

body[data-view="dashboard"] .erp-ref-menu svg {
  width: 20px !important;
  height: 20px !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  overflow: hidden !important;
  color: #0f172a !important;
  font-size: 21px !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin: 4px 0 0 !important;
  overflow: hidden !important;
  color: #52627a !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-search {
  height: 38px !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 12px !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 10px !important;
  background: #ffffff !important;
}

body[data-view="dashboard"] .erp-ref-search svg {
  width: 16px !important;
  height: 16px !important;
  color: #64748b !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  width: 100% !important;
  min-width: 0 !important;
  height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body[data-view="dashboard"] .erp-ref-bell,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick {
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 13px !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-bell {
  width: 38px !important;
  padding: 0 !important;
  border: 1px solid #fecaca !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #e11d2e !important;
}

body[data-view="dashboard"] .erp-ref-cloud {
  border: 1px solid #bbf7d0 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
}

body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user {
  border: 1px solid #dbe4ef !important;
  background: #ffffff !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-user {
  gap: 7px !important;
}

body[data-view="dashboard"] .erp-ref-user b {
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: #0f172a !important;
  color: #ffffff !important;
  font-size: 10px !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  border: 1px solid #e11d2e !important;
  background: #e11d2e !important;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(225, 29, 46, 0.18) !important;
}

body[data-view="dashboard"] .erp-ref-kpi-row {
  display: none !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  min-height: 120px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.58fr) minmax(390px, .8fr) !important;
  gap: 18px !important;
  align-items: stretch !important;
  padding: 18px 20px !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #061225 0%, #0f2748 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi {
  min-width: 0 !important;
  min-height: 84px !important;
  display: grid !important;
  grid-template-columns: 50px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 13px !important;
  padding: 0 18px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #ffffff !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi:last-child {
  border-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi-icon {
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
  background: #e11d2e !important;
  color: #ffffff !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi:nth-child(2) .erp-ref-kpi-icon {
  background: #2563eb !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi:nth-child(3) .erp-ref-kpi-icon {
  background: #10b981 !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi:nth-child(4) .erp-ref-kpi-icon {
  background: #f59e0b !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi svg {
  width: 23px !important;
  height: 23px !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi b {
  display: block !important;
  margin: 3px 0 4px !important;
  overflow: hidden !important;
  color: #ffffff !important;
  font-size: 26px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi em {
  display: block !important;
  overflow: hidden !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi small {
  display: block !important;
  overflow: hidden !important;
  color: rgba(255, 255, 255, 0.66) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi i {
  display: block !important;
  grid-column: 2 !important;
  margin-top: 8px !important;
  color: #60a5fa !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: auto 1fr !important;
  gap: 10px !important;
  padding-left: 18px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body[data-view="dashboard"] .erp-ref-glance-head {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) max-content !important;
  align-items: center !important;
  gap: 8px !important;
  color: #ffffff !important;
}

body[data-view="dashboard"] .erp-ref-glance-head span {
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #dbeafe !important;
}

body[data-view="dashboard"] .erp-ref-glance-head b,
body[data-view="dashboard"] .erp-ref-glance-head strong {
  overflow: hidden !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-glance button {
  min-width: 0 !important;
  min-height: 56px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  text-align: center !important;
}

body[data-view="dashboard"] .erp-ref-glance button b {
  font-size: 22px !important;
  line-height: 1 !important;
}

body[data-view="dashboard"] .erp-ref-glance button span {
  overflow: hidden !important;
  color: rgba(255, 255, 255, 0.74) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.16fr) minmax(280px, .76fr) minmax(280px, .76fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 14px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 16px !important;
  overflow: hidden !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  min-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 12px !important;
}

body[data-view="dashboard"] .erp-ref-card-head h2 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body[data-view="dashboard"] .erp-ref-card-head button,
body[data-view="dashboard"] .erp-ref-wide {
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 13px !important;
  border: 1px solid #dbe4ef !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-compliance .erp-ref-card-head button,
body[data-view="dashboard"] .erp-ref-upcoming .erp-ref-card-head button {
  border-color: #fecaca !important;
  color: #e11d2e !important;
  background: #fff7f7 !important;
}

body[data-view="dashboard"] .erp-ref-pending .erp-ref-card-head button {
  border-color: #bbf7d0 !important;
  color: #059669 !important;
  background: #f0fdf4 !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 36px !important;
  display: flex !important;
  align-items: end !important;
  gap: 18px !important;
  margin: 0 0 12px !important;
  padding: 0 2px !important;
  border-bottom: 1px solid #e5edf6 !important;
}

body[data-view="dashboard"] .erp-ref-tabs button {
  height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 3px solid transparent !important;
  background: transparent !important;
  color: #52627a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-tabs button.active {
  border-bottom-color: #e11d2e !important;
  color: #e11d2e !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: calc(100% - 80px) !important;
  min-height: 168px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .82fr) !important;
  gap: 18px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row article {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row article + article {
  padding-left: 18px !important;
  border-left: 1px solid #e5edf6 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row h3 {
  margin: 0 0 10px !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row h3 small {
  color: #64748b !important;
  font-size: 10px !important;
}

body[data-view="dashboard"] .erp-ref-line-chart {
  width: 100% !important;
  height: 130px !important;
  display: block !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  max-height: 140px !important;
  display: grid !important;
  grid-template-columns: 136px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-donut svg {
  width: 132px !important;
  height: 132px !important;
}

body[data-view="dashboard"] .erp-ref-donut ul,
body[data-view="dashboard"] .erp-ref-donut li {
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row {
  min-height: 62px !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) max-content !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  gap: 3px 12px !important;
  padding: 10px 12px !important;
  border: 1px solid #e5edf6 !important;
  border-radius: 11px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-alert-row > span,
body[data-view="dashboard"] .erp-ref-activity-row > span {
  width: 38px !important;
  height: 38px !important;
  grid-row: 1 / 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  background: #fff1f2 !important;
  color: #e11d2e !important;
}

body[data-view="dashboard"] .erp-ref-activity-row > span {
  background: #eef5ff !important;
  color: #2563eb !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b,
body[data-view="dashboard"] .erp-ref-alert-row small,
body[data-view="dashboard"] .erp-ref-activity-row small,
body[data-view="dashboard"] .erp-ref-alert-row u {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b {
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-alert-row small,
body[data-view="dashboard"] .erp-ref-activity-row small,
body[data-view="dashboard"] .erp-ref-alert-row u {
  color: #52627a !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

body[data-view="dashboard"] .erp-ref-alert-row em {
  grid-row: 1 / 3 !important;
  align-self: center !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  background: #fff1f2 !important;
  color: #e11d2e !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-alert-row u {
  grid-column: 2 !important;
}

body[data-view="dashboard"] .erp-ref-wide {
  width: 100% !important;
  margin-top: 12px !important;
  color: #e11d2e !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  height: 100% !important;
  min-height: 184px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 18px !important;
  border: 1px solid #e5edf6 !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #ffffff, #fbfdff) !important;
  text-align: center !important;
}

body[data-view="dashboard"] .erp-ref-empty svg {
  width: 62px !important;
  height: 62px !important;
  padding: 14px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-empty strong {
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-empty small {
  color: #52627a !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .erp-ref-action {
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  gap: 2px 10px !important;
  padding: 10px !important;
  border: 1px solid #e5edf6 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  width: 34px !important;
  height: 34px !important;
  grid-row: 1 / 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 9px !important;
  background: #eef5ff !important;
  color: #2563eb !important;
}

body[data-view="dashboard"] .erp-ref-action b,
body[data-view="dashboard"] .erp-ref-action small {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-action b {
  font-size: 12.5px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-action small {
  color: #52627a !important;
  font-size: 10.8px !important;
  font-weight: 600 !important;
}

body[data-view="dashboard"] .erp-ref-operations { grid-area: operations !important; }
body[data-view="dashboard"] .erp-ref-compliance { grid-area: compliance !important; }
body[data-view="dashboard"] .erp-ref-pending { grid-area: pending !important; }
body[data-view="dashboard"] .erp-ref-actions { grid-area: actions !important; }
body[data-view="dashboard"] .erp-ref-activities { grid-area: activities !important; }
body[data-view="dashboard"] .erp-ref-upcoming { grid-area: upcoming !important; }

body[data-view="dashboard"] .erp-ref-footer {
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .erp-ref-header {
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 420px) 38px max-content max-content max-content max-content max-content !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    grid-template-columns: 1fr !important;
  }

  body[data-view="dashboard"] .erp-ref-glance {
    padding-left: 0 !important;
    border-left: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding-top: 12px !important;
  }
}

@media (max-width: 1180px) {
  body[data-view="dashboard"] {
    overflow: auto !important;
  }

  body[data-view="dashboard"] .view,
  body[data-view="dashboard"] .erp-ref-dashboard {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  body[data-view="dashboard"] .erp-ref-header,
  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
  }

  body[data-view="dashboard"] .erp-ref-operations,
  body[data-view="dashboard"] .erp-ref-compliance,
  body[data-view="dashboard"] .erp-ref-pending,
  body[data-view="dashboard"] .erp-ref-actions,
  body[data-view="dashboard"] .erp-ref-activities,
  body[data-view="dashboard"] .erp-ref-upcoming {
    grid-area: auto !important;
  }

  body[data-view="dashboard"] .erp-ref-strip-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-strip-metrics .erp-ref-kpi {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 12px !important;
  }
}

/* ERP dashboard reference alignment v21 */
body[data-view="dashboard"] {
  overflow: hidden !important;
  background: #f6f8fc !important;
  color: #0b1730 !important;
}

body[data-view="dashboard"] .app-shell {
  grid-template-columns: 212px minmax(0, 1fr) !important;
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #f6f8fc !important;
}

body[data-view="dashboard"] .sidebar {
  width: 212px !important;
  min-width: 212px !important;
  height: 100vh !important;
  padding: 18px 16px !important;
  background: linear-gradient(180deg, #07162a 0%, #081b33 100%) !important;
  border-right: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .brand {
  gap: 12px !important;
  padding-bottom: 18px !important;
  margin-bottom: 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
}

body[data-view="dashboard"] .brand-logo {
  width: 162px !important;
  height: 48px !important;
  padding: 7px 10px !important;
  object-fit: contain !important;
  background: #fff !important;
  border-radius: 8px !important;
}

body[data-view="dashboard"] .brand-copy strong {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .brand-copy span {
  color: #d8e2f2 !important;
  font-size: 11px !important;
}

body[data-view="dashboard"] .nav {
  gap: 4px !important;
}

body[data-view="dashboard"] .nav-section-title {
  margin: 12px 0 6px !important;
  color: #8aa1bd !important;
  font-size: 11px !important;
  letter-spacing: 1.6px !important;
}

body[data-view="dashboard"] .nav button {
  min-height: 38px !important;
  padding: 8px 10px !important;
  gap: 11px !important;
  border-radius: 9px !important;
  color: #e8eef7 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .nav button.active {
  color: #fff !important;
  background: linear-gradient(135deg, #ef1d2f, #c9142d) !important;
  box-shadow: 0 12px 24px rgba(225, 29, 46, .24) !important;
}

body[data-view="dashboard"] .main {
  height: 100vh !important;
  min-width: 0 !important;
  overflow: hidden !important;
  background: #f6f8fc !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .view {
  height: 100vh !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  width: 100% !important;
  height: 100vh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 86px 152px minmax(0, 1fr) 24px !important;
  gap: 16px !important;
  padding: 24px 28px 14px !important;
  overflow: hidden !important;
  background: #f6f8fc !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  color: #07162a !important;
}

body[data-view="dashboard"] .erp-ref-dashboard *,
body[data-view="dashboard"] .erp-ref-dashboard *::before,
body[data-view="dashboard"] .erp-ref-dashboard *::after {
  box-sizing: border-box !important;
}

body[data-view="dashboard"] .erp-ref-dashboard svg {
  flex: 0 0 auto !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

body[data-view="dashboard"] .erp-ref-header {
  height: 72px !important;
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) minmax(340px, 430px) 44px 104px 82px 150px 96px 138px !important;
  gap: 12px !important;
  align-items: start !important;
  padding: 0 !important;
  overflow: visible !important;
}

body[data-view="dashboard"] .erp-ref-title {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
}

body[data-view="dashboard"] .erp-ref-menu {
  width: 42px !important;
  height: 42px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: #edf4ff !important;
  color: #2563eb !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 0 3px !important;
  font-size: 25px !important;
  line-height: 1.08 !important;
  letter-spacing: -.35px !important;
  color: #07162a !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin: 0 !important;
  color: #53647e !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-search,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick,
body[data-view="dashboard"] .erp-ref-bell {
  height: 42px !important;
  border: 1px solid #d9e4f2 !important;
  border-radius: 9px !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-search {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 14px !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  height: 38px !important;
  min-width: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  color: #26344d !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

body[data-view="dashboard"] .erp-ref-bell {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
  color: #e11d2e !important;
  border-color: #fecdd3 !important;
  border-radius: 999px !important;
}

body[data-view="dashboard"] .erp-ref-cloud {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #059669 !important;
  background: #ecfdf5 !important;
  border-color: #bbf7d0 !important;
}

body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
  color: #07162a !important;
}

body[data-view="dashboard"] .erp-ref-user {
  gap: 8px !important;
}

body[data-view="dashboard"] .erp-ref-user b {
  width: 26px !important;
  height: 26px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #07162a !important;
  color: #fff !important;
  font-size: 11px !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #ef1d2f, #df1328) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 16px 26px rgba(225, 29, 46, .25) !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  height: 152px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 430px !important;
  gap: 18px !important;
  align-items: stretch !important;
  padding: 24px 26px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #06142a, #0c2345) !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .14) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  min-width: 0 !important;
  height: 104px !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  align-items: center !important;
  gap: 2px 16px !important;
  padding: 2px 26px 2px 0 !important;
  border-right: 1px solid rgba(255,255,255,.16) !important;
  background: transparent !important;
  color: #fff !important;
  text-align: left !important;
}

body[data-view="dashboard"] .erp-ref-kpi:nth-child(4) {
  border-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 52px !important;
  height: 52px !important;
  grid-row: 1 / 4 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #ef1d2f, #cc1630) !important;
}

body[data-view="dashboard"] .erp-ref-kpi:nth-child(2) .erp-ref-kpi-icon { background: linear-gradient(135deg, #2563eb, #1d4ed8) !important; }
body[data-view="dashboard"] .erp-ref-kpi:nth-child(3) .erp-ref-kpi-icon { background: linear-gradient(135deg, #10b981, #059669) !important; }
body[data-view="dashboard"] .erp-ref-kpi:nth-child(4) .erp-ref-kpi-icon { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }

body[data-view="dashboard"] .erp-ref-kpi b {
  align-self: end !important;
  min-width: 0 !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  min-width: 0 !important;
  color: #fff !important;
  font-size: 29px !important;
  line-height: 1 !important;
  font-style: normal !important;
  font-weight: 900 !important;
  letter-spacing: -.4px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi:nth-child(3) em {
  font-size: 24px !important;
  white-space: normal !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  align-self: start !important;
  color: rgba(255,255,255,.9) !important;
  font-size: 11.2px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi i {
  grid-column: 2 !important;
  color: #ef1d2f !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: 24px 78px !important;
  gap: 10px !important;
  align-items: stretch !important;
  padding-left: 14px !important;
  border-left: 1px solid rgba(255,255,255,.16) !important;
}

body[data-view="dashboard"] .erp-ref-glance-head {
  grid-column: 1 / -1 !important;
  height: 24px !important;
  display: grid !important;
  grid-template-columns: 22px 1fr max-content !important;
  align-items: center !important;
  gap: 8px !important;
  color: #fff !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-glance-head b,
body[data-view="dashboard"] .erp-ref-glance-head strong {
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-glance button {
  height: 78px !important;
  min-width: 0 !important;
  padding: 12px 8px !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance button b {
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-glance button span {
  margin-top: 7px !important;
  color: #fff !important;
  font-size: 10.7px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  white-space: normal !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1.34fr .88fr .88fr !important;
  grid-template-rows: minmax(0, 1.06fr) minmax(0, .82fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 16px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card {
  min-height: 0 !important;
  height: 100% !important;
  padding: 16px !important;
  border: 1px solid #dde8f4 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  height: 32px !important;
  margin-bottom: 12px !important;
}

body[data-view="dashboard"] .erp-ref-card-head h2 {
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #07162a !important;
}

body[data-view="dashboard"] .erp-ref-card-head button {
  height: 30px !important;
  padding: 0 12px !important;
  border: 1px solid #dbe6f4 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #07162a !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  padding: 0 16px !important;
  border: 1px solid #e2eaf4 !important;
  border-radius: 9px 9px 0 0 !important;
  border-bottom: 0 !important;
  background: #fbfdff !important;
}

body[data-view="dashboard"] .erp-ref-tabs button {
  height: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 3px solid transparent !important;
  background: transparent !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-tabs button.active {
  color: #ef1d2f !important;
  border-bottom-color: #ef1d2f !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: calc(100% - 84px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1.05fr .95fr !important;
  gap: 0 !important;
  border: 1px solid #e2eaf4 !important;
  border-radius: 0 0 10px 10px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row article {
  min-width: 0 !important;
  padding: 18px 18px 14px !important;
  border: 0 !important;
  border-right: 1px solid #e2eaf4 !important;
  background: #fff !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row article:last-child {
  border-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row h3 {
  margin: 0 0 12px !important;
  color: #07162a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row h3 small {
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-chart {
  height: calc(100% - 26px) !important;
  min-height: 150px !important;
  display: grid !important;
  grid-template-rows: 1fr 24px !important;
  align-items: end !important;
}

body[data-view="dashboard"] .erp-ref-chart svg {
  width: 100% !important;
  height: 100% !important;
  fill: none !important;
  stroke: none !important;
}

body[data-view="dashboard"] .erp-ref-chart svg polyline {
  stroke: #ef4444 !important;
  fill: none !important;
  stroke-width: 3 !important;
}

body[data-view="dashboard"] .erp-ref-chart svg polygon {
  stroke: none !important;
}

body[data-view="dashboard"] .erp-ref-chart div {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-align: center !important;
}

body[data-view="dashboard"] .erp-ref-donut-wrap {
  height: calc(100% - 24px) !important;
  display: grid !important;
  grid-template-columns: 144px minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: center !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  width: 136px !important;
  height: 136px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: conic-gradient(var(--segments)) !important;
  position: relative !important;
}

body[data-view="dashboard"] .erp-ref-donut::after {
  content: "" !important;
  position: absolute !important;
  inset: 28px !important;
  border-radius: 999px !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-donut b,
body[data-view="dashboard"] .erp-ref-donut span {
  position: relative !important;
  z-index: 1 !important;
  grid-area: 1 / 1 !important;
}

body[data-view="dashboard"] .erp-ref-donut b {
  margin-top: -10px !important;
  font-size: 26px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-donut span {
  margin-top: 30px !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-legend {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-legend span {
  display: grid !important;
  grid-template-columns: 10px minmax(0, 1fr) max-content !important;
  gap: 8px !important;
  align-items: center !important;
  color: #07162a !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-legend i {
  width: 9px !important;
  height: 9px !important;
  border-radius: 999px !important;
}

body[data-view="dashboard"] .erp-ref-list {
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row {
  min-height: 74px !important;
  padding: 14px !important;
  grid-template-columns: 48px minmax(0, 1fr) max-content !important;
  border-color: #e2eaf4 !important;
  border-radius: 11px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row > span,
body[data-view="dashboard"] .erp-ref-activity-row > span {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b {
  font-size: 13.5px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row small,
body[data-view="dashboard"] .erp-ref-activity-row small,
body[data-view="dashboard"] .erp-ref-alert-row u {
  font-size: 11.5px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row em {
  color: #ef1d2f !important;
  background: #ffe7ea !important;
  font-size: 11px !important;
}

body[data-view="dashboard"] .erp-ref-wide {
  height: 32px !important;
  margin-top: auto !important;
  border: 1px solid #dbe6f4 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #ef1d2f !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  min-height: 0 !important;
  height: calc(100% - 44px) !important;
  border-color: #e2eaf4 !important;
}

body[data-view="dashboard"] .erp-ref-empty svg {
  width: 78px !important;
  height: 78px !important;
  padding: 18px !important;
  background: #eef4fb !important;
  color: #1e2f52 !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  height: calc(100% - 44px) !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-action {
  min-height: 0 !important;
  height: 100% !important;
  padding: 12px !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  border-radius: 10px !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  width: 42px !important;
  height: 42px !important;
}

body[data-view="dashboard"] .erp-ref-action b {
  font-size: 12.5px !important;
}

body[data-view="dashboard"] .erp-ref-action small {
  font-size: 11px !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  height: 24px !important;
  font-size: 11.5px !important;
}

@media (min-width: 1500px) {
  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: 1.38fr .88fr .88fr !important;
  }
}

@media (max-width: 1400px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 190px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 190px !important;
    min-width: 190px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 18px 22px 12px !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    grid-template-columns: minmax(300px, 1fr) minmax(260px, 360px) 40px 96px 72px 132px 88px 118px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    grid-template-columns: 1fr 380px !important;
    padding: 20px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    padding-right: 16px !important;
    gap: 2px 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi em {
    font-size: 25px !important;
  }
}

/* Final reference dashboard match: compact, one-window ERP command center. */
body[data-view="dashboard"] {
  --erp-navy: #071b38;
  --erp-navy-2: #0b2347;
  --erp-red: #ef1f2d;
  --erp-blue: #2563eb;
  --erp-border: #dce5f2;
  --erp-text: #0f1b33;
  --erp-muted: #536782;
  overflow: hidden !important;
}

body[data-view="dashboard"] .app-shell {
  grid-template-columns: 212px minmax(0, 1fr) !important;
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #f5f8fc !important;
}

body[data-view="dashboard"] .sidebar {
  width: 212px !important;
  min-width: 212px !important;
  height: 100vh !important;
  padding: 18px 14px !important;
  background: linear-gradient(180deg, #07192f 0%, #06162a 100%) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .brand-logo {
  width: 178px !important;
  height: 50px !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 7px !important;
}

body[data-view="dashboard"] .brand h2 {
  margin-top: 12px !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
}

body[data-view="dashboard"] .brand p {
  font-size: 12px !important;
}

body[data-view="dashboard"] .nav-section-title {
  margin: 18px 8px 8px !important;
  color: #8da2c1 !important;
  font-size: 11px !important;
  letter-spacing: 1.7px !important;
}

body[data-view="dashboard"] .nav-btn {
  min-height: 36px !important;
  padding: 9px 10px !important;
  gap: 10px !important;
  border-radius: 8px !important;
  color: #eaf1fb !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
}

body[data-view="dashboard"] .nav-btn.active {
  background: linear-gradient(135deg, #ff1f2f, #bf1638) !important;
  box-shadow: 0 10px 24px rgba(239, 31, 45, .24) !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .main {
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #f5f8fc !important;
}

body[data-view="dashboard"] .view {
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  height: 100vh !important;
  min-height: 0 !important;
  padding: 30px 32px 20px !important;
  display: grid !important;
  grid-template-rows: 68px 170px minmax(0, 1fr) 22px !important;
  gap: 18px !important;
  overflow: hidden !important;
  color: var(--erp-text) !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
}

body[data-view="dashboard"] .erp-ref-header {
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) minmax(340px, 470px) 44px 116px 82px 148px 118px 142px !important;
  gap: 12px !important;
  align-items: center !important;
}

body[data-view="dashboard"] .erp-ref-title {
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: center !important;
}

body[data-view="dashboard"] .erp-ref-title span {
  width: 46px !important;
  height: 46px !important;
  border-radius: 11px !important;
  background: #eef5ff !important;
  color: var(--erp-blue) !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  font-size: 26px !important;
  line-height: 1.08 !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin-top: 5px !important;
  font-size: 14px !important;
  color: #566985 !important;
}

body[data-view="dashboard"] .erp-ref-search,
body[data-view="dashboard"] .erp-ref-chip,
body[data-view="dashboard"] .erp-ref-button,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user {
  height: 44px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

body[data-view="dashboard"] .erp-ref-button {
  background: linear-gradient(135deg, #f41f2d, #c91536) !important;
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(239, 31, 45, .22) !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  height: 170px !important;
  min-height: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #071b38, #09264d) !important;
  padding: 24px 22px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 430px !important;
  gap: 18px !important;
  box-shadow: 0 18px 38px rgba(9, 30, 64, .18) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  height: 100% !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  grid-template-rows: auto auto 1fr auto !important;
  gap: 2px 14px !important;
  align-items: start !important;
  padding: 6px 26px 4px 0 !important;
  border-right: 1px solid rgba(255, 255, 255, .18) !important;
  color: #fff !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-kpi:last-child {
  border-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 54px !important;
  height: 54px !important;
  border-radius: 12px !important;
  grid-row: 1 / span 3 !important;
}

body[data-view="dashboard"] .erp-ref-kpi strong {
  font-size: 13px !important;
  line-height: 1.2 !important;
  color: #fff !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  font-size: 30px !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
  color: #fff !important;
  white-space: nowrap !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  font-size: 12px !important;
  line-height: 1.25 !important;
  color: rgba(255, 255, 255, .9) !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi a {
  align-self: end !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: 34px 1fr !important;
  gap: 10px !important;
  min-width: 0 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-head {
  grid-column: 1 / -1 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-glance-card {
  height: 80px !important;
  padding: 12px 8px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .09) !important;
  display: grid !important;
  align-content: center !important;
  text-align: center !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-card b {
  font-size: 26px !important;
  line-height: 1 !important;
}

body[data-view="dashboard"] .erp-ref-glance-card span {
  font-size: 12px !important;
  line-height: 1.3 !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1.45fr .8fr .8fr !important;
  grid-template-rows: minmax(0, 1.06fr) minmax(0, .84fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 18px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card {
  min-height: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--erp-border) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045) !important;
  padding: 18px !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  height: 34px !important;
  margin-bottom: 12px !important;
  align-items: center !important;
}

body[data-view="dashboard"] .erp-ref-card-head h2 {
  font-size: 17px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-card-head button,
body[data-view="dashboard"] .erp-ref-card-head span {
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  gap: 26px !important;
  border-bottom: 1px solid #edf2f8 !important;
  margin-bottom: 14px !important;
}

body[data-view="dashboard"] .erp-ref-tabs button {
  height: 44px !important;
  padding: 0 4px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #41546f !important;
}

body[data-view="dashboard"] .erp-ref-tabs button:first-child {
  color: var(--erp-red) !important;
  border-bottom: 3px solid var(--erp-red) !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: calc(100% - 92px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 18px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-chart {
  height: 100% !important;
  min-height: 180px !important;
  padding: 0 !important;
}

body[data-view="dashboard"] .erp-ref-chart h3,
body[data-view="dashboard"] .erp-ref-donut-wrap h3 {
  font-size: 13px !important;
  margin-bottom: 8px !important;
}

body[data-view="dashboard"] .erp-ref-chart svg {
  width: 100% !important;
  height: calc(100% - 26px) !important;
  min-height: 150px !important;
}

body[data-view="dashboard"] .erp-ref-donut-wrap {
  height: 100% !important;
  min-height: 180px !important;
  display: grid !important;
  grid-template-columns: 160px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  width: 150px !important;
  height: 150px !important;
}

body[data-view="dashboard"] .erp-ref-donut-legend {
  gap: 8px !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-list {
  height: calc(100% - 46px) !important;
  min-height: 0 !important;
  display: grid !important;
  align-content: start !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row {
  min-height: 80px !important;
  height: auto !important;
  padding: 13px 14px !important;
  border-radius: 10px !important;
  grid-template-columns: 52px minmax(0, 1fr) max-content !important;
  gap: 4px 14px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row > span {
  width: 46px !important;
  height: 46px !important;
  grid-row: 1 / span 2 !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b {
  font-size: 14px !important;
  line-height: 1.15 !important;
}

body[data-view="dashboard"] .erp-ref-alert-row small,
body[data-view="dashboard"] .erp-ref-alert-row u {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

body[data-view="dashboard"] .erp-ref-alert-row em {
  align-self: center !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  background: #ffe9ec !important;
  color: #ef1f2d !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  font-style: normal !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  height: calc(100% - 46px) !important;
  min-height: 0 !important;
  border: 1px solid #e5edf7 !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-empty svg {
  width: 112px !important;
  height: 112px !important;
  padding: 20px !important;
  background: #f2f6fb !important;
  color: #253b63 !important;
  border-radius: 999px !important;
}

body[data-view="dashboard"] .erp-ref-empty b {
  font-size: 15px !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  height: calc(100% - 46px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-action {
  min-height: 0 !important;
  height: 100% !important;
  padding: 13px !important;
  border-radius: 10px !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
}

body[data-view="dashboard"] .erp-ref-action b {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body[data-view="dashboard"] .erp-ref-action small {
  font-size: 11.5px !important;
}

body[data-view="dashboard"] .erp-ref-activity-row {
  min-height: 54px !important;
  padding: 10px 12px !important;
  grid-template-columns: 42px minmax(0, 1fr) max-content !important;
}

body[data-view="dashboard"] .erp-ref-activity-row > span {
  width: 40px !important;
  height: 40px !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12px !important;
  color: #6b7d97 !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon svg,
body[data-view="dashboard"] .erp-ref-title span svg,
body[data-view="dashboard"] .erp-ref-alert-row > span svg,
body[data-view="dashboard"] .erp-ref-action span svg,
body[data-view="dashboard"] .erp-ref-empty svg,
body[data-view="dashboard"] .erp-ref-activity-row > span svg,
body[data-view="dashboard"] .nav-btn svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 198px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 198px !important;
    min-width: 198px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 20px 22px 14px !important;
    grid-template-rows: 62px 154px minmax(0, 1fr) 20px !important;
    gap: 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    grid-template-columns: minmax(320px, 1fr) minmax(300px, 420px) 42px 108px 76px 140px 104px 130px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    height: 154px !important;
    grid-template-columns: 1fr 390px !important;
    padding: 20px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    padding-right: 18px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi em {
    font-size: 26px !important;
  }
}

/* ERP dashboard reference lock - 2026-05-31.
   This final block intentionally overrides all earlier dashboard experiments. */
body[data-view="dashboard"] {
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

body[data-view="dashboard"] .app-shell {
  display: grid !important;
  grid-template-columns: 244px minmax(0, 1fr) !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .sidebar {
  width: 244px !important;
  min-width: 244px !important;
  height: 100vh !important;
  overflow: hidden !important;
  padding: 22px 18px !important;
  background: linear-gradient(180deg, #061426 0%, #071a31 100%) !important;
  border: 0 !important;
}

body[data-view="dashboard"] .sidebar-logo {
  width: 172px !important;
  height: 54px !important;
  object-fit: contain !important;
  padding: 8px !important;
  margin: 0 0 14px !important;
  background: #fff !important;
  border-radius: 8px !important;
}

body[data-view="dashboard"] .brand-title {
  font-size: 16px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .brand-subtitle {
  font-size: 12px !important;
  color: #dbeafe !important;
}

body[data-view="dashboard"] .sidebar-section-title {
  margin: 20px 0 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  letter-spacing: 0.16em !important;
  font-weight: 900 !important;
  color: #8fb0d2 !important;
}

body[data-view="dashboard"] .nav-item {
  height: 38px !important;
  padding: 0 12px !important;
  gap: 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
}

body[data-view="dashboard"] .nav-item.active {
  background: #ef1528 !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(239, 21, 40, 0.28) !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  box-sizing: border-box !important;
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-rows: 68px 158px minmax(0, 1fr) 22px !important;
  gap: 18px !important;
  padding: 30px 32px 18px !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .erp-ref-header {
  height: 68px !important;
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) minmax(390px, 470px) 46px 116px 86px 154px 120px 140px !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-title {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-title-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: grid !important;
  place-items: center !important;
  background: #eff6ff !important;
  color: #2563eb !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  font-size: 26px !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin: 6px 0 0 !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  color: #475569 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-search {
  height: 46px !important;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) 38px !important;
  align-items: center !important;
  padding: 0 8px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04) !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  width: 100% !important;
  height: 36px !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  font-size: 13px !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-small-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-primary {
  height: 46px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-primary {
  border: 0 !important;
  padding: 0 18px !important;
  background: #ef1528 !important;
  color: #fff !important;
  box-shadow: 0 16px 30px rgba(239, 21, 40, 0.22) !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  height: 158px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 430px !important;
  gap: 22px !important;
  overflow: hidden !important;
  padding: 24px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #061426 0%, #0a2344 100%) !important;
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18) !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  min-width: 0 !important;
  height: 100% !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  min-width: 0 !important;
  height: 110px !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 0 24px 0 0 !important;
  border-right: 1px solid rgba(148, 163, 184, 0.28) !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 56px !important;
  height: 56px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 14px !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon.red { background: #ef1528 !important; }
body[data-view="dashboard"] .erp-ref-kpi-icon.blue { background: #2563eb !important; }
body[data-view="dashboard"] .erp-ref-kpi-icon.green { background: #12b981 !important; }
body[data-view="dashboard"] .erp-ref-kpi-icon.orange { background: #f59e0b !important; }

body[data-view="dashboard"] .erp-ref-kpi > span:nth-child(2) {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  order: 1 !important;
  font-style: normal !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  color: #e5edf8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  order: 2 !important;
  font-size: 26px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #fff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  order: 3 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  color: #d4e1f4 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi i {
  grid-column: 2 !important;
  align-self: end !important;
  font-style: normal !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #60a5fa !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-content: center !important;
  padding-left: 18px !important;
  border-left: 1px solid rgba(148, 163, 184, 0.28) !important;
}

body[data-view="dashboard"] .erp-ref-glance h3 {
  grid-column: 1 / -1 !important;
  display: flex !important;
  justify-content: space-between !important;
  margin: 0 0 4px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-card {
  height: 72px !important;
  display: grid !important;
  place-items: center !important;
  padding: 8px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.09) !important;
  color: #fff !important;
  text-align: center !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-glance-card b {
  font-size: 24px !important;
  line-height: 1 !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  min-height: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.68fr) minmax(310px, 0.68fr) !important;
  grid-template-rows: minmax(0, 1.1fr) minmax(0, 0.9fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 16px !important;
}

body[data-view="dashboard"] .erp-ref-card {
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 18px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05) !important;
}

body[data-view="dashboard"] .erp-ref-operations { grid-area: operations !important; }
body[data-view="dashboard"] .erp-ref-compliance { grid-area: compliance !important; }
body[data-view="dashboard"] .erp-ref-pending { grid-area: pending !important; }
body[data-view="dashboard"] .erp-ref-actions { grid-area: actions !important; }
body[data-view="dashboard"] .erp-ref-activities { grid-area: activities !important; }
body[data-view="dashboard"] .erp-ref-upcoming { grid-area: upcoming !important; }

body[data-view="dashboard"] .erp-ref-card h2 {
  margin: 0 !important;
  font-size: 17px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: -0.01em !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 14px !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 46px !important;
  display: flex !important;
  align-items: flex-end !important;
  gap: 28px !important;
  padding: 0 18px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px 10px 0 0 !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .erp-ref-tab {
  height: 46px !important;
  display: flex !important;
  align-items: center !important;
  border-bottom: 3px solid transparent !important;
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body[data-view="dashboard"] .erp-ref-tab.active {
  color: #ef1528 !important;
  border-bottom-color: #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: calc(100% - 92px) !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 330px !important;
  border: 1px solid #e2e8f0 !important;
  border-top: 0 !important;
  border-radius: 0 0 12px 12px !important;
}

body[data-view="dashboard"] .erp-ref-chart-box,
body[data-view="dashboard"] .erp-ref-donut-box {
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 24px !important;
}

body[data-view="dashboard"] .erp-ref-chart-area {
  height: 190px !important;
  position: relative !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-action-tile,
body[data-view="dashboard"] .erp-ref-action {
  height: 88px !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  text-align: left !important;
  cursor: pointer !important;
}

body[data-view="dashboard"] .erp-ref-list {
  display: grid !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row {
  height: 78px !important;
  min-height: 78px !important;
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  height: calc(100% - 44px) !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-empty-icon {
  width: 116px !important;
  height: 116px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 auto 12px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  color: #1e3a8a !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  color: #64748b !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-dashboard svg,
body[data-view="dashboard"] .nav-item svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

@media (max-width: 1500px), (max-height: 850px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 212px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 212px !important;
    min-width: 212px !important;
    padding: 18px 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 22px 24px 14px !important;
    grid-template-rows: 62px 142px minmax(0, 1fr) 20px !important;
    gap: 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    height: 62px !important;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 430px) 42px 108px 76px 140px 100px 124px !important;
    gap: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-title h1 {
    font-size: 23px !important;
  }

  body[data-view="dashboard"] .erp-ref-title p {
    font-size: 13px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    height: 142px !important;
    grid-template-columns: minmax(0, 1fr) 380px !important;
    padding: 20px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    height: 98px !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 12px !important;
    padding-right: 18px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi-icon {
    width: 48px !important;
    height: 48px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi b {
    font-size: 24px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi em {
    font-size: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.7fr) minmax(280px, 0.7fr) !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-card {
    padding: 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-chart-area {
    height: 155px !important;
  }

  body[data-view="dashboard"] .erp-ref-actions-grid {
    gap: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-action-tile,
  body[data-view="dashboard"] .erp-ref-action {
    height: 76px !important;
  }

  body[data-view="dashboard"] .erp-ref-alert-row,
  body[data-view="dashboard"] .erp-ref-activity-row {
    height: 64px !important;
    min-height: 64px !important;
  }
}

/* ERP dashboard final reference lock - 2026-05-31 */
body[data-view="dashboard"] {
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

body[data-view="dashboard"] .app-shell {
  display: grid !important;
  grid-template-columns: 210px minmax(0, 1fr) !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  height: 100vh !important;
  overflow: hidden !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .sidebar {
  width: 210px !important;
  min-width: 210px !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #071426 0%, #061426 100%) !important;
  padding: 18px 12px !important;
  color: #fff !important;
  border-right: 0 !important;
}

body[data-view="dashboard"] .sidebar-logo {
  width: 160px !important;
  height: 48px !important;
  max-height: 48px !important;
  object-fit: contain !important;
  background: #fff !important;
  border-radius: 7px !important;
  padding: 7px !important;
  margin: 0 0 12px !important;
  display: block !important;
}

body[data-view="dashboard"] .brand-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .brand-subtitle {
  font-size: 12px !important;
  color: #dbeafe !important;
  line-height: 1.25 !important;
}

body[data-view="dashboard"] .sidebar-section-title,
body[data-view="dashboard"] .nav-section-title {
  font-size: 11px !important;
  letter-spacing: .14em !important;
  color: #8fb0d2 !important;
  font-weight: 800 !important;
  margin: 18px 8px 8px !important;
}

body[data-view="dashboard"] .nav-item {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 7px !important;
  padding: 0 10px !important;
  gap: 10px !important;
  font-size: 12.5px !important;
  font-weight: 750 !important;
  color: #f8fafc !important;
  line-height: 1.1 !important;
}

body[data-view="dashboard"] .nav-item svg {
  width: 16px !important;
  height: 16px !important;
}

body[data-view="dashboard"] .nav-item.active {
  background: #ef1528 !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(239, 21, 40, .28) !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  box-sizing: border-box !important;
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 24px 28px 16px !important;
  display: grid !important;
  grid-template-rows: 66px 150px minmax(0, 1fr) 22px !important;
  gap: 16px !important;
  background: #f8fafc !important;
}

body[data-view="dashboard"] .erp-ref-header {
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 460px) 42px 108px 80px 150px 112px 136px !important;
  align-items: center !important;
  gap: 12px !important;
  height: 66px !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-title {
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  font-size: 25px !important;
  line-height: 1.1 !important;
  font-weight: 850 !important;
  letter-spacing: -.02em !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin: 6px 0 0 !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  color: #475569 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-title-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  display: grid !important;
  place-items: center !important;
}

body[data-view="dashboard"] .erp-ref-search {
  height: 42px !important;
  border-radius: 10px !important;
  border: 1px solid #d7e0ec !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  gap: 10px !important;
  box-shadow: none !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  font-size: 13px !important;
  color: #334155 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
}

body[data-view="dashboard"] .erp-ref-icon-btn,
body[data-view="dashboard"] .erp-ref-pill,
body[data-view="dashboard"] .erp-ref-admin,
body[data-view="dashboard"] .erp-ref-date-pill,
body[data-view="dashboard"] .erp-ref-quick {
  height: 42px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  background: #ef1528 !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 14px 28px rgba(239, 21, 40, .28) !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  min-height: 0 !important;
  height: 150px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 410px !important;
  gap: 18px !important;
  align-items: stretch !important;
  padding: 22px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #061426 0%, #0b2447 100%) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  height: 106px !important;
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 0 24px 0 0 !important;
  margin-right: 24px !important;
  border-right: 1px solid rgba(255, 255, 255, .16) !important;
  color: #fff !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi:last-child {
  margin-right: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 54px !important;
  height: 54px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon svg {
  width: 25px !important;
  height: 25px !important;
}

body[data-view="dashboard"] .erp-ref-kpi-text {
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  display: block !important;
  margin: 0 0 5px !important;
  font-size: 12.5px !important;
  line-height: 1.2 !important;
  font-style: normal !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  display: block !important;
  margin: 0 0 4px !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  color: #fff !important;
  letter-spacing: -.02em !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  color: #dbeafe !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi i {
  display: block !important;
  margin-top: 15px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-style: normal !important;
  font-weight: 800 !important;
  color: #3b82f6 !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  min-width: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, .16) !important;
  padding-left: 18px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: 26px 78px !important;
  gap: 9px !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-header {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-glance-card {
  height: 78px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .08) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  padding: 8px !important;
}

body[data-view="dashboard"] .erp-ref-glance-card span {
  font-size: 11.5px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  text-align: center !important;
}

body[data-view="dashboard"] .erp-ref-glance-card b {
  margin-top: 5px !important;
  font-size: 22px !important;
  line-height: 1 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .72fr) minmax(300px, .72fr) !important;
  grid-template-rows: minmax(0, 1fr) minmax(0, .78fr) !important;
  grid-template-areas: "operations compliance pending" "actions activities upcoming" !important;
  gap: 16px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card {
  border: 1px solid #dbe5f0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06) !important;
  padding: 16px !important;
  overflow: hidden !important;
  min-height: 0 !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  height: 30px !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

body[data-view="dashboard"] .erp-ref-card-head h2 {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.1 !important;
  font-weight: 850 !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-operations { grid-area: operations !important; }
body[data-view="dashboard"] .erp-ref-compliance { grid-area: compliance !important; }
body[data-view="dashboard"] .erp-ref-pending { grid-area: pending !important; }
body[data-view="dashboard"] .erp-ref-actions { grid-area: actions !important; }
body[data-view="dashboard"] .erp-ref-activities { grid-area: activities !important; }
body[data-view="dashboard"] .erp-ref-upcoming { grid-area: upcoming !important; }

body[data-view="dashboard"] .erp-ref-tabs {
  height: 36px !important;
  display: flex !important;
  align-items: flex-end !important;
  gap: 22px !important;
  border-bottom: 1px solid #e5edf6 !important;
  margin-bottom: 12px !important;
}

body[data-view="dashboard"] .erp-ref-tab {
  border: 0 !important;
  background: transparent !important;
  height: 36px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #334155 !important;
  border-bottom: 3px solid transparent !important;
}

body[data-view="dashboard"] .erp-ref-tab.active {
  color: #ef1528 !important;
  border-bottom-color: #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-chart-area {
  height: 180px !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 310px !important;
  gap: 16px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-line-chart {
  height: 134px !important;
}

body[data-view="dashboard"] .erp-ref-donut-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  height: 140px !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  width: 128px !important;
  height: 128px !important;
  min-width: 128px !important;
}

body[data-view="dashboard"] .erp-ref-donut-legend {
  flex: 1 !important;
  display: grid !important;
  gap: 9px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

body[data-view="dashboard"] .erp-ref-list {
  display: grid !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row {
  height: 72px !important;
  min-height: 72px !important;
  border: 1px solid #e1e9f3 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-row-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 11px !important;
  display: grid !important;
  place-items: center !important;
  background: #fff1f2 !important;
  color: #ef1528 !important;
}

body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b {
  font-size: 14px !important;
  line-height: 1.15 !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-alert-row span,
body[data-view="dashboard"] .erp-ref-activity-row span {
  font-size: 12.5px !important;
  line-height: 1.25 !important;
  color: #475569 !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  height: calc(100% - 42px) !important;
  min-height: 190px !important;
  border: 1px solid #e1e9f3 !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  background: #fff !important;
}

body[data-view="dashboard"] .erp-ref-empty-icon {
  width: 92px !important;
  height: 92px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  background: #f1f5f9 !important;
  color: #1e3a5f !important;
  margin: 0 auto 14px !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
  height: calc(100% - 42px) !important;
  min-height: 0 !important;
}

body[data-view="dashboard"] .erp-ref-action,
body[data-view="dashboard"] .erp-ref-action-tile {
  height: 124px !important;
  border: 1px solid #e1e9f3 !important;
  border-radius: 10px !important;
  background: #fff !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 8px !important;
  padding: 10px !important;
  text-align: center !important;
  cursor: pointer !important;
}

body[data-view="dashboard"] .erp-ref-action-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  display: grid !important;
  place-items: center !important;
}

body[data-view="dashboard"] .erp-ref-action b {
  font-size: 13px !important;
  line-height: 1.15 !important;
  color: #0f172a !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  font-size: 11.5px !important;
  line-height: 1.25 !important;
  color: #475569 !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12px !important;
  color: #64748b !important;
  height: 22px !important;
}

@media (max-height: 860px) {
  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 20px 24px 12px !important;
    grid-template-rows: 58px 128px minmax(0, 1fr) 20px !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    height: 58px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    height: 128px !important;
    padding: 18px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    height: 88px !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi-icon {
    width: 46px !important;
    height: 46px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi b {
    font-size: 24px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi em {
    font-size: 11.5px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance {
    grid-template-rows: 22px 62px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance-card {
    height: 62px !important;
  }

  body[data-view="dashboard"] .erp-ref-card {
    padding: 13px !important;
  }

  body[data-view="dashboard"] .erp-ref-chart-area {
    height: 150px !important;
  }

  body[data-view="dashboard"] .erp-ref-line-chart {
    height: 110px !important;
  }

  body[data-view="dashboard"] .erp-ref-donut {
    width: 106px !important;
    height: 106px !important;
    min-width: 106px !important;
  }

  body[data-view="dashboard"] .erp-ref-alert-row,
  body[data-view="dashboard"] .erp-ref-activity-row {
    height: 58px !important;
    min-height: 58px !important;
  }

  body[data-view="dashboard"] .erp-ref-actions-grid {
    gap: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-action,
  body[data-view="dashboard"] .erp-ref-action-tile {
    height: 94px !important;
  }
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 200px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 200px !important;
    min-width: 200px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 18px 22px 12px !important;
    grid-template-rows: 56px 122px minmax(0, 1fr) 20px !important;
    gap: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    height: 56px !important;
    grid-template-columns: minmax(300px, 1fr) minmax(280px, 380px) 38px 102px 72px 132px 96px 120px !important;
    gap: 9px !important;
  }

  body[data-view="dashboard"] .erp-ref-title h1 {
    font-size: 22px !important;
  }

  body[data-view="dashboard"] .erp-ref-title p {
    font-size: 12.5px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    height: 122px !important;
    grid-template-columns: minmax(0, 1fr) 350px !important;
    padding: 16px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    height: 84px !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
    margin-right: 14px !important;
    padding-right: 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi-icon {
    width: 42px !important;
    height: 42px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi b {
    font-size: 22px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi em {
    font-size: 11px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi small,
  body[data-view="dashboard"] .erp-ref-kpi i {
    font-size: 10.5px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance {
    grid-template-rows: 20px 58px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance-card {
    height: 58px !important;
  }

  body[data-view="dashboard"] .erp-ref-glance-card b {
    font-size: 19px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    gap: 12px !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, .75fr) minmax(270px, .75fr) !important;
  }

  body[data-view="dashboard"] .erp-ref-card {
    padding: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-card-head {
    height: 28px !important;
    margin-bottom: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-card-head h2 {
    font-size: 15px !important;
  }

  body[data-view="dashboard"] .erp-ref-chart-area {
    height: 136px !important;
    grid-template-columns: minmax(0, 1fr) 250px !important;
  }

  body[data-view="dashboard"] .erp-ref-line-chart {
    height: 100px !important;
  }

  body[data-view="dashboard"] .erp-ref-donut {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px !important;
  }

  body[data-view="dashboard"] .erp-ref-alert-row,
  body[data-view="dashboard"] .erp-ref-activity-row {
    height: 56px !important;
    min-height: 56px !important;
  }

  body[data-view="dashboard"] .erp-ref-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-view="dashboard"] .erp-ref-action,
  body[data-view="dashboard"] .erp-ref-action-tile {
    height: 62px !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    justify-items: start !important;
    text-align: left !important;
    align-content: center !important;
  }

  body[data-view="dashboard"] .erp-ref-action-icon {
    width: 34px !important;
    height: 34px !important;
  }
}
/* EOF dashboard override marker */
/* Final dashboard override: keep this as the last dashboard block. */
body[data-view="dashboard"] .app-shell { grid-template-columns: 280px minmax(0, 1fr) !important; background: #f5f7fb !important; }
body[data-view="dashboard"] .topbar { display: none !important; }
body[data-view="dashboard"] .sidebar { width: 280px !important; min-width: 280px !important; background: linear-gradient(180deg, #07162b 0%, #061328 56%, #031022 100%) !important; }
body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view { background: #f5f7fb !important; overflow: auto !important; }

body[data-view="dashboard"] .erp-ref-dashboard {
  min-height: 100vh !important;
  padding: 28px 32px 18px !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  gap: 20px !important;
  background: #f5f7fb !important;
}

body[data-view="dashboard"] .erp-ref-header {
  height: auto !important;
  min-height: 64px !important;
  display: grid !important;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 460px) 48px 116px 74px 178px 132px 160px !important;
  align-items: center !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-title { min-width: 0 !important; display: flex !important; align-items: center !important; gap: 16px !important; }
body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  color: #07142c !important;
  font-size: 28px !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body[data-view="dashboard"] .erp-ref-title p {
  margin: 6px 0 0 !important;
  color: #475569 !important;
  font-size: 15px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-menu {
  width: 48px !important;
  height: 48px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #eaf2ff !important;
  color: #2563eb !important;
  display: grid !important;
  place-items: center !important;
}

body[data-view="dashboard"] .erp-ref-search,
body[data-view="dashboard"] .erp-ref-bell,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick {
  height: 48px !important;
  border: 1px solid #d8e2ef !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #07142c !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04) !important;
}

body[data-view="dashboard"] .erp-ref-search {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) 46px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 8px 0 16px !important;
}
body[data-view="dashboard"] .erp-ref-search input { min-width: 0 !important; border: 0 !important; background: transparent !important; font-size: 14px !important; }
body[data-view="dashboard"] .erp-ref-bell,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}
body[data-view="dashboard"] .erp-ref-bell { padding: 0 !important; border-radius: 50% !important; color: #ef1528 !important; }
body[data-view="dashboard"] .erp-ref-cloud { color: #06944f !important; background: #e9fbf0 !important; border-color: #bdf3cf !important; }
body[data-view="dashboard"] .erp-ref-quick { color: #fff !important; background: #ef1528 !important; border-color: #ef1528 !important; }
body[data-view="dashboard"] .erp-ref-user b { width: 30px !important; height: 30px !important; border-radius: 50% !important; display: grid !important; place-items: center !important; color: #fff !important; background: #07142c !important; }

body[data-view="dashboard"] .erp-ref-command-strip {
  height: auto !important;
  min-height: 150px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 380px !important;
  gap: 20px !important;
  padding: 22px 24px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #06162d 0%, #061d3b 100%) !important;
  color: #fff !important;
}
body[data-view="dashboard"] .erp-ref-strip-metrics { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

body[data-view="dashboard"] .erp-ref-kpi {
  height: auto !important;
  min-height: 106px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 24px !important;
  align-items: center !important;
  column-gap: 16px !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, .18) !important;
  background: transparent !important;
  color: #fff !important;
  text-align: left !important;
}
body[data-view="dashboard"] .erp-ref-kpi:last-child { border-right: 0 !important; }
body[data-view="dashboard"] .erp-ref-kpi-icon { width: 56px !important; height: 56px !important; border-radius: 11px !important; display: grid !important; place-items: center !important; color: #fff !important; }
body[data-view="dashboard"] .erp-ref-kpi.red .erp-ref-kpi-icon { background: #ef1528 !important; }
body[data-view="dashboard"] .erp-ref-kpi.blue .erp-ref-kpi-icon { background: #2563eb !important; }
body[data-view="dashboard"] .erp-ref-kpi.green .erp-ref-kpi-icon { background: #12b981 !important; }
body[data-view="dashboard"] .erp-ref-kpi.orange .erp-ref-kpi-icon { background: #f59e0b !important; }
body[data-view="dashboard"] .erp-ref-kpi span:not(.erp-ref-kpi-icon) { min-width: 0 !important; display: grid !important; gap: 7px !important; }
body[data-view="dashboard"] .erp-ref-kpi em,
body[data-view="dashboard"] .erp-ref-kpi b,
body[data-view="dashboard"] .erp-ref-kpi small { display: block !important; min-width: 0 !important; color: #fff !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
body[data-view="dashboard"] .erp-ref-kpi em { font-size: 12px !important; font-style: normal !important; font-weight: 850 !important; }
body[data-view="dashboard"] .erp-ref-kpi b { font-size: 24px !important; line-height: 1 !important; font-weight: 950 !important; }
body[data-view="dashboard"] .erp-ref-kpi small { color: #cbd5e1 !important; font-size: 12px !important; }
body[data-view="dashboard"] .erp-ref-kpi i { grid-column: 1 / -1 !important; font-style: normal !important; color: #60a5fa !important; font-size: 13px !important; font-weight: 850 !important; }

body[data-view="dashboard"] .erp-ref-glance { width: 100% !important; min-width: 0 !important; justify-self: stretch !important; display: grid !important; grid-template-rows: 28px minmax(0, 1fr) !important; gap: 12px !important; padding-left: 18px !important; border-left: 1px solid rgba(255, 255, 255, .18) !important; }
body[data-view="dashboard"] .erp-ref-glance-head { display: grid !important; grid-template-columns: 22px minmax(0, 1fr) auto !important; align-items: center !important; gap: 8px !important; color: #fff !important; }
body[data-view="dashboard"] .erp-ref-glance-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 10px !important; }
body[data-view="dashboard"] .erp-ref-glance-grid {
  width: 100% !important;
  min-width: 450px !important;
  justify-self: stretch !important;
  align-self: stretch !important;
}
body[data-view="dashboard"] .erp-ref-glance-grid button { min-height: 74px !important; border: 1px solid rgba(255, 255, 255, .08) !important; border-radius: 6px !important; background: rgba(255, 255, 255, .09) !important; color: #fff !important; display: grid !important; align-content: center !important; justify-items: center !important; gap: 7px !important; padding: 10px !important; text-align: center !important; }

body[data-view="dashboard"] .erp-ref-grid {
  display: grid !important;
  grid-template-columns: minmax(520px, 1.55fr) minmax(300px, .8fr) minmax(300px, .8fr) !important;
  grid-template-areas: "operations compliance pending" "actions activities upcoming" !important;
  gap: 16px !important;
}
body[data-view="dashboard"] .erp-ref-card { padding: 20px !important; border: 1px solid #dbe5f0 !important; border-radius: 8px !important; background: #fff !important; box-shadow: 0 12px 32px rgba(15, 23, 42, .05) !important; overflow: hidden !important; }
body[data-view="dashboard"] .erp-ref-card-head { height: auto !important; min-height: 36px !important; margin: 0 0 14px !important; display: flex !important; align-items: center !important; justify-content: space-between !important; }
body[data-view="dashboard"] .erp-ref-card-head h2 { color: #07142c !important; font-size: 18px !important; font-weight: 950 !important; }
body[data-view="dashboard"] .erp-ref-card-head button,
body[data-view="dashboard"] .erp-ref-wide { min-height: 36px !important; border: 1px solid #d8e2ef !important; border-radius: 8px !important; background: #fff !important; color: #ef1528 !important; padding: 0 14px !important; font-size: 13px !important; font-weight: 900 !important; }

body[data-view="dashboard"] .erp-ref-tabs { height: 44px !important; display: flex !important; align-items: stretch !important; border: 1px solid #dbe5f0 !important; border-bottom: 0 !important; border-radius: 8px 8px 0 0 !important; background: #f8fafc !important; }
body[data-view="dashboard"] .erp-ref-tab { min-width: 150px !important; height: auto !important; border: 0 !important; border-right: 1px solid #e5edf6 !important; background: transparent !important; color: #334155 !important; padding: 0 22px !important; font-size: 13px !important; font-weight: 900 !important; }
body[data-view="dashboard"] .erp-ref-tab.active { color: #ef1528 !important; background: #fff !important; border-bottom: 3px solid #ef1528 !important; }
body[data-view="dashboard"] .erp-ref-analytics-row { height: 232px !important; display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr) !important; border: 1px solid #dbe5f0 !important; border-radius: 0 0 8px 8px !important; }
body[data-view="dashboard"] .erp-ref-analytics-row article { padding: 22px !important; display: grid !important; grid-template-rows: auto minmax(0, 1fr) !important; }
body[data-view="dashboard"] .erp-ref-chart svg { width: 100% !important; height: 150px !important; }
body[data-view="dashboard"] .erp-ref-donut-wrap { display: grid !important; grid-template-columns: 140px minmax(0, 1fr) !important; align-items: center !important; gap: 18px !important; }
body[data-view="dashboard"] .erp-ref-donut { width: 140px !important; height: 140px !important; border-radius: 50% !important; background: conic-gradient(var(--segments)) !important; position: relative !important; }
body[data-view="dashboard"] .erp-ref-donut::after { content: "" !important; position: absolute !important; inset: 38px !important; border-radius: 50% !important; background: #fff !important; }
body[data-view="dashboard"] .erp-ref-donut b,
body[data-view="dashboard"] .erp-ref-donut span { position: relative !important; z-index: 1 !important; }
body[data-view="dashboard"] .erp-ref-glance-grid button {
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}
body[data-view="dashboard"] .erp-ref-glance-grid span {
  max-width: 100% !important;
  width: 100% !important;
  display: block !important;
  color: #e2e8f0 !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  text-align: center !important;
  writing-mode: horizontal-tb !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}
body[data-view="dashboard"] .erp-ref-glance-grid b {
  color: #fff !important;
  font-size: 21px !important;
  line-height: 1 !important;
}
body[data-view="dashboard"] .erp-ref-donut-wrap { grid-template-columns: 124px minmax(0, 1fr) !important; }
body[data-view="dashboard"] .erp-ref-donut {
  width: 124px !important;
  height: 124px !important;
}
body[data-view="dashboard"] .erp-ref-donut::after { inset: 34px !important; }

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row,
body[data-view="dashboard"] .erp-ref-approval-row { min-height: 78px !important; display: grid !important; grid-template-columns: 54px minmax(0, 1fr) auto !important; align-items: center !important; gap: 14px !important; padding: 12px 14px !important; border: 1px solid #dbe5f0 !important; border-radius: 8px !important; background: #fff !important; text-align: left !important; }
body[data-view="dashboard"] .erp-ref-alert-row > span,
body[data-view="dashboard"] .erp-ref-activity-row > span { width: 48px !important; height: 48px !important; border-radius: 11px !important; display: grid !important; place-items: center !important; background: #fff1f2 !important; color: #ef1528 !important; }
body[data-view="dashboard"] .erp-ref-alert-row b,
body[data-view="dashboard"] .erp-ref-activity-row b,
body[data-view="dashboard"] .erp-ref-approval-row b,
body[data-view="dashboard"] .erp-ref-alert-row small,
body[data-view="dashboard"] .erp-ref-alert-row u,
body[data-view="dashboard"] .erp-ref-activity-row small,
body[data-view="dashboard"] .erp-ref-approval-row small { min-width: 0 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

body[data-view="dashboard"] .erp-ref-actions-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; }
body[data-view="dashboard"] .erp-ref-action { min-height: 74px !important; display: grid !important; grid-template-columns: 48px minmax(0, 1fr) !important; grid-template-rows: auto auto !important; align-items: center !important; column-gap: 12px !important; padding: 12px !important; border: 1px solid #dbe5f0 !important; border-radius: 8px !important; background: #fff !important; text-align: left !important; }
body[data-view="dashboard"] .erp-ref-action span { grid-row: 1 / 3 !important; width: 48px !important; height: 48px !important; border-radius: 10px !important; display: grid !important; place-items: center !important; color: #2563eb !important; background: #eef4ff !important; }
body[data-view="dashboard"] .erp-ref-action.red span { color: #ef1528 !important; background: #fff1f2 !important; }
body[data-view="dashboard"] .erp-ref-action.green span { color: #10b981 !important; background: #ecfdf5 !important; }
body[data-view="dashboard"] .erp-ref-action.orange span { color: #f59e0b !important; background: #fff7ed !important; }
body[data-view="dashboard"] .erp-ref-action.purple span { color: #7c3aed !important; background: #f3e8ff !important; }
body[data-view="dashboard"] .erp-ref-action.cyan span { color: #0891b2 !important; background: #ecfeff !important; }
body[data-view="dashboard"] .erp-ref-action b,
body[data-view="dashboard"] .erp-ref-action small { min-width: 0 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

@media (max-width: 1540px) {
  body[data-view="dashboard"] .app-shell { grid-template-columns: 238px minmax(0, 1fr) !important; }
  body[data-view="dashboard"] .sidebar { width: 238px !important; min-width: 238px !important; }
  body[data-view="dashboard"] .erp-ref-dashboard { padding: 20px 24px 14px !important; gap: 14px !important; }
  body[data-view="dashboard"] .erp-ref-header { grid-template-columns: minmax(330px, 1fr) minmax(260px, 320px) 44px 108px 70px 154px 120px 136px !important; gap: 10px !important; }
  body[data-view="dashboard"] .erp-ref-command-strip { min-height: 136px !important; grid-template-columns: minmax(0, 1fr) 420px !important; padding: 18px !important; }
  body[data-view="dashboard"] .erp-ref-grid { grid-template-columns: minmax(440px, 1.35fr) minmax(270px, .82fr) minmax(270px, .82fr) !important; gap: 12px !important; }
  body[data-view="dashboard"] .erp-ref-card { padding: 16px !important; }
  body[data-view="dashboard"] .erp-ref-analytics-row { height: 206px !important; }
}
body[data-view="dashboard"] .erp-ref-command-strip {
  grid-template-columns: minmax(0, 1fr) 500px !important;
}
body[data-view="dashboard"] .erp-ref-title h1 {
  font-size: 24px !important;
}
@media (max-width: 1540px) {
  body[data-view="dashboard"] .erp-ref-command-strip {
    grid-template-columns: minmax(0, 1fr) 420px !important;
  }
}

/* Window-fit safety pass: prevent ERP dashboard from spilling outside the browser. */
html,
body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.app-shell,
.main,
.view {
  max-width: 100vw !important;
  min-width: 0 !important;
}

.main,
.view {
  overflow-x: hidden !important;
}

body[data-view="dashboard"] .app-shell {
  width: 100vw !important;
  max-width: 100vw !important;
  grid-template-columns: clamp(220px, 15vw, 280px) minmax(0, 1fr) !important;
}

body[data-view="dashboard"] .sidebar {
  width: clamp(220px, 15vw, 280px) !important;
  min-width: clamp(220px, 15vw, 280px) !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 100vh !important;
  height: auto !important;
  padding: clamp(16px, 1.4vw, 28px) clamp(16px, 1.7vw, 32px) 18px !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

body[data-view="dashboard"] .erp-ref-header {
  width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-title {
  flex: 1 1 360px !important;
  max-width: 100% !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  font-size: clamp(21px, 1.55vw, 28px) !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  font-size: clamp(12px, .9vw, 15px) !important;
}

body[data-view="dashboard"] .erp-ref-search {
  flex: 1 1 320px !important;
  max-width: 430px !important;
}

body[data-view="dashboard"] .erp-ref-bell {
  flex: 0 0 48px !important;
}

body[data-view="dashboard"] .erp-ref-cloud {
  flex: 0 0 118px !important;
}

body[data-view="dashboard"] .erp-ref-lite-btn {
  flex: 0 0 88px !important;
}

body[data-view="dashboard"] .erp-ref-date {
  flex: 0 0 170px !important;
}

body[data-view="dashboard"] .erp-ref-user {
  flex: 0 0 132px !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  flex: 0 0 150px !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 32%) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics,
body[data-view="dashboard"] .erp-ref-glance,
body[data-view="dashboard"] .erp-ref-glance-grid {
  min-width: 0 !important;
  max-width: 100% !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  min-width: 0 !important;
  padding-inline: clamp(10px, 1vw, 20px) !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  font-size: clamp(20px, 1.5vw, 28px) !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid {
  min-width: 0 !important;
  grid-template-columns: repeat(4, minmax(82px, 1fr)) !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, .85fr) minmax(260px, .85fr) !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-card {
  min-width: 0 !important;
  height: auto !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  max-width: 100% !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-tab {
  min-width: 0 !important;
  flex: 1 1 0 !important;
  padding-inline: 10px !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: auto !important;
  min-height: 220px !important;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .9fr) !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  align-items: stretch !important;
}

body[data-view="dashboard"] .erp-ref-action {
  min-width: 0 !important;
  min-height: 76px !important;
  height: auto !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row,
body[data-view="dashboard"] .erp-ref-approval-row {
  max-width: 100% !important;
}

@media (max-width: 1700px) {
  body[data-view="dashboard"] .erp-ref-header {
    gap: 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-search {
    flex-basis: 280px !important;
    max-width: 360px !important;
  }

  body[data-view="dashboard"] .erp-ref-quick {
    flex-basis: 132px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .erp-ref-glance {
    padding-left: 0 !important;
    padding-top: 14px !important;
    border-left: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, .18) !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(250px, .9fr) !important;
    grid-template-areas:
      "operations operations"
      "compliance pending"
      "actions actions"
      "activities upcoming" !important;
  }
}

@media (max-width: 1200px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 1fr !important;
  }

  body[data-view="dashboard"] .sidebar {
    display: none !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "operations"
      "compliance"
      "pending"
      "actions"
      "activities"
      "upcoming" !important;
  }

  body[data-view="dashboard"] .erp-ref-strip-metrics,
  body[data-view="dashboard"] .erp-ref-analytics-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 2026-06-03: final shared header layout reset.
   Keeps the page title, search, CRM New menu, and user actions in one proper row
   and prevents content cards from sliding underneath it. */
html body .main,
html body[data-view] .main {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100vh !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}

html body .topbar,
html body[data-view] .topbar,
html body[data-view="crm"] .topbar,
html body[data-view="commandCenter"] .topbar,
html body[data-view="payroll"] .topbar {
  position: relative !important;
  inset: auto !important;
  z-index: 30 !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 66px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 12px 22px !important;
  display: grid !important;
  grid-template-columns: minmax(230px, 0.72fr) minmax(360px, 720px) auto !important;
  align-items: center !important;
  gap: 16px !important;
  border-bottom: 1px solid #dce6f1 !important;
  background: rgba(248, 251, 255, 0.96) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04) !important;
  overflow: visible !important;
  transform: none !important;
}

html body .topbar > div:first-of-type {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
}

html body .topbar .eyebrow {
  margin: 0 !important;
  color: #df1527 !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  font-weight: 850 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
}

html body .topbar h1 {
  margin: 0 !important;
  color: #07142b !important;
  font-size: 24px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

html body .topbar-command {
  position: relative !important;
  z-index: 2 !important;
  min-width: 0 !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
}

html body .global-header-search {
  position: relative !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 42px !important;
  max-width: none !important;
  opacity: 1 !important;
  transform: none !important;
}

html body .global-header-new,
html body .global-header-new .crm-new-button {
  position: relative !important;
  z-index: 4 !important;
}

html body .topbar-actions,
html body[data-view] .topbar-actions,
html body[data-view="crm"] .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions {
  position: relative !important;
  inset: auto !important;
  right: auto !important;
  top: auto !important;
  z-index: 3 !important;
  min-width: max-content !important;
  height: 42px !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  padding: 0 8px !important;
  border: 1px solid #dce6f1 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
  overflow: visible !important;
  transform: none !important;
}

html body .view,
html body[data-view] .view,
html body[data-view="crm"] .view,
html body[data-view="commandCenter"] .view,
html body[data-view="payroll"] .view {
  grid-row: 2 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding-top: 18px !important;
  overflow: auto !important;
}

html body[data-view="crm"] .crm-ref-dashboard,
html body[data-view="crm"] .crm-control-kpis {
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 1500px) {
  html body .topbar,
  html body[data-view] .topbar {
    grid-template-columns: minmax(190px, .62fr) minmax(300px, 1fr) auto !important;
    gap: 10px !important;
    padding: 10px 14px !important;
  }

  html body .topbar h1 {
    font-size: 20px !important;
  }

  html body .global-header-search {
    height: 38px !important;
  }

  html body .topbar-actions {
    height: 38px !important;
    min-height: 38px !important;
  }
}

/* Reference model lock: compact desktop dashboard, no horizontal spill. */
body[data-view="dashboard"] .app-shell {
  grid-template-columns: 224px minmax(0, 1fr) !important;
}

body[data-view="dashboard"] .sidebar {
  width: 224px !important;
  min-width: 224px !important;
}

body[data-view="dashboard"] .sidebar .brand-logo {
  width: 174px !important;
  height: 54px !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  padding: 18px 22px 14px !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-header {
  display: grid !important;
  grid-template-columns: minmax(340px, 1fr) minmax(280px, 360px) 44px 112px 82px 152px 126px 140px !important;
  gap: 10px !important;
  align-items: center !important;
}

body[data-view="dashboard"] .erp-ref-title {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  font-size: 24px !important;
}

body[data-view="dashboard"] .erp-ref-search,
body[data-view="dashboard"] .erp-ref-bell,
body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick {
  flex: initial !important;
  max-width: none !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  min-height: 150px !important;
  grid-template-columns: minmax(0, 1fr) 360px !important;
  gap: 18px !important;
  padding: 18px !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  min-height: 96px !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  padding: 0 12px !important;
  column-gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 48px !important;
  height: 48px !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  font-size: 22px !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  padding-left: 16px !important;
  padding-top: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, .18) !important;
  border-top: 0 !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid {
  min-width: 0 !important;
  grid-template-columns: repeat(4, minmax(70px, 1fr)) !important;
  gap: 8px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid button {
  min-height: 62px !important;
  padding: 8px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid span {
  font-size: 9.5px !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .78fr) minmax(260px, .78fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 14px !important;
}

body[data-view="dashboard"] .erp-ref-card {
  padding: 16px !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  min-height: 0 !important;
  height: 210px !important;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .88fr) !important;
}

body[data-view="dashboard"] .erp-ref-chart svg {
  height: 126px !important;
}

body[data-view="dashboard"] .erp-ref-donut-wrap {
  grid-template-columns: 112px minmax(0, 1fr) !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  width: 112px !important;
  height: 112px !important;
}

body[data-view="dashboard"] .erp-ref-donut::after {
  inset: 30px !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .erp-ref-action {
  min-height: 66px !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  padding: 10px !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  width: 40px !important;
  height: 40px !important;
}

body[data-view="dashboard"] .erp-ref-action b {
  font-size: 12.5px !important;
}

body[data-view="dashboard"] .erp-ref-action small {
  font-size: 11px !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  font-size: 12px !important;
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .erp-ref-header {
    grid-template-columns: minmax(280px, 1fr) minmax(240px, 300px) 40px 104px 72px 136px 112px 128px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    grid-template-columns: minmax(0, 1fr) 330px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(230px, .8fr) minmax(230px, .8fr) !important;
  }
}

/* Dashboard hard lock: match the clean reference layout and keep it inside the window. */
body[data-view="dashboard"] {
  overflow: hidden !important;
  background: #f4f7fb !important;
}

body[data-view="dashboard"] .app-shell {
  width: 100vw !important;
  height: 100vh !important;
  display: grid !important;
  grid-template-columns: 224px minmax(0, 1fr) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100vh !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .sidebar {
  width: 224px !important;
  min-width: 224px !important;
  height: 100vh !important;
  padding: 20px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .sidebar .brand {
  margin: 0 0 18px !important;
  padding-bottom: 18px !important;
}

body[data-view="dashboard"] .sidebar .brand-logo {
  width: 166px !important;
  height: 50px !important;
  border-radius: 8px !important;
}

body[data-view="dashboard"] .nav {
  gap: 4px !important;
}

body[data-view="dashboard"] .nav-group {
  gap: 4px !important;
  padding-top: 10px !important;
}

body[data-view="dashboard"] .nav-group-title {
  font-size: 11px !important;
  margin: 8px 0 5px !important;
}

body[data-view="dashboard"] .nav button {
  min-height: 36px !important;
  padding: 8px 10px !important;
  gap: 9px !important;
  font-size: 12.5px !important;
  border-radius: 5px !important;
}

body[data-view="dashboard"] .erp-ref-dashboard,
body[data-view="dashboard"] .erp-ref-dashboard * {
  box-sizing: border-box !important;
  min-width: 0 !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  height: 100vh !important;
  width: 100% !important;
  display: grid !important;
  grid-template-rows: 64px 148px minmax(0, 1fr) 18px !important;
  gap: 12px !important;
  padding: 16px 18px 10px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-header {
  height: 64px !important;
  display: grid !important;
  grid-template-columns: minmax(300px, 1fr) minmax(260px, 340px) 42px 112px 76px 152px 126px 142px !important;
  gap: 10px !important;
  align-items: center !important;
  overflow: visible !important;
}

body[data-view="dashboard"] .erp-ref-title {
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  margin: 0 !important;
  font-size: 25px !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  margin: 5px 0 0 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-menu,
body[data-view="dashboard"] .erp-ref-bell {
  width: 42px !important;
  height: 42px !important;
  border-radius: 8px !important;
}

body[data-view="dashboard"] .erp-ref-search {
  height: 46px !important;
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) 42px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 8px 0 14px !important;
  border-radius: 8px !important;
}

body[data-view="dashboard"] .erp-ref-search input {
  font-size: 13px !important;
}

body[data-view="dashboard"] .erp-ref-search button {
  width: 42px !important;
  height: 36px !important;
  border-radius: 6px !important;
}

body[data-view="dashboard"] .erp-ref-cloud,
body[data-view="dashboard"] .erp-ref-lite-btn,
body[data-view="dashboard"] .erp-ref-date,
body[data-view="dashboard"] .erp-ref-user,
body[data-view="dashboard"] .erp-ref-quick {
  height: 46px !important;
  border-radius: 8px !important;
  padding-inline: 12px !important;
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

body[data-view="dashboard"] .erp-ref-quick {
  background: #ef1429 !important;
  color: #fff !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  height: 148px !important;
  min-height: 148px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 374px !important;
  gap: 18px !important;
  align-items: stretch !important;
  padding: 16px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-strip-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  height: 100% !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 50px minmax(0, 1fr) !important;
  column-gap: 12px !important;
  align-content: center !important;
  padding: 0 14px !important;
}

body[data-view="dashboard"] .erp-ref-kpi:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,.16) !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 50px !important;
  height: 50px !important;
  border-radius: 8px !important;
  align-self: center !important;
}

body[data-view="dashboard"] .erp-ref-kpi strong {
  font-size: 11.5px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  font-size: 23px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  font-size: 11.5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-kpi em {
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  height: 100% !important;
  display: grid !important;
  grid-template-rows: 24px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding-left: 18px !important;
  border-left: 1px solid rgba(255,255,255,.16) !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-glance-head {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 12.5px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid button {
  height: 70px !important;
  min-height: 0 !important;
  padding: 8px 6px !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid span {
  display: block !important;
  font-size: 9.5px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid b {
  font-size: 18px !important;
  line-height: 1 !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, .78fr) minmax(250px, .78fr) !important;
  grid-template-rows: minmax(0, 1.05fr) minmax(0, .92fr) !important;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming" !important;
  gap: 12px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card {
  height: 100% !important;
  min-height: 0 !important;
  padding: 14px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-card-head {
  height: 36px !important;
  margin-bottom: 8px !important;
}

body[data-view="dashboard"] .erp-ref-card-head h2 {
  font-size: 17px !important;
  line-height: 1.1 !important;
}

body[data-view="dashboard"] .erp-ref-tabs {
  height: 40px !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-view="dashboard"] .erp-ref-tab {
  height: 40px !important;
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: calc(100% - 84px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .9fr) !important;
  gap: 10px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row article {
  height: 100% !important;
  min-height: 0 !important;
  padding: 14px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row h3 {
  font-size: 13.5px !important;
}

body[data-view="dashboard"] .erp-ref-chart svg {
  height: 118px !important;
}

body[data-view="dashboard"] .erp-ref-donut-wrap {
  height: calc(100% - 22px) !important;
  grid-template-columns: 104px minmax(0, 1fr) !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-donut {
  width: 104px !important;
  height: 104px !important;
}

body[data-view="dashboard"] .erp-ref-donut::after {
  inset: 28px !important;
}

body[data-view="dashboard"] .erp-ref-list {
  display: grid !important;
  gap: 8px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-alert-row,
body[data-view="dashboard"] .erp-ref-activity-row {
  min-height: 60px !important;
  height: 60px !important;
  border-radius: 7px !important;
}

body[data-view="dashboard"] .erp-ref-empty {
  height: calc(100% - 44px) !important;
  min-height: 0 !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  height: calc(100% - 44px) !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: minmax(58px, 1fr) !important;
  gap: 10px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-action {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  gap: 9px !important;
  align-items: center !important;
  padding: 8px !important;
  border-radius: 7px !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-action span {
  width: 38px !important;
  height: 38px !important;
  border-radius: 7px !important;
}

body[data-view="dashboard"] .erp-ref-action b,
body[data-view="dashboard"] .erp-ref-action small {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="dashboard"] .erp-ref-action b {
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-action small {
  font-size: 10.5px !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  height: 18px !important;
  font-size: 11px !important;
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .app-shell {
    grid-template-columns: 204px minmax(0, 1fr) !important;
  }

  body[data-view="dashboard"] .sidebar {
    width: 204px !important;
    min-width: 204px !important;
    padding: 18px 14px !important;
  }

  body[data-view="dashboard"] .sidebar .brand-logo {
    width: 156px !important;
  }

  body[data-view="dashboard"] .erp-ref-dashboard {
    padding: 14px 16px 10px !important;
    gap: 10px !important;
    grid-template-rows: 60px 142px minmax(0, 1fr) 16px !important;
  }

  body[data-view="dashboard"] .erp-ref-header {
    height: 60px !important;
    grid-template-columns: minmax(260px, 1fr) minmax(230px, 280px) 38px 104px 70px 132px 108px 126px !important;
    gap: 8px !important;
  }

  body[data-view="dashboard"] .erp-ref-title h1 {
    font-size: 21px !important;
  }

  body[data-view="dashboard"] .erp-ref-title p {
    font-size: 12px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    height: 142px !important;
    min-height: 142px !important;
    grid-template-columns: minmax(0, 1fr) 330px !important;
    gap: 14px !important;
    padding: 14px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    padding: 0 10px !important;
  }

  body[data-view="dashboard"] .erp-ref-kpi-icon {
    width: 44px !important;
    height: 44px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    grid-template-columns: minmax(0, 1.42fr) minmax(220px, .82fr) minmax(220px, .82fr) !important;
    gap: 10px !important;
  }
}

/* Dashboard scroll correction: keep the reference layout, but never clip content. */
body[data-view="dashboard"] {
  overflow: hidden !important;
}

body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  height: 100vh !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  height: auto !important;
  min-height: 100vh !important;
  grid-template-rows: 64px 148px auto 18px !important;
  overflow: visible !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  height: auto !important;
  min-height: 620px !important;
  grid-template-rows: minmax(300px, auto) minmax(270px, auto) !important;
  overflow: visible !important;
}

body[data-view="dashboard"] .erp-ref-card {
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="dashboard"] .erp-ref-operations {
  min-height: 300px !important;
}

body[data-view="dashboard"] .erp-ref-actions,
body[data-view="dashboard"] .erp-ref-activities,
body[data-view="dashboard"] .erp-ref-upcoming {
  min-height: 270px !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: 210px !important;
  min-height: 210px !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  height: auto !important;
  min-height: 164px !important;
  grid-auto-rows: 72px !important;
  overflow: visible !important;
}

body[data-view="dashboard"] .erp-ref-action {
  height: 72px !important;
  min-height: 72px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid button,
body[data-view="dashboard"] .erp-ref-glance-grid span,
body[data-view="dashboard"] .erp-ref-glance-grid b {
  word-break: normal !important;
  overflow-wrap: normal !important;
  text-wrap: balance !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid button {
  display: grid !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 5px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid span {
  max-width: 100% !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  line-height: 1.15 !important;
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .erp-ref-dashboard {
    grid-template-rows: 60px 142px auto 16px !important;
  }

  body[data-view="dashboard"] .erp-ref-grid {
    min-height: 630px !important;
    grid-template-rows: minmax(305px, auto) minmax(280px, auto) !important;
  }
}

/* Final dashboard scale pass: Chrome zoom friendly, reference-sized layout. */
body[data-view="dashboard"] .view {
  overflow: auto !important;
  background: #f4f7fb !important;
}

body[data-view="dashboard"] .erp-ref-dashboard {
  --dashboard-scale: .86;
  zoom: var(--dashboard-scale) !important;
  width: calc(100% / var(--dashboard-scale)) !important;
  min-height: calc(100vh / var(--dashboard-scale)) !important;
  height: auto !important;
  display: grid !important;
  grid-template-rows: 62px 142px auto 18px !important;
  gap: 12px !important;
  padding: 18px 24px 12px !important;
  overflow: visible !important;
}

body[data-view="dashboard"] .erp-ref-header {
  height: 62px !important;
  grid-template-columns: minmax(360px, 1fr) minmax(330px, 420px) 48px 132px 92px 164px 132px 150px !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-title h1 {
  font-size: 26px !important;
}

body[data-view="dashboard"] .erp-ref-title p {
  font-size: 14px !important;
}

body[data-view="dashboard"] .erp-ref-command-strip {
  height: 142px !important;
  min-height: 142px !important;
  grid-template-columns: minmax(0, 1fr) 480px !important;
  padding: 16px 18px !important;
  gap: 18px !important;
}

body[data-view="dashboard"] .erp-ref-kpi {
  grid-template-columns: 54px minmax(0, 1fr) !important;
  padding: 0 16px !important;
}

body[data-view="dashboard"] .erp-ref-kpi-icon {
  width: 54px !important;
  height: 54px !important;
}

body[data-view="dashboard"] .erp-ref-kpi strong {
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-kpi b {
  font-size: 27px !important;
}

body[data-view="dashboard"] .erp-ref-kpi small {
  font-size: 12px !important;
}

body[data-view="dashboard"] .erp-ref-glance {
  grid-template-rows: 26px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding-left: 18px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid {
  grid-template-columns: repeat(4, minmax(96px, 1fr)) !important;
  gap: 10px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid button {
  height: 72px !important;
  min-height: 72px !important;
  padding: 9px 8px !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid span {
  font-size: 11px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

body[data-view="dashboard"] .erp-ref-glance-grid b {
  font-size: 20px !important;
}

body[data-view="dashboard"] .erp-ref-grid {
  min-height: 585px !important;
  grid-template-columns: minmax(0, 1.48fr) minmax(285px, .82fr) minmax(285px, .82fr) !important;
  grid-template-rows: 300px 260px !important;
  gap: 12px !important;
}

body[data-view="dashboard"] .erp-ref-card {
  height: 100% !important;
  padding: 16px !important;
}

body[data-view="dashboard"] .erp-ref-operations {
  min-height: 0 !important;
}

body[data-view="dashboard"] .erp-ref-analytics-row {
  height: 204px !important;
  min-height: 204px !important;
}

body[data-view="dashboard"] .erp-ref-actions,
body[data-view="dashboard"] .erp-ref-activities,
body[data-view="dashboard"] .erp-ref-upcoming {
  min-height: 0 !important;
}

body[data-view="dashboard"] .erp-ref-actions-grid {
  min-height: 170px !important;
  grid-auto-rows: 72px !important;
}

body[data-view="dashboard"] .erp-ref-footer {
  height: 18px !important;
}

@media (max-width: 1500px) {
  body[data-view="dashboard"] .erp-ref-dashboard {
    --dashboard-scale: .82;
  }

  body[data-view="dashboard"] .erp-ref-header {
    grid-template-columns: minmax(330px, 1fr) minmax(300px, 370px) 48px 126px 88px 154px 126px 146px !important;
  }

  body[data-view="dashboard"] .erp-ref-command-strip {
    grid-template-columns: minmax(0, 1fr) 460px !important;
  }
}

/* Clean Operations Dashboard - isolated from the older dashboard rules. */
body[data-view="dashboard"] .main,
body[data-view="dashboard"] .view {
  overflow: auto !important;
  background: #f4f7fb !important;
}

body[data-view="dashboard"] .topbar {
  display: none !important;
}

body[data-view="dashboard"] .aq-dashboard,
body[data-view="dashboard"] .aq-dashboard * {
  box-sizing: border-box;
  min-width: 0;
}

body[data-view="dashboard"] .aq-dashboard {
  display: grid;
  grid-template-rows: 64px 156px auto 22px;
  gap: 14px;
  width: 100%;
  min-height: 100vh;
  padding: 22px 26px 12px;
  color: #07142c;
  font-family: Arial, Helvetica, sans-serif;
}

.aq-dashboard button {
  font: inherit;
  cursor: pointer;
}

.aq-dashboard svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aq-header {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 450px) 48px 132px 88px 172px 144px 168px;
  gap: 12px;
  align-items: center;
}

.aq-title {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.aq-menu,
.aq-bell {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e5f3;
  border-radius: 10px;
  background: #eef5ff;
  color: #2563eb;
  font-weight: 900;
}

.aq-bell {
  background: #fff;
  color: #ef1429;
}

.aq-title h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aq-title p {
  margin: 5px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aq-search {
  height: 48px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
  padding: 0 8px 0 14px;
  border: 1px solid #d6e2f0;
  border-radius: 9px;
  background: #fff;
}

.aq-search input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 14px;
  color: #334155;
}

.aq-search button {
  width: 46px;
  height: 38px;
  border: 1px solid #a8b5c7;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
}

.aq-cloud,
.aq-sync,
.aq-date,
.aq-user,
.aq-quick {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #d6e2f0;
  border-radius: 9px;
  background: #fff;
  color: #07142c;
  font-weight: 900;
  white-space: nowrap;
}

.aq-cloud {
  background: #e9fff1;
  border-color: #b8f2c8;
  color: #059447;
}

.aq-user b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #06142d;
  color: #fff;
  font-size: 12px;
}

.aq-quick {
  border-color: #ef1429;
  background: #ef1429;
  color: #fff;
}

.aq-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border-radius: 8px;
  background: #061a35;
  color: #fff;
  overflow: hidden;
}

.aq-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.aq-kpi {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #fff;
  text-align: left;
}

.aq-kpi-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.aq-red .aq-kpi-icon,
.aq-action.aq-red span {
  background: #ef1429;
  color: #fff;
}

.aq-blue .aq-kpi-icon,
.aq-action.aq-blue span {
  background: #2563eb;
  color: #fff;
}

.aq-green .aq-kpi-icon,
.aq-action.aq-green span {
  background: #10b981;
  color: #fff;
}

.aq-orange .aq-kpi-icon,
.aq-action.aq-orange span {
  background: #f59e0b;
  color: #fff;
}

.aq-action.aq-purple span {
  background: #efe1ff;
  color: #8b5cf6;
}

.aq-action.aq-cyan span {
  background: #dcfbff;
  color: #0891b2;
}

.aq-kpi-copy {
  display: grid;
  gap: 7px;
}

.aq-kpi small,
.aq-kpi em,
.aq-kpi strong {
  display: block;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aq-kpi small {
  font-size: 12px;
  font-weight: 900;
}

.aq-kpi b {
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aq-kpi em {
  color: #cbd5e1;
  font-size: 12px;
}

.aq-kpi strong {
  margin-top: 4px;
  color: #60a5fa;
  font-size: 12px;
}

.aq-glance {
  display: grid;
  grid-template-rows: 26px minmax(0, 1fr);
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid rgba(255,255,255,.18);
}

.aq-glance-head {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-weight: 900;
}

.aq-glance-head strong {
  font-size: 13px;
}

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

.aq-glance-grid button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 76px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 7px;
  background: rgba(255,255,255,.10);
  color: #fff;
  text-align: center;
}

.aq-glance-grid span {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.aq-glance-grid b {
  font-size: 21px;
  line-height: 1;
}

.aq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, .82fr) minmax(300px, .82fr);
  grid-template-rows: 334px 300px;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming";
  gap: 14px;
}

.aq-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 16px;
  border: 1px solid #d9e5f3;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.aq-operations { grid-area: operations; }
.aq-compliance { grid-area: compliance; }
.aq-pending { grid-area: pending; }
.aq-actions { grid-area: actions; }
.aq-activities { grid-area: activities; }
.aq-upcoming { grid-area: upcoming; }

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

.aq-card-head h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.08;
}

.aq-card-head button,
.aq-wide {
  min-height: 38px;
  border: 1px solid #d6e2f0;
  border-radius: 8px;
  background: #fff;
  color: #ef1429;
  font-weight: 900;
  padding: 0 16px;
}

.aq-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 42px;
  border: 1px solid #d9e5f3;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.aq-tabs button {
  border: 0;
  background: #f8fafc;
  color: #334155;
  font-weight: 900;
}

.aq-tabs .active {
  color: #ef1429;
  border-bottom: 3px solid #ef1429;
  background: #fff;
}

.aq-analytics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
  gap: 10px;
  height: 224px;
  border: 1px solid #d9e5f3;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 12px;
  overflow: hidden;
}

.aq-analytics article {
  min-height: 0;
  padding: 10px;
  border-right: 1px solid #e2e8f0;
  overflow: hidden;
}

.aq-analytics article:last-child {
  border-right: 0;
}

.aq-analytics h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.aq-analytics h3 small {
  color: #64748b;
}

.aq-line {
  width: 100%;
  height: 150px;
  color: #ef1429;
}

.aq-line text {
  fill: #64748b;
  font-size: 10px;
  stroke: none;
  font-weight: 700;
}

.aq-donut-wrap {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.aq-donut {
  position: relative;
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(var(--segments));
}

.aq-donut::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: inherit;
  background: #fff;
}

.aq-donut b,
.aq-donut span {
  position: relative;
  z-index: 1;
}

.aq-donut b {
  font-size: 24px;
}

.aq-donut span {
  margin-top: 34px;
  margin-left: -34px;
  color: #64748b;
  font-size: 11px;
}

.aq-legend {
  display: grid;
  gap: 8px;
}

.aq-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.aq-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.aq-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
}

.aq-doc-row,
.aq-activity,
.aq-approval {
  min-height: 66px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon title badge"
    "icon note badge";
  gap: 3px 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d9e5f3;
  border-radius: 8px;
  background: #fff;
  color: #07142c;
  text-align: left;
}

.aq-doc-row span,
.aq-activity span {
  grid-area: icon;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff0f2;
  color: #ef1429;
}

.aq-doc-row b,
.aq-activity b,
.aq-approval b {
  grid-area: title;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aq-doc-row small,
.aq-activity small,
.aq-approval small {
  grid-area: note;
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aq-doc-row em,
.aq-approval em {
  grid-area: badge;
  padding: 8px 12px;
  border-radius: 8px;
  background: #ffe3e8;
  color: #ef1429;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}

.aq-wide {
  align-self: end;
  width: 100%;
}

.aq-empty {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.aq-empty svg {
  width: 84px;
  height: 84px;
  padding: 20px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #27446e;
}

.aq-empty strong {
  font-size: 16px;
}

.aq-empty small {
  color: #64748b;
}

.aq-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 74px;
  gap: 12px;
}

.aq-action {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon note";
  gap: 4px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d9e5f3;
  border-radius: 8px;
  background: #fff;
  color: #07142c;
  text-align: left;
}

.aq-action span {
  grid-area: icon;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.aq-action b {
  grid-area: title;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aq-action small {
  grid-area: note;
  color: #475569;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aq-activity span {
  background: #eff6ff;
  color: #2563eb;
}

.aq-empty.small svg {
  width: 58px;
  height: 58px;
  padding: 14px;
  color: #2563eb;
}

.aq-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 1700px) {
  .aq-header {
    grid-template-columns: minmax(270px, 1fr) minmax(300px, 380px) 44px 118px 76px 146px 120px 138px;
    gap: 10px;
  }

  .aq-title h1 {
    font-size: 23px;
  }

  .aq-command {
    grid-template-columns: minmax(0, 1fr) 430px;
  }

  .aq-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, .86fr) minmax(270px, .86fr);
  }
}

/* Model dashboard rebuilt on commandCenter to avoid every old dashboard rule. */
body[data-view="commandCenter"] {
  overflow: hidden;
  background: #f4f7fb;
}

body[data-view="commandCenter"] .app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

body[data-view="commandCenter"] .sidebar {
  width: 224px;
  min-width: 224px;
  height: 100vh;
  padding: 20px;
  overflow-y: auto;
}

body[data-view="commandCenter"] .sidebar .brand {
  margin-bottom: 18px;
  padding-bottom: 18px;
}

body[data-view="commandCenter"] .sidebar .brand-logo {
  width: 178px;
  height: auto;
  max-height: 56px;
  border-radius: 8px;
}

body[data-view="commandCenter"] .nav-section {
  padding-top: 8px;
}

body[data-view="commandCenter"] .nav-section-title {
  margin: 8px 0 6px;
  font-size: 11px;
  letter-spacing: .12em;
}

body[data-view="commandCenter"] .nav button {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 12px;
}

body[data-view="commandCenter"] .nav button.active {
  background: #ef1429;
  color: #fff;
}

body[data-view="commandCenter"] .main,
body[data-view="commandCenter"] .view {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  overflow: auto;
  background: #f4f7fb;
}

body[data-view="commandCenter"] .topbar {
  display: none;
}

.model-dashboard,
.model-dashboard * {
  box-sizing: border-box;
  min-width: 0;
}

.model-dashboard {
  display: grid;
  grid-template-rows: 58px 146px 1fr 18px;
  gap: 12px;
  min-height: 100vh;
  padding: 18px 22px 10px;
  color: #07142c;
  font-family: Arial, Helvetica, sans-serif;
}

.model-dashboard button {
  font: inherit;
  cursor: pointer;
}

.model-dashboard svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.model-header {
  display: grid;
  grid-template-columns: minmax(310px, 1fr) minmax(320px, 410px) 44px 116px 78px 154px 126px 138px;
  gap: 10px;
  align-items: center;
}

.model-title {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.model-menu,
.model-bell {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: #eef5ff;
  color: #2563eb;
  font-weight: 900;
}

.model-bell {
  background: #fff;
  color: #ef1429;
}

.model-title h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-title p {
  margin: 5px 0 0;
  color: #475569;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-search {
  height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: #fff;
}

.model-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #334155;
  font-size: 12px;
}

.model-search kbd {
  padding: 3px 6px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-family: inherit;
}

.model-cloud,
.model-sync,
.model-date,
.model-user,
.model-quick {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: #fff;
  color: #07142c;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.model-cloud {
  background: #eafff1;
  border-color: #b8f2c8;
  color: #059447;
}

.model-user b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #06142d;
  color: #fff;
  font-size: 11px;
}

.model-quick {
  background: #ef1429;
  border-color: #ef1429;
  color: #fff;
}

.model-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  border-radius: 8px;
  background: #061a35;
  color: #fff;
  overflow: hidden;
}

.model-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.model-kpi {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "icon note"
    "icon link";
  gap: 5px 14px;
  align-content: center;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #fff;
  text-align: left;
}

.model-kpi span {
  grid-area: icon;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  align-self: center;
}

.model-kpi.red span { background: #ef1429; }
.model-kpi.blue span { background: #2563eb; }
.model-kpi.green span { background: #10b981; }
.model-kpi.orange span { background: #f59e0b; }

.model-kpi b,
.model-kpi strong,
.model-kpi small,
.model-kpi em {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-kpi b {
  grid-area: label;
  font-size: 11px;
}

.model-kpi strong {
  grid-area: value;
  font-size: 24px;
  line-height: 1;
}

.model-kpi small {
  grid-area: note;
  color: #cbd5e1;
  font-size: 11px;
}

.model-kpi em {
  grid-area: link;
  color: #60a5fa;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.model-glance {
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr);
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,.18);
}

.model-glance-head {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
}

.model-glance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.model-glance-grid button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 72px;
  padding: 8px 6px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  background: rgba(255,255,255,.1);
  color: #fff;
  text-align: center;
}

.model-glance-grid span {
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}

.model-glance-grid b {
  font-size: 20px;
  line-height: 1;
}

.model-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .82fr) minmax(260px, .82fr);
  grid-template-rows: 292px 250px;
  grid-template-areas:
    "operations compliance pending"
    "actions activities upcoming";
  gap: 12px;
}

.model-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
  padding: 14px;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.model-operations { grid-area: operations; }
.model-compliance { grid-area: compliance; }
.model-pending { grid-area: pending; }
.model-actions { grid-area: actions; }
.model-activities { grid-area: activities; }
.model-upcoming { grid-area: upcoming; }

.model-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.model-card-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
}

.model-card-head button,
.model-wide {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #d7e3f2;
  border-radius: 7px;
  background: #fff;
  color: #ef1429;
  font-size: 12px;
  font-weight: 900;
}

.model-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 38px;
  border: 1px solid #d7e3f2;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.model-tabs button {
  border: 0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.model-tabs .active {
  color: #ef1429;
  background: #fff;
  border-bottom: 3px solid #ef1429;
}

.model-analytics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .9fr);
  gap: 10px;
  height: 200px;
  padding: 10px;
  border: 1px solid #d7e3f2;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.model-analytics article {
  min-height: 0;
  padding: 8px;
  border-right: 1px solid #e2e8f0;
  overflow: hidden;
}

.model-analytics article:last-child {
  border-right: 0;
}

.model-analytics h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.model-analytics h3 small {
  color: #64748b;
}

.model-line {
  width: 100%;
  height: 142px;
}

.model-line text {
  fill: #64748b;
  stroke: none;
  font-size: 10px;
  font-weight: 700;
}

.model-donut-wrap {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.model-donut {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(var(--segments));
}

.model-donut::after {
  content: "";
  position: absolute;
  inset: 31px;
  border-radius: inherit;
  background: #fff;
}

.model-donut b,
.model-donut span {
  position: relative;
  z-index: 1;
}

.model-donut b {
  font-size: 22px;
}

.model-donut span {
  margin-top: 30px;
  margin-left: -30px;
  color: #64748b;
  font-size: 10px;
}

.model-legend {
  display: grid;
  gap: 7px;
}

.model-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}

.model-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.model-list {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
}

.model-doc-row,
.model-activity {
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-areas: "icon title badge" "icon note badge";
  gap: 2px 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.model-doc-row span,
.model-activity span {
  grid-area: icon;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff0f2;
  color: #ef1429;
}

.model-activity span {
  background: #eff6ff;
  color: #2563eb;
}

.model-doc-row b,
.model-activity b {
  grid-area: title;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-doc-row small,
.model-activity small {
  grid-area: note;
  color: #334155;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-doc-row em {
  grid-area: badge;
  padding: 7px 10px;
  border-radius: 7px;
  background: #ffe3e8;
  color: #ef1429;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.model-wide {
  width: 100%;
  align-self: end;
}

.model-empty {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: #64748b;
  text-align: center;
}

.model-empty.big svg {
  width: 84px;
  height: 84px;
  padding: 20px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #27446e;
}

.model-empty strong {
  color: #07142c;
  font-size: 15px;
}

.model-empty button {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 900;
}

.model-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 68px;
  gap: 10px;
}

.model-action {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas: "icon title" "icon note";
  gap: 3px 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.model-action span {
  grid-area: icon;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.model-action.red span { background: #ffe8ec; color: #ef1429; }
.model-action.blue span { background: #eaf2ff; color: #2563eb; }
.model-action.green span { background: #e9fff1; color: #10b981; }
.model-action.orange span { background: #fff3df; color: #f59e0b; }
.model-action.purple span { background: #efe1ff; color: #8b5cf6; }
.model-action.cyan span { background: #dcfbff; color: #0891b2; }

.model-action b {
  grid-area: title;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-action small {
  grid-area: note;
  color: #475569;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #64748b;
  font-size: 11px;
}

@media (max-width: 1500px) {
  body[data-view="commandCenter"] .app-shell {
    grid-template-columns: 204px minmax(0, 1fr);
  }

  body[data-view="commandCenter"] .sidebar {
    width: 204px;
    min-width: 204px;
    padding: 18px 14px;
  }

  .model-dashboard {
    padding: 14px 16px 10px;
    gap: 10px;
    grid-template-rows: 56px 140px 1fr 18px;
  }

  .model-header {
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 320px) 42px 108px 72px 136px 112px 128px;
    gap: 8px;
  }

  .model-title h1 {
    font-size: 20px;
  }

  .model-command {
    grid-template-columns: minmax(0, 1fr) 380px;
  }

  .model-grid {
    grid-template-columns: minmax(0, 1.38fr) minmax(230px, .86fr) minmax(230px, .86fr);
    grid-template-rows: 288px 250px;
  }
}

/* Command Center fit pass: dark sidebar, no horizontal spill, readable command tiles. */
body[data-view="commandCenter"],
body[data-view="commandCenter"] html {
  overflow: hidden !important;
}

body[data-view="commandCenter"] .app-shell {
  grid-template-columns: 224px minmax(0, 1fr) !important;
  max-width: 100vw !important;
  overflow: hidden !important;
  background: #f4f7fb !important;
}

body[data-view="commandCenter"] .sidebar {
  width: 224px !important;
  min-width: 224px !important;
  max-width: 224px !important;
  padding: 20px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: linear-gradient(180deg, #07162b 0%, #061328 58%, #031022 100%) !important;
  color: #fff !important;
  border-right: 0 !important;
}

body[data-view="commandCenter"] .sidebar .brand {
  padding: 0 0 18px !important;
  margin: 0 0 18px !important;
  border-bottom: 1px solid rgba(255,255,255,.16) !important;
}

body[data-view="commandCenter"] .sidebar .brand-logo {
  width: 170px !important;
  max-width: 170px !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
  background: #fff !important;
}

body[data-view="commandCenter"] .sidebar .brand-copy strong,
body[data-view="commandCenter"] .sidebar .brand-copy span {
  color: #fff !important;
}

body[data-view="commandCenter"] .nav {
  gap: 4px !important;
  overflow-x: hidden !important;
}

body[data-view="commandCenter"] .nav-section-title {
  color: #9fc5f4 !important;
}

body[data-view="commandCenter"] .nav button {
  width: 100% !important;
  min-height: 36px !important;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  color: #fff !important;
  text-align: left !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

body[data-view="commandCenter"] .nav button span:last-child {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .nav button.active {
  background: #ef1429 !important;
  color: #fff !important;
}

body[data-view="commandCenter"] .nav-icon,
body[data-view="commandCenter"] .nav button svg {
  color: currentColor !important;
  width: 18px !important;
  height: 18px !important;
}

body[data-view="commandCenter"] .main,
body[data-view="commandCenter"] .view {
  width: 100% !important;
  max-width: calc(100vw - 224px) !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body[data-view="commandCenter"] .model-dashboard {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-rows: 58px 146px auto 18px !important;
  padding: 18px 20px 10px !important;
  gap: 12px !important;
  overflow: visible !important;
}

body[data-view="commandCenter"] .model-header {
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 390px) 44px 116px 78px 154px 126px 150px !important;
  gap: 10px !important;
}

body[data-view="commandCenter"] .model-title h1 {
  font-size: 23px !important;
}

body[data-view="commandCenter"] .model-search input {
  font-size: 13px !important;
}

body[data-view="commandCenter"] .model-command {
  grid-template-columns: minmax(0, 1fr) minmax(410px, 430px) !important;
}

body[data-view="commandCenter"] .model-kpi {
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 4px 12px !important;
  padding: 0 12px !important;
}

body[data-view="commandCenter"] .model-kpi span {
  width: 48px !important;
  height: 48px !important;
}

body[data-view="commandCenter"] .model-kpi b {
  font-size: 11px !important;
}

body[data-view="commandCenter"] .model-kpi strong {
  font-size: 23px !important;
}

body[data-view="commandCenter"] .model-kpi small,
body[data-view="commandCenter"] .model-kpi em {
  font-size: 11px !important;
}

body[data-view="commandCenter"] .model-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .86fr) minmax(280px, .86fr) !important;
  grid-template-rows: 302px 270px !important;
  gap: 12px !important;
  overflow: visible !important;
}

body[data-view="commandCenter"] .model-card {
  padding: 14px !important;
  overflow: hidden !important;
}

body[data-view="commandCenter"] .model-operations {
  display: grid !important;
  grid-template-rows: 38px 38px minmax(0, 1fr) !important;
  gap: 9px !important;
}

body[data-view="commandCenter"] .model-card-head h2 {
  font-size: 18px !important;
}

body[data-view="commandCenter"] .model-tabs {
  height: 38px !important;
}

body[data-view="commandCenter"] .model-tabs button {
  font-size: 12px !important;
  line-height: 1.1 !important;
  white-space: normal !important;
}

body[data-view="commandCenter"] .model-analytics {
  height: auto !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .92fr) !important;
}

body[data-view="commandCenter"] .model-analytics h3 {
  font-size: 13px !important;
}

body[data-view="commandCenter"] .model-line {
  height: 130px !important;
}

body[data-view="commandCenter"] .model-donut-wrap {
  grid-template-columns: 112px minmax(0, 1fr) !important;
}

body[data-view="commandCenter"] .model-donut {
  width: 112px !important;
  height: 112px !important;
}

body[data-view="commandCenter"] .model-actions-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: 76px !important;
  gap: 10px !important;
}

body[data-view="commandCenter"] .model-action {
  grid-template-columns: 38px minmax(0, 1fr) !important;
  padding: 9px !important;
  gap: 3px 8px !important;
}

body[data-view="commandCenter"] .model-action span {
  width: 36px !important;
  height: 36px !important;
}

body[data-view="commandCenter"] .model-action b {
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .model-action small {
  font-size: 10.5px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow: hidden !important;
}

body[data-view="commandCenter"] .model-doc-row,
body[data-view="commandCenter"] .model-activity {
  min-height: 62px !important;
}

@media (max-width: 1500px) {
  body[data-view="commandCenter"] .app-shell {
    grid-template-columns: 204px minmax(0, 1fr) !important;
  }

  body[data-view="commandCenter"] .sidebar {
    width: 204px !important;
    min-width: 204px !important;
    max-width: 204px !important;
    padding: 18px 14px !important;
  }

  body[data-view="commandCenter"] .sidebar .brand-logo {
    width: 156px !important;
    max-width: 156px !important;
  }

  body[data-view="commandCenter"] .main,
  body[data-view="commandCenter"] .view {
    max-width: calc(100vw - 204px) !important;
  }

  body[data-view="commandCenter"] .model-header {
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 320px) 42px 108px 72px 136px 112px 132px !important;
    gap: 8px !important;
  }

  body[data-view="commandCenter"] .model-command {
    grid-template-columns: minmax(0, 1fr) 392px !important;
  }

  body[data-view="commandCenter"] .model-grid {
    grid-template-columns: minmax(0, 1.38fr) minmax(245px, .88fr) minmax(245px, .88fr) !important;
  }
}

/* Command Center top area reset: match the reference header and KPI band first. */
body[data-view="commandCenter"] .model-dashboard {
  grid-template-rows: 76px 152px auto 18px !important;
  padding-top: 18px !important;
}

body[data-view="commandCenter"] .model-header {
  height: 76px !important;
  display: grid !important;
  grid-template-columns: minmax(420px, 1fr) minmax(400px, 460px) 44px 128px 86px 172px 144px 148px !important;
  grid-template-rows: 44px 24px !important;
  grid-template-areas:
    "title search bell cloud sync date user user"
    "title . . . . . . quick" !important;
  gap: 8px 12px !important;
  align-items: start !important;
}

body[data-view="commandCenter"] .model-title {
  grid-area: title !important;
  align-self: center !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
}

body[data-view="commandCenter"] .model-title h1 {
  font-size: 26px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .model-title p {
  font-size: 13px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="commandCenter"] .model-menu {
  width: 52px !important;
  height: 52px !important;
}

body[data-view="commandCenter"] .model-search {
  grid-area: search !important;
  height: 44px !important;
}

body[data-view="commandCenter"] .model-bell {
  grid-area: bell !important;
}

body[data-view="commandCenter"] .model-cloud {
  grid-area: cloud !important;
}

body[data-view="commandCenter"] .model-sync {
  grid-area: sync !important;
}

body[data-view="commandCenter"] .model-date {
  grid-area: date !important;
}

body[data-view="commandCenter"] .model-user {
  grid-area: user !important;
}

body[data-view="commandCenter"] .model-quick {
  grid-area: quick !important;
  height: 32px !important;
  min-height: 32px !important;
  justify-self: end !important;
  align-self: end !important;
  padding: 0 14px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
}

body[data-view="commandCenter"] .model-command {
  height: 152px !important;
  grid-template-columns: minmax(0, 1fr) 480px !important;
  padding: 18px !important;
  gap: 18px !important;
  border-radius: 8px !important;
}

body[data-view="commandCenter"] .model-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  height: 100% !important;
}

body[data-view="commandCenter"] .model-kpi {
  grid-template-columns: 58px minmax(0, 1fr) !important;
  grid-template-areas:
    "icon label"
    "icon value"
    "icon note"
    "icon link" !important;
  align-content: center !important;
  gap: 6px 16px !important;
  padding: 0 20px !important;
}

body[data-view="commandCenter"] .model-kpi span {
  width: 58px !important;
  height: 58px !important;
}

body[data-view="commandCenter"] .model-kpi b,
body[data-view="commandCenter"] .model-kpi strong,
body[data-view="commandCenter"] .model-kpi small,
body[data-view="commandCenter"] .model-kpi em {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .model-kpi b {
  font-size: 12px !important;
  line-height: 1.1 !important;
}

body[data-view="commandCenter"] .model-kpi strong {
  font-size: 26px !important;
  line-height: 1 !important;
}

body[data-view="commandCenter"] .model-kpi small {
  font-size: 12px !important;
  line-height: 1.15 !important;
  color: #d3deeb !important;
}

body[data-view="commandCenter"] .model-kpi em {
  font-size: 12px !important;
  color: #60a5fa !important;
}

body[data-view="commandCenter"] .model-glance {
  grid-template-rows: 26px minmax(0, 1fr) !important;
  padding-left: 18px !important;
}

body[data-view="commandCenter"] .model-glance-head {
  font-size: 13px !important;
}

body[data-view="commandCenter"] .model-glance-grid {
  grid-template-columns: repeat(4, minmax(94px, 1fr)) !important;
  gap: 10px !important;
}

body[data-view="commandCenter"] .model-glance-grid button {
  min-height: 76px !important;
  padding: 8px !important;
}

body[data-view="commandCenter"] .model-glance-grid span {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

body[data-view="commandCenter"] .model-glance-grid b {
  font-size: 21px !important;
}

/* Emergency correction for top command area: no horizontal spill, no KPI overlap. */
body[data-view="commandCenter"] .model-dashboard {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  grid-template-rows: 64px 140px auto 18px !important;
}

body[data-view="commandCenter"] .model-header {
  height: 64px !important;
  grid-template-columns: minmax(300px, 1fr) minmax(260px, 360px) 42px 118px 78px 146px 126px 140px !important;
  grid-template-rows: 44px !important;
  grid-template-areas: "title search bell cloud sync date user quick" !important;
  gap: 10px !important;
  align-items: center !important;
  overflow: hidden !important;
}

body[data-view="commandCenter"] .model-title {
  align-self: center !important;
}

body[data-view="commandCenter"] .model-title h1 {
  font-size: 25px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="commandCenter"] .model-title p {
  font-size: 13px !important;
}

body[data-view="commandCenter"] .model-menu {
  width: 44px !important;
  height: 44px !important;
}

body[data-view="commandCenter"] .model-search,
body[data-view="commandCenter"] .model-bell,
body[data-view="commandCenter"] .model-cloud,
body[data-view="commandCenter"] .model-sync,
body[data-view="commandCenter"] .model-date,
body[data-view="commandCenter"] .model-user,
body[data-view="commandCenter"] .model-quick {
  height: 44px !important;
  min-height: 44px !important;
  align-self: center !important;
  justify-self: stretch !important;
}

body[data-view="commandCenter"] .model-quick {
  font-size: 13px !important;
  border-radius: 8px !important;
  padding: 0 10px !important;
}

body[data-view="commandCenter"] .model-quick svg {
  display: none !important;
}

body[data-view="commandCenter"] .model-command {
  height: 140px !important;
  grid-template-columns: minmax(0, 1fr) 430px !important;
  padding: 16px !important;
  gap: 16px !important;
  overflow: hidden !important;
}

body[data-view="commandCenter"] .model-kpi-grid {
  overflow: hidden !important;
}

body[data-view="commandCenter"] .model-kpi {
  grid-template-columns: 50px minmax(0, 1fr) !important;
  gap: 5px 12px !important;
  padding: 0 14px !important;
  overflow: hidden !important;
}

body[data-view="commandCenter"] .model-kpi span {
  width: 50px !important;
  height: 50px !important;
}

body[data-view="commandCenter"] .model-kpi b,
body[data-view="commandCenter"] .model-kpi strong,
body[data-view="commandCenter"] .model-kpi small,
body[data-view="commandCenter"] .model-kpi em {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-view="commandCenter"] .model-kpi b {
  font-size: 11px !important;
}

body[data-view="commandCenter"] .model-kpi strong {
  font-size: 23px !important;
}

body[data-view="commandCenter"] .model-kpi small,
body[data-view="commandCenter"] .model-kpi em {
  font-size: 11px !important;
}

body[data-view="commandCenter"] .model-glance {
  overflow: hidden !important;
}

body[data-view="commandCenter"] .model-glance-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-view="commandCenter"] .model-glance-grid button {
  min-height: 70px !important;
  overflow: hidden !important;
}

body[data-view="commandCenter"] .model-glance-grid span {
  font-size: 10px !important;
}

@media (max-width: 1500px) {
  body[data-view="commandCenter"] .model-header {
    grid-template-columns: minmax(250px, 1fr) minmax(230px, 300px) 40px 104px 70px 126px 106px 124px !important;
    gap: 8px !important;
  }

  body[data-view="commandCenter"] .model-title h1 {
    font-size: 21px !important;
  }

  body[data-view="commandCenter"] .model-title p {
    font-size: 12px !important;
  }

  body[data-view="commandCenter"] .model-command {
    grid-template-columns: minmax(0, 1fr) 380px !important;
  }

  body[data-view="commandCenter"] .model-kpi {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    padding: 0 10px !important;
  }

  body[data-view="commandCenter"] .model-kpi span {
    width: 44px !important;
    height: 44px !important;
  }

  body[data-view="commandCenter"] .model-kpi strong {
    font-size: 21px !important;
  }
}

/* Command Center top area v3: readable, model-like header and KPI band. */
body[data-view="commandCenter"] .model-dashboard {
  grid-template-rows: auto 150px auto 18px !important;
  padding: 18px 20px 10px !important;
}

body[data-view="commandCenter"] .model-header {
  height: auto !important;
  min-height: 60px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  overflow: hidden !important;
}

body[data-view="commandCenter"] .model-title {
  flex: 0 0 480px !important;
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
}

body[data-view="commandCenter"] .model-title h1 {
  font-size: 27px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .model-title p {
  font-size: 13px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .model-menu {
  flex: 0 0 52px !important;
  width: 52px !important;
  height: 52px !important;
}

body[data-view="commandCenter"] .model-search {
  flex: 1 1 360px !important;
  max-width: 430px !important;
  min-width: 280px !important;
}

body[data-view="commandCenter"] .model-bell {
  flex: 0 0 44px !important;
}

body[data-view="commandCenter"] .model-cloud {
  flex: 0 0 130px !important;
}

body[data-view="commandCenter"] .model-sync {
  flex: 0 0 82px !important;
}

body[data-view="commandCenter"] .model-date {
  flex: 0 0 158px !important;
}

body[data-view="commandCenter"] .model-user {
  flex: 0 0 132px !important;
}

body[data-view="commandCenter"] .model-quick {
  flex: 0 0 150px !important;
  font-size: 13px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 8px !important;
}

body[data-view="commandCenter"] .model-command {
  height: 150px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 470px !important;
  padding: 16px 18px !important;
  gap: 18px !important;
}

body[data-view="commandCenter"] .model-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(190px, 1fr)) !important;
  min-width: 0 !important;
}

body[data-view="commandCenter"] .model-kpi {
  grid-template-columns: 54px minmax(0, 1fr) !important;
  padding: 0 14px !important;
  gap: 5px 14px !important;
}

body[data-view="commandCenter"] .model-kpi span {
  width: 54px !important;
  height: 54px !important;
}

body[data-view="commandCenter"] .model-kpi b,
body[data-view="commandCenter"] .model-kpi strong,
body[data-view="commandCenter"] .model-kpi small,
body[data-view="commandCenter"] .model-kpi em {
  overflow: hidden !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .model-kpi b {
  font-size: 12px !important;
  white-space: nowrap !important;
}

body[data-view="commandCenter"] .model-kpi strong {
  font-size: 24px !important;
}

body[data-view="commandCenter"] .model-kpi small {
  font-size: 11.5px !important;
}

body[data-view="commandCenter"] .model-kpi em {
  font-size: 12px !important;
}

body[data-view="commandCenter"] .model-glance-grid {
  grid-template-columns: repeat(4, minmax(86px, 1fr)) !important;
}

@media (max-width: 1500px) {
  body[data-view="commandCenter"] .model-title {
    flex-basis: 360px !important;
  }

  body[data-view="commandCenter"] .model-title h1 {
    font-size: 22px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body[data-view="commandCenter"] .model-title p {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body[data-view="commandCenter"] .model-search {
    min-width: 220px !important;
  }

  body[data-view="commandCenter"] .model-cloud {
    flex-basis: 116px !important;
  }

  body[data-view="commandCenter"] .model-date {
    flex-basis: 140px !important;
  }

  body[data-view="commandCenter"] .model-user {
    flex-basis: 118px !important;
  }

  body[data-view="commandCenter"] .model-quick {
    flex-basis: 132px !important;
  }

  body[data-view="commandCenter"] .model-command {
    grid-template-columns: minmax(0, 1fr) 410px !important;
  }

  body[data-view="commandCenter"] .model-kpi-grid {
    grid-template-columns: repeat(4, minmax(165px, 1fr)) !important;
  }
}

/* Professional command top: readable layout over exact screenshot squeezing. */
body[data-view="commandCenter"] .model-dashboard {
  grid-template-rows: auto auto auto 18px !important;
  gap: 14px !important;
}

body[data-view="commandCenter"] .model-header {
  min-height: 0 !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) minmax(520px, 1.15fr) !important;
  gap: 16px !important;
  align-items: center !important;
  overflow: visible !important;
}

body[data-view="commandCenter"] .model-title {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  flex: initial !important;
}

body[data-view="commandCenter"] .model-title h1 {
  margin: 0 !important;
  font-size: 26px !important;
  line-height: 1.05 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .model-title p {
  margin-top: 6px !important;
  font-size: 13px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .model-search,
body[data-view="commandCenter"] .model-bell,
body[data-view="commandCenter"] .model-cloud,
body[data-view="commandCenter"] .model-sync,
body[data-view="commandCenter"] .model-date,
body[data-view="commandCenter"] .model-user,
body[data-view="commandCenter"] .model-quick {
  flex: initial !important;
  justify-self: auto !important;
  align-self: auto !important;
}

body[data-view="commandCenter"] .model-search {
  min-width: 280px !important;
  max-width: none !important;
}

body[data-view="commandCenter"] .model-header::after {
  content: "";
  display: none;
}

body[data-view="commandCenter"] .model-header {
  grid-template-areas:
    "title search"
    "title actions" !important;
}

body[data-view="commandCenter"] .model-title {
  grid-area: title !important;
}

body[data-view="commandCenter"] .model-search {
  grid-area: search !important;
}

body[data-view="commandCenter"] .model-bell,
body[data-view="commandCenter"] .model-cloud,
body[data-view="commandCenter"] .model-sync,
body[data-view="commandCenter"] .model-date,
body[data-view="commandCenter"] .model-user,
body[data-view="commandCenter"] .model-quick {
  height: 42px !important;
  min-height: 42px !important;
}

body[data-view="commandCenter"] .model-bell {
  grid-area: actions !important;
  justify-self: start !important;
}

body[data-view="commandCenter"] .model-cloud,
body[data-view="commandCenter"] .model-sync,
body[data-view="commandCenter"] .model-date,
body[data-view="commandCenter"] .model-user,
body[data-view="commandCenter"] .model-quick {
  grid-area: actions !important;
}

body[data-view="commandCenter"] .model-bell {
  margin-left: 0 !important;
}

body[data-view="commandCenter"] .model-cloud {
  margin-left: 56px !important;
}

body[data-view="commandCenter"] .model-sync {
  margin-left: 190px !important;
}

body[data-view="commandCenter"] .model-date {
  margin-left: 284px !important;
}

body[data-view="commandCenter"] .model-user {
  margin-left: 452px !important;
}

body[data-view="commandCenter"] .model-quick {
  margin-left: 590px !important;
  width: 144px !important;
  background: #ef1429 !important;
  color: #fff !important;
}

body[data-view="commandCenter"] .model-command {
  height: auto !important;
  min-height: 214px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  gap: 16px !important;
  padding: 18px !important;
  overflow: visible !important;
}

body[data-view="commandCenter"] .model-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  height: auto !important;
}

body[data-view="commandCenter"] .model-kpi {
  min-height: 104px !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  padding: 14px !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.035) !important;
}

body[data-view="commandCenter"] .model-kpi span {
  width: 52px !important;
  height: 52px !important;
}

body[data-view="commandCenter"] .model-kpi b,
body[data-view="commandCenter"] .model-kpi strong,
body[data-view="commandCenter"] .model-kpi small,
body[data-view="commandCenter"] .model-kpi em {
  max-width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

body[data-view="commandCenter"] .model-kpi b {
  font-size: 12px !important;
}

body[data-view="commandCenter"] .model-kpi strong {
  font-size: 25px !important;
}

body[data-view="commandCenter"] .model-glance {
  display: grid !important;
  grid-template-columns: minmax(210px, .75fr) minmax(0, 1.25fr) !important;
  grid-template-rows: auto !important;
  gap: 16px !important;
  padding: 14px 0 0 !important;
  border-left: 0 !important;
  border-top: 1px solid rgba(255,255,255,.16) !important;
}

body[data-view="commandCenter"] .model-glance-head {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-self: center !important;
  font-size: 14px !important;
}

body[data-view="commandCenter"] .model-glance-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body[data-view="commandCenter"] .model-glance-grid button {
  min-height: 78px !important;
  border-radius: 8px !important;
}

@media (max-width: 1500px) {
  body[data-view="commandCenter"] .model-header {
    grid-template-columns: minmax(320px, 1fr) minmax(460px, 1fr) !important;
  }

  body[data-view="commandCenter"] .model-cloud {
    margin-left: 52px !important;
  }

  body[data-view="commandCenter"] .model-sync {
    margin-left: 174px !important;
  }

  body[data-view="commandCenter"] .model-date {
    margin-left: 260px !important;
  }

  body[data-view="commandCenter"] .model-user {
    margin-left: 408px !important;
  }

  body[data-view="commandCenter"] .model-quick {
    margin-left: 530px !important;
    width: 128px !important;
  }
}

/* Fresh Operations Dashboard: clean rebuild matching the latest requested design. */
body[data-view="commandCenter"] {
  overflow: hidden !important;
  background: #f6f8fc !important;
}

body[data-view="commandCenter"] .app-shell {
  grid-template-columns: 224px minmax(0, 1fr) !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
}

body[data-view="commandCenter"] .main,
body[data-view="commandCenter"] .view {
  height: 100vh !important;
  min-width: 0 !important;
  overflow: auto !important;
  background: #f6f8fc !important;
}

body[data-view="commandCenter"] .topbar {
  display: none !important;
}

body[data-view="commandCenter"] .sidebar {
  width: 224px !important;
  min-width: 224px !important;
  max-width: 224px !important;
  padding: 22px 20px !important;
  background: linear-gradient(180deg, #07162b 0%, #061328 58%, #031022 100%) !important;
  color: #fff !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border-right: 0 !important;
}

body[data-view="commandCenter"] .sidebar .brand {
  margin-bottom: 22px !important;
  padding-bottom: 20px !important;
  border-bottom: 1px solid rgba(255,255,255,.16) !important;
}

body[data-view="commandCenter"] .sidebar .brand-logo {
  width: 172px !important;
  height: auto !important;
  max-height: 58px !important;
  object-fit: contain !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-view="commandCenter"] .sidebar .brand-copy strong,
body[data-view="commandCenter"] .sidebar .brand-copy span {
  color: #fff !important;
}

body[data-view="commandCenter"] .nav-section-title {
  color: #9fc5f4 !important;
  font-size: 11px !important;
  letter-spacing: .08em !important;
}

body[data-view="commandCenter"] .nav button {
  width: 100% !important;
  min-height: 36px !important;
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

body[data-view="commandCenter"] .nav button.active {
  background: #ef1429 !important;
  color: #fff !important;
}

.fresh-dashboard,
.fresh-dashboard * {
  box-sizing: border-box;
  min-width: 0;
}

.fresh-dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 86px auto 1fr 24px;
  gap: 24px;
  padding: 24px 30px 14px;
  color: #07142c;
  font-family: Arial, Helvetica, sans-serif;
}

.fresh-dashboard button {
  font: inherit;
  cursor: pointer;
}

.fresh-dashboard svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fresh-header {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 430px) 50px 130px 172px 128px;
  gap: 14px;
  align-items: center;
}

.fresh-title h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}

.fresh-title p {
  margin: 8px 0 0;
  color: #334155;
  font-size: 14px;
}

.fresh-search,
.fresh-bell,
.fresh-cloud,
.fresh-date,
.fresh-user {
  min-height: 46px;
  border: 1px solid #dce6f3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.fresh-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
}

.fresh-search input {
  border: 0;
  outline: 0;
  color: #334155;
  font-size: 12px;
}

.fresh-search button,
.fresh-bell,
.fresh-cloud,
.fresh-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fresh-search button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #07142c;
}

.fresh-bell {
  position: relative;
  color: #07142c;
}

.fresh-bell b {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ef1429;
  color: #fff;
  font-size: 10px;
}

.fresh-cloud {
  background: #ecfff3;
  color: #059447;
  border-color: #c4f3d0;
  font-size: 12px;
  font-weight: 900;
}

.fresh-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
}

.fresh-user b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #06142d;
  color: #fff;
  font-size: 12px;
}

.fresh-user span {
  font-size: 12px;
  font-weight: 900;
}

.fresh-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.fresh-kpi {
  min-height: 130px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "icon note";
  align-content: center;
  gap: 8px 20px;
  padding: 24px;
  border: 1px solid #e0e8f3;
  border-radius: 8px;
  background: #fff;
  color: #07142c;
  text-align: left;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .05);
}

.fresh-kpi span {
  grid-area: icon;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
}

.fresh-kpi.blue span { background: #eef5ff; color: #2563eb; }
.fresh-kpi.orange span { background: #fff4e5; color: #f97316; }
.fresh-kpi.red span { background: #fff0f2; color: #ef1429; }
.fresh-kpi.green span { background: #e9fff1; color: #10b981; }

.fresh-kpi small {
  grid-area: label;
  color: #172554;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.fresh-kpi b {
  grid-area: value;
  font-size: 25px;
  line-height: 1;
}

.fresh-kpi em {
  grid-area: note;
  color: #334155;
  font-size: 12px;
  font-style: normal;
}

.fresh-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.03fr);
  grid-template-rows: 246px 236px;
  grid-template-areas:
    "attendance compliance"
    "actions recent";
  gap: 20px;
}

.fresh-card {
  padding: 22px;
  border: 1px solid #e0e8f3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .05);
  overflow: hidden;
}

.fresh-attendance { grid-area: attendance; }
.fresh-compliance { grid-area: compliance; }
.fresh-actions { grid-area: actions; }
.fresh-recent { grid-area: recent; }

.fresh-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.fresh-card-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
}

.fresh-card-head span,
.fresh-card-head button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #0f3f93;
  font-size: 12px;
  font-weight: 900;
}

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

.fresh-attendance-grid button {
  min-height: 132px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  padding: 24px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  text-align: left;
}

.fresh-attendance-grid span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.fresh-attendance-grid b {
  font-size: 28px;
  line-height: 1;
}

.fresh-attendance-grid small {
  color: #07142c;
  font-size: 12px;
  font-weight: 900;
}

.fresh-attendance-grid .present { background: #f0fdf7; color: #10b981; }
.fresh-attendance-grid .missing { background: #fff5f5; color: #dc2626; }
.fresh-attendance-grid .leave { background: #f3f7ff; color: #2563eb; }

.fresh-list,
.fresh-recent-list {
  display: grid;
  gap: 14px;
}

.fresh-alert-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  grid-template-areas: "icon title badge" "icon note badge";
  gap: 4px 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e0e8f3;
  border-radius: 8px;
  background: #fff;
  color: #07142c;
  text-align: left;
}

.fresh-alert-row span {
  grid-area: icon;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff0f2;
  color: #ef1429;
}

.fresh-alert-row.orange span {
  background: #fff4e5;
  color: #f97316;
}

.fresh-alert-row b {
  grid-area: title;
  font-size: 14px;
}

.fresh-alert-row small {
  grid-area: note;
  color: #334155;
  font-size: 12px;
}

.fresh-alert-row em {
  grid-area: badge;
  padding: 9px 12px;
  border-radius: 7px;
  background: #ffe8ec;
  color: #ef1429;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.fresh-alert-row.orange em {
  background: #fff4e5;
  color: #f97316;
}

.fresh-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.fresh-action {
  min-height: 138px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid #e8eef7;
  border-radius: 8px;
  background: #fbfdff;
  color: #07142c;
  text-align: center;
}

.fresh-action span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.fresh-action.blue span { background: #eef5ff; color: #2563eb; }
.fresh-action.green span { background: #e9fff1; color: #10b981; }
.fresh-action.purple span { background: #f2e8ff; color: #7c3aed; }

.fresh-action b {
  font-size: 12px;
}

.fresh-action small {
  color: #334155;
  font-size: 11px;
  line-height: 1.35;
}

.fresh-recent-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 0;
  background: transparent;
  color: #07142c;
  text-align: left;
}

.fresh-recent-row span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.fresh-recent-row.red span { background: #fff0f2; color: #ef1429; }
.fresh-recent-row.orange span { background: #fff4e5; color: #f97316; }
.fresh-recent-row.blue span { background: #eef5ff; color: #2563eb; }

.fresh-recent-row b {
  font-size: 12px;
  font-weight: 500;
}

.fresh-recent-row em {
  color: #334155;
  font-size: 11px;
  font-style: normal;
}

.fresh-empty {
  color: #64748b;
  font-size: 13px;
}

.fresh-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 11px;
}

@media (max-width: 1500px) {
  .fresh-dashboard {
    padding: 20px 24px 12px;
    gap: 18px;
  }

  .fresh-header {
    grid-template-columns: minmax(280px, 1fr) minmax(260px, 360px) 48px 120px 148px 118px;
    gap: 10px;
  }

  .fresh-kpi {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 18px;
  }

  .fresh-kpi span {
    width: 56px;
    height: 56px;
  }

  .fresh-grid {
    grid-template-rows: 246px 238px;
  }
}

/* Fresh dashboard viewport fit: keep header visible and cards complete. */
body[data-view="commandCenter"] .fresh-dashboard {
  min-height: 100vh !important;
  grid-template-rows: 64px 112px minmax(0, 1fr) 18px !important;
  gap: 14px !important;
  padding: 16px 24px 10px !important;
}

body[data-view="commandCenter"] .fresh-header {
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 390px) 44px 118px 152px 120px !important;
  gap: 10px !important;
  align-items: center !important;
}

body[data-view="commandCenter"] .fresh-title h1 {
  font-size: 21px !important;
  line-height: 1.05 !important;
}

body[data-view="commandCenter"] .fresh-title p {
  margin-top: 5px !important;
  font-size: 12px !important;
}

body[data-view="commandCenter"] .fresh-search,
body[data-view="commandCenter"] .fresh-bell,
body[data-view="commandCenter"] .fresh-cloud,
body[data-view="commandCenter"] .fresh-date,
body[data-view="commandCenter"] .fresh-user {
  min-height: 42px !important;
  height: 42px !important;
}

body[data-view="commandCenter"] .fresh-kpis {
  gap: 12px !important;
}

body[data-view="commandCenter"] .fresh-kpi {
  min-height: 112px !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  gap: 6px 16px !important;
  padding: 18px !important;
}

body[data-view="commandCenter"] .fresh-kpi span {
  width: 54px !important;
  height: 54px !important;
  border-radius: 14px !important;
}

body[data-view="commandCenter"] .fresh-kpi small {
  font-size: 11px !important;
}

body[data-view="commandCenter"] .fresh-kpi b {
  font-size: 23px !important;
}

body[data-view="commandCenter"] .fresh-kpi em {
  font-size: 11px !important;
}

body[data-view="commandCenter"] .fresh-grid {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-rows: minmax(210px, 1fr) minmax(210px, .95fr) !important;
  gap: 14px !important;
}

body[data-view="commandCenter"] .fresh-card {
  padding: 18px !important;
  min-height: 0 !important;
}

body[data-view="commandCenter"] .fresh-card-head {
  margin-bottom: 14px !important;
}

body[data-view="commandCenter"] .fresh-card-head h2 {
  font-size: 16px !important;
}

body[data-view="commandCenter"] .fresh-attendance-grid {
  gap: 12px !important;
}

body[data-view="commandCenter"] .fresh-attendance-grid button {
  min-height: 116px !important;
  padding: 18px !important;
}

body[data-view="commandCenter"] .fresh-attendance-grid span {
  width: 36px !important;
  height: 36px !important;
}

body[data-view="commandCenter"] .fresh-attendance-grid b {
  font-size: 25px !important;
}

body[data-view="commandCenter"] .fresh-alert-row {
  min-height: 66px !important;
  padding: 12px !important;
}

body[data-view="commandCenter"] .fresh-alert-row span {
  width: 42px !important;
  height: 42px !important;
}

body[data-view="commandCenter"] .fresh-actions-grid {
  gap: 12px !important;
}

body[data-view="commandCenter"] .fresh-action {
  min-height: 118px !important;
  padding: 14px !important;
  gap: 7px !important;
}

body[data-view="commandCenter"] .fresh-action span {
  width: 44px !important;
  height: 44px !important;
}

body[data-view="commandCenter"] .fresh-action small {
  line-height: 1.25 !important;
}

body[data-view="commandCenter"] .fresh-recent-row {
  min-height: 38px !important;
}

body[data-view="commandCenter"] .fresh-footer {
  font-size: 11px !important;
}

/* Compact command modal for dashboard search, quick actions, and admin menu. */
.modal[data-mode="dashboard-command"] .modal-panel {
  width: min(860px, calc(100vw - 48px)) !important;
  max-height: min(760px, calc(100vh - 48px)) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

.modal[data-mode="dashboard-command"] .modal-header {
  padding: 22px 24px !important;
  min-height: 0 !important;
}

.modal[data-mode="dashboard-command"] #modalEyebrow {
  color: #ef1429 !important;
  font-size: 12px !important;
  letter-spacing: .08em !important;
}

.modal[data-mode="dashboard-command"] #modalTitle {
  font-size: 28px !important;
  line-height: 1.1 !important;
}

.modal[data-mode="dashboard-command"] .modal-body {
  padding: 20px 24px 24px !important;
  overflow: auto !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-list {
  display: grid !important;
  gap: 10px !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-row {
  min-height: 64px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  grid-template-areas:
    "icon title"
    "icon note" !important;
  gap: 4px 12px !important;
  align-items: center !important;
  padding: 12px !important;
  border: 1px solid #dbe5f2 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #07142c !important;
  text-align: left !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-row span,
.modal[data-mode="dashboard-command"] .dashboard-command-row > svg {
  grid-area: icon !important;
  width: 40px !important;
  height: 40px !important;
  display: grid !important;
  place-items: center !important;
  padding: 9px !important;
  border-radius: 10px !important;
  background: #eef5ff !important;
  color: #2563eb !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-row svg,
.modal[data-mode="dashboard-command"] .dashboard-command-tile svg,
.modal[data-mode="dashboard-command"] .dashboard-user-card svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.1 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-row b {
  grid-area: title !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-row small {
  grid-area: note !important;
  color: #475569 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-tile {
  min-height: 118px !important;
  display: grid !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 8px !important;
  padding: 14px !important;
  border: 1px solid #dbe5f2 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #07142c !important;
  text-align: center !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-tile span {
  width: 44px !important;
  height: 44px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 12px !important;
  background: #eef5ff !important;
  color: #2563eb !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-tile b {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

.modal[data-mode="dashboard-command"] .dashboard-command-tile small {
  color: #475569 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.modal[data-mode="dashboard-command"] .dashboard-user-card {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-areas:
    "avatar name"
    "avatar role" !important;
  gap: 4px 12px !important;
  align-items: center !important;
  margin-bottom: 14px !important;
  padding: 14px !important;
  border: 1px solid #dbe5f2 !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
}

.modal[data-mode="dashboard-command"] .dashboard-user-card span {
  grid-area: avatar !important;
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #06142d !important;
  color: #fff !important;
  font-weight: 900 !important;
}

.modal[data-mode="dashboard-command"] .dashboard-user-card b {
  grid-area: name !important;
  font-size: 15px !important;
}

.modal[data-mode="dashboard-command"] .dashboard-user-card small {
  grid-area: role !important;
  color: #475569 !important;
  font-size: 12px !important;
}

/* SVG-free command modal content. This bypasses old detail-preview icon rules entirely. */
.modal[data-mode="dashboard-command"] .cmd-list {
  display: grid !important;
  gap: 10px !important;
}

.modal[data-mode="dashboard-command"] .cmd-row {
  min-height: 62px !important;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  grid-template-areas:
    "badge title"
    "badge note" !important;
  gap: 4px 12px !important;
  align-items: center !important;
  width: 100% !important;
  padding: 12px !important;
  border: 1px solid #dbe5f2 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #07142c !important;
  text-align: left !important;
}

.modal[data-mode="dashboard-command"] .cmd-row span,
.modal[data-mode="dashboard-command"] .cmd-tile span {
  display: grid !important;
  place-items: center !important;
  border-radius: 10px !important;
  background: #eef5ff !important;
  color: #2563eb !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.modal[data-mode="dashboard-command"] .cmd-row span {
  grid-area: badge !important;
  width: 40px !important;
  height: 40px !important;
  font-size: 12px !important;
}

.modal[data-mode="dashboard-command"] .cmd-row b {
  grid-area: title !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.modal[data-mode="dashboard-command"] .cmd-row small {
  grid-area: note !important;
  color: #475569 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.modal[data-mode="dashboard-command"] .cmd-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.modal[data-mode="dashboard-command"] .cmd-tile {
  min-height: 116px !important;
  display: grid !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 8px !important;
  padding: 14px !important;
  border: 1px solid #dbe5f2 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #07142c !important;
  text-align: center !important;
}

.modal[data-mode="dashboard-command"] .cmd-tile span {
  width: 42px !important;
  height: 42px !important;
  font-size: 12px !important;
}

.modal[data-mode="dashboard-command"] .cmd-tile b {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

.modal[data-mode="dashboard-command"] .cmd-tile small {
  color: #475569 !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.modal[data-mode="dashboard-command"] .cmd-user-card {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-areas:
    "avatar name"
    "avatar role" !important;
  gap: 4px 12px !important;
  align-items: center !important;
  margin-bottom: 14px !important;
  padding: 14px !important;
  border: 1px solid #dbe5f2 !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
}

.modal[data-mode="dashboard-command"] .cmd-user-card span {
  grid-area: avatar !important;
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #06142d !important;
  color: #fff !important;
  font-weight: 900 !important;
}

.modal[data-mode="dashboard-command"] .cmd-user-card b {
  grid-area: name !important;
  font-size: 15px !important;
}

.modal[data-mode="dashboard-command"] .cmd-user-card small {
  grid-area: role !important;
  color: #475569 !important;
  font-size: 12px !important;
}

.modal[data-mode="dashboard-command"] .cmd-empty {
  display: grid !important;
  gap: 6px !important;
  padding: 18px !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 10px !important;
  color: #475569 !important;
}

.modal[data-mode="dashboard-command"] .cmd-empty b {
  color: #07142c !important;
  font-size: 15px !important;
}

/* Shared top controls visible on every screen, including the dashboard. */
body[data-view="commandCenter"] .topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-height: 76px !important;
  padding: 12px 24px !important;
  background: #f6f8fc !important;
  border-bottom: 1px solid #e3ebf5 !important;
  box-shadow: none !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
}

body[data-view="commandCenter"] .topbar > div:first-of-type {
  display: none !important;
}

body[data-view="commandCenter"] .topbar-actions {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
}

body[data-view="commandCenter"] .notification-toggle {
  width: 58px !important;
  height: 58px !important;
  border-radius: 999px !important;
  border: 1px solid #f6b7bd !important;
  background: #fff7f8 !important;
  color: #b91c1c !important;
  position: relative !important;
}

body[data-view="commandCenter"] .notification-toggle strong {
  position: absolute !important;
  top: -8px !important;
  right: -4px !important;
  width: 28px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #b91c1c !important;
  color: #fff !important;
  font-size: 16px !important;
}

body[data-view="commandCenter"] #currentUserLabel,
body[data-view="commandCenter"] #cloudStatusLabel,
body[data-view="commandCenter"] #todayLabel,
body[data-view="commandCenter"] #syncLatestButton,
body[data-view="commandCenter"] #installAppButton,
body[data-view="commandCenter"] #logoutButton {
  min-height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 18px !important;
  border: 1px solid #cfd9e6 !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  color: #1f2937 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body[data-view="commandCenter"] #cloudStatusLabel {
  background: #eafff1 !important;
  border-color: #9ee7b8 !important;
  color: #047857 !important;
}

body[data-view="commandCenter"] #currentUserLabel::before {
  content: "AD";
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  margin-right: 10px;
  border-radius: 999px;
  background: #06142d;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

body[data-view="commandCenter"] .fresh-dashboard {
  min-height: calc(100vh - 76px) !important;
}

body[data-view="commandCenter"] .fresh-header {
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 430px) !important;
  align-items: center !important;
}

/* Final top strip: keep the real ERP controls visible and aligned everywhere. */
#installAppButton.hidden {
  display: inline-flex !important;
}

.topbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}

.topbar-actions .notification-center,
.topbar-actions .pill,
.topbar-actions .ghost-button {
  flex: 0 0 auto !important;
}

.topbar-actions .pill,
.topbar-actions .ghost-button {
  min-height: 46px !important;
  padding: 0 18px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

#currentUserLabel,
#cloudStatusLabel,
#todayLabel,
#syncLatestButton,
#installAppButton,
#logoutButton {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 1440px) {
  .topbar {
    padding-left: 18px !important;
    padding-right: 18px !important;
    gap: 14px !important;
  }

  .topbar-actions {
    gap: 8px !important;
  }

  .topbar-actions .pill,
  .topbar-actions .ghost-button {
    min-height: 42px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
  }

  .topbar-actions .notification-toggle {
    width: 48px !important;
    height: 48px !important;
  }
}

/* Professional global sidebar: one compact menu across every ERP screen. */
.app-shell {
  grid-template-columns: 224px minmax(0, 1fr) !important;
  background: #f4f7fb !important;
}

.sidebar {
  width: 224px !important;
  min-width: 224px !important;
  height: 100vh !important;
  position: sticky !important;
  top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 22px 14px 16px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: linear-gradient(180deg, #07162d 0%, #061429 52%, #031022 100%) !important;
  color: #ffffff !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08) !important;
}

.sidebar .brand {
  display: block !important;
  padding: 0 6px 18px !important;
  margin: 0 0 18px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
}

.sidebar .brand-logo {
  width: 158px !important;
  height: auto !important;
  max-height: 58px !important;
  padding: 7px 8px !important;
  margin: 0 0 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  object-fit: contain !important;
}

.sidebar .brand-copy strong {
  display: block !important;
  margin: 0 0 4px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
}

.sidebar .brand-copy span {
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

.nav {
  display: grid !important;
  gap: 16px !important;
  padding: 0 !important;
}

.nav-section {
  display: grid !important;
  gap: 4px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13) !important;
}

.nav-section:last-child {
  border-bottom: 0 !important;
}

.nav-section-title {
  margin: 0 0 6px !important;
  padding: 0 6px !important;
  color: #9fc5f2 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

.nav button {
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  text-align: left !important;
  box-shadow: none !important;
}

.nav button:hover,
.nav button.active {
  background: #f3122d !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(243, 18, 45, 0.24) !important;
}

.nav .nav-icon {
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  display: inline-grid !important;
  place-items: center !important;
  color: currentColor !important;
}

.nav .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2.35 !important;
}

.sidebar-collapse {
  min-height: 40px !important;
  width: 100% !important;
  margin: auto 0 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

.sidebar-collapse::before {
  content: "<<";
  margin-right: 8px;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr) !important;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 72px !important;
  min-width: 72px !important;
  padding: 18px 10px !important;
}

.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .nav-section-title,
.app-shell.sidebar-collapsed .nav button span:last-child,
.app-shell.sidebar-collapsed .sidebar-collapse {
  display: none !important;
}

.app-shell.sidebar-collapsed .sidebar .brand {
  padding: 0 0 12px !important;
  margin-bottom: 12px !important;
}

.app-shell.sidebar-collapsed .sidebar .brand-logo {
  width: 44px !important;
  max-width: 44px !important;
  margin: 0 auto !important;
}

.app-shell.sidebar-collapsed .nav button {
  justify-content: center !important;
  padding: 9px !important;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    width: 224px !important;
    min-width: 224px !important;
    position: fixed !important;
    z-index: 50 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.2s ease !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }
}

/* Compact ERP header controls: professional scale, no oversized pills. */
.topbar,
body[data-view="commandCenter"] .topbar {
  min-height: 58px !important;
  padding: 8px 18px !important;
  background: #f6f8fc !important;
  border-bottom: 1px solid #e3ebf5 !important;
}

.topbar-actions,
body[data-view="commandCenter"] .topbar-actions {
  width: auto !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

.topbar-actions .pill,
.topbar-actions .ghost-button,
body[data-view="commandCenter"] #currentUserLabel,
body[data-view="commandCenter"] #cloudStatusLabel,
body[data-view="commandCenter"] #todayLabel,
body[data-view="commandCenter"] #syncLatestButton,
body[data-view="commandCenter"] #installAppButton,
body[data-view="commandCenter"] #logoutButton {
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 13px !important;
  border-radius: 5px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

#currentUserLabel,
body[data-view="commandCenter"] #currentUserLabel {
  gap: 8px !important;
}

#currentUserLabel::before,
body[data-view="commandCenter"] #currentUserLabel::before {
  width: 28px !important;
  height: 28px !important;
  margin-right: 0 !important;
  font-size: 11px !important;
}

.notification-toggle,
body[data-view="commandCenter"] .notification-toggle {
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  border: 1px solid #f3b4bc !important;
  background: #fff7f8 !important;
  color: #b91c1c !important;
}

.notification-bell svg,
body[data-view="commandCenter"] .notification-bell svg {
  width: 18px !important;
  height: 18px !important;
}

.notification-toggle strong,
body[data-view="commandCenter"] .notification-toggle strong {
  top: -7px !important;
  right: -4px !important;
  width: 20px !important;
  height: 20px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

#cloudStatusLabel,
body[data-view="commandCenter"] #cloudStatusLabel {
  min-width: 116px !important;
  background: #eafff1 !important;
  border-color: #9ee7b8 !important;
  color: #047857 !important;
}

#todayLabel,
body[data-view="commandCenter"] #todayLabel {
  min-width: 154px !important;
}

#installAppButton,
body[data-view="commandCenter"] #installAppButton {
  min-width: 104px !important;
}

#logoutButton,
body[data-view="commandCenter"] #logoutButton {
  min-width: 78px !important;
}

body[data-view="commandCenter"] .fresh-dashboard {
  min-height: calc(100vh - 58px) !important;
}

@media (max-width: 1280px) {
  .topbar-actions,
  body[data-view="commandCenter"] .topbar-actions {
    gap: 7px !important;
  }

  .topbar-actions .pill,
  .topbar-actions .ghost-button,
  body[data-view="commandCenter"] #currentUserLabel,
  body[data-view="commandCenter"] #cloudStatusLabel,
  body[data-view="commandCenter"] #todayLabel,
  body[data-view="commandCenter"] #syncLatestButton,
  body[data-view="commandCenter"] #installAppButton,
  body[data-view="commandCenter"] #logoutButton {
    padding: 0 10px !important;
    font-size: 13px !important;
  }
}

/* Fresh Alqaser CRM dashboard matching the requested professional layout. */
body[data-view="crm"] .view {
  padding: 26px 28px 34px !important;
  background: #f6f8fc !important;
}

.crm-ref-dashboard,
.crm-ref-dashboard * {
  box-sizing: border-box;
}

.crm-ref-dashboard {
  display: grid;
  gap: 18px;
  color: #07142c;
}

.crm-ref-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 18px;
}

.crm-ref-kpi {
  min-height: 132px;
  display: grid;
  grid-template-columns: 68px 1fr;
  grid-template-rows: 1fr auto;
  gap: 12px 18px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
  text-align: left;
  cursor: pointer;
}

.crm-ref-kpi > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.crm-ref-kpi svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crm-ref-kpi small,
.crm-ref-kpi b,
.crm-ref-kpi em {
  display: block;
}

.crm-ref-kpi small {
  margin: 0 0 10px;
  color: #17213a;
  font-size: 14px;
  font-weight: 800;
}

.crm-ref-kpi b {
  color: #06142d;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.crm-ref-kpi em {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #2563eb;
  font-style: normal;
  font-size: 14px;
  font-weight: 800;
}

.crm-ref-kpi em svg {
  width: 18px;
  height: 18px;
}

.crm-ref-kpi.blue > span { background: #eef5ff; color: #2563eb; }
.crm-ref-kpi.green > span { background: #eafaf1; color: #16a34a; }
.crm-ref-kpi.orange > span { background: #fff4df; color: #f59e0b; }
.crm-ref-kpi.purple > span { background: #f3e8ff; color: #9333ea; }

.crm-ref-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  grid-template-areas:
    "latest followups"
    "summary customers";
  gap: 18px;
}

.crm-ref-panel {
  min-width: 0;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.crm-ref-latest { grid-area: latest; }
.crm-ref-followups { grid-area: followups; }
.crm-ref-summary { grid-area: summary; }
.crm-ref-customers { grid-area: customers; }

.crm-ref-panel-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
}

.crm-ref-panel-head h2 {
  margin: 0;
  color: #07142c;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
}

.crm-ref-panel-head button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d5e1ef;
  border-radius: 6px;
  background: #ffffff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.crm-ref-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.crm-ref-table th,
.crm-ref-table td {
  padding: 16px 22px;
  border-top: 1px solid #edf2f7;
  color: #17213a;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}

.crm-ref-table th {
  background: #fbfcfe;
  color: #51627b;
  font-size: 12px;
  font-weight: 900;
}

.crm-ref-table td {
  font-weight: 700;
}

.crm-ref-table tr {
  cursor: pointer;
}

.crm-ref-table th:last-child,
.crm-ref-table td:last-child {
  width: 50px;
  text-align: center;
}

.crm-ref-more {
  border: 0;
  background: transparent;
  color: #07142c;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.crm-ref-badge {
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 8px;
  color: #2563eb;
  background: #eaf1ff;
  font-size: 12px;
  font-weight: 900;
}

.crm-ref-badge.won { color: #16a34a; background: #e9faef; }
.crm-ref-badge.lost { color: #ef4444; background: #ffe8ec; }
.crm-ref-badge.follow-up { color: #f59e0b; background: #fff4df; }
.crm-ref-badge.sent { color: #7c3aed; background: #f3e8ff; }

.crm-ref-follow-list {
  display: grid;
  gap: 10px;
  padding: 0 22px 18px;
}

.crm-ref-follow-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.crm-ref-follow-row > span {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 8px;
  background: #eef5ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.crm-ref-follow-row.tone-2 > span { background: #fff4df; color: #f59e0b; }
.crm-ref-follow-row.tone-3 > span { background: #f3e8ff; color: #9333ea; }

.crm-ref-follow-row b,
.crm-ref-follow-row small {
  display: block;
}

.crm-ref-follow-row b {
  margin: 0 0 6px;
  color: #07142c;
  font-size: 14px;
  font-weight: 900;
}

.crm-ref-follow-row small {
  color: #394b66;
  font-size: 13px;
  font-weight: 700;
}

.crm-ref-summary-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 20px 28px 28px;
}

.crm-ref-donut {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 999px;
  background: radial-gradient(circle at center, #fff 0 43%, transparent 44%), conic-gradient(var(--segments));
}

.crm-ref-donut b,
.crm-ref-donut span {
  grid-area: 1 / 1;
  display: block;
  text-align: center;
}

.crm-ref-donut b {
  margin-top: -16px;
  color: #07142c;
  font-size: 24px;
  font-weight: 900;
}

.crm-ref-donut span {
  margin-top: 34px;
  color: #51627b;
  font-size: 12px;
  font-weight: 800;
}

.crm-ref-legend {
  display: grid;
  gap: 14px;
}

.crm-ref-legend span {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 12px;
  color: #17213a;
  font-size: 13px;
  font-weight: 800;
}

.crm-ref-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.crm-ref-legend em {
  color: #07142c;
  font-style: normal;
  font-weight: 900;
}

.crm-ref-bars {
  display: grid;
  gap: 18px;
  padding: 24px 28px 30px;
}

.crm-ref-bars button {
  display: grid;
  grid-template-columns: 34px minmax(150px, 0.42fr) minmax(170px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 0;
  background: transparent;
  color: #07142c;
  text-align: left;
  cursor: pointer;
}

.crm-ref-bars span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: #51627b;
  font-weight: 900;
}

.crm-ref-bars b {
  font-size: 14px;
  font-weight: 900;
}

.crm-ref-bars i {
  height: 7px;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}

.crm-ref-bars u {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.crm-ref-bars em {
  min-width: 120px;
  color: #17213a;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.crm-ref-empty {
  padding: 28px;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 1280px) {
  .crm-ref-kpis {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .crm-ref-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "latest" "followups" "summary" "customers";
  }
}

@media (max-width: 760px) {
  body[data-view="crm"] .view {
    padding: 16px !important;
  }

  .crm-ref-kpis,
  .crm-ref-summary-body {
    grid-template-columns: 1fr;
  }

  .crm-ref-follow-row,
  .crm-ref-bars button {
    grid-template-columns: 1fr;
  }

  .crm-ref-table {
    min-width: 720px;
  }

  .crm-ref-latest {
    overflow-x: auto;
  }
}

/* Minimum-scale ERP shell. This is the final authority for header and sidebar sizing. */
html body .app-shell {
  grid-template-columns: 184px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view="crm"] .sidebar,
html body[data-view="commandCenter"] .sidebar {
  width: 184px !important;
  min-width: 184px !important;
  padding: 14px 10px 10px !important;
  overflow-x: hidden !important;
}

html body .sidebar .brand {
  padding: 0 4px 10px !important;
  margin: 0 0 10px !important;
}

html body .sidebar .brand-logo {
  width: 128px !important;
  max-height: 42px !important;
  padding: 5px 6px !important;
  margin: 0 0 9px !important;
  border-radius: 5px !important;
}

html body .sidebar .brand-copy strong {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

html body .sidebar .brand-copy span {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

html body .nav {
  gap: 8px !important;
}

html body .nav-section {
  gap: 2px !important;
  padding: 0 0 6px !important;
}

html body .nav-section-title {
  margin: 0 0 3px !important;
  padding: 0 4px !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
}

html body .nav button {
  min-height: 28px !important;
  gap: 8px !important;
  padding: 6px 8px !important;
  border-radius: 5px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
}

html body .nav .nav-icon {
  flex-basis: 15px !important;
  width: 15px !important;
  height: 15px !important;
}

html body .nav .nav-icon svg {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2.2 !important;
}

html body .sidebar-collapse {
  min-height: 32px !important;
  height: 32px !important;
  margin-top: 8px !important;
  border-radius: 5px !important;
  font-size: 11px !important;
}

html body .topbar,
html body[data-view="commandCenter"] .topbar,
html body[data-view="crm"] .topbar {
  min-height: 46px !important;
  height: 46px !important;
  padding: 6px 14px !important;
  gap: 10px !important;
}

html body .topbar h1 {
  font-size: 16px !important;
}

html body .topbar .eyebrow {
  font-size: 9px !important;
}

html body .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions,
html body[data-view="crm"] .topbar-actions {
  gap: 6px !important;
}

html body .topbar-actions .pill,
html body .topbar-actions .ghost-button,
html body[data-view="commandCenter"] #currentUserLabel,
html body[data-view="commandCenter"] #cloudStatusLabel,
html body[data-view="commandCenter"] #todayLabel,
html body[data-view="commandCenter"] #syncLatestButton,
html body[data-view="commandCenter"] #installAppButton,
html body[data-view="commandCenter"] #logoutButton {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 9px !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

html body #currentUserLabel::before,
html body[data-view="commandCenter"] #currentUserLabel::before {
  width: 22px !important;
  height: 22px !important;
  font-size: 9px !important;
}

html body .notification-toggle,
html body[data-view="commandCenter"] .notification-toggle {
  width: 34px !important;
  height: 34px !important;
}

html body .notification-bell svg,
html body[data-view="commandCenter"] .notification-bell svg {
  width: 15px !important;
  height: 15px !important;
}

html body .notification-toggle strong,
html body[data-view="commandCenter"] .notification-toggle strong {
  top: -5px !important;
  right: -3px !important;
  width: 17px !important;
  height: 17px !important;
  font-size: 9px !important;
}

html body #cloudStatusLabel,
html body[data-view="commandCenter"] #cloudStatusLabel {
  min-width: 88px !important;
}

html body #todayLabel,
html body[data-view="commandCenter"] #todayLabel {
  min-width: 118px !important;
}

html body #installAppButton,
html body[data-view="commandCenter"] #installAppButton {
  min-width: 78px !important;
}

html body #logoutButton,
html body[data-view="commandCenter"] #logoutButton {
  min-width: 56px !important;
}

html body .view {
  padding: 16px 18px 28px !important;
}

@media (max-width: 900px) {
  html body .app-shell {
    grid-template-columns: 1fr !important;
  }

  html body .sidebar {
    width: 184px !important;
    min-width: 184px !important;
  }
}

/* Reference topbar controls: bell, date, admin, logout only. */
html body #cloudStatusLabel,
html body #syncLatestButton,
html body #installAppButton {
  display: none !important;
}

html body .topbar,
html body[data-view="commandCenter"] .topbar,
html body[data-view="crm"] .topbar {
  min-height: 44px !important;
  height: 44px !important;
  padding: 5px 14px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e8eef6 !important;
  box-shadow: none !important;
}

html body .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions,
html body[data-view="crm"] .topbar-actions {
  gap: 12px !important;
  align-items: center !important;
}

html body .notification-center {
  order: 1 !important;
}

html body #todayLabel {
  order: 2 !important;
}

html body #currentUserLabel {
  order: 3 !important;
}

html body #logoutButton {
  order: 4 !important;
}

html body .notification-toggle,
html body[data-view="commandCenter"] .notification-toggle {
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #06142d !important;
  box-shadow: none !important;
}

html body .notification-bell svg,
html body[data-view="commandCenter"] .notification-bell svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2.35 !important;
}

html body .notification-toggle strong,
html body[data-view="commandCenter"] .notification-toggle strong {
  top: -5px !important;
  right: -3px !important;
  width: 15px !important;
  height: 15px !important;
  border: 2px solid #ffffff !important;
  border-radius: 999px !important;
  background: #e11d2e !important;
  color: #ffffff !important;
  font-size: 8px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

html body #todayLabel,
html body[data-view="commandCenter"] #todayLabel {
  min-width: 126px !important;
  height: 32px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 10px !important;
  border: 1px solid #dce5ef !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #17213a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

html body #todayLabel::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

html body #todayLabel::after,
html body #currentUserLabel::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

html body #currentUserLabel,
html body[data-view="commandCenter"] #currentUserLabel {
  min-width: 92px !important;
  height: 32px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #17213a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

html body #currentUserLabel::before,
html body[data-view="commandCenter"] #currentUserLabel::before {
  content: "A" !important;
  width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: #06142d !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

html body #logoutButton,
html body[data-view="commandCenter"] #logoutButton {
  min-width: 74px !important;
  height: 32px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #17213a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

html body #logoutButton::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

/* Final header correction: hide old sync controls and keep requested order. */
html body .topbar-actions #cloudStatusLabel,
html body .topbar-actions #syncLatestButton,
html body[data-view="commandCenter"] .topbar-actions #cloudStatusLabel,
html body[data-view="commandCenter"] .topbar-actions #syncLatestButton,
html body[data-view="crm"] .topbar-actions #cloudStatusLabel,
html body[data-view="crm"] .topbar-actions #syncLatestButton {
  display: none !important;
}

html body .topbar-actions #installAppButton,
html body .topbar-actions #installAppButton.hidden,
html body[data-view="commandCenter"] .topbar-actions #installAppButton,
html body[data-view="commandCenter"] .topbar-actions #installAppButton.hidden,
html body[data-view="crm"] .topbar-actions #installAppButton,
html body[data-view="crm"] .topbar-actions #installAppButton.hidden {
  order: 4 !important;
  min-width: 86px !important;
  height: 32px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  border: 1px solid #dce5ef !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #17213a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

html body .topbar-actions #logoutButton,
html body[data-view="commandCenter"] .topbar-actions #logoutButton,
html body[data-view="crm"] .topbar-actions #logoutButton {
  order: 5 !important;
}

/* Final sidebar replacement: exact professional menu structure and brand. */
html body .app-shell {
  grid-template-columns: 224px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar {
  width: 224px !important;
  min-width: 224px !important;
  height: 100vh !important;
  padding: 22px 16px 16px !important;
  background:
    radial-gradient(circle at 86% 8%, rgba(37, 99, 235, 0.18), transparent 32%),
    linear-gradient(180deg, #07162d 0%, #061429 48%, #031022 100%) !important;
  color: #ffffff !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

html body .sidebar-brand-ref {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 4px 18px !important;
  margin: 0 0 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

html body .sidebar-brand-mark {
  width: 34px !important;
  height: 34px !important;
  display: block !important;
  position: relative !important;
  clip-path: polygon(50% 0, 92% 25%, 92% 75%, 50% 100%, 8% 75%, 8% 25%) !important;
  background: #f3122d !important;
}

html body .sidebar-brand-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  clip-path: inherit;
  background: #ffffff;
}

html body .sidebar-brand-mark::after {
  content: "";
  position: absolute;
  inset: 12px;
  clip-path: inherit;
  background: #07162d;
}

html body .sidebar-brand-text {
  min-width: 0 !important;
}

html body .sidebar-brand-text strong {
  display: block !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

html body .sidebar-brand-text small {
  display: block !important;
  margin-top: 3px !important;
  color: #ffffff !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

html body .sidebar .brand-logo,
html body .sidebar .brand-copy {
  display: none !important;
}

html body .nav {
  display: grid !important;
  gap: 12px !important;
}

html body .nav-section {
  display: grid !important;
  gap: 4px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13) !important;
}

html body .nav-section:last-child {
  border-bottom: 0 !important;
}

html body .nav-section-title {
  margin: 0 0 4px !important;
  padding: 0 4px !important;
  color: #a7bfdc !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0 !important;
}

html body .nav button {
  min-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 9px 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

html body .nav button:hover,
html body .nav button.active {
  background: #f3122d !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(243, 18, 45, 0.24) !important;
}

html body .nav .nav-icon {
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  color: currentColor !important;
}

html body .nav .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2.25 !important;
}

html body .sidebar-collapse {
  min-height: 42px !important;
  width: 100% !important;
  margin-top: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body .sidebar-collapse::before {
  content: "<" !important;
  margin-right: 10px !important;
}

@media (max-width: 900px) {
  html body .app-shell {
    grid-template-columns: 1fr !important;
  }

  html body .sidebar,
  html body[data-view="commandCenter"] .sidebar,
  html body[data-view="crm"] .sidebar {
    width: 224px !important;
    min-width: 224px !important;
  }
}

/* Final fit pass: no heavy header band, cleaner sidebar, dashboard fits the viewport. */
html body .main {
  position: relative !important;
  min-width: 0 !important;
}

html body .topbar,
html body[data-view="commandCenter"] .topbar,
html body[data-view="crm"] .topbar {
  height: 40px !important;
  min-height: 40px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  justify-content: flex-end !important;
  padding: 4px 18px !important;
  background: #f6f8fc !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body .topbar > div:first-of-type,
html body[data-view="commandCenter"] .topbar > div:first-of-type,
html body[data-view="crm"] .topbar > div:first-of-type {
  display: none !important;
}

html body .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions,
html body[data-view="crm"] .topbar-actions {
  gap: 10px !important;
}

html body .notification-toggle,
html body[data-view="commandCenter"] .notification-toggle,
html body[data-view="crm"] .notification-toggle {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
}

html body .notification-bell svg,
html body[data-view="commandCenter"] .notification-bell svg,
html body[data-view="crm"] .notification-bell svg {
  width: 16px !important;
  height: 16px !important;
}

html body #todayLabel,
html body[data-view="commandCenter"] #todayLabel,
html body[data-view="crm"] #todayLabel,
html body #currentUserLabel,
html body[data-view="commandCenter"] #currentUserLabel,
html body[data-view="crm"] #currentUserLabel,
html body #installAppButton,
html body[data-view="commandCenter"] #installAppButton,
html body[data-view="crm"] #installAppButton,
html body #logoutButton,
html body[data-view="commandCenter"] #logoutButton,
html body[data-view="crm"] #logoutButton {
  height: 28px !important;
  min-height: 28px !important;
  font-size: 11px !important;
}

html body #currentUserLabel::before,
html body[data-view="commandCenter"] #currentUserLabel::before {
  width: 24px !important;
  height: 24px !important;
  font-size: 10px !important;
}

html body .sidebar {
  scrollbar-width: none !important;
}

html body .sidebar::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

html body .view {
  padding: 10px 18px 18px !important;
}

html body[data-view="commandCenter"] .fresh-dashboard {
  min-height: calc(100vh - 40px) !important;
  grid-template-rows: 58px 92px minmax(0, 1fr) 16px !important;
  gap: 10px !important;
  padding: 8px 22px 8px !important;
}

html body[data-view="commandCenter"] .fresh-header {
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 430px) !important;
  gap: 14px !important;
}

html body[data-view="commandCenter"] .fresh-title h1 {
  font-size: 20px !important;
}

html body[data-view="commandCenter"] .fresh-title p {
  margin-top: 4px !important;
  font-size: 12px !important;
}

html body[data-view="commandCenter"] .fresh-search {
  height: 40px !important;
  min-height: 40px !important;
}

html body[data-view="commandCenter"] .fresh-kpis {
  gap: 12px !important;
}

html body[data-view="commandCenter"] .fresh-kpi {
  min-height: 92px !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 4px 14px !important;
  padding: 14px 16px !important;
}

html body[data-view="commandCenter"] .fresh-kpi span {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
}

html body[data-view="commandCenter"] .fresh-kpi b {
  font-size: 21px !important;
}

html body[data-view="commandCenter"] .fresh-grid {
  grid-template-rows: minmax(190px, 1fr) minmax(190px, .94fr) !important;
  gap: 12px !important;
}

html body[data-view="commandCenter"] .fresh-card {
  padding: 16px !important;
}

html body[data-view="commandCenter"] .fresh-card-head {
  margin-bottom: 12px !important;
}

html body[data-view="commandCenter"] .fresh-attendance-grid button {
  min-height: 100px !important;
  padding: 14px !important;
}

html body[data-view="commandCenter"] .fresh-action {
  min-height: 100px !important;
  padding: 12px !important;
}

html body[data-view="commandCenter"] .fresh-action span {
  width: 38px !important;
  height: 38px !important;
}

html body[data-view="commandCenter"] .fresh-alert-row {
  min-height: 58px !important;
  padding: 10px !important;
}

html body[data-view="commandCenter"] .fresh-alert-row span {
  width: 36px !important;
  height: 36px !important;
}

html body[data-view="commandCenter"] .fresh-footer {
  align-self: end !important;
  font-size: 10px !important;
}

/* Final CRM fit: compact ERP density and no extra title header. */
html body .topbar > div:first-of-type,
html body[data-view="crm"] .topbar > div:first-of-type,
html body[data-view="quotations"] .topbar > div:first-of-type,
html body[data-view="customers"] .topbar > div:first-of-type,
html body[data-view="followUps"] .topbar > div:first-of-type,
html body[data-view="salesOrders"] .topbar > div:first-of-type {
  display: none !important;
}

html body[data-view="crm"] .view,
html body[data-view="quotations"] .view,
html body[data-view="customers"] .view,
html body[data-view="followUps"] .view,
html body[data-view="salesOrders"] .view {
  height: calc(100vh - 40px) !important;
  overflow: hidden !important;
  padding: 10px 14px 12px !important;
}

html body[data-view="crm"] .crm-ref-dashboard,
html body[data-view="quotations"] .crm-ref-dashboard,
html body[data-view="customers"] .crm-ref-dashboard,
html body[data-view="followUps"] .crm-ref-dashboard,
html body[data-view="salesOrders"] .crm-ref-dashboard {
  height: 100% !important;
  display: grid !important;
  grid-template-rows: 92px minmax(0, 1fr) !important;
  gap: 12px !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-ref-kpis,
html body[data-view="quotations"] .crm-ref-kpis,
html body[data-view="customers"] .crm-ref-kpis,
html body[data-view="followUps"] .crm-ref-kpis,
html body[data-view="salesOrders"] .crm-ref-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  min-height: 0 !important;
}

html body[data-view="crm"] .crm-ref-kpi,
html body[data-view="quotations"] .crm-ref-kpi,
html body[data-view="customers"] .crm-ref-kpi,
html body[data-view="followUps"] .crm-ref-kpi,
html body[data-view="salesOrders"] .crm-ref-kpi {
  min-height: 92px !important;
  height: 92px !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 6px 12px !important;
  padding: 14px !important;
}

html body[data-view="crm"] .crm-ref-kpi > span,
html body[data-view="quotations"] .crm-ref-kpi > span,
html body[data-view="customers"] .crm-ref-kpi > span,
html body[data-view="followUps"] .crm-ref-kpi > span,
html body[data-view="salesOrders"] .crm-ref-kpi > span {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-ref-kpi svg,
html body[data-view="quotations"] .crm-ref-kpi svg,
html body[data-view="customers"] .crm-ref-kpi svg,
html body[data-view="followUps"] .crm-ref-kpi svg,
html body[data-view="salesOrders"] .crm-ref-kpi svg {
  width: 22px !important;
  height: 22px !important;
}

html body[data-view="crm"] .crm-ref-kpi small,
html body[data-view="quotations"] .crm-ref-kpi small,
html body[data-view="customers"] .crm-ref-kpi small,
html body[data-view="followUps"] .crm-ref-kpi small,
html body[data-view="salesOrders"] .crm-ref-kpi small {
  margin-bottom: 4px !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-ref-kpi b,
html body[data-view="quotations"] .crm-ref-kpi b,
html body[data-view="customers"] .crm-ref-kpi b,
html body[data-view="followUps"] .crm-ref-kpi b,
html body[data-view="salesOrders"] .crm-ref-kpi b {
  font-size: 20px !important;
}

html body[data-view="crm"] .crm-ref-kpi em,
html body[data-view="quotations"] .crm-ref-kpi em,
html body[data-view="customers"] .crm-ref-kpi em,
html body[data-view="followUps"] .crm-ref-kpi em,
html body[data-view="salesOrders"] .crm-ref-kpi em {
  gap: 6px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-ref-grid,
html body[data-view="quotations"] .crm-ref-grid,
html body[data-view="customers"] .crm-ref-grid,
html body[data-view="followUps"] .crm-ref-grid,
html body[data-view="salesOrders"] .crm-ref-grid {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr) !important;
  grid-template-rows: minmax(265px, 1fr) minmax(215px, .76fr) !important;
  gap: 12px !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-ref-panel,
html body[data-view="quotations"] .crm-ref-panel,
html body[data-view="customers"] .crm-ref-panel,
html body[data-view="followUps"] .crm-ref-panel,
html body[data-view="salesOrders"] .crm-ref-panel {
  min-height: 0 !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-ref-panel-head,
html body[data-view="quotations"] .crm-ref-panel-head,
html body[data-view="customers"] .crm-ref-panel-head,
html body[data-view="followUps"] .crm-ref-panel-head,
html body[data-view="salesOrders"] .crm-ref-panel-head {
  min-height: 44px !important;
  padding: 12px 16px !important;
}

html body[data-view="crm"] .crm-ref-panel-head h2,
html body[data-view="quotations"] .crm-ref-panel-head h2,
html body[data-view="customers"] .crm-ref-panel-head h2,
html body[data-view="followUps"] .crm-ref-panel-head h2,
html body[data-view="salesOrders"] .crm-ref-panel-head h2 {
  font-size: 15px !important;
}

html body[data-view="crm"] .crm-ref-panel-head button,
html body[data-view="quotations"] .crm-ref-panel-head button,
html body[data-view="customers"] .crm-ref-panel-head button,
html body[data-view="followUps"] .crm-ref-panel-head button,
html body[data-view="salesOrders"] .crm-ref-panel-head button {
  min-height: 28px !important;
  padding: 0 11px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-ref-table th,
html body[data-view="crm"] .crm-ref-table td,
html body[data-view="quotations"] .crm-ref-table th,
html body[data-view="quotations"] .crm-ref-table td,
html body[data-view="customers"] .crm-ref-table th,
html body[data-view="customers"] .crm-ref-table td,
html body[data-view="followUps"] .crm-ref-table th,
html body[data-view="followUps"] .crm-ref-table td,
html body[data-view="salesOrders"] .crm-ref-table th,
html body[data-view="salesOrders"] .crm-ref-table td {
  padding: 10px 14px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-ref-follow-list,
html body[data-view="quotations"] .crm-ref-follow-list,
html body[data-view="customers"] .crm-ref-follow-list,
html body[data-view="followUps"] .crm-ref-follow-list,
html body[data-view="salesOrders"] .crm-ref-follow-list {
  gap: 8px !important;
  padding: 0 16px 12px !important;
}

html body[data-view="crm"] .crm-ref-follow-row,
html body[data-view="quotations"] .crm-ref-follow-row,
html body[data-view="customers"] .crm-ref-follow-row,
html body[data-view="followUps"] .crm-ref-follow-row,
html body[data-view="salesOrders"] .crm-ref-follow-row {
  min-height: 62px !important;
  grid-template-columns: 60px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  padding: 10px !important;
}

html body[data-view="crm"] .crm-ref-follow-row > span,
html body[data-view="quotations"] .crm-ref-follow-row > span,
html body[data-view="customers"] .crm-ref-follow-row > span,
html body[data-view="followUps"] .crm-ref-follow-row > span,
html body[data-view="salesOrders"] .crm-ref-follow-row > span {
  min-height: 42px !important;
  font-size: 10px !important;
}

html body[data-view="crm"] .crm-ref-summary-body,
html body[data-view="quotations"] .crm-ref-summary-body,
html body[data-view="customers"] .crm-ref-summary-body,
html body[data-view="followUps"] .crm-ref-summary-body,
html body[data-view="salesOrders"] .crm-ref-summary-body {
  grid-template-columns: 150px minmax(0, 1fr) !important;
  gap: 16px !important;
  padding: 8px 18px 14px !important;
}

html body[data-view="crm"] .crm-ref-donut,
html body[data-view="quotations"] .crm-ref-donut,
html body[data-view="customers"] .crm-ref-donut,
html body[data-view="followUps"] .crm-ref-donut,
html body[data-view="salesOrders"] .crm-ref-donut {
  width: 118px !important;
  height: 118px !important;
}

html body[data-view="crm"] .crm-ref-donut b,
html body[data-view="quotations"] .crm-ref-donut b,
html body[data-view="customers"] .crm-ref-donut b,
html body[data-view="followUps"] .crm-ref-donut b,
html body[data-view="salesOrders"] .crm-ref-donut b {
  font-size: 19px !important;
}

html body[data-view="crm"] .crm-ref-legend,
html body[data-view="quotations"] .crm-ref-legend,
html body[data-view="customers"] .crm-ref-legend,
html body[data-view="followUps"] .crm-ref-legend,
html body[data-view="salesOrders"] .crm-ref-legend {
  gap: 8px !important;
}

html body[data-view="crm"] .crm-ref-legend span,
html body[data-view="quotations"] .crm-ref-legend span,
html body[data-view="customers"] .crm-ref-legend span,
html body[data-view="followUps"] .crm-ref-legend span,
html body[data-view="salesOrders"] .crm-ref-legend span {
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-ref-bars,
html body[data-view="quotations"] .crm-ref-bars,
html body[data-view="customers"] .crm-ref-bars,
html body[data-view="followUps"] .crm-ref-bars,
html body[data-view="salesOrders"] .crm-ref-bars {
  gap: 10px !important;
  padding: 14px 18px 16px !important;
}

html body[data-view="crm"] .crm-ref-bars button,
html body[data-view="quotations"] .crm-ref-bars button,
html body[data-view="customers"] .crm-ref-bars button,
html body[data-view="followUps"] .crm-ref-bars button,
html body[data-view="salesOrders"] .crm-ref-bars button {
  grid-template-columns: 28px minmax(120px, .42fr) minmax(130px, 1fr) auto !important;
  gap: 12px !important;
}

html body[data-view="crm"] .crm-ref-bars span,
html body[data-view="quotations"] .crm-ref-bars span,
html body[data-view="customers"] .crm-ref-bars span,
html body[data-view="followUps"] .crm-ref-bars span,
html body[data-view="salesOrders"] .crm-ref-bars span {
  width: 24px !important;
  height: 24px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-ref-bars b,
html body[data-view="quotations"] .crm-ref-bars b,
html body[data-view="customers"] .crm-ref-bars b,
html body[data-view="followUps"] .crm-ref-bars b,
html body[data-view="salesOrders"] .crm-ref-bars b,
html body[data-view="crm"] .crm-ref-bars em,
html body[data-view="quotations"] .crm-ref-bars em,
html body[data-view="customers"] .crm-ref-bars em,
html body[data-view="followUps"] .crm-ref-bars em,
html body[data-view="salesOrders"] .crm-ref-bars em {
  font-size: 11px !important;
}

/* Unified ERP shell: one compact structure for every window. */
html {
  overflow: hidden !important;
}

html body {
  overflow: hidden !important;
  background: #f5f7fb !important;
}

html body .app-shell {
  --erp-sidebar: 230px;
  grid-template-columns: var(--erp-sidebar) minmax(0, 1fr) !important;
  height: 100vh !important;
  max-width: 100vw !important;
  overflow: hidden !important;
}

html body .main {
  min-width: 0 !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: #f5f7fb !important;
}

html body .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar {
  width: var(--erp-sidebar) !important;
  min-width: var(--erp-sidebar) !important;
  height: 100vh !important;
  padding: 24px 16px 16px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  background:
    radial-gradient(circle at 76% 5%, rgba(27, 89, 160, .32), transparent 34%),
    linear-gradient(180deg, #061b35 0%, #071528 48%, #04101f 100%) !important;
}

html body .sidebar::-webkit-scrollbar,
html body .nav::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

html body .sidebar-brand-ref {
  margin: 0 0 24px !important;
  padding: 0 0 22px !important;
  border-bottom: 1px solid rgba(204, 221, 245, .18) !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

html body .sidebar-brand-mark {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
}

html body .sidebar-brand-text strong {
  font-size: 25px !important;
  line-height: .95 !important;
  letter-spacing: 0 !important;
  color: #fff !important;
}

html body .sidebar-brand-text small {
  margin-top: 5px !important;
  font-size: 9px !important;
  line-height: 1 !important;
  letter-spacing: .04em !important;
  color: #fff !important;
}

html body .nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 17px !important;
  min-height: 0 !important;
}

html body .nav-section {
  gap: 4px !important;
  padding: 0 0 13px !important;
  border-bottom: 1px solid rgba(204, 221, 245, .13) !important;
}

html body .nav-section:last-child {
  border-bottom: 0 !important;
}

html body .nav-section-title {
  margin: 0 0 7px !important;
  padding: 0 2px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  letter-spacing: .08em !important;
  color: #a9c7eb !important;
}

html body .nav button {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 11px !important;
  border-radius: 7px !important;
  gap: 10px !important;
  color: rgba(255, 255, 255, .92) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

html body .nav button span:last-child {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body .nav button.active {
  background: linear-gradient(135deg, #f9152f 0%, #e30b22 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(239, 19, 42, .22) !important;
}

html body .nav-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
}

html body .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2.35 !important;
}

html body .sidebar-collapse {
  min-height: 40px !important;
  height: 40px !important;
  margin-top: 18px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

html body .topbar,
html body[data-view="commandCenter"] .topbar,
html body[data-view="crm"] .topbar {
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  overflow: visible !important;
  background: #fff !important;
  border-bottom: 1px solid #dce5f1 !important;
  box-shadow: 0 1px 0 rgba(9, 30, 66, .03) !important;
}

html body .topbar > div:first-of-type,
html body[data-view="commandCenter"] .topbar > div:first-of-type,
html body[data-view="crm"] .topbar > div:first-of-type {
  display: none !important;
}

html body .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions,
html body[data-view="crm"] .topbar-actions {
  width: auto !important;
  max-width: 100% !important;
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
}

html body .topbar-actions #cloudStatusLabel,
html body .topbar-actions #syncLatestButton {
  display: none !important;
}

html body .topbar-actions .notification-center {
  order: 1 !important;
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
}

html body .topbar-actions .notification-toggle {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border: 0 !important;
  background: transparent !important;
  color: #b91c1c !important;
  box-shadow: none !important;
}

html body .topbar-actions .notification-toggle strong {
  min-width: 17px !important;
  height: 17px !important;
  top: -5px !important;
  right: -4px !important;
  font-size: 10px !important;
}

html body .topbar-actions #todayLabel {
  order: 2 !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 13px 0 36px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #07142b !important;
  background: #fff !important;
  border: 1px solid #d4e0ee !important;
  box-shadow: 0 1px 2px rgba(9, 30, 66, .04) !important;
}

html body .topbar-actions #todayLabel::before {
  left: 12px !important;
  width: 15px !important;
  height: 15px !important;
  background-size: 15px 15px !important;
}

html body .topbar-actions #todayLabel::after {
  display: block !important;
  content: "" !important;
  width: 8px !important;
  height: 8px !important;
  margin-left: 8px !important;
  border-right: 2px solid #07142b !important;
  border-bottom: 2px solid #07142b !important;
  transform: rotate(45deg) translateY(-2px) !important;
}

html body .topbar-actions #currentUserLabel {
  order: 3 !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 22px 0 45px !important;
  border: 0 !important;
  background: transparent !important;
  color: #07142b !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  position: relative !important;
}

html body .topbar-actions #currentUserLabel::before {
  width: 32px !important;
  height: 32px !important;
  left: 0 !important;
  font-size: 13px !important;
}

html body .topbar-actions #currentUserLabel::after {
  content: "" !important;
  position: absolute !important;
  right: 4px !important;
  top: 12px !important;
  width: 8px !important;
  height: 8px !important;
  border-right: 2px solid #07142b !important;
  border-bottom: 2px solid #07142b !important;
  transform: rotate(45deg) !important;
}

html body .topbar-actions #installAppButton {
  order: 4 !important;
}

html body .topbar-actions #logoutButton {
  order: 5 !important;
  border-color: transparent !important;
  background: transparent !important;
  padding-left: 30px !important;
}

html body .topbar-actions #logoutButton::before {
  left: 7px !important;
  width: 17px !important;
  height: 17px !important;
  background-size: 17px 17px !important;
}

html body .topbar-actions .pill,
html body .topbar-actions .ghost-button {
  min-height: 34px !important;
  height: 34px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

html body .view {
  height: calc(100vh - 52px) !important;
  min-height: 0 !important;
  padding: 18px 22px 18px !important;
  overflow: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #9aa3ad transparent !important;
  background: #f5f7fb !important;
}

html body[data-view="commandCenter"] .view,
html body[data-view="crm"] .view {
  padding: 18px 22px 18px !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .view {
  display: block !important;
  max-width: none !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .view > .toolbar.section-title {
  min-height: 54px !important;
  margin: 0 0 12px !important;
  padding: 10px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  background: #fff !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04) !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .view > .toolbar.section-title h2 {
  margin: 0 !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
  color: #07142b !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .toolbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .button,
html body:not([data-view="commandCenter"]):not([data-view="crm"]) .ghost-button,
html body:not([data-view="commandCenter"]):not([data-view="crm"]) .danger-button {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .view > .table-wrap,
html body:not([data-view="commandCenter"]):not([data-view="crm"]) .view .card .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  max-height: calc(100vh - 146px) !important;
  overflow: auto !important;
  background: #fff !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045) !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .table-wrap::-webkit-scrollbar {
  width: 9px !important;
  height: 9px !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .table-wrap::-webkit-scrollbar-thumb {
  background: #a7b1bf !important;
  border-radius: 99px !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .table-wrap table {
  width: 100% !important;
  min-width: 1040px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .table-wrap th,
html body:not([data-view="commandCenter"]):not([data-view="crm"]) .table-wrap td {
  height: 44px !important;
  max-width: 180px !important;
  padding: 9px 12px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .table-wrap th {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  background: #f3f7fc !important;
  color: #44546a !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .02em !important;
  border-bottom: 1px solid #c7d4e5 !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .table-wrap td {
  color: #07142b !important;
  border-bottom: 1px solid #e6edf6 !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .table-wrap tbody tr:nth-child(even) {
  background: #fbfdff !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .split-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .status {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 22px !important;
  max-width: 100% !important;
  padding: 0 9px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .card {
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04) !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .card-body {
  padding: 14px !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .grid,
html body:not([data-view="commandCenter"]):not([data-view="crm"]) .grid.two-col {
  gap: 14px !important;
}

html body:not([data-view="commandCenter"]):not([data-view="crm"]) .empty.card {
  min-height: 130px !important;
  display: grid !important;
  place-items: center !important;
  color: #5d6b82 !important;
}

@media (max-width: 1200px) {
  html body .app-shell {
    --erp-sidebar: 214px;
  }

  html body .topbar-actions {
    gap: 8px !important;
  }

  html body .topbar-actions .pill,
  html body .topbar-actions .ghost-button {
    font-size: 11px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  html body .topbar-actions #todayLabel {
    max-width: 178px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 900px) {
  html body {
    overflow: auto !important;
  }

  html body .app-shell {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  html body .main {
    height: auto !important;
    min-height: 100vh !important;
  }

  html body .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    overflow-x: auto !important;
  }

  html body .view {
    height: auto !important;
    min-height: calc(100vh - 52px) !important;
  }
}

/* Exact sidebar replacement and CRM shortcut command panel. */
html body .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar {
  width: 230px !important;
  min-width: 230px !important;
  padding: 34px 18px 22px !important;
  background:
    radial-gradient(circle at 90% 0%, rgba(21, 83, 148, .34), transparent 36%),
    linear-gradient(180deg, #061b35 0%, #061428 52%, #04101f 100%) !important;
}

html body .sidebar-brand-ref {
  display: grid !important;
  justify-items: center !important;
  gap: 7px !important;
  margin: 0 0 28px !important;
  padding: 0 6px 24px !important;
  border-bottom: 0 !important;
}

html body .sidebar-logo-wordmark {
  display: block !important;
  width: 168px !important;
  height: auto !important;
  max-height: 54px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)) !important;
}

html body .sidebar-erp-label {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 12px !important;
  width: 176px !important;
  color: #ff1d2f !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: .16em !important;
  line-height: 1 !important;
}

html body .sidebar-erp-label::before,
html body .sidebar-erp-label::after {
  content: "" !important;
  height: 1px !important;
  background: rgba(198, 215, 238, .32) !important;
}

html body .sidebar-brand-mark,
html body .sidebar-brand-mark::before,
html body .sidebar-brand-mark::after,
html body .sidebar-brand-text {
  display: none !important;
}

html body .nav-section {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  align-items: center !important;
  column-gap: 12px !important;
  row-gap: 7px !important;
  padding: 0 0 18px !important;
  margin: 0 0 2px !important;
  border-bottom: 0 !important;
}

html body .nav-section-title {
  display: grid !important;
  grid-template-columns: auto minmax(38px, 1fr) !important;
  grid-column: 1 / -1 !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  color: #c2d7f3 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .12em !important;
}

html body .nav-section-title::after {
  content: "" !important;
  height: 1px !important;
  background: rgba(198, 215, 238, .26) !important;
}

html body .nav button {
  grid-column: 1 / -1 !important;
  min-height: 43px !important;
  height: 43px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 13px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, .92) !important;
  background: transparent !important;
}

html body .nav button.active {
  background: linear-gradient(135deg, #fb172f 0%, #e40b22 100%) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(239, 19, 42, .26) !important;
}

html body .nav-icon,
html body .nav-icon svg {
  width: 21px !important;
  height: 21px !important;
}

html body .sidebar-collapse {
  display: none !important;
}

html body .app-shell.sidebar-collapsed {
  grid-template-columns: 230px minmax(0, 1fr) !important;
}

html body[data-view="crm"] .crm-ref-dashboard {
  height: auto !important;
  min-height: 100% !important;
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  gap: 14px !important;
  overflow: visible !important;
}

html body[data-view="crm"] .crm-quick-shortcuts {
  padding: 16px !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .045) !important;
}

html body[data-view="crm"] .crm-quick-shortcuts h2 {
  margin: 0 0 14px !important;
  color: #07142b !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

html body[data-view="crm"] .crm-quick-shortcuts > div {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

html body[data-view="crm"] .crm-quick-shortcut {
  min-height: 138px !important;
  padding: 16px 12px !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  display: grid !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 9px !important;
  cursor: pointer !important;
  color: #07142b !important;
  background: #f8fbff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

html body[data-view="crm"] .crm-quick-shortcut span {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  background: #fff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .10) !important;
}

html body[data-view="crm"] .crm-quick-shortcut svg {
  width: 25px !important;
  height: 25px !important;
  stroke-width: 2.4 !important;
}

html body[data-view="crm"] .crm-quick-shortcut b {
  max-width: 100% !important;
  color: #020b1d !important;
  font-size: 19px !important;
  line-height: 1.18 !important;
  font-weight: 900 !important;
  text-align: center !important;
}

html body[data-view="crm"] .crm-quick-shortcut small {
  color: #65758c !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  text-align: center !important;
}

html body[data-view="crm"] .crm-quick-shortcut.red { background: #fff1f2 !important; }
html body[data-view="crm"] .crm-quick-shortcut.blue { background: #eff6ff !important; }
html body[data-view="crm"] .crm-quick-shortcut.purple { background: #f5f3ff !important; }
html body[data-view="crm"] .crm-quick-shortcut.green { background: #ecfdf5 !important; }
html body[data-view="crm"] .crm-quick-shortcut.orange { background: #fff7ed !important; }
html body[data-view="crm"] .crm-quick-shortcut.cyan { background: #ecfeff !important; }

html body[data-view="crm"] .crm-quick-shortcut.red svg { stroke: #ef172d !important; }
html body[data-view="crm"] .crm-quick-shortcut.blue svg { stroke: #2563eb !important; }
html body[data-view="crm"] .crm-quick-shortcut.purple svg { stroke: #7c3aed !important; }
html body[data-view="crm"] .crm-quick-shortcut.green svg { stroke: #16a34a !important; }
html body[data-view="crm"] .crm-quick-shortcut.orange svg { stroke: #f97316 !important; }
html body[data-view="crm"] .crm-quick-shortcut.cyan svg { stroke: #0891b2 !important; }

html body[data-view="crm"] .crm-ref-kpis {
  height: auto !important;
  min-height: 96px !important;
}

html body[data-view="crm"] .crm-ref-grid {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

@media (max-width: 1400px) {
  html body[data-view="crm"] .crm-quick-shortcuts > div {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  html body[data-view="crm"] .crm-quick-shortcut {
    min-height: 118px !important;
  }

  html body[data-view="crm"] .crm-quick-shortcut b {
    font-size: 16px !important;
  }
}

@media (max-width: 1050px) {
  html body[data-view="crm"] .crm-quick-shortcuts > div {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* CRM control-center replacement: compact business dashboard, no oversized launcher cards. */
html body .sidebar-logo-wordmark {
  display: none !important;
}

html body .sidebar-brand-ref::before {
  content: "ALQASER" !important;
  display: block !important;
  color: #f8fbff !important;
  font-size: 29px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .14em !important;
  text-shadow: 0 6px 16px rgba(0, 0, 0, .28) !important;
}

html body .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar,
html body[data-view="quotations"] .sidebar,
html body[data-view="customers"] .sidebar,
html body[data-view="followUps"] .sidebar,
html body[data-view="salesOrders"] .sidebar {
  width: 238px !important;
  min-width: 238px !important;
}

html body .app-shell {
  --erp-sidebar: 238px;
}

html body .nav button {
  font-size: 12px !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
}

html body .nav button span:last-child {
  white-space: nowrap !important;
}

html body[data-view="crm"] .view,
html body[data-view="quotations"] .view,
html body[data-view="customers"] .view,
html body[data-view="followUps"] .view,
html body[data-view="salesOrders"] .view {
  padding: 18px 22px !important;
  overflow: auto !important;
}

html body[data-view="crm"] .crm-ref-dashboard,
html body[data-view="quotations"] .crm-ref-dashboard,
html body[data-view="customers"] .crm-ref-dashboard,
html body[data-view="followUps"] .crm-ref-dashboard,
html body[data-view="salesOrders"] .crm-ref-dashboard {
  height: auto !important;
  min-height: 100% !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 14px !important;
  overflow: visible !important;
}

html body .crm-quick-shortcuts {
  display: none !important;
}

html body .crm-control-head {
  min-height: 72px !important;
  display: grid !important;
  grid-template-columns: minmax(250px, 1fr) minmax(420px, auto) !important;
  align-items: center !important;
  gap: 18px !important;
}

html body .crm-control-head h1 {
  margin: 0 0 4px !important;
  color: #07142b !important;
  font-size: 22px !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
}

html body .crm-control-head p {
  margin: 0 !important;
  color: #40516a !important;
  font-size: 13px !important;
}

html body .crm-control-tools {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
}

html body .crm-control-search {
  width: min(410px, 42vw) !important;
  height: 40px !important;
  padding: 0 6px 0 12px !important;
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) 30px !important;
  align-items: center !important;
  gap: 10px !important;
  border: 1px solid #d7e2ef !important;
  border-radius: 6px !important;
  background: #fff !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04) !important;
}

html body .crm-control-search svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #53667f !important;
}

html body .crm-control-search input {
  min-width: 0 !important;
  width: 100% !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #07142b !important;
  font: inherit !important;
  font-size: 12px !important;
}

html body .crm-control-search button {
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #07142b !important;
  cursor: pointer !important;
}

html body .crm-control-search button:hover {
  background: #eef4ff !important;
  color: #2563eb !important;
}

html body .crm-control-search button svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
}

html body .crm-new-menu {
  position: relative !important;
  z-index: 5 !important;
}

html body .crm-new-button {
  height: 40px !important;
  min-width: 112px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #df1527 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  box-shadow: 0 12px 24px rgba(223, 21, 39, .22) !important;
  cursor: pointer !important;
}

html body .crm-new-button::after {
  content: "" !important;
  display: inline-block !important;
  width: 7px !important;
  height: 7px !important;
  margin-left: 12px !important;
  border-right: 2px solid #fff !important;
  border-bottom: 2px solid #fff !important;
  transform: rotate(45deg) translateY(-2px) !important;
}

html body .crm-new-dropdown {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  right: 0 !important;
  width: 190px !important;
  padding: 8px !important;
  display: none !important;
  border: 1px solid #d7e2ef !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .14) !important;
}

html body .crm-new-menu:hover .crm-new-dropdown,
html body .crm-new-menu:focus-within .crm-new-dropdown {
  display: grid !important;
  gap: 4px !important;
}

html body .crm-new-dropdown button {
  height: 34px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 5px !important;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  background: transparent !important;
  color: #07142b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: left !important;
  cursor: pointer !important;
}

html body .crm-new-dropdown button:hover {
  background: #f3f7fc !important;
}

html body .crm-new-dropdown svg {
  width: 16px !important;
  height: 16px !important;
}

html body .crm-control-kpis {
  height: auto !important;
  min-height: 112px !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

html body .crm-control-kpis .crm-ref-kpi {
  height: 112px !important;
  min-height: 112px !important;
  padding: 18px !important;
}

html body .crm-control-grid {
  display: grid !important;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
  grid-auto-rows: minmax(220px, auto) !important;
  gap: 14px !important;
}

html body .crm-control-grid .crm-ref-panel {
  min-height: 0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

html body .crm-steel-price-body {
  min-height: 160px !important;
  padding: 20px 22px !important;
  display: grid !important;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
}

html body .crm-steel-price-body strong {
  display: block !important;
  margin-bottom: 9px !important;
  color: #07142b !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
}

html body .crm-steel-price-body b {
  display: block !important;
  color: #df1527 !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
}

html body .crm-steel-price-body small {
  display: block !important;
  margin-top: 12px !important;
  color: #66758c !important;
}

html body .crm-steel-price-body svg {
  width: 100% !important;
  height: 72px !important;
}

html body .crm-steel-price-body polyline {
  fill: none !important;
  stroke: #ef172d !important;
  stroke-width: 3 !important;
}

html body .crm-ref-panel-head {
  min-height: 48px !important;
}

html body .crm-ref-table th,
html body .crm-ref-table td {
  height: 40px !important;
  padding: 9px 16px !important;
  font-size: 11px !important;
}

@media (max-width: 1250px) {
  html body .crm-control-head {
    grid-template-columns: 1fr !important;
  }

  html body .crm-control-tools {
    justify-content: flex-start !important;
  }

  html body .crm-control-search {
    width: min(520px, 100%) !important;
  }

  html body .crm-control-kpis,
  html body .crm-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Final CRM reference alignment: remove old grid-area leftovers and stop sidebar cropping. */
html body .sidebar-brand-ref::before {
  font-size: 22px !important;
  letter-spacing: .11em !important;
}

html body .sidebar-erp-label {
  width: 150px !important;
  font-size: 13px !important;
}

html body .nav button {
  overflow: visible !important;
}

html body .nav button span:last-child {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.15 !important;
}

html body .crm-control-grid .crm-ref-latest,
html body .crm-control-grid .crm-ref-followups,
html body .crm-control-grid .crm-ref-summary,
html body .crm-control-grid .crm-ref-customers,
html body .crm-control-grid .crm-steel-price-panel,
html body .crm-control-grid .crm-delivery-panel {
  grid-area: auto !important;
}

html body .crm-control-grid {
  grid-auto-flow: row !important;
  grid-auto-rows: auto !important;
  align-items: start !important;
}

html body .crm-control-grid .crm-ref-followups,
html body .crm-control-grid .crm-steel-price-panel {
  min-height: 236px !important;
}

html body .crm-control-grid .crm-ref-latest,
html body .crm-control-grid .crm-delivery-panel {
  min-height: 260px !important;
}

html body .crm-ref-follow-list {
  padding: 0 18px 16px !important;
}

html body .crm-ref-follow-row {
  min-height: 58px !important;
  grid-template-columns: 54px minmax(0, 1fr) auto !important;
  gap: 12px !important;
  padding: 10px 12px !important;
}

html body .crm-ref-follow-row > span {
  min-height: 38px !important;
}

html body .crm-steel-price-body {
  min-height: 172px !important;
}

/* CRM polish pass: compact like the reference and keep the sidebar brand fully visible. */
html body .topbar,
html body[data-view="crm"] .topbar,
html body[data-view="commandCenter"] .topbar {
  height: 46px !important;
  min-height: 46px !important;
}

html body .view,
html body[data-view="crm"] .view {
  height: calc(100vh - 46px) !important;
}

html body[data-view="crm"] .view {
  padding: 12px 18px 14px !important;
}

html body .sidebar-brand-ref {
  margin-bottom: 22px !important;
  padding: 0 0 18px !important;
  overflow: hidden !important;
}

html body .sidebar-brand-ref::before {
  width: 100% !important;
  max-width: 178px !important;
  overflow: hidden !important;
  color: #ffffff !important;
  font-size: 18px !important;
  letter-spacing: .16em !important;
  text-align: center !important;
  white-space: nowrap !important;
}

html body .sidebar-erp-label {
  width: 152px !important;
  gap: 9px !important;
  font-size: 12px !important;
  letter-spacing: .16em !important;
}

html body .sidebar-erp-label::after {
  content: "Greenland Building Materials Trading LLC" !important;
  grid-column: 1 / -1 !important;
  height: auto !important;
  margin-top: 8px !important;
  background: transparent !important;
  color: rgba(255, 255, 255, .78) !important;
  font-size: 8px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
}

html body .sidebar,
html body[data-view="crm"] .sidebar {
  padding-top: 30px !important;
}

html body[data-view="crm"] .crm-ref-dashboard {
  gap: 12px !important;
}

html body .crm-control-head {
  min-height: 62px !important;
  gap: 14px !important;
}

html body .crm-control-head h1 {
  font-size: 20px !important;
}

html body .crm-control-head p {
  font-size: 12px !important;
}

html body .crm-control-search {
  height: 36px !important;
}

html body .crm-new-button {
  height: 36px !important;
  min-width: 102px !important;
  font-size: 12px !important;
}

html body .crm-control-kpis {
  min-height: 92px !important;
  gap: 12px !important;
}

html body .crm-control-kpis .crm-ref-kpi {
  min-height: 92px !important;
  height: 92px !important;
  padding: 14px 16px !important;
}

html body .crm-control-kpis .crm-ref-kpi > span {
  width: 44px !important;
  height: 44px !important;
}

html body .crm-control-kpis .crm-ref-kpi b {
  font-size: 19px !important;
}

html body .crm-control-grid {
  gap: 12px !important;
}

html body .crm-control-grid .crm-ref-followups,
html body .crm-control-grid .crm-steel-price-panel {
  min-height: 196px !important;
}

html body .crm-control-grid .crm-ref-latest,
html body .crm-control-grid .crm-delivery-panel {
  min-height: 230px !important;
}

html body .crm-ref-panel-head {
  min-height: 42px !important;
  padding: 10px 16px !important;
}

html body .crm-ref-panel-head h2 {
  font-size: 14px !important;
}

html body .crm-ref-panel-head button {
  min-height: 28px !important;
  padding: 0 11px !important;
  font-size: 11px !important;
}

html body .crm-ref-follow-list {
  gap: 8px !important;
  padding: 0 14px 12px !important;
}

html body .crm-ref-follow-row {
  min-height: 52px !important;
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  padding: 8px 10px !important;
}

html body .crm-ref-follow-row > span {
  min-height: 34px !important;
  font-size: 10px !important;
}

html body .crm-ref-follow-row b,
html body .crm-ref-follow-row small {
  font-size: 12px !important;
}

html body .crm-steel-price-body {
  min-height: 138px !important;
  padding: 14px 18px !important;
}

html body .crm-steel-price-body b {
  font-size: 18px !important;
}

html body .crm-steel-price-body svg {
  height: 58px !important;
}

html body .crm-ref-table th,
html body .crm-ref-table td {
  height: 34px !important;
  padding: 7px 14px !important;
  font-size: 10.5px !important;
}

html body .crm-ref-badge {
  min-width: 44px !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
}

/* CRM model pass: match the supplied control-center layout. */
html body[data-view="crm"] .main {
  position: relative !important;
}

html body[data-view="crm"] .topbar {
  position: absolute !important;
  top: 18px !important;
  right: 20px !important;
  width: auto !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 10 !important;
}

html body[data-view="crm"] .topbar-actions {
  gap: 14px !important;
}

html body[data-view="crm"] .topbar-actions #todayLabel,
html body[data-view="crm"] .topbar-actions #installAppButton,
html body[data-view="crm"] .topbar-actions #logoutButton,
html body[data-view="crm"] .topbar-actions #cloudStatusLabel,
html body[data-view="crm"] .topbar-actions #syncLatestButton {
  display: none !important;
}

html body[data-view="crm"] .topbar-actions .notification-center {
  width: 32px !important;
  height: 32px !important;
  flex-basis: 32px !important;
}

html body[data-view="crm"] .topbar-actions #currentUserLabel {
  height: 36px !important;
  min-height: 36px !important;
  padding-left: 42px !important;
  padding-right: 24px !important;
}

html body[data-view="crm"] .view {
  height: 100vh !important;
  padding: 22px 22px 18px !important;
  overflow: auto !important;
}

html body[data-view="crm"] .sidebar {
  width: 220px !important;
  min-width: 220px !important;
  padding: 30px 16px 22px !important;
}

html body[data-view="crm"] .app-shell,
html body .app-shell {
  --erp-sidebar: 220px;
}

html body .sidebar-brand-ref::before {
  max-width: 170px !important;
  font-size: 21px !important;
  letter-spacing: .11em !important;
}

html body .sidebar-erp-label {
  width: 172px !important;
  display: block !important;
  font-size: 0 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
}

html body .sidebar-erp-label::before {
  content: "Greenland Building Materials Trading LLC" !important;
  display: block !important;
  margin-top: 2px !important;
  color: rgba(255, 255, 255, .82) !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
}

html body .sidebar-erp-label::after {
  content: "" !important;
  display: block !important;
  height: 1px !important;
  margin-top: 16px !important;
  background: rgba(198, 215, 238, .30) !important;
}

html body .nav {
  gap: 14px !important;
}

html body .nav-section {
  row-gap: 4px !important;
  padding-bottom: 12px !important;
}

html body .nav button {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  grid-template-columns: 21px minmax(0, 1fr) !important;
  gap: 10px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
}

html body .nav-icon,
html body .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
}

html body[data-view="crm"] .crm-ref-dashboard {
  max-width: 1210px !important;
  margin: 0 auto !important;
  gap: 16px !important;
}

html body[data-view="crm"] .crm-control-head {
  min-height: 58px !important;
  grid-template-columns: minmax(260px, 1fr) auto !important;
  padding-right: 172px !important;
}

html body[data-view="crm"] .crm-control-head h1 {
  font-size: 20px !important;
  letter-spacing: .05em !important;
}

html body[data-view="crm"] .crm-control-tools {
  gap: 18px !important;
}

html body[data-view="crm"] .crm-control-search {
  width: 340px !important;
  height: 38px !important;
}

html body[data-view="crm"] .crm-new-button {
  width: 100px !important;
  height: 38px !important;
  min-width: 100px !important;
}

html body[data-view="crm"] .crm-control-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  min-height: 126px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi {
  min-height: 126px !important;
  height: 126px !important;
  padding: 18px !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi > span {
  width: 54px !important;
  height: 54px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi small {
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi b {
  font-size: 22px !important;
}

html body[data-view="crm"] .crm-control-grid {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr) !important;
  gap: 16px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-ref-followups,
html body[data-view="crm"] .crm-control-grid .crm-steel-price-panel {
  min-height: 252px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-ref-latest,
html body[data-view="crm"] .crm-control-grid .crm-delivery-panel {
  min-height: 286px !important;
}

html body[data-view="crm"] .crm-ref-panel-head {
  min-height: 48px !important;
  padding: 13px 16px !important;
}

html body[data-view="crm"] .crm-ref-panel-head h2 {
  font-size: 14px !important;
  text-transform: uppercase !important;
}

html body[data-view="crm"] .crm-ref-panel-head button {
  border: 0 !important;
  color: #df1527 !important;
  background: transparent !important;
}

html body[data-view="crm"] .crm-ref-follow-row {
  min-height: 64px !important;
  grid-template-columns: 54px minmax(0, 1fr) auto !important;
  padding: 10px 12px !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  min-height: 196px !important;
  grid-template-columns: minmax(170px, .62fr) minmax(260px, 1fr) !important;
  padding: 18px 20px !important;
}

html body[data-view="crm"] .crm-steel-price-body b {
  font-size: 20px !important;
}

html body[data-view="crm"] .crm-steel-price-body svg {
  height: 76px !important;
}

html body[data-view="crm"] .crm-ref-table th,
html body[data-view="crm"] .crm-ref-table td {
  height: 38px !important;
  padding: 9px 16px !important;
}

/* CRM overlap fix: reserve a clean lane for +New, bell, and admin. */
html body[data-view="crm"] .topbar {
  top: 24px !important;
  right: 18px !important;
  width: 206px !important;
  pointer-events: auto !important;
}

html body[data-view="crm"] .topbar-actions {
  width: 206px !important;
  gap: 12px !important;
}

html body[data-view="crm"] .topbar-actions #currentUserLabel {
  width: 142px !important;
  padding-left: 42px !important;
  padding-right: 18px !important;
}

html body[data-view="crm"] .crm-control-head {
  grid-template-columns: minmax(300px, 1fr) minmax(520px, auto) !important;
  padding-right: 226px !important;
}

html body[data-view="crm"] .crm-control-tools {
  width: 520px !important;
  gap: 14px !important;
}

html body[data-view="crm"] .crm-control-search {
  width: 374px !important;
}

html body[data-view="crm"] .crm-new-menu {
  width: 104px !important;
  flex: 0 0 104px !important;
}

html body[data-view="crm"] .crm-new-button {
  width: 104px !important;
}

html body .sidebar-brand-ref::before {
  max-width: 164px !important;
  font-size: 16px !important;
  letter-spacing: .10em !important;
  text-indent: .10em !important;
}

html body .sidebar-erp-label {
  width: 164px !important;
}

html body .sidebar-erp-label::before {
  white-space: normal !important;
}

html body[data-view="crm"] .crm-control-grid .crm-ref-panel {
  box-shadow: 0 12px 28px rgba(15, 23, 42, .04) !important;
}

html body[data-view="crm"] .crm-control-grid .crm-ref-followups,
html body[data-view="crm"] .crm-control-grid .crm-steel-price-panel {
  min-height: 228px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-ref-latest,
html body[data-view="crm"] .crm-control-grid .crm-delivery-panel {
  min-height: 260px !important;
}

@media (max-width: 1280px) {
  html body[data-view="crm"] .crm-control-head {
    grid-template-columns: 1fr !important;
    padding-right: 226px !important;
  }

  html body[data-view="crm"] .crm-control-tools {
    justify-content: flex-start !important;
  }
}

/* CRM click/dropdown and compact visual correction. */
html body .crm-new-menu.open .crm-new-dropdown {
  display: grid !important;
  gap: 4px !important;
}

html body .crm-new-menu {
  z-index: 40 !important;
}

html body .crm-new-dropdown {
  z-index: 60 !important;
}

html body[data-view="crm"] .topbar {
  z-index: 30 !important;
}

html body[data-view="crm"] .crm-ref-dashboard {
  max-width: 1184px !important;
  gap: 14px !important;
}

html body[data-view="crm"] .crm-control-head {
  min-height: 52px !important;
}

html body[data-view="crm"] .crm-control-kpis {
  min-height: 112px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi {
  min-height: 112px !important;
  height: 112px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-ref-followups,
html body[data-view="crm"] .crm-control-grid .crm-steel-price-panel {
  min-height: 226px !important;
  height: 226px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-ref-latest,
html body[data-view="crm"] .crm-control-grid .crm-delivery-panel {
  min-height: 250px !important;
  height: 250px !important;
}

html body[data-view="crm"] .crm-ref-panel {
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  min-height: 178px !important;
  height: 178px !important;
}

html body[data-view="crm"] .crm-ref-table {
  table-layout: fixed !important;
}

html body[data-view="crm"] .crm-ref-table th,
html body[data-view="crm"] .crm-ref-table td {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .sidebar-brand-ref::before {
  content: "ALQASER" !important;
  max-width: 158px !important;
  font-size: 18px !important;
  letter-spacing: .12em !important;
}

html body .sidebar-erp-label::before {
  content: "Greenland Building Materials Trading LLC" !important;
  font-size: 7px !important;
  line-height: 1.15 !important;
}

html body .nav-section-title {
  font-size: 10px !important;
}

html body .nav button {
  height: 32px !important;
  min-height: 32px !important;
  font-size: 11px !important;
}

/* Final universal sidebar: ALQASER ERP SYSTEM model for every window. */
html body .app-shell {
  --erp-sidebar: 224px !important;
}

html body .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar,
html body[data-view="employees"] .sidebar,
html body[data-view="vehicles"] .sidebar,
html body[data-view="attendance"] .sidebar,
html body[data-view="payroll"] .sidebar,
html body[data-view="branches"] .sidebar,
html body[data-view="approvals"] .sidebar,
html body[data-view="purchaseRequests"] .sidebar,
html body[data-view="reports"] .sidebar,
html body[data-view="users"] .sidebar,
html body[data-view="company"] .sidebar {
  width: 224px !important;
  min-width: 224px !important;
  padding: 40px 12px 22px !important;
  background:
    radial-gradient(circle at 75% 0%, rgba(23, 79, 142, .28), transparent 34%),
    linear-gradient(180deg, #061b35 0%, #051428 48%, #030d1c 100%) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

html body .sidebar-brand-ref {
  width: 100% !important;
  margin: 0 0 34px !important;
  padding: 0 !important;
  display: grid !important;
  justify-items: center !important;
  gap: 11px !important;
  border: 0 !important;
  overflow: visible !important;
}

html body .sidebar-brand-ref::before {
  content: "ALQASER" !important;
  width: auto !important;
  max-width: 100% !important;
  display: block !important;
  color: #ffffff !important;
  font-size: 27px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .12em !important;
  text-indent: .12em !important;
  text-align: center !important;
  white-space: nowrap !important;
  text-shadow: 0 8px 18px rgba(0, 0, 0, .22) !important;
}

html body .sidebar-erp-label {
  width: auto !important;
  display: block !important;
  color: #ff1730 !important;
  font-size: 0 !important;
  font-weight: 900 !important;
  letter-spacing: .12em !important;
  line-height: 1 !important;
  text-align: center !important;
}

html body .sidebar-erp-label::before {
  content: "ERP SYSTEM" !important;
  display: block !important;
  color: #ff1730 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: .12em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

html body .sidebar-erp-label::after {
  display: none !important;
}

html body .nav {
  gap: 24px !important;
}

html body .nav-section {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

html body .nav-section-title {
  display: block !important;
  margin: 0 0 11px !important;
  padding: 0 9px !important;
  color: #a9c7eb !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  line-height: 1 !important;
}

html body .nav-section-title::after {
  display: none !important;
}

html body .nav button {
  width: 100% !important;
  min-height: 38px !important;
  height: 38px !important;
  margin: 0 0 5px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  background: transparent !important;
  color: rgba(255, 255, 255, .92) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  text-align: left !important;
}

html body .nav button.active {
  background: linear-gradient(135deg, #fb172f 0%, #e50b23 100%) !important;
  color: #fff !important;
  box-shadow: 0 12px 22px rgba(239, 19, 42, .24) !important;
}

html body .nav-icon,
html body .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
}

html body .nav button span:last-child {
  min-width: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html body .sidebar-collapse {
  display: none !important;
}

html body .app-shell.sidebar-collapsed {
  grid-template-columns: 224px minmax(0, 1fr) !important;
}

/* Fit register tables to the available window width. */
html body[data-view="employees"] .view,
html body[data-view="vehicles"] .view,
html body[data-view="branches"] .view,
html body[data-view="attendance"] .view,
html body[data-view="payroll"] .view,
html body[data-view="purchaseRequests"] .view,
html body[data-view="approvals"] .view {
  padding: 14px 18px !important;
  overflow-x: hidden !important;
}

html body[data-view="employees"] .view > .toolbar.section-title,
html body[data-view="vehicles"] .view > .toolbar.section-title,
html body[data-view="branches"] .view > .toolbar.section-title,
html body[data-view="attendance"] .view > .toolbar.section-title,
html body[data-view="payroll"] .view > .toolbar.section-title,
html body[data-view="purchaseRequests"] .view > .toolbar.section-title,
html body[data-view="approvals"] .view > .toolbar.section-title {
  min-height: 48px !important;
  margin-bottom: 10px !important;
  padding: 8px 12px !important;
}

html body[data-view="employees"] .view > .toolbar.section-title h2,
html body[data-view="vehicles"] .view > .toolbar.section-title h2,
html body[data-view="branches"] .view > .toolbar.section-title h2,
html body[data-view="attendance"] .view > .toolbar.section-title h2,
html body[data-view="payroll"] .view > .toolbar.section-title h2,
html body[data-view="purchaseRequests"] .view > .toolbar.section-title h2,
html body[data-view="approvals"] .view > .toolbar.section-title h2 {
  font-size: 18px !important;
}

html body[data-view="employees"] .view > .table-wrap,
html body[data-view="vehicles"] .view > .table-wrap,
html body[data-view="branches"] .view > .table-wrap,
html body[data-view="attendance"] .view > .table-wrap,
html body[data-view="payroll"] .view > .table-wrap,
html body[data-view="purchaseRequests"] .view > .table-wrap,
html body[data-view="approvals"] .view > .table-wrap {
  overflow-x: hidden !important;
  max-height: calc(100vh - 124px) !important;
}

html body[data-view="employees"] .table-wrap table,
html body[data-view="vehicles"] .table-wrap table,
html body[data-view="branches"] .table-wrap table,
html body[data-view="attendance"] .table-wrap table,
html body[data-view="payroll"] .table-wrap table,
html body[data-view="purchaseRequests"] .table-wrap table,
html body[data-view="approvals"] .table-wrap table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

html body[data-view="employees"] .table-wrap th,
html body[data-view="employees"] .table-wrap td,
html body[data-view="vehicles"] .table-wrap th,
html body[data-view="vehicles"] .table-wrap td,
html body[data-view="branches"] .table-wrap th,
html body[data-view="branches"] .table-wrap td,
html body[data-view="attendance"] .table-wrap th,
html body[data-view="attendance"] .table-wrap td,
html body[data-view="payroll"] .table-wrap th,
html body[data-view="payroll"] .table-wrap td,
html body[data-view="purchaseRequests"] .table-wrap th,
html body[data-view="purchaseRequests"] .table-wrap td,
html body[data-view="approvals"] .table-wrap th,
html body[data-view="approvals"] .table-wrap td {
  height: 40px !important;
  padding: 7px 9px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

html body[data-view="employees"] .table-wrap th:last-child,
html body[data-view="employees"] .table-wrap td:last-child,
html body[data-view="vehicles"] .table-wrap th:last-child,
html body[data-view="vehicles"] .table-wrap td:last-child,
html body[data-view="branches"] .table-wrap th:last-child,
html body[data-view="branches"] .table-wrap td:last-child {
  width: 172px !important;
  min-width: 172px !important;
  max-width: 172px !important;
}

html body[data-view="employees"] .split-actions,
html body[data-view="vehicles"] .split-actions,
html body[data-view="branches"] .split-actions {
  gap: 5px !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
}

html body[data-view="employees"] .split-actions .ghost-button,
html body[data-view="employees"] .split-actions .danger-button,
html body[data-view="vehicles"] .split-actions .ghost-button,
html body[data-view="vehicles"] .split-actions .danger-button,
html body[data-view="branches"] .split-actions .ghost-button,
html body[data-view="branches"] .split-actions .danger-button {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 10.5px !important;
  border-radius: 5px !important;
}

/* Attendance register: professional dashboard-matched work surface. */
html body[data-view="attendance"] .view {
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 14px 18px !important;
  overflow: hidden !important;
}

html body[data-view="attendance"] .attendance-register-card {
  border-radius: 8px !important;
  border: 1px solid #d8e3f1 !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .045) !important;
  overflow: hidden !important;
}

html body[data-view="attendance"] .attendance-register-card .card-body {
  padding: 0 !important;
}

html body[data-view="attendance"] .attendance-register-head {
  min-height: 60px !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid #e4edf7 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

html body[data-view="attendance"] .attendance-register-head h2 {
  margin: 0 !important;
  color: #07142b !important;
  font-size: 20px !important;
  line-height: 1.1 !important;
}

html body[data-view="attendance"] .attendance-register-head p {
  margin: 5px 0 0 !important;
  color: #5d6b82 !important;
  font-size: 12px !important;
}

html body[data-view="attendance"] .attendance-register-head .pill {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  color: #24405f !important;
  background: #f3f7fc !important;
  border: 1px solid #d3deec !important;
  font-size: 12px !important;
}

html body[data-view="attendance"] .attendance-register-form {
  padding: 14px 18px 18px !important;
}

html body[data-view="attendance"] .attendance-register-tools {
  min-height: 42px !important;
  margin: 0 0 12px !important;
  display: flex !important;
  align-items: end !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

html body[data-view="attendance"] .attendance-register-tools .compact-field {
  display: grid !important;
  gap: 5px !important;
  color: #44546a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

html body[data-view="attendance"] .attendance-register-tools input {
  width: 160px !important;
  height: 34px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
}

html body[data-view="attendance"] .attendance-register-tools .button {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 16px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  box-shadow: 0 12px 22px rgba(220, 20, 38, .16) !important;
}

html body[data-view="attendance"] .attendance-register-table {
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

html body[data-view="attendance"] .attendance-register-table table {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed !important;
}

html body[data-view="attendance"] .attendance-register-table th,
html body[data-view="attendance"] .attendance-register-table td {
  height: 42px !important;
  padding: 8px 10px !important;
  font-size: 11px !important;
}

html body[data-view="attendance"] .attendance-register-table td:first-child {
  width: 190px !important;
}

html body[data-view="attendance"] .attendance-register-table select,
html body[data-view="attendance"] .attendance-register-table input {
  width: 100% !important;
  height: 32px !important;
  min-height: 32px !important;
  border: 1px solid #cad6e5 !important;
  border-radius: 6px !important;
  padding: 0 9px !important;
  background: #fff !important;
  color: #07142b !important;
  font-size: 11px !important;
}

html body[data-view="attendance"] .attendance-register-table .ot-input {
  max-width: 78px !important;
}

html body[data-view="attendance"] .view > .toolbar.section-title {
  min-height: 48px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
}

html body[data-view="attendance"] .empty.card {
  min-height: 120px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
}

/* Payroll & WPS: compact dashboard-matched layout. */
html body[data-view="payroll"] .view {
  height: calc(100vh - 52px) !important;
  padding: 14px 18px !important;
  overflow: auto !important;
}

html body[data-view="payroll"] .payroll-dashboard {
  min-height: 100% !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(140px, .8fr) auto !important;
  gap: 12px !important;
}

html body[data-view="payroll"] .payroll-kpis {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

html body[data-view="payroll"] .payroll-kpi-card {
  min-height: 96px !important;
  padding: 16px !important;
  display: grid !important;
  grid-template-columns: 50px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-view="payroll"] .payroll-kpi-icon {
  width: 50px !important;
  height: 50px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 12px !important;
}

html body[data-view="payroll"] .payroll-kpi-icon svg {
  width: 22px !important;
  height: 22px !important;
}

html body[data-view="payroll"] .payroll-kpi-icon.blue {
  color: #2563eb !important;
  background: #eef5ff !important;
}

html body[data-view="payroll"] .payroll-kpi-icon.green {
  color: #059669 !important;
  background: #eafaf1 !important;
}

html body[data-view="payroll"] .payroll-kpi-icon.orange {
  color: #f97316 !important;
  background: #fff3e3 !important;
}

html body[data-view="payroll"] .payroll-kpi-card p {
  margin: 0 0 6px !important;
  color: #112044 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .02em !important;
}

html body[data-view="payroll"] .payroll-kpi-card strong {
  display: block !important;
  margin: 0 !important;
  color: #07142b !important;
  font-size: 24px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="payroll"] .payroll-kpi-card span {
  display: block !important;
  margin-top: 8px !important;
  color: #4d5d73 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="payroll"] .payroll-action-panel {
  min-height: 78px !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-view="payroll"] .payroll-action-panel h2 {
  margin: 0 !important;
  color: #07142b !important;
  font-size: 18px !important;
  line-height: 1.1 !important;
}

html body[data-view="payroll"] .payroll-action-panel p {
  max-width: 740px !important;
  margin: 6px 0 0 !important;
  color: #53647a !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

html body[data-view="payroll"] .payroll-action-buttons {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

html body[data-view="payroll"] .payroll-action-buttons .button,
html body[data-view="payroll"] .payroll-action-buttons .ghost-button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}

html body[data-view="payroll"] .payroll-section-card {
  min-width: 0 !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  overflow: hidden !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-view="payroll"] .payroll-section-head {
  min-height: 44px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border-bottom: 1px solid #e4edf7 !important;
  background: #fbfdff !important;
}

html body[data-view="payroll"] .payroll-section-head h2 {
  margin: 0 !important;
  color: #07142b !important;
  font-size: 16px !important;
  line-height: 1.1 !important;
}

html body[data-view="payroll"] .payroll-section-head span {
  min-height: 26px !important;
  padding: 5px 10px !important;
  border: 1px solid #d4dfed !important;
  border-radius: 999px !important;
  color: #4d5d73 !important;
  background: #f5f8fc !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

html body[data-view="payroll"] .payroll-section-card .table-wrap {
  max-height: 220px !important;
  overflow: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body[data-view="payroll"] .payroll-section-card table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

html body[data-view="payroll"] .payroll-section-card th,
html body[data-view="payroll"] .payroll-section-card td {
  height: 38px !important;
  padding: 7px 12px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

html body[data-view="payroll"] .payroll-dashboard .empty.card {
  min-height: 112px !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #66758c !important;
  font-size: 13px !important;
}

html body[data-view="payroll"] .payroll-wps-card .table-wrap {
  max-height: 150px !important;
}

@media (max-width: 1180px) {
  html body[data-view="payroll"] .payroll-kpis {
    grid-template-columns: 1fr !important;
  }

  html body[data-view="payroll"] .payroll-action-panel {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  html body[data-view="payroll"] .payroll-action-buttons {
    justify-content: flex-start !important;
  }
}

/* Branches & Warehouses: dashboard theme fit. */
html body[data-view="branches"] .view {
  height: calc(100vh - 52px) !important;
  padding: 14px 18px !important;
  overflow: auto !important;
}

html body[data-view="branches"] .branch-dashboard {
  display: grid !important;
  gap: 12px !important;
}

html body[data-view="branches"] .branch-hero,
html body[data-view="branches"] .branch-register-card,
html body[data-view="branches"] .branch-kpi-card {
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-view="branches"] .branch-hero {
  min-height: 112px !important;
  padding: 18px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  border-left: 5px solid #e11d2e !important;
}

html body[data-view="branches"] .branch-hero span,
html body[data-view="branches"] .branch-card-head span {
  color: #e11d2e !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
}

html body[data-view="branches"] .branch-hero h2 {
  margin: 6px 0 4px !important;
  color: #07142b !important;
  font-size: 26px !important;
  line-height: 1.05 !important;
}

html body[data-view="branches"] .branch-hero p {
  margin: 0 !important;
  color: #53647a !important;
  font-size: 13px !important;
}

html body[data-view="branches"] .branch-hero-actions {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

html body[data-view="branches"] .branch-hero-actions .button,
html body[data-view="branches"] .branch-hero-actions .ghost-button,
html body[data-view="branches"] .branch-card-head .button {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}

html body[data-view="branches"] .branch-hero-actions svg {
  width: 15px !important;
  height: 15px !important;
}

html body[data-view="branches"] .branch-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

html body[data-view="branches"] .branch-kpi-card {
  min-height: 88px !important;
  padding: 14px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}

html body[data-view="branches"] .branch-kpi-icon {
  width: 46px !important;
  height: 46px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 12px !important;
}

html body[data-view="branches"] .branch-kpi-icon svg {
  width: 21px !important;
  height: 21px !important;
}

html body[data-view="branches"] .branch-kpi-icon.blue { color: #2563eb !important; background: #eef5ff !important; }
html body[data-view="branches"] .branch-kpi-icon.green { color: #059669 !important; background: #eafaf1 !important; }
html body[data-view="branches"] .branch-kpi-icon.orange { color: #f97316 !important; background: #fff3e3 !important; }
html body[data-view="branches"] .branch-kpi-icon.red { color: #e11d2e !important; background: #fff0f2 !important; }

html body[data-view="branches"] .branch-kpi-card p,
html body[data-view="branches"] .branch-kpi-card strong,
html body[data-view="branches"] .branch-kpi-card span {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="branches"] .branch-kpi-card p {
  margin: 0 0 5px !important;
  color: #112044 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

html body[data-view="branches"] .branch-kpi-card strong {
  color: #07142b !important;
  font-size: 23px !important;
  line-height: 1 !important;
}

html body[data-view="branches"] .branch-kpi-card span {
  margin-top: 7px !important;
  color: #53647a !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}

html body[data-view="branches"] .branch-register-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}

html body[data-view="branches"] .branch-register-card {
  overflow: hidden !important;
}

html body[data-view="branches"] .branch-card-head {
  min-height: 56px !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border-bottom: 1px solid #e4edf7 !important;
  background: #fbfdff !important;
}

html body[data-view="branches"] .branch-card-head h2 {
  margin: 3px 0 0 !important;
  color: #07142b !important;
  font-size: 18px !important;
  line-height: 1.1 !important;
}

html body[data-view="branches"] .branch-register-card .table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: auto !important;
}

html body[data-view="branches"] .branch-register-card table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

html body[data-view="branches"] .branch-register-card th,
html body[data-view="branches"] .branch-register-card td {
  height: 40px !important;
  padding: 8px 12px !important;
  font-size: 11px !important;
}

html body[data-view="branches"] .branch-register-card th:last-child,
html body[data-view="branches"] .branch-register-card td:last-child {
  width: 170px !important;
}

/* Quotation details should show actions/details only; the A4 sheet opens only for print/PDF. */
.approval-screen-content + .gs-quote-sheet {
  display: none !important;
}

/* Branches normal page reset after removing duplicate hero actions. */
html body[data-view="branches"] .branches-normal-page {
  display: grid !important;
  gap: 12px !important;
}

html body[data-view="branches"] .branches-normal-hero {
  min-height: 96px !important;
  margin: 0 !important;
  padding: 16px 18px !important;
  display: flex !important;
  align-items: center !important;
  border-left: 5px solid #e11d2e !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-view="branches"] .branches-normal-hero span {
  color: #e11d2e !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

html body[data-view="branches"] .branches-normal-hero h2 {
  margin: 6px 0 4px !important;
  color: #07142b !important;
  font-size: 24px !important;
  line-height: 1.08 !important;
}

html body[data-view="branches"] .branches-normal-hero p {
  margin: 0 !important;
  color: #53647a !important;
  font-size: 13px !important;
}

html body[data-view="branches"] .branches-normal-kpis {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

html body[data-view="branches"] .branches-normal-kpis .dashboard-kpi {
  min-height: 84px !important;
  padding: 14px 16px !important;
  border-radius: 8px !important;
  background: #fff !important;
  border: 1px solid #d8e3f1 !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-view="branches"] .branches-normal-kpis .dashboard-kpi span {
  color: #53647a !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

html body[data-view="branches"] .branches-normal-kpis .dashboard-kpi strong {
  color: #07142b !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

html body[data-view="branches"] .branches-normal-kpis .dashboard-kpi small {
  color: #53647a !important;
  font-size: 11px !important;
}

html body[data-view="branches"] .branches-normal-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}

html body[data-view="branches"] .branches-register-card {
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045) !important;
  overflow: hidden !important;
}

html body[data-view="branches"] .branches-register-card .card-body {
  padding: 0 !important;
}

html body[data-view="branches"] .branches-register-card .toolbar.section-title {
  min-height: 54px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #e4edf7 !important;
  background: #fbfdff !important;
}

html body[data-view="branches"] .branches-register-card .toolbar.section-title h2 {
  font-size: 18px !important;
}

html body[data-view="branches"] .branches-register-card .toolbar.section-title .button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  font-size: 11.5px !important;
}

html body[data-view="branches"] .branches-register-card .table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-x: hidden !important;
}

html body[data-view="branches"] .branches-register-card table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

/* Final CRM sidebar reset: keep CRM identical to the rest of the ERP. */
html body[data-view="crm"] .app-shell {
  grid-template-columns: 224px minmax(0, 1fr) !important;
  --erp-sidebar: 224px !important;
}

html body[data-view="crm"] .sidebar {
  width: 224px !important;
  min-width: 224px !important;
  padding: 40px 12px 22px !important;
  overflow-x: hidden !important;
}

html body[data-view="crm"] .sidebar-brand-ref {
  width: 100% !important;
  margin: 0 0 34px !important;
  padding: 0 !important;
  display: grid !important;
  justify-items: center !important;
  gap: 11px !important;
  overflow: visible !important;
}

html body[data-view="crm"] .sidebar-brand-ref::before {
  content: "ALQASER" !important;
  max-width: 188px !important;
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .13em !important;
  text-indent: .13em !important;
  text-align: center !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .sidebar-erp-label {
  width: auto !important;
  display: block !important;
  font-size: 0 !important;
  letter-spacing: 0 !important;
}

html body[data-view="crm"] .sidebar-erp-label::before {
  content: "ERP SYSTEM" !important;
  display: block !important;
  margin: 0 !important;
  color: #ff1730 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .14em !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .sidebar-erp-label::after {
  display: none !important;
}

html body[data-view="crm"] .nav {
  gap: 24px !important;
}

html body[data-view="crm"] .nav button {
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 12px !important;
  grid-template-columns: 26px minmax(0, 1fr) !important;
  gap: 10px !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .nav button span:last-child {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Final simple social-style header: notification, user, install, logout only. */
html body .topbar,
html body[data-view="commandCenter"] .topbar,
html body[data-view="crm"] .topbar {
  min-height: 52px !important;
  height: 52px !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  background: rgba(255, 255, 255, .96) !important;
  border-bottom: 1px solid #dbe5f0 !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .035) !important;
}

html body .topbar > div:first-of-type,
html body[data-view="commandCenter"] .topbar > div:first-of-type,
html body[data-view="crm"] .topbar > div:first-of-type {
  display: none !important;
}

html body .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions,
html body[data-view="crm"] .topbar-actions {
  width: auto !important;
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

html body .topbar-actions #cloudStatusLabel,
html body .topbar-actions #syncLatestButton,
html body .topbar-actions #todayLabel {
  display: none !important;
}

/* 2026-06-09: Finance Desk module */
html body[data-view="finance"] .view {
  padding: 22px 28px 36px !important;
}

.finance-desk {
  display: grid;
  gap: 18px;
}

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

.finance-action {
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: #fff;
  color: #020b22;
  min-height: 78px;
  padding: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas: "icon title" "icon note";
  align-items: center;
  column-gap: 10px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045);
}

.finance-action:hover {
  border-color: #93c5fd;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .08);
}

.finance-action > span {
  grid-area: icon;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
}

.finance-action svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2.3;
  fill: none;
}

.finance-action b {
  grid-area: title;
  font-size: 14px;
  line-height: 1.1;
}

.finance-action small {
  grid-area: note;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.finance-action.green > span { background: #ecfdf5; color: #10b981; }
.finance-action.orange > span { background: #fff7ed; color: #f97316; }
.finance-action.red > span { background: #fff1f2; color: #e11d48; }
.finance-action.purple > span { background: #f3e8ff; color: #7c3aed; }
.finance-action.cyan > span { background: #ecfeff; color: #0891b2; }

.finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

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

.finance-kpi {
  min-height: 92px;
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .06);
}

.finance-kpi > span {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
  flex: 0 0 auto;
}

.finance-kpi.orange > span { background: #fff7ed; color: #f97316; }
.finance-kpi.green > span { background: #ecfdf5; color: #10b981; }
.finance-kpi.red > span { background: #fff1f2; color: #e11d48; }

.finance-kpi svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
  stroke-width: 2.3;
  fill: none;
}

.finance-kpi small,
.finance-kpi em {
  display: block;
  color: #64748b;
  font-weight: 800;
  font-style: normal;
}

.finance-kpi strong {
  display: block;
  margin: 3px 0;
  color: #020b22;
  font-size: 30px;
  line-height: 1;
}

.finance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 18px;
  align-items: start;
}

.finance-grid.limited {
  grid-template-columns: 1fr;
}

.finance-card {
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.finance-notifications {
  grid-column: 1 / -1;
}

.finance-card-head {
  min-height: 62px;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finance-card-head h2 {
  margin: 0;
  color: #020b22;
  font-size: 24px;
  line-height: 1.1;
}

.finance-card-head span {
  color: #64748b;
  font-weight: 900;
}

.finance-document-form,
.finance-letter-form,
.finance-followup-form,
.finance-sales-form {
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fbff;
}

.finance-paste-help {
  color: #64748b;
  font-weight: 800;
}

.finance-pasted-images {
  display: grid;
  gap: 10px;
}

.finance-paste-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  color: #64748b;
  font-weight: 800;
  background: #fff;
}

.finance-pasted-image {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.finance-pasted-image img {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.finance-pasted-image b,
.finance-pasted-image small {
  display: block;
}

.finance-document-list,
.finance-letter-list,
.finance-followup-list,
.finance-purchase-list,
.finance-notification-list,
.finance-sales-list {
  display: grid;
  gap: 0;
}

.finance-document-row,
.finance-letter-row,
.finance-followup-row,
.finance-purchase-row,
.finance-notification {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 48px minmax(180px, 1fr) minmax(150px, .8fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.finance-notification {
  grid-template-columns: 42px minmax(0, 1fr) minmax(160px, .55fr) auto;
}

.finance-document-row:hover,
.finance-letter-row:hover,
.finance-followup-row:hover,
.finance-purchase-row:hover,
.finance-notification:hover {
  background: #f8fbff;
}

.finance-document-row > span,
.finance-letter-row > span,
.finance-followup-row > span,
.finance-purchase-row > span,
.finance-notification > span {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
}

.finance-document-row svg,
.finance-letter-row svg,
.finance-followup-row svg,
.finance-purchase-row svg,
.finance-notification svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.3;
  fill: none;
}

.finance-document-row b,
.finance-letter-row b,
.finance-followup-row b,
.finance-purchase-row b,
.finance-notification b,
.finance-sales-list b {
  color: #020b22;
  font-size: 18px;
  line-height: 1.2;
}

.finance-document-row small,
.finance-letter-row small,
.finance-followup-row small,
.finance-purchase-row small,
.finance-notification small,
.finance-letter-row em,
.finance-followup-row em,
.finance-purchase-row em,
.finance-notification em,
.finance-sales-list span {
  color: #64748b;
  font-weight: 800;
}

.finance-notification.red > span { background: #fff1f2; color: #e11d48; }
.finance-notification.orange > span { background: #fff7ed; color: #f97316; }
.finance-notification.green > span { background: #ecfdf5; color: #10b981; }

.finance-sign-queue {
  display: grid;
  gap: 16px;
}

.finance-queue-section {
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.finance-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fbff;
}

.finance-queue-head h4 {
  margin: 0;
  color: #020b22;
  font-size: 18px;
}

.finance-queue-head span {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff1f2;
  color: #e11d48;
  font-weight: 900;
}

.finance-calculator-form {
  padding: 18px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.finance-calc-grid {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-calc-grid article {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.finance-calc-grid small {
  display: block;
  color: #64748b;
  font-weight: 900;
}

.finance-calc-grid strong {
  display: block;
  margin-top: 4px;
  color: #020b22;
  font-size: 22px;
}

.finance-law-note {
  margin: 0;
  padding: 0 20px 18px;
  color: #64748b;
  font-weight: 700;
  line-height: 1.5;
}

.finance-sales {
  grid-column: 2;
}

.finance-sales-list article {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.finance-sales-list p {
  margin: 8px 0 0;
  color: #0f172a;
  line-height: 1.5;
}

.finance-document-content {
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: #f8fbff;
  padding: 16px;
  color: #0f172a;
  line-height: 1.6;
  font-weight: 700;
}

.finance-print-sheet {
  position: relative;
  width: 190mm;
  min-height: 277mm;
  margin: 0 auto;
  padding: 0;
  color: #0f172a;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.finance-print-header {
  display: grid;
  grid-template-columns: 34mm 1fr auto;
  align-items: center;
  gap: 8mm;
  border-bottom: 2px solid #16a34a;
  padding-bottom: 5mm;
  margin-bottom: 5mm;
}

.finance-print-header img {
  width: 32mm;
  height: auto;
}

.finance-print-header span {
  color: #16a34a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.finance-print-header h1 {
  margin: 1mm 0;
  font-size: 22px;
}

.finance-print-header p {
  margin: 0;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
}

.finance-print-header > strong,
.finance-print-footer strong {
  border: 2px solid #16a34a;
  border-radius: 4px;
  color: #047857;
  padding: 5px 8px;
  font-size: 11px;
  text-transform: uppercase;
}

.finance-print-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3mm;
  margin-bottom: 5mm;
}

.finance-print-meta div,
.finance-print-content,
.finance-print-sign-card,
.finance-print-file,
.finance-print-empty {
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 4mm;
}

.finance-print-meta span,
.finance-print-sign-card small,
.finance-print-file span,
.finance-print-footer {
  color: #475569;
  font-size: 10px;
  font-weight: 700;
}

.finance-print-meta strong,
.finance-print-sign-card strong,
.finance-print-file strong {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.finance-print-block {
  margin-top: 5mm;
  break-inside: avoid;
}

.finance-print-block h2 {
  margin: 0 0 3mm;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 2mm;
  font-size: 14px;
}

.finance-print-content {
  min-height: 35mm;
  line-height: 1.45;
  font-size: 11px;
  font-weight: 700;
}

.finance-print-signatures,
.finance-print-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42mm, 1fr));
  gap: 3mm;
}

.finance-print-sign-card img {
  display: block;
  width: 38mm;
  height: 14mm;
  object-fit: contain;
  margin: 2mm 0;
}

.finance-print-sign-card em {
  display: block;
  margin: 2mm 0;
  color: #047857;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.finance-print-attachments figure {
  margin: 0;
  break-inside: avoid;
}

.finance-print-attachments img {
  max-width: 100%;
  max-height: 110mm;
  object-fit: contain;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
}

.finance-print-attachments figcaption {
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  margin-top: 2mm;
}

.finance-approved-pages {
  display: grid;
  gap: 12px;
}

.finance-approved-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0 4px;
}

.finance-approved-page {
  position: relative;
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.finance-approved-image-page {
  display: grid;
  place-items: center;
  padding: 12px;
}

.finance-approved-image-page > img {
  display: block;
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.finance-approved-image-page figcaption,
.finance-approved-pdf-page footer {
  width: 100%;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.finance-approved-pdf-page object {
  display: block;
  width: 100%;
  height: 560px;
  border: 0;
  background: #f8fafc;
}

.finance-approved-file-page,
.finance-approved-text-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.finance-approved-text-content {
  width: 100%;
  min-height: 260px;
  padding: 20px 20px 120px;
  color: #0f172a;
  line-height: 1.55;
  font-weight: 700;
}

.finance-approved-text-content h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.finance-approved-text-content p {
  margin: 0;
}

.finance-approved-file-fallback {
  max-width: 520px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fbff;
  padding: 22px;
  text-align: center;
}

.finance-approved-file-fallback strong,
.finance-approved-file-fallback span,
.finance-approved-file-fallback small {
  display: block;
}

.finance-approved-file-fallback strong {
  color: #020b22;
  font-size: 18px;
}

.finance-approved-file-fallback span,
.finance-approved-file-fallback small {
  margin-top: 6px;
  color: #64748b;
  font-weight: 800;
}

.finance-approved-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.approved-card-seal {
  width: min(360px, 100%);
  border: 1px solid #b8c1cc;
  border-radius: 8px;
  background: rgba(255, 255, 255, .97);
  color: #020b22;
  padding: 12px 14px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.approved-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #047857;
}

.approved-card-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: #c7cbd1;
}

.approved-card-check {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #047857;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
}

.approved-card-title strong {
  color: #047857;
  font-size: 24px;
  line-height: 1;
}

.approved-card-line {
  height: 1px;
  background: #c7cbd1;
  margin: 8px 0;
}

.approved-card-rows {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 6px 8px;
  font-size: 14px;
  line-height: 1.15;
}

.approved-card-rows span,
.approved-card-rows b {
  color: #020b22;
  font-weight: 600;
}

.approved-card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #020b22;
  font-size: 13px;
  font-weight: 500;
}

.approved-card-foot span {
  width: 14px;
  height: 14px;
  border: 1px solid #047857;
  color: #047857;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  line-height: 1;
}

.approved-card-foot b {
  color: #047857;
}

.finance-approved-overlay .approved-card-seal {
  position: absolute;
  left: 18px;
  bottom: 18px;
}

.finance-approved-seal {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border: 2px solid #16a34a;
  border-radius: 7px;
  background: rgba(236, 253, 245, .94);
  color: #047857;
  padding: 8px 11px;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

.finance-approved-seal span,
.finance-approved-seal small {
  display: block;
  font-size: 9px;
  font-weight: 900;
}

.finance-approved-seal strong {
  display: block;
  font-size: 14px;
  line-height: 1.1;
}

.finance-approved-signbox {
  position: absolute;
  right: 18px;
  bottom: 18px;
  min-width: 230px;
  border-top: 2px solid #64748b;
  background: rgba(255, 255, 255, .96);
  padding: 10px 12px 8px;
  text-align: center;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .10);
}

.finance-approved-signbox img {
  display: block;
  width: 190px;
  height: 62px;
  object-fit: contain;
  margin: 0 auto 3px;
}

.finance-approved-signbox b {
  display: block;
  color: #047857;
  font-size: 13px;
  text-transform: uppercase;
}

.finance-approved-signbox strong,
.finance-approved-signbox span,
.finance-approved-signbox small {
  display: block;
  color: #0f172a;
  font-weight: 900;
}

.finance-approved-signbox span,
.finance-approved-signbox small {
  color: #475569;
  font-size: 10px;
}

.finance-print-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #cbd5e1;
  margin-top: 6mm;
  padding-top: 3mm;
}

.finance-page-approval-stamp,
.finance-page-signature {
  display: none;
}

body.printing-finance-document {
  margin: 0;
  background: #fff;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  body.printing-finance-document {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-finance-document .finance-print-sheet {
    width: 190mm;
    min-height: auto;
  }

  body.printing-finance-document .finance-page-approval-stamp {
    display: grid;
    position: fixed;
    left: 8mm;
    bottom: 8mm;
    z-index: 10;
    border: 2px solid #16a34a;
    border-radius: 7px;
    color: #047857;
    background: rgba(236, 253, 245, .92);
    padding: 3mm 4mm;
    text-align: center;
    transform: rotate(-5deg);
  }

  body.printing-finance-document .finance-page-approval-stamp span,
  body.printing-finance-document .finance-page-approval-stamp small {
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
  }

  body.printing-finance-document .finance-page-approval-stamp strong {
    display: block;
    font-size: 13px;
    line-height: 1.1;
    text-transform: uppercase;
  }

  body.printing-finance-document .finance-page-signature {
    display: grid;
    position: fixed;
    right: 9mm;
    bottom: 8mm;
    z-index: 10;
    min-width: 45mm;
    color: #0f172a;
    background: rgba(255, 255, 255, .94);
    border-top: 1px solid #94a3b8;
    padding-top: 2mm;
    text-align: center;
  }

  body.printing-finance-document .finance-page-signature img {
    width: 40mm;
    height: 12mm;
    object-fit: contain;
    margin: 0 auto 1mm;
  }

  body.printing-finance-document .finance-page-signature b {
    color: #047857;
    font-size: 11px;
    text-transform: uppercase;
  }

  body.printing-finance-document .finance-page-signature span,
  body.printing-finance-document .finance-page-signature small {
    display: block;
    font-size: 8px;
    font-weight: 800;
  }

  body.printing-finance-document .finance-approved-pages {
    gap: 6mm;
  }

  body.printing-finance-document .finance-approved-page {
    min-height: 245mm;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing-finance-document .finance-approved-page + .finance-approved-page {
    break-before: page;
    page-break-before: always;
  }

  body.printing-finance-document .finance-approved-image-page {
    padding: 5mm;
  }

  body.printing-finance-document .finance-approved-image-page > img {
    max-height: 226mm;
  }

  body.printing-finance-document .finance-approved-pdf-page object {
    height: 228mm;
  }

  body.printing-finance-document .finance-approved-text-content {
    min-height: 220mm;
    padding: 8mm 8mm 38mm;
  }

  body.printing-finance-document .finance-approved-overlay .approved-card-seal {
    left: 8mm;
    bottom: 8mm;
    width: 74mm;
    padding: 3mm;
    box-shadow: none;
  }

  body.printing-finance-document .finance-approved-seal {
    left: 8mm;
    bottom: 8mm;
  }

  body.printing-finance-document .finance-approved-signbox {
    right: 9mm;
    bottom: 8mm;
  }

  body.printing-finance-document .finance-approved-signbox img {
    width: 50mm;
    height: 17mm;
  }
}

@media (max-width: 1200px) {
  .finance-kpi-grid,
  .finance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finance-sales {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  html body[data-view="finance"] .view {
    padding: 14px !important;
  }
  .finance-kpi-grid,
  .finance-grid,
  .finance-calc-grid,
  .finance-calculator-form {
    grid-template-columns: 1fr;
  }
  .finance-document-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .finance-document-row small,
  .finance-document-row em {
    grid-column: 2;
  }
}

/* 2026-06-09: Finance Desk compact sizing pass. */
html body[data-view="finance"] .view {
  padding: 14px 22px 24px !important;
}

html body[data-view="finance"] .finance-desk {
  gap: 12px;
  max-width: 1720px;
  margin: 0 auto;
}

html body[data-view="finance"] .finance-kpi-grid,
html body[data-view="finance"] .finance-grid {
  gap: 11px;
}

html body[data-view="finance"] .finance-action-grid {
  gap: 9px;
}

html body[data-view="finance"] .finance-action {
  min-height: 64px;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 9px 10px;
  column-gap: 8px;
}

html body[data-view="finance"] .finance-action > span {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

html body[data-view="finance"] .finance-action svg {
  width: 17px;
  height: 17px;
}

html body[data-view="finance"] .finance-action b {
  font-size: 12px;
}

html body[data-view="finance"] .finance-action small {
  font-size: 10px;
}

html body[data-view="finance"] .finance-kpi {
  min-height: 66px;
  gap: 11px;
  padding: 10px 13px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

html body[data-view="finance"] .finance-kpi > span {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

html body[data-view="finance"] .finance-kpi svg {
  width: 20px;
  height: 20px;
}

html body[data-view="finance"] .finance-kpi small {
  font-size: 12px;
  line-height: 1.15;
}

html body[data-view="finance"] .finance-kpi strong {
  margin: 1px 0;
  font-size: clamp(20px, 1.35vw, 24px);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html body[data-view="finance"] .finance-kpi em {
  font-size: 11px;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html body[data-view="finance"] .finance-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
}

html body[data-view="finance"] .finance-card {
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045);
}

html body[data-view="finance"] .finance-card-head {
  min-height: 46px;
  padding: 10px 14px;
}

html body[data-view="finance"] .finance-card-head h2 {
  font-size: 19px;
}

html body[data-view="finance"] .finance-card-head .button,
html body[data-view="finance"] .finance-card-head .ghost-button {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12px;
}

html body[data-view="finance"] .finance-document-form,
html body[data-view="finance"] .finance-letter-form,
html body[data-view="finance"] .finance-followup-form,
html body[data-view="finance"] .finance-sales-form {
  padding: 12px 16px;
}

html body[data-view="finance"] .finance-document-form .form-grid,
html body[data-view="finance"] .finance-letter-form .form-grid,
html body[data-view="finance"] .finance-followup-form .form-grid,
html body[data-view="finance"] .finance-sales-form .form-grid {
  gap: 10px 12px;
}

html body[data-view="finance"] .finance-document-form label,
html body[data-view="finance"] .finance-letter-form label,
html body[data-view="finance"] .finance-followup-form label,
html body[data-view="finance"] .finance-sales-form label,
html body[data-view="finance"] .finance-calculator-form label {
  font-size: 13px;
  gap: 5px;
}

html body[data-view="finance"] .finance-document-form input,
html body[data-view="finance"] .finance-document-form select,
html body[data-view="finance"] .finance-letter-form input,
html body[data-view="finance"] .finance-letter-form select,
html body[data-view="finance"] .finance-followup-form input,
html body[data-view="finance"] .finance-followup-form select,
html body[data-view="finance"] .finance-sales-form input,
html body[data-view="finance"] .finance-sales-form select,
html body[data-view="finance"] .finance-calculator-form select {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}

html body[data-view="finance"] .finance-document-form textarea,
html body[data-view="finance"] .finance-letter-form textarea,
html body[data-view="finance"] .finance-followup-form textarea,
html body[data-view="finance"] .finance-sales-form textarea {
  min-height: 118px;
  padding: 10px;
  font-size: 14px;
  line-height: 1.4;
}

html body[data-view="finance"] .finance-paste-help {
  font-size: 12px;
}

html body[data-view="finance"] .finance-paste-empty {
  padding: 9px 10px;
  font-size: 12px;
}

html body[data-view="finance"] .finance-pasted-image {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  padding: 8px;
}

html body[data-view="finance"] .finance-pasted-image img {
  width: 58px;
  height: 42px;
}

html body[data-view="finance"] .finance-document-row {
  grid-template-columns: 36px minmax(220px, 1fr) minmax(170px, .78fr) auto;
  gap: 9px;
  padding: 9px 14px;
}

html body[data-view="finance"] .finance-letter-row,
html body[data-view="finance"] .finance-followup-row,
html body[data-view="finance"] .finance-purchase-row,
html body[data-view="finance"] .finance-notification {
  grid-template-columns: 36px minmax(220px, 1fr) minmax(170px, .78fr) auto;
  gap: 9px;
  padding: 9px 14px;
}

html body[data-view="finance"] .finance-document-row > span,
html body[data-view="finance"] .finance-letter-row > span,
html body[data-view="finance"] .finance-followup-row > span,
html body[data-view="finance"] .finance-purchase-row > span,
html body[data-view="finance"] .finance-notification > span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

html body[data-view="finance"] .finance-document-row svg,
html body[data-view="finance"] .finance-letter-row svg,
html body[data-view="finance"] .finance-followup-row svg,
html body[data-view="finance"] .finance-purchase-row svg,
html body[data-view="finance"] .finance-notification svg {
  width: 18px;
  height: 18px;
}

html body[data-view="finance"] .finance-document-row b,
html body[data-view="finance"] .finance-letter-row b,
html body[data-view="finance"] .finance-followup-row b,
html body[data-view="finance"] .finance-purchase-row b,
html body[data-view="finance"] .finance-notification b,
html body[data-view="finance"] .finance-sales-list b {
  font-size: 14px;
}

html body[data-view="finance"] .finance-document-row small,
html body[data-view="finance"] .finance-document-row em,
html body[data-view="finance"] .finance-letter-row small,
html body[data-view="finance"] .finance-letter-row em,
html body[data-view="finance"] .finance-followup-row small,
html body[data-view="finance"] .finance-followup-row em,
html body[data-view="finance"] .finance-purchase-row small,
html body[data-view="finance"] .finance-purchase-row em,
html body[data-view="finance"] .finance-notification small,
html body[data-view="finance"] .finance-notification em,
html body[data-view="finance"] .finance-sales-list span {
  font-size: 12px;
}

html body[data-view="finance"] .finance-calculator-form {
  padding: 11px 14px 0;
  gap: 8px;
}

html body[data-view="finance"] .finance-calc-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 11px 14px;
  gap: 8px;
}

html body[data-view="finance"] .finance-calc-grid article {
  padding: 9px;
}

html body[data-view="finance"] .finance-calc-grid small {
  font-size: 11px;
  line-height: 1.2;
}

html body[data-view="finance"] .finance-calc-grid strong {
  font-size: 16px;
  line-height: 1.15;
}

html body[data-view="finance"] .finance-law-note {
  padding: 0 14px 12px;
  font-size: 11px;
  line-height: 1.35;
}

html body[data-view="finance"] .finance-sales-list article {
  padding: 10px 14px;
}

html body[data-view="finance"] .finance-sales-list p {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.35;
}

html body[data-view="finance"] .empty.card {
  padding: 12px 14px;
  font-size: 13px;
}

@media (max-width: 1500px) {
  html body[data-view="finance"] .finance-calc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  html body[data-view="finance"] .finance-action-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  html body[data-view="finance"] .finance-kpi-grid,
  html body[data-view="finance"] .finance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body[data-view="finance"] .finance-sales {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  html body[data-view="finance"] .view {
    padding: 12px !important;
  }

  html body[data-view="finance"] .finance-kpi-grid,
  html body[data-view="finance"] .finance-grid,
  html body[data-view="finance"] .finance-action-grid,
  html body[data-view="finance"] .finance-calc-grid,
  html body[data-view="finance"] .finance-calculator-form {
    grid-template-columns: 1fr;
  }
}

/* 2026-06-10: Finance Desk workflow dashboard */
html body[data-view="finance"] .view {
  overflow-x: hidden !important;
}

html body[data-view="finance"] .finance-v2,
html body[data-view="finance"] .finance-v2 *,
html body[data-view="finance"] .finance-v2-card,
html body[data-view="finance"] .finance-v2-grid {
  min-width: 0;
}

html body[data-view="finance"] .finance-v2 {
  max-width: 1700px;
  gap: 16px;
}

.finance-v2-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.finance-v2-metric {
  min-height: 112px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  color: #020b22;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .045);
}

.finance-v2-metric > span,
.finance-v2-row > span,
.finance-v2-alert > span,
.finance-v2-shortcut > span,
.finance-v2-upload > span,
.finance-v2-settlement > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff1f2;
  color: #e11d48;
}

.finance-v2-metric > span {
  width: 62px;
  height: 62px;
  border-radius: 14px;
}

.finance-v2-metric svg,
.finance-v2-row svg,
.finance-v2-alert svg,
.finance-v2-shortcut svg,
.finance-v2-upload svg,
.finance-v2-settlement svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.finance-v2-metric b,
.finance-v2-metric small {
  display: block;
  color: #64748b;
  font-weight: 800;
}

.finance-v2-metric b {
  color: #1f2937;
  font-size: 18px;
  line-height: 1.15;
}

.finance-v2-metric strong {
  display: block;
  margin: 8px 0 4px;
  color: #020b22;
  font-size: 34px;
  line-height: .9;
}

.finance-v2-metric small {
  font-size: 14px;
}

.finance-v2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .92fr);
  gap: 18px 22px;
  align-items: start;
}

.finance-v2-grid.limited {
  grid-template-columns: 1fr;
}

.finance-v2-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .045);
}

.finance-v2-head {
  min-height: 58px;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finance-v2-head h2 {
  margin: 0;
  color: #020b22;
  font-size: 22px;
  line-height: 1.1;
}

.finance-v2-head button {
  border: 0;
  background: transparent;
  color: #e11d48;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
}

.finance-v2-tools {
  display: grid;
}

.finance-v2-settlement {
  margin: 18px 24px 0;
  min-height: 122px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 22px 28px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 22px;
  color: #020b22;
  text-align: left;
  cursor: pointer;
}

.finance-v2-settlement > span {
  width: 78px;
  height: 78px;
  border-radius: 14px;
}

.finance-v2-settlement b {
  display: block;
  font-size: 22px;
  line-height: 1.15;
}

.finance-v2-settlement small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-weight: 800;
  line-height: 1.35;
}

.finance-v2-settlement em,
.finance-v2-row em,
.finance-v2-alert em,
.finance-v2-shortcut em {
  color: #64748b;
  font-style: normal;
}

.finance-v2 .finance-calculator-form {
  padding: 16px 24px 0;
}

.finance-v2 .finance-calc-grid {
  padding: 16px 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-v2 .finance-law-note {
  padding: 0 24px 18px;
}

.finance-v2-list,
.finance-v2-alert-list {
  display: grid;
  padding: 0 24px;
}

.finance-v2-row,
.finance-v2-alert {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #020b22;
  display: grid;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.finance-v2-row {
  grid-template-columns: 44px minmax(0, 1fr) auto 18px;
  gap: 14px;
  padding: 13px 0;
}

.finance-v2-alert {
  grid-template-columns: 34px minmax(0, .72fr) minmax(0, 1fr) auto 18px;
  gap: 12px;
  padding: 13px 0;
}

.finance-v2-row > span,
.finance-v2-alert > span {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.finance-v2-row svg,
.finance-v2-alert svg {
  width: 19px;
  height: 19px;
}

.finance-v2-row b,
.finance-v2-alert b {
  display: block;
  color: #020b22;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finance-v2-row small,
.finance-v2-alert small,
.finance-v2-row time,
.finance-v2-alert time {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.finance-v2-alert small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finance-v2-signing-body {
  padding: 18px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
}

.finance-v2-upload {
  min-height: 140px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #020b22;
  text-align: center;
  cursor: pointer;
}

.finance-v2-upload.readonly {
  cursor: default;
}

.finance-v2-upload > span {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #fff1f2;
}

.finance-v2-upload b,
.finance-v2-upload small {
  display: block;
}

.finance-v2-upload small {
  max-width: 420px;
  color: #64748b;
  font-weight: 800;
  line-height: 1.35;
}

.finance-v2-sign-actions {
  display: grid;
  gap: 10px;
}

.finance-v2-sign-actions button {
  min-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.finance-v2-sign-actions svg {
  width: 18px;
  height: 18px;
  color: #e11d48;
}

.finance-v2 .finance-document-list,
.finance-v2 .finance-letter-list {
  padding: 0 24px 12px;
}

.finance-v2 .finance-document-row,
.finance-v2 .finance-letter-row {
  padding: 12px 0;
}

.finance-v2-empty {
  margin: 16px 24px;
  border: 1px dashed #d7e3f0;
  border-radius: 8px;
  padding: 22px;
  color: #64748b;
  font-weight: 800;
  text-align: center;
}

.finance-v2-shortcuts {
  grid-column: 1 / -1;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  box-shadow: 0 16px 36px rgba(15, 23, 42, .045);
  overflow: hidden;
}

.finance-v2-shortcut {
  min-height: 88px;
  border: 0;
  border-right: 1px solid #e2e8f0;
  background: #fff;
  color: #020b22;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  text-align: left;
  cursor: pointer;
}

.finance-v2-shortcut:last-child {
  border-right: 0;
}

.finance-v2-shortcut > span {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.finance-v2-shortcut svg {
  width: 24px;
  height: 24px;
}

.finance-v2-shortcut b,
.finance-v2-shortcut small {
  display: block;
}

.finance-v2-shortcut b {
  font-size: 16px;
  line-height: 1.15;
}

.finance-v2-shortcut small {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.finance-v2-metric:hover,
.finance-v2-settlement:hover,
.finance-v2-row:hover,
.finance-v2-alert:hover,
.finance-v2-shortcut:hover,
.finance-v2-sign-actions button:hover,
.finance-v2-upload:not(.readonly):hover {
  border-color: #fecdd3;
  box-shadow: 0 14px 30px rgba(225, 29, 72, .08);
}

@media (max-width: 1400px) {
  .finance-v2-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-v2-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .finance-v2-metrics,
  .finance-v2-shortcuts {
    grid-template-columns: 1fr;
  }

  .finance-v2-signing-body {
    grid-template-columns: 1fr;
  }

  .finance-v2-alert {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .finance-v2-alert small {
    grid-column: 2 / -1;
  }

  .finance-v2-alert time {
    grid-column: 2;
  }

  .finance-v2-alert em {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 620px) {
  .finance-v2-metric,
  .finance-v2-settlement,
  .finance-v2-shortcut {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 16px;
  }

  .finance-v2-metric > span,
  .finance-v2-shortcut > span {
    width: 44px;
    height: 44px;
  }

  .finance-v2-settlement > span {
    width: 48px;
    height: 48px;
  }

  .finance-v2-settlement em,
  .finance-v2-shortcut em {
    display: none;
  }

  .finance-v2 .finance-calc-grid,
  .finance-v2 .finance-calculator-form {
    grid-template-columns: 1fr;
  }
}

/* 2026-06-10: Finance Desk single-screen density pass */
html body[data-view="finance"] .finance-v2 {
  max-width: 1580px;
  gap: 12px;
}

html body[data-view="finance"] .finance-v2-metrics {
  gap: 14px;
}

html body[data-view="finance"] .finance-v2-metric {
  min-height: 82px;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 20px;
}

html body[data-view="finance"] .finance-v2-metric > span {
  width: 54px;
  height: 54px;
  border-radius: 12px;
}

html body[data-view="finance"] .finance-v2-metric svg {
  width: 26px;
  height: 26px;
}

html body[data-view="finance"] .finance-v2-metric b {
  font-size: 15px;
}

html body[data-view="finance"] .finance-v2-metric strong {
  margin: 5px 0 2px;
  font-size: 28px;
}

html body[data-view="finance"] .finance-v2-metric small {
  font-size: 12px;
}

html body[data-view="finance"] .finance-v2-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  gap: 14px;
}

html body[data-view="finance"] .finance-v2-head {
  min-height: 46px;
  padding: 11px 18px;
}

html body[data-view="finance"] .finance-v2-head h2 {
  font-size: 18px;
}

html body[data-view="finance"] .finance-v2-head button {
  font-size: 12px;
}

html body[data-view="finance"] .finance-v2-settlement {
  margin: 14px 18px 18px;
  min-height: 128px;
  grid-template-columns: 78px minmax(0, 1fr) 22px;
  gap: 18px;
  padding: 18px 22px;
}

html body[data-view="finance"] .finance-v2-settlement > span {
  width: 70px;
  height: 70px;
}

html body[data-view="finance"] .finance-v2-settlement svg {
  width: 34px;
  height: 34px;
}

html body[data-view="finance"] .finance-v2-settlement b {
  font-size: 19px;
}

html body[data-view="finance"] .finance-v2-settlement small {
  margin-top: 6px;
  font-size: 12px;
}

html body[data-view="finance"] .finance-v2-list,
html body[data-view="finance"] .finance-v2-alert-list {
  padding: 0 18px;
  max-height: 174px;
  overflow-y: auto;
}

html body[data-view="finance"] .finance-v2-row {
  grid-template-columns: 36px minmax(0, 1fr) auto 16px;
  gap: 10px;
  padding: 10px 0;
}

html body[data-view="finance"] .finance-v2-alert {
  grid-template-columns: 30px minmax(0, .72fr) minmax(0, 1fr) auto 16px;
  gap: 9px;
  padding: 10px 0;
}

html body[data-view="finance"] .finance-v2-row > span,
html body[data-view="finance"] .finance-v2-alert > span {
  width: 30px;
  height: 30px;
}

html body[data-view="finance"] .finance-v2-row svg,
html body[data-view="finance"] .finance-v2-alert svg {
  width: 16px;
  height: 16px;
}

html body[data-view="finance"] .finance-v2-row b,
html body[data-view="finance"] .finance-v2-alert b {
  font-size: 13px;
}

html body[data-view="finance"] .finance-v2-row small,
html body[data-view="finance"] .finance-v2-alert small,
html body[data-view="finance"] .finance-v2-row time,
html body[data-view="finance"] .finance-v2-alert time {
  font-size: 11px;
}

html body[data-view="finance"] .finance-v2-empty {
  margin: 14px 18px;
  padding: 22px 14px;
  font-size: 13px;
}

html body[data-view="finance"] .finance-v2-signing-body {
  padding: 14px 18px;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 12px;
}

html body[data-view="finance"] .finance-v2-upload {
  min-height: 128px;
}

html body[data-view="finance"] .finance-v2-upload > span {
  width: 44px;
  height: 44px;
}

html body[data-view="finance"] .finance-v2-upload svg {
  width: 24px;
  height: 24px;
}

html body[data-view="finance"] .finance-v2-upload b {
  font-size: 14px;
}

html body[data-view="finance"] .finance-v2-upload small {
  font-size: 11px;
}

html body[data-view="finance"] .finance-v2-sign-actions button {
  min-height: 34px;
  font-size: 12px;
}

html body[data-view="finance"] .finance-v2 .finance-document-list,
html body[data-view="finance"] .finance-v2 .finance-letter-list {
  max-height: 112px;
  overflow-y: auto;
  padding: 0 18px 8px;
}

html body[data-view="finance"] .finance-v2 .finance-document-row,
html body[data-view="finance"] .finance-v2 .finance-letter-row {
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 8px 0;
}

html body[data-view="finance"] .finance-v2 .finance-document-row > span,
html body[data-view="finance"] .finance-v2 .finance-letter-row > span {
  width: 30px;
  height: 30px;
}

html body[data-view="finance"] .finance-v2 .finance-document-row b,
html body[data-view="finance"] .finance-v2 .finance-letter-row b {
  font-size: 13px;
}

html body[data-view="finance"] .finance-v2 .finance-document-row small,
html body[data-view="finance"] .finance-v2 .finance-document-row em,
html body[data-view="finance"] .finance-v2 .finance-letter-row small,
html body[data-view="finance"] .finance-v2 .finance-letter-row em {
  font-size: 11px;
}

html body[data-view="finance"] .finance-v2-shortcuts {
  min-height: 72px;
}

html body[data-view="finance"] .finance-v2-shortcut {
  min-height: 72px;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  gap: 12px;
  padding: 12px 22px;
}

html body[data-view="finance"] .finance-v2-shortcut > span {
  width: 42px;
  height: 42px;
}

html body[data-view="finance"] .finance-v2-shortcut svg {
  width: 22px;
  height: 22px;
}

html body[data-view="finance"] .finance-v2-shortcut b {
  font-size: 14px;
}

html body[data-view="finance"] .finance-v2-shortcut small {
  margin-top: 3px;
  font-size: 11px;
}

html body[data-view="finance"] .finance-calculator-modal .finance-calculator-form {
  padding: 0 0 14px;
}

html body[data-view="finance"] .finance-calculator-modal .finance-calc-grid {
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html body[data-view="finance"] .finance-calculator-modal .finance-law-note {
  padding: 14px 0 0;
}

@media (max-width: 1400px) {
  html body[data-view="finance"] .finance-v2-grid {
    grid-template-columns: 1fr;
  }
}

/* 2026-06-10: Finance Desk one-screen fit pass */
html body[data-view="finance"] .view {
  padding: 10px 18px 18px !important;
}

html body[data-view="finance"] .finance-v2 {
  max-width: 1600px;
  gap: 10px;
}

html body[data-view="finance"] .finance-v2-metrics {
  gap: 12px;
}

html body[data-view="finance"] .finance-v2-metric {
  min-height: 72px;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 16px;
}

html body[data-view="finance"] .finance-v2-metric > span {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

html body[data-view="finance"] .finance-v2-metric svg {
  width: 22px;
  height: 22px;
}

html body[data-view="finance"] .finance-v2-metric b {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html body[data-view="finance"] .finance-v2-metric strong {
  margin: 3px 0 1px;
  font-size: 24px;
}

html body[data-view="finance"] .finance-v2-metric small {
  font-size: 11px;
  white-space: nowrap;
}

html body[data-view="finance"] .finance-v2-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 12px;
}

html body[data-view="finance"] .finance-v2-card {
  box-shadow: 0 12px 28px rgba(15, 23, 42, .04);
}

html body[data-view="finance"] .finance-v2-head {
  min-height: 38px;
  padding: 8px 14px;
}

html body[data-view="finance"] .finance-v2-head h2 {
  font-size: 16px;
}

html body[data-view="finance"] .finance-v2-head button {
  font-size: 11px;
}

html body[data-view="finance"] .finance-v2-settlement {
  margin: 10px 14px 14px;
  min-height: 90px;
  grid-template-columns: 52px minmax(0, 1fr) 18px;
  gap: 12px;
  padding: 12px 14px;
}

html body[data-view="finance"] .finance-v2-settlement > span {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

html body[data-view="finance"] .finance-v2-settlement svg {
  width: 24px;
  height: 24px;
}

html body[data-view="finance"] .finance-v2-settlement b {
  font-size: 16px;
}

html body[data-view="finance"] .finance-v2-settlement small {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.25;
}

html body[data-view="finance"] .finance-v2-list,
html body[data-view="finance"] .finance-v2-alert-list {
  max-height: none;
  overflow: hidden;
  padding: 0 14px;
}

html body[data-view="finance"] .finance-v2-row {
  grid-template-columns: 28px minmax(0, 1fr) auto 14px;
  gap: 8px;
  padding: 7px 0;
}

html body[data-view="finance"] .finance-v2-alert {
  grid-template-columns: 26px minmax(0, .58fr) minmax(0, 1fr) auto 14px;
  gap: 8px;
  padding: 7px 0;
}

html body[data-view="finance"] .finance-v2-row > span,
html body[data-view="finance"] .finance-v2-alert > span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

html body[data-view="finance"] .finance-v2-row svg,
html body[data-view="finance"] .finance-v2-alert svg {
  width: 13px;
  height: 13px;
}

html body[data-view="finance"] .finance-v2-row b,
html body[data-view="finance"] .finance-v2-alert b {
  font-size: 12px;
}

html body[data-view="finance"] .finance-v2-row small,
html body[data-view="finance"] .finance-v2-alert small,
html body[data-view="finance"] .finance-v2-row time,
html body[data-view="finance"] .finance-v2-alert time {
  font-size: 10px;
}

html body[data-view="finance"] .finance-v2-empty {
  margin: 10px 14px;
  padding: 16px 10px;
  font-size: 12px;
}

html body[data-view="finance"] .finance-v2-signing-body {
  padding: 10px 14px;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
}

html body[data-view="finance"] .finance-v2-upload {
  min-height: 86px;
  gap: 5px;
}

html body[data-view="finance"] .finance-v2-upload > span {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

html body[data-view="finance"] .finance-v2-upload svg {
  width: 19px;
  height: 19px;
}

html body[data-view="finance"] .finance-v2-upload b {
  font-size: 12px;
}

html body[data-view="finance"] .finance-v2-upload small {
  font-size: 10px;
  line-height: 1.2;
}

html body[data-view="finance"] .finance-v2-sign-actions {
  gap: 8px;
}

html body[data-view="finance"] .finance-v2-sign-actions button {
  min-height: 30px;
  font-size: 11px;
}

html body[data-view="finance"] .finance-v2 .finance-document-list,
html body[data-view="finance"] .finance-v2 .finance-letter-list {
  max-height: none;
  overflow: hidden;
  padding: 0 14px 7px;
}

html body[data-view="finance"] .finance-v2 .finance-document-row,
html body[data-view="finance"] .finance-v2 .finance-letter-row {
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  gap: 7px;
  padding: 6px 0;
}

html body[data-view="finance"] .finance-v2 .finance-document-row > span,
html body[data-view="finance"] .finance-v2 .finance-letter-row > span {
  width: 24px;
  height: 24px;
}

html body[data-view="finance"] .finance-v2 .finance-document-row b,
html body[data-view="finance"] .finance-v2 .finance-letter-row b {
  font-size: 12px;
}

html body[data-view="finance"] .finance-v2 .finance-document-row small,
html body[data-view="finance"] .finance-v2 .finance-document-row em,
html body[data-view="finance"] .finance-v2 .finance-letter-row small,
html body[data-view="finance"] .finance-v2 .finance-letter-row em {
  font-size: 10px;
}

html body[data-view="finance"] .finance-v2-shortcuts {
  min-height: 54px;
}

html body[data-view="finance"] .finance-v2-shortcut {
  min-height: 54px;
  grid-template-columns: 34px minmax(0, 1fr) 14px;
  gap: 9px;
  padding: 9px 14px;
}

html body[data-view="finance"] .finance-v2-shortcut > span {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

html body[data-view="finance"] .finance-v2-shortcut svg {
  width: 16px;
  height: 16px;
}

html body[data-view="finance"] .finance-v2-shortcut b {
  font-size: 12px;
}

html body[data-view="finance"] .finance-v2-shortcut small {
  margin-top: 1px;
  font-size: 9px;
}

@media (max-width: 1400px) {
  html body[data-view="finance"] .finance-v2-grid {
    grid-template-columns: 1fr;
  }
}

/* Approval table action column: keep decisions readable and non-overlapping. */
html body[data-view="approvals"] .approval-table {
  table-layout: fixed !important;
  min-width: 1180px !important;
}

html body[data-view="approvals"] .approval-table th:nth-child(1),
html body[data-view="approvals"] .approval-table td:nth-child(1) { width: 8% !important; }
html body[data-view="approvals"] .approval-table th:nth-child(2),
html body[data-view="approvals"] .approval-table td:nth-child(2) { width: 9% !important; }
html body[data-view="approvals"] .approval-table th:nth-child(3),
html body[data-view="approvals"] .approval-table td:nth-child(3) { width: 15% !important; }
html body[data-view="approvals"] .approval-table th:nth-child(4),
html body[data-view="approvals"] .approval-table td:nth-child(4) { width: 18% !important; }
html body[data-view="approvals"] .approval-table th:nth-child(5),
html body[data-view="approvals"] .approval-table td:nth-child(5) { width: 17% !important; }
html body[data-view="approvals"] .approval-table th:nth-child(6),
html body[data-view="approvals"] .approval-table td:nth-child(6) { width: 14% !important; }
html body[data-view="approvals"] .approval-table th:nth-child(7),
html body[data-view="approvals"] .approval-table td:nth-child(7) {
  width: 19% !important;
  min-width: 245px !important;
  max-width: none !important;
  overflow: visible !important;
}

html body[data-view="approvals"] .approval-decision-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 7px !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

html body[data-view="approvals"] .approval-decision-actions.waiting {
  flex-wrap: nowrap !important;
}

html body[data-view="approvals"] .approval-decision-actions .button,
html body[data-view="approvals"] .approval-decision-actions .ghost-button,
html body[data-view="approvals"] .approval-decision-actions .danger-button {
  height: 34px !important;
  min-width: 64px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
}

html body[data-view="approvals"] .approval-decision-actions .status {
  height: 34px !important;
  max-width: 170px !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Dashboard card click affordance. */
html body[data-view="commandCenter"] .compact-dash-card[data-card-action] {
  cursor: pointer !important;
}

html body[data-view="commandCenter"] .compact-dash-card[data-card-action]:hover {
  border-color: #cbdced !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .065) !important;
}

html body[data-view="commandCenter"] .compact-dash-card[data-card-action] button {
  cursor: pointer !important;
}

/* 2026-06-09: Operations dashboard reference layout pass.
   Matches the compact card rhythm, spacing, and typography of the approved model. */
html body[data-view="commandCenter"] {
  --dash-border: #dfe9f5;
  --dash-ink: #071631;
  --dash-muted: #66758a;
  --dash-soft-shadow: 0 14px 34px rgba(15, 23, 42, .045);
}

html body[data-view="commandCenter"] .main,
html body[data-view="commandCenter"] .view {
  background: #f5f9fe !important;
}

html body[data-view="commandCenter"] .compact-dashboard {
  max-width: 1160px !important;
  width: calc(100% - 40px) !important;
  margin: 0 auto !important;
  padding: 18px 0 28px !important;
  display: grid !important;
  gap: 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  margin: 0 0 10px !important;
  min-height: 38px !important;
}

html body[data-view="commandCenter"] .compact-dash-header h1 {
  margin: 0 !important;
  color: var(--dash-ink) !important;
  font-size: 24px !important;
  font-weight: 850 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

html body[data-view="commandCenter"] .compact-dash-header p {
  margin: 4px 0 0 !important;
  color: #536982 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

html body[data-view="commandCenter"] .compact-dash-header > span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 6px !important;
  color: #536982 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

html body[data-view="commandCenter"] .compact-dash-header > span svg {
  width: 16px !important;
  height: 16px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi {
  min-height: 112px !important;
  height: 112px !important;
  padding: 20px 22px !important;
  display: grid !important;
  grid-template-columns: 66px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
  background: #fff !important;
  border: 1px solid var(--dash-border) !important;
  border-radius: 8px !important;
  box-shadow: var(--dash-soft-shadow) !important;
  overflow: hidden !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon {
  width: 66px !important;
  height: 66px !important;
  min-width: 66px !important;
  border-radius: 50% !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon svg {
  width: 29px !important;
  height: 29px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy {
  display: grid !important;
  grid-template-areas:
    "label"
    "value"
    "note" !important;
  justify-items: start !important;
  align-content: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  text-align: left !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy small {
  grid-area: label !important;
  color: #405169 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
  grid-area: value !important;
  color: var(--dash-ink) !important;
  font-size: 34px !important;
  font-weight: 850 !important;
  line-height: .95 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.red .compact-dash-kpi-copy b {
  color: #e71327 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
  color: #16a34a !important;
  font-size: 26px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy em {
  grid-area: note !important;
  color: var(--dash-muted) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html body[data-view="commandCenter"] .compact-dash-grid {
  display: grid !important;
  grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr) !important;
  gap: 14px !important;
  align-items: start !important;
}

html body[data-view="commandCenter"] .compact-dash-card {
  background: #fff !important;
  border: 1px solid var(--dash-border) !important;
  border-radius: 8px !important;
  box-shadow: var(--dash-soft-shadow) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

html body[data-view="commandCenter"] .compact-dash-card-head {
  min-height: 56px !important;
  padding: 0 24px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 1px solid #e7eef6 !important;
}

html body[data-view="commandCenter"] .compact-dash-card-head h2 {
  margin: 0 !important;
  color: var(--dash-ink) !important;
  font-size: 20px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

html body[data-view="commandCenter"] .compact-dash-card-head button {
  color: #0969e8 !important;
  font-size: 15px !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.attendance {
  padding: 24px 24px 16px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.attendance .compact-dash-card-head {
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 0 24px !important;
  border-bottom: 0 !important;
}

html body[data-view="commandCenter"] .compact-attendance-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row button {
  min-height: 104px !important;
  padding: 16px !important;
  border: 0 !important;
  border-radius: 8px !important;
  display: grid !important;
  place-items: center !important;
  gap: 12px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row span {
  font-size: 16px !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .compact-attendance-row b {
  font-size: 34px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

html body[data-view="commandCenter"] .compact-attendance-quick {
  height: 44px !important;
  margin-top: 20px !important;
  border: 1px solid var(--dash-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #0b70f0 !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-attendance-quick svg {
  width: 19px !important;
  height: 19px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-list,
html body[data-view="commandCenter"] .compact-dash-card.recent .compact-recent-list {
  padding: 0 24px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert {
  min-height: 88px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 10px minmax(0, 1fr) 22px !important;
  align-items: center !important;
  gap: 26px !important;
  border: 0 !important;
  border-bottom: 1px solid #e7eef6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body[data-view="commandCenter"] .compact-dash-alert i {
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
}

html body[data-view="commandCenter"] .compact-dash-alert b {
  display: block !important;
  margin: 0 0 6px !important;
  color: var(--dash-ink) !important;
  font-size: 18px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert small {
  display: block !important;
  color: var(--dash-ink) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert small b,
html body[data-view="commandCenter"] .compact-dash-alert small strong {
  display: inline !important;
  margin: 0 !important;
  font-size: inherit !important;
  font-weight: 800 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert em {
  color: #617287 !important;
  font-size: 34px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.actions {
  padding: 24px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.actions .compact-dash-card-head {
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 0 20px !important;
  border-bottom: 0 !important;
}

html body[data-view="commandCenter"] .compact-actions-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px 18px !important;
}

html body[data-view="commandCenter"] .compact-dash-action {
  min-height: 70px !important;
  padding: 0 18px !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  border: 1px solid var(--dash-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body[data-view="commandCenter"] .compact-dash-action span,
html body[data-view="commandCenter"] .compact-recent-row span {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-action svg,
html body[data-view="commandCenter"] .compact-recent-row svg {
  width: 19px !important;
  height: 19px !important;
}

html body[data-view="commandCenter"] .compact-dash-action b {
  color: var(--dash-ink) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html body[data-view="commandCenter"] .compact-recent-row {
  min-height: 64px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 16px !important;
  border: 0 !important;
  border-bottom: 1px solid #e7eef6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body[data-view="commandCenter"] .compact-recent-row b {
  color: var(--dash-ink) !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  min-width: 0 !important;
  white-space: normal !important;
}

html body[data-view="commandCenter"] .compact-recent-row em {
  color: #66758a !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

@media (max-width: 1180px) {
  html body[data-view="commandCenter"] .compact-dashboard {
    width: calc(100% - 24px) !important;
  }

  html body[data-view="commandCenter"] .compact-dash-kpi {
    padding: 16px !important;
    grid-template-columns: 56px minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  html body[data-view="commandCenter"] .compact-dash-kpi-icon {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
  }

  html body[data-view="commandCenter"] .compact-dash-kpi-copy small {
    font-size: 13px !important;
  }

  html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
    font-size: 28px !important;
  }

  html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
    font-size: 23px !important;
  }
}

@media (max-width: 900px) {
  html body[data-view="commandCenter"] .compact-dash-kpis,
  html body[data-view="commandCenter"] .compact-dash-grid {
    grid-template-columns: 1fr !important;
  }

  html body[data-view="commandCenter"] .compact-actions-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* FINAL CRM compact override: keep same CRM layout, reduce size and visual noise. */
html body[data-view="crm"] .view {
  padding-top: 0 !important;
}

html body[data-view="crm"] .crm-ref-dashboard.crm-control-center {
  padding: 18px 22px 22px !important;
  gap: 10px !important;
  max-width: none !important;
}

html body[data-view="crm"] .crm-control-head {
  display: none !important;
}

html body[data-view="crm"] .crm-control-kpis,
html body[data-view="crm"] .crm-ref-kpis {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 !important;
}

html body[data-view="crm"] .crm-ref-kpi {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 84px !important;
  height: 84px !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  border: 1px solid #dce8f5 !important;
  background: #ffffff !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .045) !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-ref-kpi-top,
html body[data-view="crm"] .crm-ref-kpi-menu,
html body[data-view="crm"] .crm-ref-kpi-watermark,
html body[data-view="crm"] .crm-ref-kpi em {
  display: none !important;
}

html body[data-view="crm"] .crm-ref-kpi-icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-ref-kpi-icon svg {
  width: 20px !important;
  height: 20px !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy small {
  font-size: 12px !important;
  line-height: 1.05 !important;
  font-weight: 650 !important;
  color: #41536b !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy b {
  max-width: 100% !important;
  font-size: 23px !important;
  line-height: .95 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy strong {
  font-size: 10.5px !important;
  line-height: 1.05 !important;
  font-weight: 500 !important;
  color: #66758a !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-control-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-followups {
  border-left-width: 4px !important;
  border-radius: 8px !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-view="crm"] .crm-pro-panel-head {
  min-height: 48px !important;
  padding: 8px 14px !important;
  grid-template-columns: 32px minmax(0, 1fr) auto !important;
}

html body[data-view="crm"] .crm-pro-panel-head h2,
html body[data-view="crm"] .crm-ref-panel-head h2 {
  font-size: 17px !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
}

html body[data-view="crm"] .crm-pro-panel-head p {
  font-size: 11.5px !important;
  margin-top: 3px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button,
html body[data-view="crm"] .crm-ref-panel-head button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 8px 12px 0 !important;
}

html body[data-view="crm"] .crm-pro-follow-columns {
  min-height: 34px !important;
  padding: 0 12px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  min-height: 58px !important;
  padding: 8px 10px 8px 12px !important;
  border-width: 0 0 1px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  width: 30px !important;
  height: 30px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b {
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small,
html body[data-view="crm"] .crm-pro-follow-quote {
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-status,
html body[data-view="crm"] .crm-pro-follow-open {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 9px !important;
  font-size: 10.5px !important;
  border-radius: 9px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  min-height: 34px !important;
  margin: 8px 12px 12px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
}

html body[data-view="crm"] .crm-ref-latest,
html body[data-view="crm"] .crm-delivery-panel {
  border-radius: 8px !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-view="crm"] .crm-ref-panel-head:not(.crm-pro-panel-head) {
  min-height: 44px !important;
  padding: 10px 14px !important;
}

html body[data-view="crm"] .crm-ref-table th,
html body[data-view="crm"] .crm-ref-table td {
  height: 34px !important;
  padding: 7px 10px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-ref-table th {
  font-size: 10.5px !important;
}

/* CRM New button final compact toolbar size. */
html body[data-view="crm"] #globalHeaderNewMenu .crm-new-button,
html body[data-view="crm"] .topbar .crm-new-button,
html body[data-view="crm"] .crm-new-button {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 88px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 16px !important;
  border-radius: 13px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  box-shadow: 0 8px 18px rgba(220, 20, 35, .16) !important;
}

html body[data-view="crm"] .crm-new-button::after {
  content: "" !important;
  width: 7px !important;
  height: 7px !important;
  border-right: 2px solid currentColor !important;
  border-bottom: 2px solid currentColor !important;
  transform: translateY(-2px) rotate(45deg) !important;
}

/* Dashboard final fit: remove duplicate inner title and use a compact reference layout. */
html body[data-view="commandCenter"] .topbar {
  display: grid !important;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 520px) auto !important;
  align-items: center !important;
  gap: 22px !important;
  min-height: 74px !important;
  height: 74px !important;
  padding: 12px 24px !important;
  background: #f8fbff !important;
  border-bottom: 1px solid #dce7f3 !important;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .04) !important;
}

html body[data-view="commandCenter"] .topbar > .mobile-only {
  display: none !important;
}

html body[data-view="commandCenter"] .topbar > div:first-of-type {
  display: block !important;
  min-width: 0 !important;
}

html body[data-view="commandCenter"] .topbar #pageEyebrow {
  display: block !important;
  margin: 0 0 2px !important;
  color: #536982 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

html body[data-view="commandCenter"] .topbar #pageTitle {
  display: block !important;
  margin: 0 !important;
  color: #071631 !important;
  font-size: 27px !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

html body[data-view="commandCenter"] .topbar-command {
  width: 100% !important;
  max-width: 520px !important;
  justify-self: center !important;
}

html body[data-view="commandCenter"] .global-header-search {
  height: 48px !important;
  min-height: 48px !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  border: 1px solid #d7e4f2 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04) !important;
}

html body[data-view="commandCenter"] .global-header-search input {
  font-size: 15px !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .topbar-actions {
  justify-self: end !important;
  gap: 8px !important;
  padding: 4px 6px !important;
  border-radius: 24px !important;
  background: #ffffff !important;
  border: 1px solid #d7e4f2 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04) !important;
}

html body[data-view="commandCenter"] .topbar-actions #logoutButton,
html body[data-view="commandCenter"] .topbar-actions #installAppButton,
html body[data-view="commandCenter"] .topbar-actions #todayLabel,
html body[data-view="commandCenter"] .topbar-actions #cloudStatusLabel,
html body[data-view="commandCenter"] .topbar-actions #syncLatestButton {
  display: none !important;
}

html body[data-view="commandCenter"] .main,
html body[data-view="commandCenter"] .view {
  padding-top: 0 !important;
}

html body[data-view="commandCenter"] .compact-dashboard {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 26px 26px 34px !important;
  gap: 14px !important;
}

html body[data-view="commandCenter"] .compact-dash-header {
  display: none !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi {
  min-height: 118px !important;
  height: 118px !important;
  padding: 18px 24px !important;
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 16px !important;
  border-radius: 8px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  border-radius: 50% !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon svg {
  width: 26px !important;
  height: 26px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy {
  display: grid !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 4px !important;
  min-width: 0 !important;
  text-align: left !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy small {
  font-size: 17px !important;
  line-height: 1.15 !important;
  color: #41536b !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
  font-size: 34px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
  font-size: 31px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy em {
  font-size: 14px !important;
  line-height: 1.15 !important;
  color: #66758a !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .compact-dash-grid {
  display: grid !important;
  grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr) !important;
  gap: 14px !important;
}

html body[data-view="commandCenter"] .compact-dash-card {
  border-radius: 8px !important;
  padding: 18px !important;
  min-height: 0 !important;
}

html body[data-view="commandCenter"] .compact-dash-card-head h2 {
  font-size: 22px !important;
  line-height: 1.1 !important;
}

html body[data-view="commandCenter"] .compact-attendance-row {
  gap: 14px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row button {
  min-height: 104px !important;
  padding: 16px !important;
  border-radius: 8px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row span {
  font-size: 18px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row b {
  font-size: 38px !important;
}

html body[data-view="commandCenter"] .compact-attendance-quick {
  height: 48px !important;
  margin-top: 14px !important;
  border-radius: 8px !important;
  font-size: 17px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert {
  min-height: 72px !important;
  padding: 12px 16px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span b,
html body[data-view="commandCenter"] .compact-dash-alert span small {
  font-size: 18px !important;
  line-height: 1.25 !important;
}

html body[data-view="commandCenter"] .compact-actions-row {
  gap: 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-action {
  min-height: 66px !important;
  padding: 12px 14px !important;
  border-radius: 8px !important;
}

html body[data-view="commandCenter"] .compact-dash-action b,
html body[data-view="commandCenter"] .compact-recent-row b {
  font-size: 16px !important;
}

html body[data-view="commandCenter"] .compact-recent-row {
  min-height: 58px !important;
  padding: 10px 14px !important;
}

/* Dashboard size correction: compact everything to match the smaller reference. */
html body[data-view="commandCenter"] .topbar {
  min-height: 58px !important;
  height: 58px !important;
  padding: 8px 18px !important;
  gap: 18px !important;
  grid-template-columns: minmax(230px, .9fr) minmax(320px, 480px) auto !important;
}

html body[data-view="commandCenter"] .topbar #pageEyebrow {
  font-size: 12px !important;
  margin-bottom: 1px !important;
}

html body[data-view="commandCenter"] .topbar #pageTitle {
  font-size: 22px !important;
  line-height: 1 !important;
}

html body[data-view="commandCenter"] .global-header-search {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 13px !important;
}

html body[data-view="commandCenter"] .global-header-search input {
  font-size: 13px !important;
}

html body[data-view="commandCenter"] .topbar-actions {
  transform: scale(.88) !important;
  transform-origin: right center !important;
}

html body[data-view="commandCenter"] .compact-dashboard {
  padding: 18px 22px 24px !important;
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis {
  gap: 9px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi {
  min-height: 88px !important;
  height: 88px !important;
  padding: 12px 18px !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  gap: 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon svg {
  width: 20px !important;
  height: 20px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy {
  gap: 2px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy small {
  font-size: 14px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
  font-size: 25px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
  font-size: 24px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy em {
  font-size: 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-grid {
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-card {
  padding: 14px !important;
  border-radius: 8px !important;
}

html body[data-view="commandCenter"] .compact-dash-card-head {
  margin-bottom: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-card-head h2 {
  font-size: 18px !important;
}

html body[data-view="commandCenter"] .compact-dash-card-head button {
  font-size: 14px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row {
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row button {
  min-height: 76px !important;
  padding: 10px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row span {
  font-size: 14px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row b {
  font-size: 28px !important;
}

html body[data-view="commandCenter"] .compact-attendance-quick {
  height: 38px !important;
  margin-top: 10px !important;
  font-size: 14px !important;
  gap: 8px !important;
}

html body[data-view="commandCenter"] .compact-attendance-quick svg {
  width: 18px !important;
  height: 18px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert {
  min-height: 54px !important;
  padding: 9px 12px !important;
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert i {
  width: 7px !important;
  height: 7px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span b,
html body[data-view="commandCenter"] .compact-dash-alert span small {
  font-size: 14px !important;
  line-height: 1.18 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert em {
  font-size: 24px !important;
}

html body[data-view="commandCenter"] .compact-actions-row {
  gap: 9px !important;
}

html body[data-view="commandCenter"] .compact-dash-action {
  min-height: 50px !important;
  padding: 8px 10px !important;
  gap: 9px !important;
}

html body[data-view="commandCenter"] .compact-dash-action span,
html body[data-view="commandCenter"] .compact-recent-row span {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
}

html body[data-view="commandCenter"] .compact-dash-action svg,
html body[data-view="commandCenter"] .compact-recent-row svg {
  width: 16px !important;
  height: 16px !important;
}

html body[data-view="commandCenter"] .compact-dash-action b,
html body[data-view="commandCenter"] .compact-recent-row b {
  font-size: 13px !important;
}

html body[data-view="commandCenter"] .compact-recent-row {
  min-height: 46px !important;
  padding: 8px 10px !important;
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-recent-row em {
  font-size: 12px !important;
}

/* Recent Activity reference style. */
html body[data-view="commandCenter"] .compact-dash-card.recent {
  padding: 0 !important;
  overflow: hidden !important;
}

html body[data-view="commandCenter"] .compact-dash-card.recent .compact-dash-card-head {
  min-height: 54px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-bottom: 1px solid #e6edf5 !important;
  display: flex !important;
  align-items: center !important;
}

html body[data-view="commandCenter"] .compact-dash-card.recent .compact-dash-card-head h2 {
  font-size: 18px !important;
  font-weight: 850 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.recent .compact-dash-card-head button {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #0b6ff2 !important;
}

html body[data-view="commandCenter"] .compact-recent-list {
  padding: 0 18px !important;
  gap: 0 !important;
}

html body[data-view="commandCenter"] .compact-recent-row {
  min-height: 62px !important;
  padding: 10px 0 !important;
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  border: 0 !important;
  border-bottom: 1px solid #e8eef6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body[data-view="commandCenter"] .compact-recent-row:last-child {
  border-bottom: 0 !important;
}

html body[data-view="commandCenter"] .compact-recent-row > span {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 9px !important;
  display: grid !important;
  place-items: center !important;
}

html body[data-view="commandCenter"] .compact-recent-row.blue > span {
  background: #eef5ff !important;
  color: #2563eb !important;
}

html body[data-view="commandCenter"] .compact-recent-row.green > span {
  background: #eafaf0 !important;
  color: #16a34a !important;
}

html body[data-view="commandCenter"] .compact-recent-row.orange > span {
  background: #fff4e6 !important;
  color: #f59e0b !important;
}

html body[data-view="commandCenter"] .compact-recent-row svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
}

html body[data-view="commandCenter"] .compact-recent-row b {
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="commandCenter"] .compact-recent-row em {
  color: #66758a !important;
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

/* Dashboard top section exactly like the compact reference. */
html body[data-view="commandCenter"] .compact-dashboard {
  padding: 16px 20px 24px !important;
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  min-height: 44px !important;
}

html body[data-view="commandCenter"] .compact-dash-header h1 {
  margin: 0 !important;
  color: #071631 !important;
  font-size: 22px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

html body[data-view="commandCenter"] .compact-dash-header p {
  margin: 4px 0 0 !important;
  color: #536982 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

html body[data-view="commandCenter"] .compact-dash-header > span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 6px !important;
  color: #536982 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

html body[data-view="commandCenter"] .compact-dash-header > span svg {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2.1 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis {
  gap: 8px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi {
  height: 92px !important;
  min-height: 92px !important;
  padding: 14px 18px !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  gap: 14px !important;
  border-radius: 8px !important;
  align-items: center !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon svg {
  width: 25px !important;
  height: 25px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy small {
  font-size: 14px !important;
  font-weight: 650 !important;
  color: #41536b !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
  font-size: 30px !important;
  font-weight: 850 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
  font-size: 24px !important;
  color: #16a34a !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy em {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #66758a !important;
}

/* Remove duplicate dashboard title block per final request. */
html body[data-view="commandCenter"] .compact-dash-header {
  display: none !important;
}

html body[data-view="commandCenter"] .compact-dashboard {
  padding-top: 18px !important;
}

/* Smaller dashboard KPI cards. */
html body[data-view="commandCenter"] .compact-dash-kpis {
  gap: 8px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi {
  height: 70px !important;
  min-height: 70px !important;
  padding: 10px 14px !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  gap: 11px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon svg {
  width: 19px !important;
  height: 19px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy {
  gap: 1px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy small {
  font-size: 12px !important;
  line-height: 1.05 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
  font-size: 23px !important;
  line-height: .95 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
  font-size: 20px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy em {
  font-size: 10.5px !important;
  line-height: 1.05 !important;
}

/* KPI final reference sizing: compact, clean, and balanced like the sample. */
html body[data-view="commandCenter"] .compact-dash-kpis {
  gap: 8px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi {
  height: 104px !important;
  min-height: 104px !important;
  padding: 14px 22px !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon svg {
  width: 26px !important;
  height: 26px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy {
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 7px !important;
  min-width: 0 !important;
  text-align: left !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy small {
  font-size: 15px !important;
  line-height: 1.05 !important;
  font-weight: 650 !important;
  color: #41536b !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
  font-size: 31px !important;
  line-height: .9 !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
  font-size: 25px !important;
  line-height: .95 !important;
  color: #16a34a !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy em {
  font-size: 12px !important;
  line-height: 1.05 !important;
  font-weight: 500 !important;
  color: #66758a !important;
}

/* Alerts & Expiry reference style. */
html body[data-view="commandCenter"] .compact-dash-card.alerts {
  padding: 0 !important;
  overflow: hidden !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-card-head {
  min-height: 54px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-bottom: 1px solid #e6edf5 !important;
  display: flex !important;
  align-items: center !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-card-head h2 {
  font-size: 18px !important;
  line-height: 1.1 !important;
  font-weight: 850 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-card-head button {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #0b6ff2 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-list {
  padding: 0 18px !important;
  gap: 0 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert {
  min-height: 78px !important;
  padding: 12px 0 !important;
  display: grid !important;
  grid-template-columns: 8px minmax(0, 1fr) 18px !important;
  align-items: center !important;
  gap: 24px !important;
  border: 0 !important;
  border-bottom: 1px solid #e8eef6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body[data-view="commandCenter"] .compact-dash-alert:last-child {
  border-bottom: 0 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert i {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  align-self: center !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
  text-align: left !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span b {
  color: #071631 !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span small {
  color: #111827 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span small strong {
  font-weight: 850 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert em {
  color: #64748b !important;
  font-size: 30px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}

/* Quick Actions: use the available card space with balanced button sizing. */
html body[data-view="commandCenter"] .compact-dash-card.actions {
  min-height: 226px !important;
  padding: 18px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.actions .compact-dash-card-head {
  margin-bottom: 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.actions .compact-dash-card-head h2 {
  font-size: 19px !important;
  font-weight: 850 !important;
}

html body[data-view="commandCenter"] .compact-actions-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-content: stretch !important;
}

html body[data-view="commandCenter"] .compact-dash-action {
  min-height: 64px !important;
  height: 64px !important;
  padding: 12px 18px !important;
  gap: 14px !important;
  border-radius: 8px !important;
  justify-content: flex-start !important;
}

html body[data-view="commandCenter"] .compact-dash-action span {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  border-radius: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-action svg {
  width: 20px !important;
  height: 20px !important;
}

html body[data-view="commandCenter"] .compact-dash-action b {
  font-size: 15px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Quick action labels must show fully. */
html body[data-view="commandCenter"] .compact-dash-action {
  gap: 10px !important;
  padding: 10px 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-action span {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
}

html body[data-view="commandCenter"] .compact-dash-action svg {
  width: 17px !important;
  height: 17px !important;
}

html body[data-view="commandCenter"] .compact-dash-action b {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
  text-overflow: clip !important;
}

/* Final dashboard polish: calmer typography, tighter rhythm, and complete labels. */
html body[data-view="commandCenter"] .topbar {
  min-height: 58px !important;
  height: 58px !important;
  padding: 8px 18px !important;
}

html body[data-view="commandCenter"] .topbar #pageEyebrow {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #5c6f86 !important;
}

html body[data-view="commandCenter"] .topbar #pageTitle {
  font-size: 21px !important;
  font-weight: 850 !important;
}

html body[data-view="commandCenter"] .compact-dashboard {
  padding: 18px 22px 22px !important;
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis,
html body[data-view="commandCenter"] .compact-dash-grid {
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi {
  height: 94px !important;
  min-height: 94px !important;
  padding: 13px 18px !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 14px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon svg {
  width: 23px !important;
  height: 23px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy {
  gap: 5px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy small {
  font-size: 13px !important;
  font-weight: 650 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
  font-size: 28px !important;
  font-weight: 800 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
  font-size: 23px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy em {
  font-size: 11.5px !important;
  font-weight: 500 !important;
}

html body[data-view="commandCenter"] .compact-dash-card {
  border-radius: 8px !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .045) !important;
}

html body[data-view="commandCenter"] .compact-dash-card-head h2 {
  font-size: 18px !important;
  font-weight: 800 !important;
}

html body[data-view="commandCenter"] .compact-dash-card-head button {
  font-size: 14px !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.attendance {
  padding: 16px !important;
  min-height: 188px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row {
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row button {
  min-height: 70px !important;
  padding: 10px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row span {
  font-size: 14px !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .compact-attendance-row b {
  font-size: 27px !important;
  font-weight: 800 !important;
}

html body[data-view="commandCenter"] .compact-attendance-quick {
  height: 38px !important;
  margin-top: 10px !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts,
html body[data-view="commandCenter"] .compact-dash-card.recent {
  min-height: 188px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-card-head,
html body[data-view="commandCenter"] .compact-dash-card.recent .compact-dash-card-head {
  min-height: 48px !important;
  padding: 0 16px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-list,
html body[data-view="commandCenter"] .compact-recent-list {
  padding: 0 16px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert {
  min-height: 65px !important;
  padding: 10px 0 !important;
  gap: 18px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span b {
  font-size: 15px !important;
  font-weight: 800 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span small {
  font-size: 14px !important;
  font-weight: 500 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.actions {
  min-height: 188px !important;
  padding: 16px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.actions .compact-dash-card-head {
  margin-bottom: 10px !important;
}

html body[data-view="commandCenter"] .compact-actions-row {
  gap: 10px !important;
}

html body[data-view="commandCenter"] .compact-dash-action {
  height: 54px !important;
  min-height: 54px !important;
  padding: 9px 10px !important;
  gap: 9px !important;
}

html body[data-view="commandCenter"] .compact-dash-action span {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
}

html body[data-view="commandCenter"] .compact-dash-action svg {
  width: 16px !important;
  height: 16px !important;
}

html body[data-view="commandCenter"] .compact-dash-action b {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-size: 12.2px !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .compact-recent-row {
  min-height: 54px !important;
  padding: 8px 0 !important;
}

html body[data-view="commandCenter"] .compact-recent-row b {
  font-size: 13.5px !important;
  font-weight: 600 !important;
}

html body[data-view="commandCenter"] .compact-recent-row em {
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

/* KPI match pass: same style as reference, scaled for ERP width. */
html body[data-view="commandCenter"] .compact-dash-kpi {
  height: 84px !important;
  min-height: 84px !important;
  padding: 12px 18px !important;
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-icon svg {
  width: 23px !important;
  height: 23px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy {
  gap: 5px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy small {
  font-size: 12.5px !important;
  font-weight: 650 !important;
  color: #41536b !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
  font-size: 27px !important;
  font-weight: 800 !important;
  line-height: .9 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
  font-size: 22px !important;
  color: #16a34a !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy em {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #66758a !important;
}

/* KPI vertical alignment fix: prevent bottom text from touching the card edge. */
html body[data-view="commandCenter"] .compact-dash-kpi {
  height: 90px !important;
  min-height: 90px !important;
  padding: 12px 18px 14px !important;
  align-items: center !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy {
  gap: 4px !important;
  align-content: center !important;
  transform: translateY(-1px) !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy b {
  font-size: 26px !important;
  line-height: .95 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi.green .compact-dash-kpi-copy b {
  font-size: 21px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpi-copy em {
  line-height: 1.2 !important;
  margin-top: 0 !important;
}

/* Alerts & Expiry size correction to match requested compact card. */
html body[data-view="commandCenter"] .compact-dash-card.alerts {
  min-height: 166px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-card-head {
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 14px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-card-head h2 {
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-card-head button {
  font-size: 13px !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .compact-dash-card.alerts .compact-dash-list {
  padding: 0 14px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert {
  min-height: 62px !important;
  padding: 9px 0 !important;
  grid-template-columns: 7px minmax(0, 1fr) 14px !important;
  gap: 22px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert i {
  width: 7px !important;
  height: 7px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span {
  gap: 5px !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span b {
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert span small {
  font-size: 13px !important;
  font-weight: 500 !important;
}

html body[data-view="commandCenter"] .compact-dash-alert em {
  font-size: 24px !important;
  color: #64748b !important;
}

/* KPI final size lock: match the smaller requested reference. */
html body[data-view="commandCenter"] .compact-dash-kpis .compact-dash-kpi {
  height: 78px !important;
  min-height: 78px !important;
  padding: 10px 16px !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis .compact-dash-kpi-icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis .compact-dash-kpi-icon svg {
  width: 20px !important;
  height: 20px !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis .compact-dash-kpi-copy {
  gap: 4px !important;
  align-content: center !important;
  transform: none !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis .compact-dash-kpi-copy small {
  font-size: 11.5px !important;
  line-height: 1.05 !important;
  font-weight: 650 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis .compact-dash-kpi-copy b {
  font-size: 23px !important;
  line-height: .9 !important;
  font-weight: 800 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis .compact-dash-kpi.green .compact-dash-kpi-copy b {
  font-size: 19px !important;
  line-height: .95 !important;
}

html body[data-view="commandCenter"] .compact-dash-kpis .compact-dash-kpi-copy em {
  font-size: 10px !important;
  line-height: 1.05 !important;
  font-weight: 500 !important;
}

/* Attendance card size match to requested reference. */
html body[data-view="commandCenter"] .compact-dash-card.attendance {
  min-height: 166px !important;
  padding: 14px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.attendance .compact-dash-card-head {
  margin-bottom: 12px !important;
}

html body[data-view="commandCenter"] .compact-dash-card.attendance .compact-dash-card-head h2 {
  font-size: 15px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

html body[data-view="commandCenter"] .compact-attendance-row {
  gap: 14px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row button {
  min-height: 72px !important;
  height: 72px !important;
  padding: 10px !important;
  border-radius: 8px !important;
}

html body[data-view="commandCenter"] .compact-attendance-row span {
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
}

html body[data-view="commandCenter"] .compact-attendance-row b {
  font-size: 26px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

html body[data-view="commandCenter"] .compact-attendance-quick {
  height: 34px !important;
  min-height: 34px !important;
  margin-top: 10px !important;
  border-radius: 7px !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  gap: 8px !important;
}

html body[data-view="commandCenter"] .compact-attendance-quick svg {
  width: 16px !important;
  height: 16px !important;
}

/* CRM dashboard professional polish: compact, calmer, and less visually heavy. */
html body[data-view="crm"] .topbar {
  min-height: 58px !important;
  height: 58px !important;
  padding: 8px 18px !important;
}

html body[data-view="crm"] .topbar #pageEyebrow {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #5c6f86 !important;
}

html body[data-view="crm"] .topbar #pageTitle {
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
}

html body[data-view="crm"] .topbar-command {
  max-width: 520px !important;
}

html body[data-view="crm"] .global-header-search {
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 14px !important;
}

html body[data-view="crm"] #globalHeaderNewMenu .crm-new-button,
html body[data-view="crm"] .crm-new-button {
  height: 42px !important;
  min-height: 42px !important;
  min-width: 104px !important;
  padding: 0 18px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: 0 12px 22px rgba(220, 20, 35, .18) !important;
}

html body[data-view="crm"] .crm-ref-dashboard.crm-control-center {
  padding: 16px 22px 22px !important;
  gap: 12px !important;
}

html body[data-view="crm"] .crm-control-head {
  display: none !important;
}

html body[data-view="crm"] .crm-control-kpis {
  gap: 10px !important;
  margin: 0 !important;
}

html body[data-view="crm"] .crm-ref-kpi {
  min-height: 86px !important;
  height: 86px !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  border: 1px solid #dce8f5 !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .045) !important;
}

html body[data-view="crm"] .crm-ref-kpi-top,
html body[data-view="crm"] .crm-ref-kpi-menu,
html body[data-view="crm"] .crm-ref-kpi-watermark {
  display: none !important;
}

html body[data-view="crm"] .crm-ref-kpi-icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-ref-kpi-icon svg {
  width: 20px !important;
  height: 20px !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy {
  gap: 4px !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy small {
  font-size: 12px !important;
  font-weight: 650 !important;
  color: #41536b !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy b {
  max-width: 100% !important;
  font-size: 24px !important;
  line-height: .95 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy strong {
  font-size: 10.5px !important;
  line-height: 1.05 !important;
  font-weight: 500 !important;
  color: #66758a !important;
}

html body[data-view="crm"] .crm-ref-kpi em {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  box-shadow: none !important;
}

html body[data-view="crm"] .crm-control-grid {
  gap: 10px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-followups,
html body[data-view="crm"] .crm-control-grid .crm-ref-latest,
html body[data-view="crm"] .crm-control-grid .crm-delivery-panel {
  border-radius: 8px !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-followups {
  border-left-width: 4px !important;
}

html body[data-view="crm"] .crm-pro-panel-head {
  min-height: 48px !important;
  padding: 8px 14px !important;
  grid-template-columns: 32px minmax(0, 1fr) auto !important;
}

html body[data-view="crm"] .crm-pro-panel-icon,
html body[data-view="crm"] .crm-pro-panel-head > span {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-pro-panel-head h2,
html body[data-view="crm"] .crm-ref-panel-head h2 {
  font-size: 17px !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

html body[data-view="crm"] .crm-pro-panel-head p {
  margin-top: 3px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #64748b !important;
}

html body[data-view="crm"] .crm-pro-panel-head button,
html body[data-view="crm"] .crm-ref-panel-head button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 8px 12px 0 !important;
}

html body[data-view="crm"] .crm-pro-follow-columns {
  min-height: 34px !important;
  padding: 0 12px !important;
  font-size: 10.5px !important;
  border-radius: 8px 8px 0 0 !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-ref-follow-list {
  gap: 0 !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  min-height: 58px !important;
  padding: 8px 10px 8px 12px !important;
  border-radius: 0 !important;
  border-width: 0 0 1px !important;
  border-color: #e6edf5 !important;
  box-shadow: none !important;
}

html body[data-view="crm"] .crm-pro-follow-row::before {
  width: 3px !important;
  border-radius: 0 !important;
}

html body[data-view="crm"] .crm-pro-follow-customer {
  grid-template-columns: 30px minmax(0, 1fr) !important;
  gap: 0 9px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  width: 30px !important;
  height: 30px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b {
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small,
html body[data-view="crm"] .crm-pro-follow-quote {
  font-size: 10.5px !important;
  font-weight: 600 !important;
}

html body[data-view="crm"] .crm-pro-follow-quote {
  margin-left: 39px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount b {
  font-size: 12px !important;
  font-weight: 800 !important;
}

html body[data-view="crm"] .crm-pro-follow-status,
html body[data-view="crm"] .crm-pro-follow-open {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 9px !important;
  border-radius: 9px !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  min-height: 34px !important;
  margin: 8px 12px 12px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span {
  width: 28px !important;
  height: 28px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary p,
html body[data-view="crm"] .crm-pro-follow-summary small {
  font-size: 11px !important;
  font-weight: 650 !important;
}

html body[data-view="crm"] .crm-ref-panel-head:not(.crm-pro-panel-head) {
  min-height: 44px !important;
  padding: 10px 14px !important;
}

html body[data-view="crm"] .crm-ref-table th,
html body[data-view="crm"] .crm-ref-table td {
  height: 34px !important;
  padding: 7px 10px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-ref-table th {
  font-size: 10.5px !important;
  font-weight: 800 !important;
}

/* Header user model: bell | avatar + Admin + chevron. */
html body .topbar-actions,
html body[data-view] .topbar-actions,
html body[data-view="crm"] .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions {
  gap: 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .topbar-actions .notification-center {
  height: 34px !important;
  padding-right: 12px !important;
  border-right: 1px solid #d8e1eb !important;
}

html body .topbar-actions .notification-toggle {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  background: transparent !important;
  border-radius: 8px !important;
}

html body .topbar-actions .notification-bell,
html body .topbar-actions .notification-bell svg {
  width: 19px !important;
  height: 19px !important;
}

html body .topbar-actions .notification-toggle strong {
  top: -2px !important;
  right: -2px !important;
  min-width: 16px !important;
  height: 16px !important;
  font-size: 9px !important;
  border-width: 2px !important;
}

html body .topbar-actions #currentUserLabel,
html body[data-view] .topbar-actions #currentUserLabel,
html body[data-view="crm"] .topbar-actions #currentUserLabel {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 0 0 42px !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body .topbar-actions #currentUserLabel::before {
  left: 0 !important;
  top: 1px !important;
  width: 32px !important;
  height: 32px !important;
  font-size: 14px !important;
}

html body .topbar-actions #currentUserLabel::after {
  content: none !important;
  display: none !important;
}

html body .topbar-actions #installAppButton,
html body .topbar-actions #logoutButton,
html body[data-view] .topbar-actions #installAppButton,
html body[data-view] .topbar-actions #logoutButton {
  display: none !important;
}

html body .sidebar-install-button {
  width: calc(100% - 16px) !important;
  min-height: 32px !important;
  height: 32px !important;
  margin: 8px 8px 0 !important;
  padding: 0 9px !important;
  border: 1px solid rgba(128, 174, 230, .28) !important;
  border-radius: 9px !important;
  background: rgba(15, 55, 101, .72) !important;
  color: #eaf4ff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 11.5px !important;
  font-weight: 850 !important;
}

html body .sidebar-install-button.hidden {
  display: none !important;
}

html body .sidebar-install-button svg {
  width: 15px !important;
  height: 15px !important;
  stroke: currentColor !important;
  stroke-width: 2.4 !important;
  fill: none !important;
}

html body .sidebar-install-button:hover {
  background: rgba(25, 82, 148, .82) !important;
  border-color: rgba(135, 190, 255, .5) !important;
}

html body .sidebar #installAppButton.sidebar-install-button {
  display: inline-flex !important;
}

/* Notification dropdown model. */
html body .notification-panel {
  width: 320px !important;
  max-width: min(320px, calc(100vw - 24px)) !important;
  padding: 0 !important;
  border: 1px solid #e1e8f1 !important;
  border-radius: 0 0 6px 6px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 44px rgba(11, 30, 58, .16) !important;
  overflow: hidden !important;
}

html body .notification-model-header {
  height: 44px !important;
  padding: 0 14px !important;
  border-bottom: 1px solid #e4ebf3 !important;
  background: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

html body .notification-model-header strong {
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #071631 !important;
}

html body .notification-settings {
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #071631 !important;
  display: grid !important;
  place-items: center !important;
}

html body .notification-settings svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  fill: none !important;
}

html body .notification-model-item {
  width: 100% !important;
  min-height: 66px !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid #e8edf4 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  display: grid !important;
  grid-template-columns: 10px minmax(0, 1fr) 14px !important;
  align-items: center !important;
  column-gap: 8px !important;
  text-align: left !important;
}

html body .notification-model-item:hover {
  background: #f7fbff !important;
}

html body .notification-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  align-self: start !important;
  margin-top: 6px !important;
}

html body .notification-model-item.red .notification-dot { background: #ff101f !important; }
html body .notification-model-item.orange .notification-dot { background: #ff7a00 !important; }
html body .notification-model-item.yellow .notification-dot { background: #ffba19 !important; }
html body .notification-model-item.green .notification-dot { background: #0fbd5e !important; }

html body .notification-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

html body .notification-row-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

html body .notification-row-head strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #071631 !important;
}

html body .notification-row-head em {
  flex: 0 0 auto !important;
  font-style: normal !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #6b7a90 !important;
}

html body .notification-message {
  font-size: 12px !important;
  font-weight: 650 !important;
  color: #16243a !important;
}

html body .notification-message b {
  font-weight: 950 !important;
}

html body .notification-model-item.red .notification-message b { color: #ff101f !important; }
html body .notification-model-item.orange .notification-message b { color: #ff7a00 !important; }
html body .notification-model-item.yellow .notification-message b { color: #ffba19 !important; }
html body .notification-model-item.green .notification-message b { color: #0fbd5e !important; }

html body .notification-copy small {
  font-size: 11px !important;
  font-weight: 650 !important;
  color: #6a7484 !important;
}

html body .notification-chevron {
  color: #6d7d90 !important;
  font-size: 24px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
}

html body .notification-footer {
  width: 100% !important;
  height: 40px !important;
  padding: 0 14px !important;
  border: 0 !important;
  background: #ffffff !important;
  color: #1373ea !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12.5px !important;
  font-weight: 850 !important;
}

html body .notification-footer b {
  font-size: 22px !important;
  line-height: 1 !important;
}

html body .notification-all-list {
  display: grid !important;
  border: 1px solid #e4ebf3 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

html body .modal[data-mode="notifications"] .modal-panel {
  width: min(560px, calc(100vw - 32px)) !important;
  max-width: 560px !important;
  min-height: 0 !important;
  max-height: calc(100vh - 72px) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

html body .modal[data-mode="notifications"] .modal-header {
  padding: 14px 18px !important;
  min-height: 64px !important;
}

html body .modal[data-mode="notifications"] .modal-header .eyebrow {
  font-size: 10px !important;
  margin: 0 0 3px !important;
}

html body .modal[data-mode="notifications"] .modal-header h2 {
  font-size: 22px !important;
  line-height: 1.1 !important;
}

html body .modal[data-mode="notifications"] .modal-body {
  padding: 14px 18px 18px !important;
  max-height: calc(100vh - 160px) !important;
  overflow: auto !important;
}

html body .modal[data-mode="notifications"] .notification-model-item {
  min-height: 62px !important;
  padding: 9px 12px !important;
}

/* Compact professional operations dashboard. Revert by mapping commandCenter back to renderFreshOperationsDashboard. */
html body .compact-dashboard {
  display: grid !important;
  gap: 14px !important;
  padding: 12px 18px 18px !important;
  max-width: 1380px !important;
  margin: 0 auto !important;
}

html body .compact-dash-header {
  display: flex !important;
  align-items: end !important;
  justify-content: space-between !important;
  gap: 18px !important;
  min-height: 38px !important;
}

html body .compact-dash-header h1 {
  margin: 0 !important;
  color: #06152c !important;
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

html body .compact-dash-header p,
html body .compact-dash-header span {
  margin: 5px 0 0 !important;
  color: #53667f !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

html body .compact-dash-kpis {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

html body .compact-dash-kpi {
  min-height: 72px !important;
  padding: 12px 14px !important;
  border: 1px solid #dce7f3 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  grid-template-areas: "icon label" "icon value" "icon note" !important;
  align-items: center !important;
  column-gap: 12px !important;
  text-align: left !important;
  box-shadow: 0 10px 24px rgba(15, 38, 70, .06) !important;
}

html body .compact-dash-kpi > .compact-dash-kpi-icon {
  grid-area: icon !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
  display: grid !important;
  place-items: center !important;
  background: #eef5ff !important;
  color: #2563eb !important;
}

html body .compact-dash-kpi.orange > .compact-dash-kpi-icon { background: #fff4e7 !important; color: #f97316 !important; }
html body .compact-dash-kpi.red > .compact-dash-kpi-icon { background: #fff0f3 !important; color: #e11d2e !important; }
html body .compact-dash-kpi.green > .compact-dash-kpi-icon { background: #eafaf1 !important; color: #10b981 !important; }
html body .compact-dash-kpi.blue > .compact-dash-kpi-icon { background: #eef5ff !important; color: #2563eb !important; }
html body .compact-dash-kpi svg {
  width: 20px !important;
  height: 20px !important;
}

html body .compact-dashboard svg,
html body .compact-dashboard svg path,
html body .compact-dashboard svg rect,
html body .compact-dashboard svg circle {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.3 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body .compact-dash-kpi small {
  grid-area: label !important;
  color: #40536d !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  text-transform: uppercase !important;
}

html body .compact-dash-kpi b {
  grid-area: value !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #06152c !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

html body .compact-dash-kpi em {
  grid-area: note !important;
  color: #53667f !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 650 !important;
}

html body .compact-dash-grid {
  display: grid !important;
  grid-template-columns: minmax(300px, 4fr) minmax(0, 8fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

html body .compact-dash-card {
  min-height: 0 !important;
  padding: 14px !important;
  border: 1px solid #dce7f3 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(15, 38, 70, .05) !important;
}

html body .compact-dash-card-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

html body .compact-dash-card-head h2 {
  margin: 0 !important;
  color: #06152c !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

html body .compact-dash-card-head button {
  border: 0 !important;
  background: transparent !important;
  color: #0b3d91 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

html body .compact-attendance-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
}

html body .compact-attendance-row button {
  min-height: 74px !important;
  border: 1px solid #e2eaf4 !important;
  border-radius: 8px !important;
  background: #f8fbff !important;
  display: grid !important;
  place-items: center !important;
  gap: 4px !important;
}

html body .compact-attendance-row b {
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

html body .compact-attendance-row span {
  font-size: 12px !important;
  font-weight: 850 !important;
  color: #06152c !important;
}

html body .compact-attendance-row .present { background: #edfcf5 !important; color: #10b981 !important; }
html body .compact-attendance-row .missing { background: #fff4f5 !important; color: #dc1f2a !important; }
html body .compact-attendance-row .leave { background: #f2f6ff !important; color: #2563eb !important; }

html body .compact-dash-list,
html body .compact-recent-list {
  display: grid !important;
  gap: 8px !important;
}

html body .compact-dash-alert,
html body .compact-recent-row {
  width: 100% !important;
  min-height: 52px !important;
  padding: 9px 10px !important;
  border: 1px solid #e1e9f3 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  display: grid !important;
  grid-template-columns: 10px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  text-align: left !important;
}

html body .compact-dash-alert i {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #ef1429 !important;
}

html body .compact-dash-alert.orange i { background: #f97316 !important; }
html body .compact-dash-alert.yellow i { background: #f59e0b !important; }
html body .compact-dash-alert.green i { background: #10b981 !important; }

html body .compact-dash-alert span,
html body .compact-recent-row b {
  min-width: 0 !important;
}

html body .compact-dash-alert b,
html body .compact-recent-row b {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #071631 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

html body .compact-dash-alert small {
  display: block !important;
  margin-top: 3px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #53667f !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

html body .compact-dash-alert small b {
  display: inline !important;
  color: #ef1429 !important;
  font-size: inherit !important;
}

html body .compact-dash-alert em,
html body .compact-recent-row em {
  border-radius: 8px !important;
  padding: 6px 9px !important;
  background: #fff1f3 !important;
  color: #ef1429 !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

html body .compact-actions-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

html body .compact-dash-action {
  min-height: 48px !important;
  border: 1px solid #e1e9f3 !important;
  border-radius: 8px !important;
  background: #f8fbff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  padding: 0 10px !important;
}

html body .compact-dash-action span {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  display: grid !important;
  place-items: center !important;
  background: #eef5ff !important;
  color: #2563eb !important;
}

html body .compact-dash-action:nth-child(2) span { background: #e9fff1 !important; color: #10b981 !important; }
html body .compact-dash-action:nth-child(3) span { background: #fff4e7 !important; color: #f97316 !important; }
html body .compact-dash-action:nth-child(4) span { background: #eef5ff !important; color: #2563eb !important; }
html body .compact-dash-action:nth-child(5) span { background: #f2e8ff !important; color: #7c3aed !important; }

html body .compact-dash-action svg {
  width: 16px !important;
  height: 16px !important;
}

html body .compact-dash-action b {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #071631 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-align: left !important;
}

html body .compact-recent-row {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
}

html body .compact-recent-row > span {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  display: grid !important;
  place-items: center !important;
  background: #eef5ff !important;
  color: #2563eb !important;
}

html body .compact-recent-row svg {
  width: 17px !important;
  height: 17px !important;
}

html body .compact-empty {
  padding: 16px !important;
  border: 1px dashed #d9e4f1 !important;
  border-radius: 8px !important;
  color: #53667f !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

@media (max-width: 1100px) {
  html body .compact-dash-kpis,
  html body .compact-dash-grid,
  html body .compact-actions-row {
    grid-template-columns: 1fr !important;
  }
}

/* Reference dashboard pass: closer to the supplied layout. */
html body .compact-dashboard {
  gap: 12px !important;
  padding: 14px 20px 18px !important;
  max-width: none !important;
}

html body .compact-dash-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

html body .compact-dash-kpi {
  min-height: 82px !important;
  padding: 13px 16px !important;
  border-radius: 8px !important;
  grid-template-columns: 50px minmax(0, 1fr) !important;
  grid-template-areas: "icon copy" !important;
  column-gap: 14px !important;
  align-items: center !important;
}

html body .compact-dash-kpi > .compact-dash-kpi-icon {
  grid-area: icon !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
}

html body .compact-dash-kpi > .compact-dash-kpi-copy {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  display: grid !important;
  place-items: start !important;
}

html body .compact-dash-kpi > .compact-dash-kpi-icon svg {
  width: 23px !important;
  height: 23px !important;
}

html body .compact-dash-kpi-copy {
  grid-area: copy !important;
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
}

html body .compact-dash-kpi-copy small {
  color: #4b5c74 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  text-transform: none !important;
}

html body .compact-dash-kpi-copy b {
  color: #06152c !important;
  font-size: 24px !important;
  line-height: .9 !important;
  font-weight: 950 !important;
}

html body .compact-dash-kpi.green .compact-dash-kpi-copy b {
  color: #12a852 !important;
}

html body .compact-dash-kpi.red .compact-dash-kpi-copy b {
  color: #ef1429 !important;
}

html body .compact-dash-kpi-copy em {
  color: #6d7890 !important;
  font-size: 11.5px !important;
  font-style: normal !important;
  font-weight: 650 !important;
}

html body .compact-dash-grid {
  grid-template-columns: 1fr 1.08fr !important;
  gap: 14px !important;
}

html body .compact-dash-card {
  padding: 16px 18px !important;
  border-radius: 8px !important;
}

html body .compact-dash-card-head {
  margin-bottom: 12px !important;
  padding: 0 !important;
}

html body .compact-dash-card-head h2 {
  font-size: 17px !important;
}

html body .compact-dash-card-head button {
  font-size: 13px !important;
  color: #0f6fe8 !important;
}

html body .compact-attendance-row {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
}

html body .compact-attendance-row button {
  min-height: 86px !important;
  border: 0 !important;
  border-radius: 8px !important;
  gap: 8px !important;
}

html body .compact-attendance-row span {
  font-size: 14px !important;
  font-weight: 900 !important;
}

html body .compact-attendance-row b {
  font-size: 28px !important;
}

html body .compact-attendance-quick {
  width: 100% !important;
  height: 38px !important;
  margin-top: 12px !important;
  border: 1px solid #dbe6f2 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #126ff0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

html body .compact-attendance-quick svg {
  width: 20px !important;
  height: 20px !important;
}

html body .compact-dash-card.alerts,
html body .compact-dash-card.recent {
  padding: 0 !important;
}

html body .compact-dash-card.alerts .compact-dash-card-head,
html body .compact-dash-card.recent .compact-dash-card-head {
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-bottom: 1px solid #e5edf6 !important;
}

html body .compact-dash-list,
html body .compact-recent-list {
  gap: 0 !important;
  padding: 0 18px !important;
}

html body .compact-dash-alert {
  min-height: 68px !important;
  padding: 10px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #e7edf5 !important;
  border-radius: 0 !important;
  grid-template-columns: 10px minmax(0, 1fr) 20px !important;
  gap: 14px !important;
}

html body .compact-dash-alert b {
  font-size: 15px !important;
}

html body .compact-dash-alert small {
  font-size: 14px !important;
  color: #071631 !important;
}

html body .compact-dash-alert em {
  padding: 0 !important;
  background: transparent !important;
  color: #667589 !important;
  font-size: 28px !important;
  font-weight: 300 !important;
}

html body .compact-dash-alert small b {
  color: #ef1429 !important;
  font-size: inherit !important;
}

html body .compact-actions-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

html body .compact-dash-action {
  min-height: 50px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  gap: 10px !important;
}

html body .compact-dash-action span {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
}

html body .compact-dash-action b {
  overflow: visible !important;
  text-overflow: clip !important;
  font-size: 13px !important;
}

html body .compact-recent-row {
  min-height: 58px !important;
  padding: 9px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #e7edf5 !important;
  border-radius: 0 !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  gap: 12px !important;
}

html body .compact-recent-row > span {
  width: 34px !important;
  height: 34px !important;
}

html body .compact-recent-row b {
  font-size: 13.5px !important;
  font-weight: 760 !important;
}

html body .compact-recent-row em {
  background: transparent !important;
  color: #6d7890 !important;
  font-size: 12px !important;
  padding: 0 !important;
}

/* Exact reference dashboard correction: compact, no KPI overlap, same visual rhythm. */
html body[data-view="commandCenter"] .topbar {
  display: none !important;
}

html body[data-view="commandCenter"] .main {
  padding-top: 0 !important;
}

html body .compact-dashboard {
  padding: 18px 22px 22px !important;
  gap: 14px !important;
  background: transparent !important;
}

html body .compact-dash-header {
  min-height: 46px !important;
  margin: 0 0 4px !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
}

html body .compact-dash-header h1 {
  margin: 0 !important;
  color: #06152c !important;
  font-size: 24px !important;
  line-height: 1.05 !important;
  font-weight: 850 !important;
}

html body .compact-dash-header p {
  margin: 6px 0 0 !important;
  color: #52657d !important;
  font-size: 15px !important;
  font-weight: 500 !important;
}

html body .compact-dash-header > span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 8px !important;
  color: #52657d !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

html body .compact-dash-header > span svg {
  width: 16px !important;
  height: 16px !important;
}

html body .compact-dash-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

html body .compact-dash-kpi {
  min-height: 94px !important;
  padding: 16px 18px !important;
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  grid-template-areas: "icon copy" !important;
  column-gap: 18px !important;
  align-items: center !important;
  border: 1px solid #dfe8f4 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(15, 38, 70, .05) !important;
}

html body .compact-dash-kpi .compact-dash-kpi-icon {
  grid-area: icon !important;
  width: 54px !important;
  min-width: 54px !important;
  height: 54px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
}

html body .compact-dash-kpi .compact-dash-kpi-copy {
  grid-area: copy !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-auto-rows: auto !important;
  align-content: center !important;
  gap: 7px !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: inherit !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

html body .compact-dash-kpi .compact-dash-kpi-copy small,
html body .compact-dash-kpi .compact-dash-kpi-copy b,
html body .compact-dash-kpi .compact-dash-kpi-copy em {
  grid-area: auto !important;
  position: static !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  text-align: left !important;
  white-space: nowrap !important;
}

html body .compact-dash-kpi .compact-dash-kpi-copy small {
  color: #40536d !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  text-transform: none !important;
}

html body .compact-dash-kpi .compact-dash-kpi-copy b {
  color: #06152c !important;
  font-size: 30px !important;
  line-height: .9 !important;
  font-weight: 950 !important;
}

html body .compact-dash-kpi.green .compact-dash-kpi-copy b { color: #10a34a !important; }
html body .compact-dash-kpi.red .compact-dash-kpi-copy b { color: #ef1429 !important; }

html body .compact-dash-kpi .compact-dash-kpi-copy em {
  color: #6d7890 !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 650 !important;
}

html body .compact-dash-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) !important;
  gap: 14px !important;
}

html body .compact-dash-card {
  border-radius: 8px !important;
  border-color: #dfe8f4 !important;
  box-shadow: 0 10px 24px rgba(15, 38, 70, .05) !important;
}

html body .compact-attendance-row button {
  min-height: 92px !important;
}

html body .compact-actions-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

html body .notification-center {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

html body .notification-toggle,
html body[data-view="commandCenter"] .notification-toggle,
html body[data-view="crm"] .notification-toggle {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #07142b !important;
  box-shadow: none !important;
}

html body .notification-toggle:hover,
html body .notification-center.open .notification-toggle {
  background: #f1f5f9 !important;
}

html body .notification-bell,
html body .notification-bell svg {
  width: 20px !important;
  height: 20px !important;
  color: #07142b !important;
  stroke: currentColor !important;
}

html body .notification-toggle strong,
html body[data-view="commandCenter"] .notification-toggle strong,
html body[data-view="crm"] .notification-toggle strong {
  position: absolute !important;
  top: -1px !important;
  right: -1px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  background: #e11d2e !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

html body .topbar-actions #currentUserLabel,
html body[data-view="crm"] .topbar-actions #currentUserLabel {
  min-width: 0 !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 28px 0 44px !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #07142b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

html body .topbar-actions #currentUserLabel::before {
  content: "A" !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: #07142b !important;
  color: #fff !important;
  transform: translateY(-50%) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

html body .topbar-actions #currentUserLabel::after {
  content: "" !important;
  position: absolute !important;
  right: 5px !important;
  top: 50% !important;
  width: 8px !important;
  height: 8px !important;
  border-right: 2px solid #07142b !important;
  border-bottom: 2px solid #07142b !important;
  transform: translateY(-65%) rotate(45deg) !important;
}

html body .topbar-actions #installAppButton,
html body .topbar-actions #installAppButton.hidden,
html body .topbar-actions #logoutButton {
  min-height: 36px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 14px !important;
  border: 1px solid #d7e1ee !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #07142b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

html body .topbar-actions #installAppButton:hover,
html body .topbar-actions #logoutButton:hover {
  background: #f8fafc !important;
  border-color: #c8d5e5 !important;
}

html body .topbar-actions #logoutButton {
  border-color: transparent !important;
  padding-right: 4px !important;
}

html body .topbar-actions #logoutButton::before {
  content: "" !important;
  width: 18px !important;
  height: 18px !important;
  display: inline-block !important;
  background: currentColor !important;
  clip-path: path("M3 3h8v2H5v14h6v2H3V3Zm12.6 4.4L20.2 12l-4.6 4.6-1.4-1.4 2.2-2.2H9v-2h7.4l-2.2-2.2 1.4-1.4Z") !important;
}

@media (max-width: 760px) {
  html body .topbar {
    padding: 0 10px !important;
  }

  html body .topbar-actions {
    gap: 6px !important;
  }

  html body .topbar-actions #installAppButton,
  html body .topbar-actions #installAppButton.hidden,
  html body .topbar-actions #logoutButton {
    padding: 0 10px !important;
    font-size: 12px !important;
  }
}
/* Final sidebar branding: use the AQ360 ERP image everywhere. */
html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  width: 100% !important;
  margin: 0 0 26px !important;
  padding: 4px 8px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-bottom: 1px solid rgba(198, 215, 238, .28) !important;
  overflow: visible !important;
}

html body .sidebar-brand-ref::before,
html body[data-view="crm"] .sidebar-brand-ref::before,
html body .sidebar-erp-label,
html body .sidebar-erp-label::before,
html body .sidebar-erp-label::after,
html body[data-view="crm"] .sidebar-erp-label,
html body[data-view="crm"] .sidebar-erp-label::before,
html body[data-view="crm"] .sidebar-erp-label::after {
  display: none !important;
  content: none !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark {
  display: block !important;
  width: 184px !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 74px !important;
  object-fit: contain !important;
  padding: 8px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16) !important;
}

/* Final login branding: use the AQ360 ERP image without duplicate text. */
html body #loginScreen .login-brand {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 0 22px !important;
  margin: 0 0 22px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html body #loginScreen .login-brand .brand-copy {
  display: none !important;
}

html body #loginScreen .login-brand .brand-logo,
html body #loginScreen img.brand-logo {
  display: block !important;
  width: min(520px, 92%) !important;
  height: auto !important;
  max-height: 150px !important;
  object-fit: contain !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Final compact sidebar spacing: reduce row gaps so the menu fits the viewport. */
html body .sidebar,
html body[data-view="crm"] .sidebar {
  padding: 18px 12px 14px !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  margin-bottom: 14px !important;
  padding-bottom: 14px !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark {
  width: 168px !important;
  max-height: 62px !important;
  padding: 6px !important;
}

html body .nav,
html body[data-view="crm"] .nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  margin: 0 0 10px !important;
  padding: 0 0 8px !important;
  gap: 3px !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  min-height: 22px !important;
  margin: 0 0 4px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  letter-spacing: 2px !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  gap: 12px !important;
  border-radius: 8px !important;
}

html body .nav-icon,
html body .nav-icon svg,
html body[data-view="crm"] .nav-icon,
html body[data-view="crm"] .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  font-size: 14px !important;
  line-height: 1.15 !important;
}

html body .sidebar-collapse,
html body[data-view="crm"] .sidebar-collapse {
  min-height: 40px !important;
  margin-top: 6px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
}

/* Hide the old sidebar navigation menu completely. */
html body #nav,
html body .nav,
html body .nav-section,
html body .nav-section-title,
html body .sidebar-collapse {
  display: none !important;
}

/* Remove the entire sidebar from every ERP window. */
html body .app-shell,
html body[data-view] .app-shell,
html body[data-view="dashboard"] .app-shell,
html body[data-view="commandCenter"] .app-shell,
html body[data-view="crm"] .app-shell {
  grid-template-columns: minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="dashboard"] .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar {
  display: none !important;
}

html body .main,
html body[data-view] .main {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Final AQ360 sidebar model for every ERP window. */
html body .app-shell,
html body[data-view] .app-shell,
html body[data-view="dashboard"] .app-shell,
html body[data-view="commandCenter"] .app-shell,
html body[data-view="crm"] .app-shell {
  grid-template-columns: 280px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="dashboard"] .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar {
  position: sticky !important;
  top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 280px !important;
  min-width: 280px !important;
  height: 100vh !important;
  padding: 22px 16px 14px !important;
  overflow: hidden !important;
  color: #ffffff !important;
  background:
    radial-gradient(circle at 85% 8%, rgba(37, 99, 235, .32), transparent 28%),
    linear-gradient(180deg, #08254a 0%, #061a35 42%, #03101f 100%) !important;
  border-right: 1px solid rgba(148, 190, 255, .18) !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05) !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  width: 100% !important;
  min-height: 82px !important;
  margin: 0 0 16px !important;
  padding: 0 0 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  border-bottom: 1px solid rgba(148, 190, 255, .16) !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark {
  width: 196px !important;
  max-width: 100% !important;
  height: 62px !important;
  max-height: 62px !important;
  object-fit: contain !important;
  object-position: left center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body #nav,
html body .nav,
html body[data-view="crm"] .nav {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  flex-direction: column !important;
  gap: 0 !important;
  padding: 0 0 12px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(147, 197, 253, .38) transparent !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin: 0 0 13px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid rgba(148, 190, 255, .12) !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 24px !important;
  margin: 0 0 6px !important;
  padding: 0 8px !important;
  color: #9ec8ff !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
}

html body .nav-section-title::after,
html body[data-view="crm"] .nav-section-title::after {
  content: "" !important;
  height: 1px !important;
  background: rgba(148, 190, 255, .18) !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 42px !important;
  height: 42px !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) 16px !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 11px !important;
  border: 0 !important;
  border-radius: 9px !important;
  color: rgba(255, 255, 255, .9) !important;
  background: transparent !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: background .15s ease, color .15s ease, transform .15s ease !important;
}

html body .nav button::after,
html body[data-view="crm"] .nav button::after {
  content: "›" !important;
  justify-self: end !important;
  color: rgba(209, 226, 255, .72) !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

html body .nav button:hover {
  background: rgba(37, 99, 235, .18) !important;
}

html body .nav button.active,
html body[data-view="crm"] .nav button.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0f7bff 0%, #123f9f 100%) !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .28) !important;
}

html body .nav-icon,
html body .nav-icon svg,
html body[data-view="crm"] .nav-icon,
html body[data-view="crm"] .nav-icon svg {
  width: 21px !important;
  height: 21px !important;
  min-width: 21px !important;
  stroke-width: 2.4 !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  overflow: hidden !important;
  color: inherit !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  white-space: normal !important;
  text-overflow: clip !important;
}

html body .sidebar-user-card {
  flex: 0 0 auto !important;
  min-height: 62px !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) 40px 40px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px !important;
  border: 1px solid rgba(148, 190, 255, .14) !important;
  border-radius: 12px !important;
  background: rgba(16, 46, 89, .62) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .14) !important;
}

html body .sidebar-user-avatar {
  width: 46px !important;
  height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  color: #fff !important;
  background: linear-gradient(135deg, #1e88ff, #102d73) !important;
  border: 1px solid rgba(255, 255, 255, .35) !important;
  font-size: 16px !important;
  font-weight: 950 !important;
}

html body .sidebar-user-copy {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

html body .sidebar-user-copy strong {
  overflow: hidden !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .sidebar-user-copy small {
  overflow: hidden !important;
  color: #9ec8ff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .sidebar-user-icon {
  position: relative !important;
  width: 40px !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  background: rgba(37, 99, 235, .18) !important;
  cursor: pointer !important;
}

html body .sidebar-user-icon svg {
  width: 21px !important;
  height: 21px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body .sidebar-user-icon b {
  position: absolute !important;
  top: -5px !important;
  right: -3px !important;
  min-width: 18px !important;
  height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: #ef2341 !important;
  font-size: 10px !important;
  font-weight: 950 !important;
}

html body .sidebar-collapse {
  display: none !important;
}

html body .main,
html body[data-view] .main {
  grid-column: auto !important;
  width: auto !important;
}

/* Fit the AQ360 sidebar into a single viewport height. */
html body .app-shell,
html body[data-view] .app-shell,
html body[data-view="dashboard"] .app-shell,
html body[data-view="commandCenter"] .app-shell,
html body[data-view="crm"] .app-shell {
  grid-template-columns: 260px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="dashboard"] .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar {
  width: 260px !important;
  min-width: 260px !important;
  padding: 14px 12px 10px !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  min-height: 58px !important;
  margin-bottom: 8px !important;
  padding-bottom: 10px !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark {
  width: 168px !important;
  height: 46px !important;
  max-height: 46px !important;
}

html body #nav,
html body .nav,
html body[data-view="crm"] .nav {
  padding-bottom: 6px !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  gap: 1px !important;
  margin-bottom: 6px !important;
  padding-bottom: 5px !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  min-height: 17px !important;
  margin-bottom: 2px !important;
  padding: 0 6px !important;
  font-size: 10px !important;
  letter-spacing: 2.4px !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 32px !important;
  height: 32px !important;
  grid-template-columns: 23px minmax(0, 1fr) 12px !important;
  gap: 9px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
}

html body .nav button::after,
html body[data-view="crm"] .nav button::after {
  font-size: 18px !important;
}

html body .nav-icon,
html body .nav-icon svg,
html body[data-view="crm"] .nav-icon,
html body[data-view="crm"] .nav-icon svg {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  font-size: 12.5px !important;
  line-height: 1.05 !important;
}

html body .sidebar-user-card {
  min-height: 50px !important;
  grid-template-columns: 36px minmax(0, 1fr) 32px 32px !important;
  gap: 7px !important;
  padding: 7px !important;
  border-radius: 10px !important;
}

html body .sidebar-user-avatar {
  width: 36px !important;
  height: 36px !important;
  font-size: 13px !important;
}

html body .sidebar-user-copy strong {
  font-size: 12px !important;
}

html body .sidebar-user-copy small {
  font-size: 10px !important;
}

html body .sidebar-user-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
}

html body .sidebar-user-icon svg {
  width: 17px !important;
  height: 17px !important;
}

/* Exact AQ360 reference sidebar pass. */
html body .app-shell,
html body[data-view] .app-shell,
html body[data-view="dashboard"] .app-shell,
html body[data-view="commandCenter"] .app-shell,
html body[data-view="crm"] .app-shell {
  grid-template-columns: 270px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="dashboard"] .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar {
  width: 270px !important;
  min-width: 270px !important;
  padding: 18px 12px 12px !important;
  background:
    radial-gradient(circle at 95% 2%, rgba(21, 102, 244, .34), transparent 30%),
    linear-gradient(180deg, #082a55 0%, #041a37 46%, #020d1d 100%) !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  min-height: 64px !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  border-bottom: 0 !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark {
  width: 178px !important;
  height: 58px !important;
  max-height: 58px !important;
  object-position: left center !important;
}

html body #nav,
html body .nav,
html body[data-view="crm"] .nav {
  padding-bottom: 0 !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  gap: 5px !important;
  margin: 0 0 12px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid rgba(41, 119, 224, .18) !important;
}

html body .nav-section:first-child,
html body[data-view="crm"] .nav-section:first-child {
  margin-bottom: 12px !important;
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  min-height: 20px !important;
  margin: 0 0 8px !important;
  padding: 0 14px !important;
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  gap: 12px !important;
  color: #2492ff !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 3px !important;
}

html body .nav-section-title::after,
html body[data-view="crm"] .nav-section-title::after {
  background: rgba(57, 133, 228, .26) !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 46px !important;
  height: 46px !important;
  grid-template-columns: 40px minmax(0, 1fr) 14px !important;
  gap: 11px !important;
  padding: 0 12px 0 14px !important;
  border-radius: 10px !important;
  color: rgba(255, 255, 255, .9) !important;
}

html body .nav-section:first-child button,
html body[data-view="crm"] .nav-section:first-child button {
  min-height: 52px !important;
  height: 52px !important;
  padding-left: 18px !important;
  background: linear-gradient(135deg, #0b86ff 0%, #123f9d 100%) !important;
  box-shadow: 0 16px 26px rgba(19, 94, 204, .30) !important;
}

html body .nav-section:first-child button::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 7px !important;
  bottom: 7px !important;
  width: 3px !important;
  border-radius: 999px !important;
  background: #0ea5ff !important;
}

html body .nav button {
  position: relative !important;
}

html body .nav button::after,
html body[data-view="crm"] .nav button::after {
  content: "" !important;
  color: rgba(210, 230, 255, .76) !important;
  font-size: 25px !important;
}

html body .nav button.active,
html body[data-view="crm"] .nav button.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0b86ff 0%, #123f9d 100%) !important;
  box-shadow: 0 16px 26px rgba(19, 94, 204, .30) !important;
}

html body .nav-icon,
html body[data-view="crm"] .nav-icon {
  width: 31px !important;
  height: 31px !important;
  min-width: 31px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 7px !important;
  background: rgba(18, 61, 120, .62) !important;
  color: #2d95ff !important;
}

html body .nav-icon svg,
html body[data-view="crm"] .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  stroke: currentColor !important;
}

html body .nav-section:first-child .nav-icon,
html body[data-view="crm"] .nav-section:first-child .nav-icon {
  background: transparent !important;
  color: #ffffff !important;
}

html body .nav-section:nth-child(2) button:nth-of-type(2) .nav-icon,
html body .nav-section:nth-child(2) button:nth-of-type(6) .nav-icon {
  color: #14d3c8 !important;
}

html body .nav-section:nth-child(2) button:nth-of-type(3) .nav-icon,
html body .nav-section:nth-child(4) .nav-icon {
  color: #ff8a1d !important;
}

html body .nav-section:nth-child(2) button:nth-of-type(4) .nav-icon,
html body .nav-section:nth-child(6) button:nth-of-type(2) .nav-icon {
  color: #7c63ff !important;
}

html body .nav-section:nth-child(3) .nav-icon {
  color: #8b5cf6 !important;
}

html body .nav-section:nth-child(5) .nav-icon {
  color: #1594ff !important;
}

html body .nav-section:nth-child(6) button:nth-of-type(1) .nav-icon {
  color: #10d6c2 !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  font-size: 14px !important;
  font-weight: 750 !important;
  line-height: 1.1 !important;
}

html body .sidebar-user-card {
  display: none !important;
}

/* Fix sidebar chevrons and final fit polish. */
html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="commandCenter"] .sidebar,
html body[data-view="crm"] .sidebar {
  padding: 14px 10px 10px !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark {
  width: 164px !important;
  height: 48px !important;
  max-height: 48px !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  gap: 3px !important;
  margin-bottom: 9px !important;
  padding-bottom: 8px !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 39px !important;
  height: 39px !important;
  grid-template-columns: 36px minmax(0, 1fr) 14px !important;
}

html body .nav-section:first-child button,
html body[data-view="crm"] .nav-section:first-child button {
  min-height: 46px !important;
  height: 46px !important;
}

html body .nav button::after,
html body[data-view="crm"] .nav button::after {
  content: "" !important;
  width: 7px !important;
  height: 7px !important;
  justify-self: end !important;
  border-right: 2px solid rgba(210, 230, 255, .78) !important;
  border-bottom: 2px solid rgba(210, 230, 255, .78) !important;
  transform: rotate(-45deg) !important;
}

html body .nav-icon,
html body[data-view="crm"] .nav-icon {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Clean AQ360 sidebar correction: remove the white logo card and match the compact reference menu. */
html body .app-shell,
html body[data-view] .app-shell {
  grid-template-columns: 250px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view] .sidebar {
  width: 250px !important;
  min-width: 250px !important;
  height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 18px 14px 12px !important;
  background:
    radial-gradient(circle at 92% 0%, rgba(31, 111, 255, .28), transparent 34%),
    linear-gradient(180deg, #082c5a 0%, #031a37 50%, #020b1a 100%) !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  position: relative !important;
  width: 100% !important;
  min-height: 76px !important;
  height: 76px !important;
  margin: 0 0 14px !important;
  padding: 0 0 14px !important;
  border-bottom: 1px solid rgba(135, 177, 232, .26) !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark {
  display: none !important;
}

html body .sidebar-brand-ref::before,
html body[data-view="crm"] .sidebar-brand-ref::before {
  content: "AQ" !important;
  position: absolute !important;
  left: 14px !important;
  top: 11px !important;
  width: auto !important;
  height: auto !important;
  color: #ffffff !important;
  background: none !important;
  font-size: 34px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -2px !important;
  text-shadow: 0 12px 28px rgba(0, 0, 0, .24) !important;
}

html body .sidebar-brand-ref::after,
html body[data-view="crm"] .sidebar-brand-ref::after {
  content: "360 ERP" !important;
  position: absolute !important;
  left: 73px !important;
  top: 12px !important;
  color: #ff6b1a !important;
  font-size: 29px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  font-style: italic !important;
  letter-spacing: -2px !important;
}

html body .sidebar-erp-label,
html body .sidebar-erp-label::before,
html body .sidebar-erp-label::after,
html body[data-view="crm"] .sidebar-erp-label,
html body[data-view="crm"] .sidebar-erp-label::before,
html body[data-view="crm"] .sidebar-erp-label::after {
  display: none !important;
}

html body #nav,
html body .nav,
html body[data-view="crm"] .nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  padding: 0 !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  gap: 4px !important;
  margin: 0 0 13px !important;
  padding: 0 0 11px !important;
  border-bottom: 1px solid rgba(42, 117, 218, .18) !important;
}

html body .nav-section:first-child,
html body[data-view="crm"] .nav-section:first-child {
  margin: 0 0 15px !important;
  padding: 0 !important;
  border-bottom: 0 !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  min-height: 18px !important;
  margin: 0 0 8px !important;
  padding: 0 12px !important;
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  align-items: center !important;
  gap: 12px !important;
  color: #2997ff !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 2.8px !important;
}

html body .nav-section-title::after,
html body[data-view="crm"] .nav-section-title::after {
  content: "" !important;
  height: 1px !important;
  background: rgba(92, 156, 237, .22) !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  position: relative !important;
  width: 100% !important;
  min-height: 43px !important;
  height: 43px !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 10px !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: rgba(255, 255, 255, .91) !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .nav-section:first-child button,
html body[data-view="crm"] .nav-section:first-child button,
html body .nav button.active,
html body[data-view="crm"] .nav button.active {
  min-height: 54px !important;
  height: 54px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #0d8dff 0%, #123f9f 100%) !important;
  box-shadow: 0 16px 26px rgba(17, 91, 202, .28) !important;
}

html body .nav-section:first-child button::before,
html body .nav button.active::before,
html body[data-view="crm"] .nav button.active::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 9px !important;
  bottom: 9px !important;
  width: 3px !important;
  border-radius: 999px !important;
  background: #16a4ff !important;
}

html body .nav-icon,
html body[data-view="crm"] .nav-icon {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  background: rgba(23, 71, 136, .62) !important;
  color: #2f98ff !important;
}

html body .nav-section:first-child .nav-icon,
html body[data-view="crm"] .nav-section:first-child .nav-icon,
html body .nav button.active .nav-icon,
html body[data-view="crm"] .nav button.active .nav-icon {
  background: transparent !important;
  color: #ffffff !important;
}

html body .nav-icon svg,
html body[data-view="crm"] .nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2.4 !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  color: inherit !important;
  font-size: 14px !important;
  font-weight: 760 !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
}

html body .nav button::after,
html body[data-view="crm"] .nav button::after {
  content: "" !important;
  width: 7px !important;
  height: 7px !important;
  border-right: 2px solid rgba(210, 230, 255, .76) !important;
  border-bottom: 2px solid rgba(210, 230, 255, .76) !important;
  transform: rotate(-45deg) !important;
}

html body .nav-section:first-child button::after,
html body .nav button.active::after,
html body[data-view="crm"] .nav-section:first-child button::after,
html body[data-view="crm"] .nav button.active::after {
  display: none !important;
}

/* One-window compact sidebar: no inner scrollbar, clean AQ360 ERP brand, all rows visible. */
html body .app-shell,
html body[data-view] .app-shell {
  grid-template-columns: 230px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="crm"] .sidebar,
html body[data-view="commandCenter"] .sidebar {
  width: 230px !important;
  min-width: 230px !important;
  max-width: 230px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  padding: 14px 12px 10px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(30, 111, 255, .26), transparent 34%),
    linear-gradient(180deg, #082f62 0%, #041d3d 52%, #020c1c 100%) !important;
}

html body .sidebar::-webkit-scrollbar,
html body .nav::-webkit-scrollbar {
  display: none !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  position: relative !important;
  height: 54px !important;
  min-height: 54px !important;
  margin: 0 0 10px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid rgba(137, 181, 239, .26) !important;
  display: block !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark,
html body .sidebar-erp-label,
html body[data-view="crm"] .sidebar-erp-label {
  display: none !important;
}

html body .sidebar-brand-ref::before,
html body[data-view="crm"] .sidebar-brand-ref::before {
  content: "AQ360 ERP" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 4px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  color: #ffffff !important;
  background: transparent !important;
  text-align: center !important;
  font-size: 26px !important;
  font-weight: 950 !important;
  font-style: italic !important;
  letter-spacing: -1.4px !important;
  line-height: 1 !important;
  text-shadow: 0 12px 24px rgba(0, 0, 0, .24) !important;
}

html body .sidebar-brand-ref::after,
html body[data-view="crm"] .sidebar-brand-ref::after {
  content: "Business Operations Platform" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 32px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  color: rgba(212, 230, 255, .72) !important;
  background: transparent !important;
  text-align: center !important;
  font-size: 8px !important;
  font-weight: 700 !important;
  font-style: normal !important;
  letter-spacing: .1px !important;
  line-height: 1 !important;
}

html body #nav,
html body .nav,
html body[data-view="crm"] .nav {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  gap: 0 !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  gap: 2px !important;
  margin: 0 0 7px !important;
  padding: 0 0 6px !important;
  border-bottom: 1px solid rgba(62, 135, 232, .17) !important;
}

html body .nav-section:first-child,
html body[data-view="crm"] .nav-section:first-child {
  margin: 0 0 7px !important;
  padding: 0 !important;
  border-bottom: 0 !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  min-height: 13px !important;
  height: 13px !important;
  margin: 0 0 4px !important;
  padding: 0 8px !important;
  font-size: 9px !important;
  line-height: 13px !important;
  letter-spacing: 2.2px !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 32px !important;
  height: 32px !important;
  grid-template-columns: 28px minmax(0, 1fr) 8px !important;
  gap: 8px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
}

html body .nav-section:first-child button,
html body[data-view="crm"] .nav-section:first-child button,
html body .nav button.active,
html body[data-view="crm"] .nav button.active {
  min-height: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
}

html body .nav-icon,
html body[data-view="crm"] .nav-icon {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  border-radius: 7px !important;
}

html body .nav-icon svg,
html body[data-view="crm"] .nav-icon svg {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  font-size: 12px !important;
  line-height: 1.05 !important;
  font-weight: 760 !important;
}

html body .nav button::after,
html body[data-view="crm"] .nav button::after {
  width: 5px !important;
  height: 5px !important;
  border-width: 1.5px !important;
}

/* Final alignment reset: calm background, no stray arrows, compact one-line menu rows. */
html body .app-shell,
html body[data-view] .app-shell {
  grid-template-columns: 224px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="crm"] .sidebar,
html body[data-view="commandCenter"] .sidebar {
  width: 224px !important;
  min-width: 224px !important;
  max-width: 224px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  padding: 16px 12px 10px !important;
  background:
    linear-gradient(180deg, rgba(18, 49, 86, .78), rgba(4, 18, 35, .95)),
    #061427 !important;
  box-shadow: inset -1px 0 0 rgba(148, 190, 255, .10) !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  height: 58px !important;
  min-height: 58px !important;
  margin: 0 0 12px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid rgba(148, 190, 255, .18) !important;
}

html body .sidebar-brand-ref::before,
html body[data-view="crm"] .sidebar-brand-ref::before {
  content: "AQ360 ERP" !important;
  top: 6px !important;
  color: #ffffff !important;
  font-size: 27px !important;
  letter-spacing: -1px !important;
  text-align: center !important;
}

html body .sidebar-brand-ref::after,
html body[data-view="crm"] .sidebar-brand-ref::after {
  content: "Business Operations Platform" !important;
  top: 36px !important;
  color: rgba(210, 226, 246, .68) !important;
  font-size: 8px !important;
  letter-spacing: .1px !important;
  text-align: center !important;
}

html body .nav,
html body #nav,
html body[data-view="crm"] .nav {
  display: flex !important;
  flex-direction: column !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  margin: 0 0 8px !important;
  padding: 0 0 8px !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  height: 16px !important;
  min-height: 16px !important;
  margin: 0 0 3px !important;
  padding: 0 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #83bfff !important;
  text-align: left !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  letter-spacing: 2.1px !important;
}

html body .nav-section-title::after,
html body[data-view="crm"] .nav-section-title::after {
  content: "" !important;
  flex: 1 1 auto !important;
  height: 1px !important;
  background: rgba(148, 190, 255, .16) !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  position: relative !important;
  min-height: 36px !important;
  height: 36px !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
  color: rgba(245, 249, 255, .92) !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .nav-section:first-child button,
html body[data-view="crm"] .nav-section:first-child button,
html body .nav button.active,
html body[data-view="crm"] .nav button.active {
  min-height: 42px !important;
  height: 42px !important;
  background: linear-gradient(135deg, #1769d7 0%, #0e3f92 100%) !important;
  box-shadow: 0 10px 22px rgba(2, 10, 28, .22) !important;
}

html body .nav button::after,
html body[data-view="crm"] .nav button::after {
  display: none !important;
  content: none !important;
}

html body .nav-icon,
html body[data-view="crm"] .nav-icon {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  margin: 0 !important;
  border-radius: 8px !important;
}

html body .nav-icon svg,
html body[data-view="crm"] .nav-icon svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: inherit !important;
  font-size: 12.5px !important;
  line-height: 1 !important;
  font-weight: 760 !important;
}

/* AQ360 color logo pass: keep the dark calm background and render AQ / 360 / ERP in brand colors. */
html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="crm"] .sidebar,
html body[data-view="commandCenter"] .sidebar {
  background:
    radial-gradient(circle at 90% -4%, rgba(31, 93, 158, .24), transparent 38%),
    linear-gradient(180deg, #10243d 0%, #08182b 48%, #030b17 100%) !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  height: 62px !important;
  min-height: 62px !important;
  margin: 0 0 12px !important;
  padding: 0 0 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-bottom: 1px solid rgba(148, 190, 255, .18) !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark,
html body .sidebar-erp-label,
html body[data-view="crm"] .sidebar-erp-label,
html body .sidebar-brand-ref::before,
html body .sidebar-brand-ref::after,
html body[data-view="crm"] .sidebar-brand-ref::before,
html body[data-view="crm"] .sidebar-brand-ref::after {
  display: none !important;
  content: none !important;
}

html body .sidebar-aq360-logo,
html body[data-view="crm"] .sidebar-aq360-logo {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 100% !important;
  max-width: 190px !important;
  color: #ffffff !important;
  line-height: .86 !important;
  font-style: italic !important;
  font-weight: 950 !important;
  letter-spacing: -1.4px !important;
  text-shadow: 0 12px 28px rgba(0, 0, 0, .28) !important;
}

html body .sidebar-aq360-logo span,
html body[data-view="crm"] .sidebar-aq360-logo span {
  color: #ffffff !important;
  font-size: 34px !important;
}

html body .sidebar-aq360-logo b,
html body[data-view="crm"] .sidebar-aq360-logo b {
  color: #ff5f1c !important;
  font-size: 34px !important;
  font-weight: 950 !important;
}

html body .sidebar-aq360-logo em,
html body[data-view="crm"] .sidebar-aq360-logo em {
  color: #ffffff !important;
  font-size: 16px !important;
  font-style: italic !important;
  font-weight: 950 !important;
  letter-spacing: -.4px !important;
}

/* Payroll KPI model: polished status cards matching the requested reference. */
html body[data-view="payroll"] .payroll-kpis {
  gap: 14px !important;
}

html body[data-view="payroll"] .payroll-kpi-card {
  position: relative !important;
  min-height: 118px !important;
  padding: 20px 48px 20px 22px !important;
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 22px !important;
  overflow: hidden !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 34px rgba(15, 23, 42, .075) !important;
}

html body[data-view="payroll"] .payroll-kpi-card::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 4px !important;
  background: #2f75ff !important;
}

html body[data-view="payroll"] .payroll-kpi-card.green::before {
  background: #18b968 !important;
}

html body[data-view="payroll"] .payroll-kpi-card.orange::before {
  background: #ff7a1a !important;
}

html body[data-view="payroll"] .payroll-kpi-icon {
  width: 72px !important;
  height: 72px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 18px !important;
}

html body[data-view="payroll"] .payroll-kpi-icon svg {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  stroke-width: 2.4 !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body[data-view="payroll"] .payroll-kpi-icon.blue {
  color: #2f75ff !important;
  background: linear-gradient(135deg, #edf5ff, #e7f0ff) !important;
}

html body[data-view="payroll"] .payroll-kpi-icon.green {
  color: #18a957 !important;
  background: linear-gradient(135deg, #eafaf1, #e7f8ee) !important;
}

html body[data-view="payroll"] .payroll-kpi-icon.orange {
  color: #ff7615 !important;
  background: linear-gradient(135deg, #fff3e6, #fff0df) !important;
}

html body[data-view="payroll"] .payroll-kpi-card p {
  margin: 0 0 8px !important;
  color: #3d4b63 !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

html body[data-view="payroll"] .payroll-kpi-card strong {
  display: block !important;
  margin: 0 !important;
  color: #07142b !important;
  font-size: 30px !important;
  line-height: 1.05 !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html body[data-view="payroll"] .payroll-kpi-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 14px !important;
  color: #e11d2e !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html body[data-view="payroll"] .payroll-kpi-status i {
  width: 10px !important;
  height: 10px !important;
  display: inline-block !important;
  border-radius: 999px !important;
  background: currentColor !important;
}

html body[data-view="payroll"] .payroll-kpi-status.green {
  color: #18a957 !important;
}

html body[data-view="payroll"] .payroll-kpi-status.orange {
  color: #ff7615 !important;
}

html body[data-view="payroll"] .payroll-kpi-status.red {
  color: #e11d2e !important;
}

html body[data-view="payroll"] .payroll-kpi-menu {
  position: absolute !important;
  right: 18px !important;
  top: 18px !important;
  width: 28px !important;
  height: 24px !important;
  border: 0 !important;
  background: transparent !important;
  color: #07142b !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
  cursor: default !important;
}

@media (max-width: 1380px) {
  html body[data-view="payroll"] .payroll-kpi-card {
    min-height: 108px !important;
    padding: 18px 42px 18px 18px !important;
    grid-template-columns: 62px minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  html body[data-view="payroll"] .payroll-kpi-icon {
    width: 62px !important;
    height: 62px !important;
  }

  html body[data-view="payroll"] .payroll-kpi-card strong {
    font-size: 23px !important;
  }

  html body[data-view="payroll"] .payroll-kpi-card p,
html body[data-view="payroll"] .payroll-kpi-status {
    font-size: 14px !important;
  }
}

/* CRM KPI model: same size, new structured cards with top accents and action footer. */
html body[data-view="crm"] .crm-control-kpis {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi {
  position: relative !important;
  min-height: 174px !important;
  height: 174px !important;
  padding: 22px 22px 0 !important;
  display: grid !important;
  grid-template-columns: 74px minmax(0, 1fr) 24px !important;
  grid-template-rows: 1fr 52px !important;
  align-items: start !important;
  gap: 0 18px !important;
  overflow: hidden !important;
  border: 1px solid #d8e3f1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 16px 30px rgba(15, 23, 42, .075) !important;
  text-align: left !important;
}

html body[data-view="crm"] .crm-ref-kpi-top {
  position: absolute !important;
  inset: 0 0 auto 0 !important;
  height: 4px !important;
  background: #2563eb !important;
}

html body[data-view="crm"] .crm-ref-kpi.green .crm-ref-kpi-top {
  background: #16a34a !important;
}

html body[data-view="crm"] .crm-ref-kpi.orange .crm-ref-kpi-top {
  background: #f97316 !important;
}

html body[data-view="crm"] .crm-ref-kpi.purple .crm-ref-kpi-top {
  background: #7c3aed !important;
}

html body[data-view="crm"] .crm-ref-kpi-icon {
  width: 66px !important;
  height: 66px !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  color: #2563eb !important;
  background: #eef5ff !important;
}

html body[data-view="crm"] .crm-ref-kpi.green .crm-ref-kpi-icon {
  color: #16a34a !important;
  background: #eafaf1 !important;
}

html body[data-view="crm"] .crm-ref-kpi.orange .crm-ref-kpi-icon {
  color: #f97316 !important;
  background: #fff3e3 !important;
}

html body[data-view="crm"] .crm-ref-kpi.purple .crm-ref-kpi-icon {
  color: #7c3aed !important;
  background: #f3e8ff !important;
}

html body[data-view="crm"] .crm-ref-kpi-icon svg {
  width: 33px !important;
  height: 33px !important;
  stroke-width: 2.2 !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  padding-top: 4px !important;
}

html body[data-view="crm"] .crm-ref-kpi small,
html body[data-view="crm"] .crm-ref-kpi b,
html body[data-view="crm"] .crm-ref-kpi strong {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-ref-kpi small {
  margin: 0 0 11px !important;
  color: #07142b !important;
  font-size: 15px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
}

html body[data-view="crm"] .crm-ref-kpi b {
  margin: 0 0 16px !important;
  color: #07142b !important;
  font-size: 32px !important;
  line-height: .95 !important;
  font-weight: 850 !important;
}

html body[data-view="crm"] .crm-ref-kpi strong {
  color: #66758c !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
  font-weight: 650 !important;
}

html body[data-view="crm"] .crm-ref-kpi-menu {
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  color: #07142b !important;
  font-size: 22px !important;
  line-height: .8 !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
}

html body[data-view="crm"] .crm-ref-kpi-watermark {
  position: absolute !important;
  right: -11px !important;
  top: 82px !important;
  width: 76px !important;
  height: 76px !important;
  color: #2563eb !important;
  opacity: .055 !important;
  pointer-events: none !important;
}

html body[data-view="crm"] .crm-ref-kpi.green .crm-ref-kpi-watermark {
  color: #16a34a !important;
}

html body[data-view="crm"] .crm-ref-kpi.orange .crm-ref-kpi-watermark {
  color: #f97316 !important;
}

html body[data-view="crm"] .crm-ref-kpi.purple .crm-ref-kpi-watermark {
  color: #7c3aed !important;
}

html body[data-view="crm"] .crm-ref-kpi-watermark svg {
  width: 76px !important;
  height: 76px !important;
  stroke-width: 1.8 !important;
}

html body[data-view="crm"] .crm-ref-kpi em {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  margin: 0 -22px !important;
  padding: 0 22px !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-top: 1px solid #e4edf7 !important;
  color: #2563eb !important;
  background: #ffffff !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-style: normal !important;
  font-weight: 850 !important;
}

html body[data-view="crm"] .crm-ref-kpi.green em {
  color: #16a34a !important;
}

html body[data-view="crm"] .crm-ref-kpi.orange em {
  color: #f97316 !important;
}

html body[data-view="crm"] .crm-ref-kpi.purple em {
  color: #7c3aed !important;
}

html body[data-view="crm"] .crm-ref-kpi em svg {
  width: 22px !important;
  height: 22px !important;
  stroke-width: 2.4 !important;
}

@media (max-width: 1380px) {
  html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi {
    min-height: 158px !important;
    height: 158px !important;
    padding: 18px 18px 0 !important;
    grid-template-columns: 58px minmax(0, 1fr) 22px !important;
    grid-template-rows: 1fr 46px !important;
    gap: 0 14px !important;
  }

  html body[data-view="crm"] .crm-ref-kpi-icon {
    width: 54px !important;
    height: 54px !important;
  }

  html body[data-view="crm"] .crm-ref-kpi-icon svg {
    width: 27px !important;
    height: 27px !important;
  }

  html body[data-view="crm"] .crm-ref-kpi small {
    font-size: 13px !important;
  }

  html body[data-view="crm"] .crm-ref-kpi b {
    font-size: 27px !important;
  }

  html body[data-view="crm"] .crm-ref-kpi strong,
  html body[data-view="crm"] .crm-ref-kpi em {
    font-size: 12.5px !important;
  }

html body[data-view="crm"] .crm-ref-kpi em {
    height: 46px !important;
    margin: 0 -18px !important;
    padding: 0 18px !important;
  }
}

/* CRM KPI size correction: compact cards and small menu dots, not icon blocks. */
html body[data-view="crm"] .crm-control-kpis {
  gap: 12px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi {
  min-height: 132px !important;
  height: 132px !important;
  padding: 14px 14px 0 !important;
  grid-template-columns: 48px minmax(0, 1fr) 20px !important;
  grid-template-rows: 1fr 38px !important;
  gap: 0 12px !important;
}

html body[data-view="crm"] .crm-ref-kpi-icon {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  border-radius: 14px !important;
}

html body[data-view="crm"] .crm-ref-kpi-icon svg {
  width: 24px !important;
  height: 24px !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy {
  padding-top: 2px !important;
}

html body[data-view="crm"] .crm-ref-kpi small {
  margin: 0 0 6px !important;
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-ref-kpi b {
  margin: 0 0 8px !important;
  font-size: 24px !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html body[data-view="crm"] .crm-ref-kpi strong {
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-ref-kpi .crm-ref-kpi-menu {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  padding: 0 !important;
  display: block !important;
  border-radius: 0 !important;
  color: #07142b !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
}

html body[data-view="crm"] .crm-ref-kpi-watermark {
  right: -8px !important;
  top: 58px !important;
  width: 54px !important;
  height: 54px !important;
}

html body[data-view="crm"] .crm-ref-kpi-watermark svg {
  width: 54px !important;
  height: 54px !important;
}

html body[data-view="crm"] .crm-ref-kpi em {
  height: 38px !important;
  margin: 0 -14px !important;
  padding: 0 14px !important;
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-ref-kpi em svg {
  width: 18px !important;
  height: 18px !important;
}

/* Final CRM KPI compact pass: prevent legacy span rules from making the dots huge. */
html body[data-view="crm"] .crm-control-kpis {
  grid-template-columns: repeat(4, minmax(190px, 1fr)) !important;
  gap: 14px !important;
  margin: 14px 0 16px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi {
  position: relative !important;
  min-height: 118px !important;
  height: 118px !important;
  padding: 14px 16px 0 !important;
  grid-template-columns: 44px minmax(0, 1fr) 16px !important;
  grid-template-rows: minmax(0, 1fr) 34px !important;
  gap: 0 12px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi > .crm-ref-kpi-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: start !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi > .crm-ref-kpi-icon svg {
  width: 22px !important;
  height: 22px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi > .crm-ref-kpi-copy {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi small {
  margin: 0 0 5px !important;
  font-size: 11.5px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi b {
  margin: 0 0 5px !important;
  font-size: 22px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi strong {
  display: block !important;
  font-size: 10.5px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi > .crm-ref-kpi-menu {
  position: static !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-self: start !important;
  justify-self: end !important;
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #07142b !important;
  font-size: 15px !important;
  line-height: 10px !important;
  letter-spacing: 1px !important;
  text-align: center !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi > .crm-ref-kpi-watermark {
  position: absolute !important;
  right: -9px !important;
  bottom: 31px !important;
  top: auto !important;
  width: 46px !important;
  height: 46px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: .045 !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi > .crm-ref-kpi-watermark svg {
  width: 46px !important;
  height: 46px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi em {
  height: 34px !important;
  margin: 0 -16px !important;
  padding: 0 16px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-control-kpis .crm-ref-kpi em svg {
  width: 16px !important;
  height: 16px !important;
}

/* CRM command header: compact professional toolbar. */
html body[data-view="crm"] .view {
  padding-top: 14px !important;
}

html body[data-view="crm"] .crm-control-head {
  min-height: 56px !important;
  padding: 0 0 12px !important;
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(500px, 680px) !important;
  align-items: center !important;
  gap: 18px !important;
  border-bottom: 1px solid #e3ebf5 !important;
  background: transparent !important;
}

html body[data-view="crm"] .crm-control-head h1 {
  margin: 0 0 4px !important;
  color: #06142d !important;
  font-size: 21px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase !important;
}

html body[data-view="crm"] .crm-control-head p {
  margin: 0 !important;
  color: #41536c !important;
  font-size: 12.5px !important;
  line-height: 1.15 !important;
  font-weight: 500 !important;
}

html body[data-view="crm"] .crm-control-tools {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) 104px !important;
  align-items: center !important;
  justify-content: end !important;
  gap: 12px !important;
}

html body[data-view="crm"] .crm-control-search {
  width: 100% !important;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid #d6e1ef !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
}

html body[data-view="crm"] .crm-control-search svg {
  width: 16px !important;
  height: 16px !important;
  stroke: #53667f !important;
}

html body[data-view="crm"] .crm-control-search input {
  font-size: 12.5px !important;
  font-weight: 650 !important;
}

html body[data-view="crm"] .crm-new-menu {
  width: 104px !important;
  flex: 0 0 104px !important;
}

html body[data-view="crm"] .crm-new-button {
  width: 104px !important;
  min-width: 104px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  border-radius: 7px !important;
  font-size: 12.5px !important;
  line-height: 1 !important;
  box-shadow: 0 10px 20px rgba(223, 21, 39, .18) !important;
}

html body[data-view="crm"] .crm-new-dropdown {
  top: calc(100% + 7px) !important;
  width: 188px !important;
  border-radius: 8px !important;
}

html body[data-view="crm"] .topbar {
  min-height: 42px !important;
  height: 42px !important;
  padding: 4px 12px !important;
  background: transparent !important;
  border-bottom: 1px solid #edf2f8 !important;
}

html body[data-view="crm"] .topbar-actions {
  width: auto !important;
  height: 34px !important;
  padding: 0 8px !important;
  gap: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  border: 1px solid #dfe7f1 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
}

html body[data-view="crm"] .notification-toggle {
  width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
}

html body[data-view="crm"] .notification-bell svg {
  width: 16px !important;
  height: 16px !important;
}

html body[data-view="crm"] .notification-toggle strong {
  top: -5px !important;
  right: -3px !important;
  width: 14px !important;
  height: 14px !important;
  font-size: 8px !important;
}

html body[data-view="crm"] .topbar-actions #currentUserLabel {
  min-width: auto !important;
  height: 30px !important;
  gap: 7px !important;
  padding: 0 6px 0 0 !important;
  color: #07142b !important;
  font-size: 12.5px !important;
  font-weight: 850 !important;
}

html body[data-view="crm"] .topbar-actions #currentUserLabel::before {
  width: 28px !important;
  height: 28px !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .topbar-actions #currentUserLabel::after {
  width: 7px !important;
  height: 7px !important;
}

/* Payroll fit-to-window pass: compact KPI cards and reduce empty vertical space. */
html body[data-view="payroll"] .view {
  padding: 14px 18px 22px !important;
}

html body[data-view="payroll"] .payroll-dashboard {
  gap: 12px !important;
}

html body[data-view="payroll"] .payroll-kpis {
  gap: 10px !important;
  margin: 0 0 10px !important;
}

html body[data-view="payroll"] .payroll-kpi-card {
  min-height: 88px !important;
  height: 88px !important;
  padding: 14px 34px 14px 16px !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 14px !important;
  border-radius: 7px !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .055) !important;
}

html body[data-view="payroll"] .payroll-kpi-card::before {
  width: 3px !important;
}

html body[data-view="payroll"] .payroll-kpi-icon {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  border-radius: 13px !important;
}

html body[data-view="payroll"] .payroll-kpi-icon svg {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  stroke-width: 2.3 !important;
}

html body[data-view="payroll"] .payroll-kpi-card p {
  margin: 0 0 6px !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
  font-weight: 750 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="payroll"] .payroll-kpi-card strong {
  max-width: 100% !important;
  font-size: 24px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="payroll"] .payroll-kpi-status {
  margin-top: 7px !important;
  gap: 5px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
}

html body[data-view="payroll"] .payroll-kpi-status i {
  width: 7px !important;
  height: 7px !important;
}

html body[data-view="payroll"] .payroll-kpi-menu {
  right: 11px !important;
  top: 9px !important;
  width: 18px !important;
  height: 16px !important;
  font-size: 15px !important;
  line-height: 10px !important;
}

html body[data-view="payroll"] .payroll-section-card {
  padding: 16px 18px !important;
  border-radius: 8px !important;
}

html body[data-view="payroll"] .payroll-action-panel {
  min-height: 86px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
}

html body[data-view="payroll"] .payroll-action-panel h2,
html body[data-view="payroll"] .payroll-section-card h2 {
  font-size: 18px !important;
  line-height: 1.1 !important;
}

html body[data-view="payroll"] .payroll-action-panel p {
  margin: 6px 0 0 !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

html body[data-view="payroll"] .payroll-action-buttons {
  gap: 8px !important;
}

html body[data-view="payroll"] .payroll-action-buttons button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  border-radius: 7px !important;
}

html body[data-view="payroll"] .payroll-lines-card .empty.card {
  min-height: 145px !important;
  height: 145px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
}

html body[data-view="payroll"] .payroll-wps-card .table-wrap th,
html body[data-view="payroll"] .payroll-wps-card .table-wrap td {
  padding: 10px 12px !important;
  font-size: 12px !important;
}

/* Common app command bar: balanced header for all ERP windows. */
html body .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  min-height: 52px !important;
  height: 52px !important;
  padding: 6px 18px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  background: rgba(255, 255, 255, .96) !important;
  border-bottom: 1px solid #dde7f2 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .055) !important;
  backdrop-filter: blur(10px) !important;
}

html body .topbar > div:first-of-type {
  display: block !important;
  min-width: 0 !important;
}

html body .topbar > div:first-of-type .eyebrow {
  margin: 0 0 2px !important;
  color: #e11d2e !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

html body .topbar > div:first-of-type h1 {
  margin: 0 !important;
  color: #06142d !important;
  font-size: 17px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

html body .topbar-actions {
  width: auto !important;
  max-width: 100% !important;
  height: 38px !important;
  margin-left: auto !important;
  padding: 0 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
}

html body .topbar-actions #cloudStatusLabel,
html body .topbar-actions #syncLatestButton {
  display: none !important;
}

html body .topbar-actions .notification-center {
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px !important;
}

html body .topbar-actions .notification-toggle {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #b91c1c !important;
  box-shadow: none !important;
}

html body .topbar-actions .notification-bell svg {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2.35 !important;
}

html body .topbar-actions .notification-toggle strong {
  top: -4px !important;
  right: -2px !important;
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  border: 2px solid #ffffff !important;
  font-size: 8px !important;
}

html body .topbar-actions #todayLabel {
  display: none !important;
}

html body .topbar-actions #currentUserLabel {
  min-width: 86px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 20px 0 36px !important;
  position: relative !important;
  border: 0 !important;
  background: transparent !important;
  color: #06142d !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

html body .topbar-actions #currentUserLabel::before {
  width: 28px !important;
  height: 28px !important;
  left: 0 !important;
  font-size: 12px !important;
}

html body .topbar-actions #currentUserLabel::after {
  right: 5px !important;
  top: 11px !important;
  width: 7px !important;
  height: 7px !important;
}

html body .topbar-actions #installAppButton,
html body .topbar-actions #installAppButton.hidden {
  display: inline-flex !important;
  width: auto !important;
  min-width: 88px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  border: 1px solid #d9e3ef !important;
  border-radius: 999px !important;
  background: #f8fbff !important;
  color: #17213a !important;
  font-size: 11.5px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

html body .topbar-actions #logoutButton {
  min-width: 76px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px 0 28px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #17213a !important;
  font-size: 11.5px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

html body .topbar-actions #logoutButton::before {
  left: 8px !important;
  width: 15px !important;
  height: 15px !important;
}

html body[data-view="crm"] .view {
  padding-top: 14px !important;
}

html body[data-view="crm"] .crm-control-head {
  min-height: 54px !important;
  padding: 0 0 12px !important;
  grid-template-columns: minmax(250px, 1fr) minmax(420px, 620px) !important;
  gap: 14px !important;
  border-bottom: 1px solid #e2eaf4 !important;
}

html body[data-view="crm"] .crm-control-head h1 {
  font-size: 20px !important;
  letter-spacing: .05em !important;
}

html body[data-view="crm"] .crm-control-tools {
  grid-template-columns: minmax(260px, 1fr) 98px !important;
  gap: 10px !important;
}

html body[data-view="crm"] .crm-control-search {
  height: 36px !important;
  border-radius: 999px !important;
}

html body[data-view="crm"] .crm-new-button {
  width: 98px !important;
  min-width: 98px !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  box-shadow: 0 10px 18px rgba(223, 21, 39, .18) !important;
}

/* Unified header: same title/search/actions structure across every ERP window. */
html body .topbar {
  min-height: 58px !important;
  height: 58px !important;
  padding: 7px 18px !important;
  grid-template-columns: minmax(210px, .72fr) minmax(360px, 680px) auto !important;
  gap: 14px !important;
}

html body .topbar > div:first-of-type {
  display: block !important;
}

html body .topbar > div:first-of-type .eyebrow {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .topbar > div:first-of-type h1 {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .topbar-command {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
}

html body .global-header-search {
  min-width: 0 !important;
  height: 36px !important;
  padding: 0 6px 0 12px !important;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) 28px !important;
  align-items: center !important;
  gap: 9px !important;
  border: 1px solid #d7e2ef !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .045) !important;
}

html body .global-header-search svg {
  width: 16px !important;
  height: 16px !important;
  fill: none !important;
  stroke: #53667f !important;
  stroke-width: 2.25 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body .global-header-search input {
  min-width: 0 !important;
  width: 100% !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #07142b !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

html body .global-header-search button {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  cursor: pointer !important;
}

html body .global-header-new {
  width: 96px !important;
  flex: 0 0 96px !important;
}

html body .global-header-new.hidden {
  display: none !important;
}

html body .global-header-new .crm-new-button {
  width: 96px !important;
  min-width: 96px !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  box-shadow: 0 8px 18px rgba(223, 21, 39, .16) !important;
}

html body .topbar-actions {
  height: 36px !important;
  padding: 0 8px !important;
  gap: 7px !important;
}

html body .topbar-actions #installAppButton,
html body .topbar-actions #installAppButton.hidden,
html body .topbar-actions #logoutButton,
html body .topbar-actions #currentUserLabel {
  height: 28px !important;
  min-height: 28px !important;
  font-size: 11.5px !important;
}

html body .topbar-actions #currentUserLabel::before {
  width: 26px !important;
  height: 26px !important;
}

html body[data-view="crm"] .crm-control-head {
  display: none !important;
}

html body[data-view="crm"] .crm-ref-dashboard,
html body[data-view="quotations"] .crm-ref-dashboard,
html body[data-view="customers"] .crm-ref-dashboard,
html body[data-view="followUps"] .crm-ref-dashboard,
html body[data-view="salesOrders"] .crm-ref-dashboard {
  grid-template-rows: auto minmax(0, 1fr) !important;
}

@media (max-width: 1200px) {
  html body .topbar {
    grid-template-columns: minmax(170px, .55fr) minmax(280px, 1fr) auto !important;
    gap: 10px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  html body .topbar-actions #installAppButton,
  html body .topbar-actions #installAppButton.hidden {
    display: none !important;
  }
}

/* 2026-06-03: final common header lock.
   This sits at the end on purpose so every ERP window uses the same clean header
   and the CRM cards can never slide underneath the user controls again. */
html body .app-shell {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  width: 100vw !important;
  height: 100vh !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

html body .main {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100vh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #f4f7fb !important;
}

html body .topbar,
html body[data-view] .topbar,
html body[data-view="crm"] .topbar,
html body[data-view="commandCenter"] .topbar {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  z-index: 40 !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 72px !important;
  margin: 0 !important;
  padding: 12px 22px !important;
  display: grid !important;
  grid-template-columns: minmax(260px, .72fr) minmax(360px, 760px) max-content !important;
  align-items: center !important;
  gap: 16px !important;
  background: rgba(248, 251, 255, .98) !important;
  border: 0 !important;
  border-bottom: 1px solid #dbe5f0 !important;
  border-radius: 0 !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .045) !important;
  overflow: visible !important;
}

html body .topbar > .mobile-only {
  display: none !important;
}

html body .topbar > div:first-of-type {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

html body .topbar .eyebrow,
html body .topbar #pageEyebrow {
  display: block !important;
  margin: 0 !important;
  max-width: 100% !important;
  color: #5a6b82 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body .topbar h1,
html body .topbar #pageTitle {
  display: block !important;
  margin: 0 !important;
  max-width: 100% !important;
  color: #06142b !important;
  font-size: 24px !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
  letter-spacing: .01em !important;
  text-transform: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body .topbar-command {
  position: relative !important;
  z-index: 2 !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow: visible !important;
}

html body .global-header-search {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  z-index: 2 !important;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) 28px !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 8px 0 14px !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: #ffffff !important;
  border: 1px solid #d5e0ee !important;
  border-radius: 13px !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .045) !important;
}

html body .global-header-search input {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #07142b !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body .global-header-search svg {
  width: 16px !important;
  height: 16px !important;
  fill: none !important;
  stroke: #0b1830 !important;
  stroke-width: 2.3 !important;
}

html body .global-header-search button {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  display: grid !important;
  place-items: center !important;
}

html body .global-header-new {
  position: relative !important;
  z-index: 6 !important;
  display: block !important;
  width: 92px !important;
  min-width: 92px !important;
}

html body .global-header-new.hidden {
  display: none !important;
}

html body .global-header-new .crm-new-button {
  width: 92px !important;
  height: 40px !important;
  min-width: 92px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  box-shadow: 0 12px 24px rgba(223, 21, 39, .18) !important;
}

html body .global-header-new .crm-new-dropdown {
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 70 !important;
}

html body .topbar-actions,
html body[data-view] .topbar-actions,
html body[data-view="crm"] .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  z-index: 5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  min-width: max-content !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
  padding: 3px 7px !important;
  gap: 8px !important;
  overflow: visible !important;
  background: #ffffff !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .055) !important;
}

html body .topbar-actions #cloudStatusLabel,
html body .topbar-actions #syncLatestButton,
html body .topbar-actions #todayLabel {
  display: none !important;
}

html body .topbar-actions .notification-center {
  display: flex !important;
  position: relative !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
}

html body .topbar-actions .notification-toggle {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .topbar-actions .notification-toggle strong {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  font-size: 10px !important;
  top: -4px !important;
  right: -1px !important;
}

html body .topbar-actions #currentUserLabel,
html body[data-view="crm"] .topbar-actions #currentUserLabel {
  display: inline-grid !important;
  grid-template-columns: 30px auto 12px !important;
  align-items: center !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 116px !important;
  max-width: 170px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 9px 0 2px !important;
  overflow: hidden !important;
  border: 0 !important;
  background: transparent !important;
  color: #07142b !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

html body .topbar-actions #currentUserLabel::before {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  font-size: 14px !important;
}

html body .topbar-actions #currentUserLabel::after {
  width: 10px !important;
  height: 10px !important;
  margin: 0 !important;
}

html body .topbar-actions #installAppButton,
html body .topbar-actions #installAppButton.hidden,
html body .topbar-actions #logoutButton {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 82px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 13px !important;
  border: 1px solid #d5e0ee !important;
  border-radius: 11px !important;
  background: #ffffff !important;
  color: #07142b !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

html body .topbar-actions #logoutButton {
  min-width: 76px !important;
  gap: 7px !important;
}

html body .topbar-actions #logoutButton::before {
  width: 16px !important;
  height: 16px !important;
}

html body .view,
html body[data-view] .view,
html body[data-view="crm"] .view,
html body[data-view="commandCenter"] .view {
  position: relative !important;
  z-index: 1 !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 18px 22px 24px !important;
  overflow: auto !important;
  background: #f4f7fb !important;
}

html body[data-view="crm"] .crm-control-head {
  display: none !important;
}

html body[data-view="crm"] .crm-ref-dashboard,
html body[data-view="crm"] .crm-gs-dashboard,
html body[data-view="commandCenter"] .command-dashboard {
  position: relative !important;
  z-index: 1 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html body[data-view="crm"] .crm-kpi-grid,
html body[data-view="crm"] .crm-ref-stats,
html body[data-view="crm"] .crm-gs-kpi-grid {
  margin-top: 0 !important;
}

@media (max-width: 1440px) {
  html body .topbar {
    grid-template-columns: minmax(220px, .65fr) minmax(300px, 1fr) max-content !important;
    padding: 11px 16px !important;
    gap: 12px !important;
  }

  html body .topbar h1,
  html body .topbar #pageTitle {
    font-size: 21px !important;
  }

  html body .topbar .eyebrow,
  html body .topbar #pageEyebrow {
    font-size: 12px !important;
  }
}

@media (max-width: 1180px) {
  html body .app-shell {
    grid-template-columns: 86px minmax(0, 1fr) !important;
  }

  html body .topbar {
    grid-template-columns: minmax(180px, .7fr) minmax(240px, 1fr) max-content !important;
  }

  html body .topbar-actions #installAppButton,
  html body .topbar-actions #installAppButton.hidden {
    display: none !important;
  }
}

/* 2026-06-03: shared ERP page heading, v16.
   A two-row header prevents CRM's + New button and admin tools from overlapping. */
html body .topbar,
html body[data-view] .topbar,
html body[data-view="crm"] .topbar,
html body[data-view="commandCenter"] .topbar {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) max-content !important;
  grid-template-areas:
    "title actions"
    "command command" !important;
  align-items: center !important;
  gap: 9px 18px !important;
  min-height: 110px !important;
  padding: 12px 22px 13px !important;
  overflow: visible !important;
}

html body .topbar > div:first-of-type {
  grid-area: title !important;
  align-self: center !important;
  min-width: 0 !important;
}

html body .topbar-command {
  grid-area: command !important;
  justify-self: end !important;
  width: min(880px, 100%) !important;
  max-width: 880px !important;
  display: grid !important;
  grid-template-columns: minmax(320px, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  overflow: visible !important;
}

html body .topbar-actions,
html body[data-view] .topbar-actions,
html body[data-view="crm"] .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions {
  grid-area: actions !important;
  justify-self: end !important;
  align-self: center !important;
  max-width: calc(100vw - 360px) !important;
  overflow: visible !important;
}

html body .topbar h1,
html body .topbar #pageTitle {
  font-size: 25px !important;
  letter-spacing: .01em !important;
}

html body .topbar .eyebrow,
html body .topbar #pageEyebrow {
  font-size: 13px !important;
}

html body .global-header-search {
  height: 40px !important;
  border-radius: 14px !important;
}

html body .global-header-new {
  width: 96px !important;
  min-width: 96px !important;
}

html body .global-header-new .crm-new-button {
  width: 96px !important;
  min-width: 96px !important;
  height: 40px !important;
}

html body .view,
html body[data-view] .view,
html body[data-view="crm"] .view,
html body[data-view="commandCenter"] .view {
  padding-top: 18px !important;
}

@media (min-width: 1500px) {
  html body .topbar,
  html body[data-view] .topbar {
    grid-template-columns: minmax(340px, 1fr) max-content !important;
  }

  html body .topbar-command {
    width: min(960px, 100%) !important;
    max-width: 960px !important;
  }
}

@media (max-width: 1320px) {
  html body .topbar,
  html body[data-view] .topbar {
    min-height: 124px !important;
    grid-template-columns: minmax(180px, 1fr) max-content !important;
  }

  html body .topbar-command {
    justify-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
  }
}

/* 2026-06-03: compact shared header, v17.
   Final correction: one aligned row on desktop, no blank header band. */
html body .topbar,
html body[data-view] .topbar,
html body[data-view="crm"] .topbar,
html body[data-view="commandCenter"] .topbar {
  display: grid !important;
  grid-template-columns: minmax(240px, 360px) minmax(360px, 1fr) max-content !important;
  grid-template-areas: "title command actions" !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  min-height: 72px !important;
  height: 72px !important;
  padding: 10px 18px !important;
  margin: 0 !important;
  background: rgba(248, 251, 255, .98) !important;
  border-bottom: 1px solid #dbe5f0 !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045) !important;
  overflow: visible !important;
}

html body .topbar > div:first-of-type,
html body[data-view] .topbar > div:first-of-type,
html body[data-view="crm"] .topbar > div:first-of-type {
  grid-area: title !important;
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
  max-width: 360px !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: hidden !important;
}

html body .topbar h1,
html body .topbar #pageTitle {
  display: block !important;
  margin: 0 !important;
  color: #06142b !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  letter-spacing: .01em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html body .topbar .eyebrow,
html body .topbar #pageEyebrow {
  display: block !important;
  margin: 0 !important;
  color: #50627a !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html body .topbar-command,
html body[data-view] .topbar-command,
html body[data-view="crm"] .topbar-command {
  grid-area: command !important;
  justify-self: stretch !important;
  align-self: center !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: visible !important;
}

html body .global-header-search {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 14px !important;
}

html body .global-header-new {
  width: 98px !important;
  min-width: 98px !important;
}

html body .global-header-new.hidden {
  display: none !important;
}

html body .global-header-new .crm-new-button {
  width: 98px !important;
  min-width: 98px !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 13px !important;
}

html body .topbar-actions,
html body[data-view] .topbar-actions,
html body[data-view="crm"] .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions {
  grid-area: actions !important;
  justify-self: end !important;
  align-self: center !important;
  display: flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 4px 7px !important;
  gap: 8px !important;
  overflow: visible !important;
  background: #ffffff !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 999px !important;
}

html body .view,
html body[data-view] .view,
html body[data-view="crm"] .view,
html body[data-view="commandCenter"] .view {
  padding-top: 16px !important;
}

@media (max-width: 1380px) {
  html body .topbar,
  html body[data-view] .topbar {
    grid-template-columns: minmax(190px, 280px) minmax(260px, 1fr) max-content !important;
    gap: 10px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  html body .topbar h1,
  html body .topbar #pageTitle {
    font-size: 19px !important;
  }

  html body .topbar .eyebrow,
  html body .topbar #pageEyebrow {
    font-size: 11px !important;
  }

  html body .global-header-new {
    width: 88px !important;
    min-width: 88px !important;
  }

  html body .global-header-new .crm-new-button {
    width: 88px !important;
    min-width: 88px !important;
  }
}

/* 2026-06-03: professional toolbar icons, v18. */
html body .topbar-actions,
html body[data-view] .topbar-actions,
html body[data-view="crm"] .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 4px 7px !important;
  gap: 6px !important;
  background: #ffffff !important;
  border: 1px solid #d9e4f1 !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06) !important;
}

html body .topbar-actions .notification-center {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
}

html body .topbar-actions .notification-toggle {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #07142b !important;
}

html body .topbar-actions .notification-bell,
html body .topbar-actions .notification-bell svg {
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  color: #07142b !important;
  fill: none !important;
  stroke: #07142b !important;
  stroke-width: 2.1 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body .topbar-actions .notification-toggle strong {
  position: absolute !important;
  top: 0 !important;
  right: 1px !important;
  display: grid !important;
  place-items: center !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  border-radius: 999px !important;
  background: #e1192b !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

html body .topbar-actions #currentUserLabel,
html body[data-view] .topbar-actions #currentUserLabel,
html body[data-view="crm"] .topbar-actions #currentUserLabel {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 118px !important;
  max-width: 150px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 9px 0 2px !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #07142b !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-indent: 0 !important;
}

html body .topbar-actions #currentUserLabel::before {
  content: "A" !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  flex: 0 0 30px !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: #06142b !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

html body .topbar-actions #currentUserLabel::after {
  content: "" !important;
  position: static !important;
  inset: auto !important;
  transform: rotate(45deg) !important;
  flex: 0 0 8px !important;
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  margin-left: 2px !important;
  border: 0 !important;
  border-right: 2px solid #07142b !important;
  border-bottom: 2px solid #07142b !important;
  background: transparent !important;
}

html body .topbar-actions #installAppButton,
html body .topbar-actions #installAppButton.hidden,
html body .topbar-actions #logoutButton {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 11px !important;
  color: #07142b !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

html body .topbar-actions #logoutButton::before {
  content: "" !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  background: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E") center / contain no-repeat !important;
}

html body .global-header-search svg {
  fill: none !important;
  stroke: #07142b !important;
  stroke-width: 2.1 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

/* 2026-06-03: CRM mid-panel polish, v19. */
html body[data-view="crm"] .crm-control-grid {
  gap: 16px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-ref-followups,
html body[data-view="crm"] .crm-control-grid .crm-steel-price-panel {
  position: relative !important;
  min-height: 210px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 92% 0%, rgba(37, 99, 235, .08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  border: 1px solid #d9e5f2 !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .065) !important;
}

html body[data-view="crm"] .crm-control-grid .crm-ref-followups::before,
html body[data-view="crm"] .crm-control-grid .crm-steel-price-panel::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 4px !important;
  background: linear-gradient(180deg, #e1192b, #2563eb) !important;
  opacity: .95 !important;
}

html body[data-view="crm"] .crm-control-grid .crm-steel-price-panel::before {
  background: linear-gradient(180deg, #f97316, #e1192b) !important;
}

html body[data-view="crm"] .crm-ref-panel-head {
  min-height: 48px !important;
  padding: 13px 18px 10px 22px !important;
  border-bottom: 1px solid #edf2f7 !important;
  background: rgba(255, 255, 255, .72) !important;
}

html body[data-view="crm"] .crm-ref-panel-head h2 {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 !important;
  color: #07142b !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
  text-transform: uppercase !important;
}

html body[data-view="crm"] .crm-ref-followups .crm-ref-panel-head h2::before,
html body[data-view="crm"] .crm-steel-price-panel .crm-ref-panel-head h2::before {
  content: "" !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 10px !important;
  background-color: #eef5ff !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 16px 16px !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08) !important;
}

html body[data-view="crm"] .crm-ref-followups .crm-ref-panel-head h2::before {
  background-color: #fff1f2 !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='%23e1192b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.11 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.33 1.77.62 2.6a2 2 0 0 1-.45 2.11L8.1 9.9a16 16 0 0 0 6 6l1.47-1.18a2 2 0 0 1 2.11-.45c.83.29 1.7.5 2.6.62A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") !important;
}

html body[data-view="crm"] .crm-steel-price-panel .crm-ref-panel-head h2::before {
  background-color: #fff7ed !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='%23f97316' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3 3v18h18M7 15l4-4 3 3 6-7'/%3E%3C/svg%3E") !important;
}

html body[data-view="crm"] .crm-ref-panel-head button {
  min-height: 30px !important;
  padding: 0 12px !important;
  color: #d7192a !important;
  background: #fff5f6 !important;
  border: 1px solid #ffd4da !important;
  border-radius: 999px !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
}

html body[data-view="crm"] .crm-ref-follow-list {
  display: grid !important;
  gap: 10px !important;
  padding: 14px 18px 18px 22px !important;
}

html body[data-view="crm"] .crm-ref-follow-row {
  position: relative !important;
  min-height: 66px !important;
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 13px !important;
  padding: 10px 12px !important;
  background: #ffffff !important;
  border: 1px solid #dbe7f4 !important;
  border-radius: 13px !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04) !important;
}

html body[data-view="crm"] .crm-ref-follow-row:hover {
  border-color: #b9cff0 !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .09) !important;
  transform: translateY(-1px) !important;
}

html body[data-view="crm"] .crm-ref-follow-row > span {
  display: grid !important;
  place-items: center !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #eaf2ff, #f5f8ff) !important;
  color: #2563eb !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  text-align: center !important;
}

html body[data-view="crm"] .crm-ref-follow-row b {
  color: #07142b !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: .01em !important;
}

html body[data-view="crm"] .crm-ref-follow-row small {
  margin-top: 3px !important;
  color: #53667f !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

html body[data-view="crm"] .crm-ref-follow-row .crm-ref-badge {
  min-width: 58px !important;
  padding: 7px 10px !important;
  border-radius: 12px !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(180px, .58fr) minmax(180px, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
  min-height: 160px !important;
  padding: 16px 22px 20px !important;
}

html body[data-view="crm"] .crm-steel-price-body > div {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  gap: 7px !important;
  padding: 16px !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%) !important;
  border: 1px solid #ffe1c7 !important;
}

html body[data-view="crm"] .crm-steel-price-body strong {
  color: #07142b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  letter-spacing: .02em !important;
  text-transform: uppercase !important;
}

html body[data-view="crm"] .crm-steel-price-body b {
  color: #e1192b !important;
  font-size: 25px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
}

html body[data-view="crm"] .crm-steel-price-body small {
  width: fit-content !important;
  padding: 5px 9px !important;
  border-radius: 999px !important;
  background: #fff1f2 !important;
  color: #9f1239 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  text-transform: uppercase !important;
}

html body[data-view="crm"] .crm-steel-price-body svg {
  width: 100% !important;
  height: 92px !important;
  padding: 14px !important;
  border-radius: 14px !important;
  background:
    linear-gradient(180deg, rgba(225, 25, 43, .06), transparent),
    repeating-linear-gradient(0deg, transparent, transparent 21px, rgba(148, 163, 184, .16) 22px) !important;
  border: 1px solid #eef2f7 !important;
  overflow: visible !important;
}

html body[data-view="crm"] .crm-steel-price-body polyline {
  fill: none !important;
  stroke: #e1192b !important;
  stroke-width: 5 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  filter: drop-shadow(0 6px 8px rgba(225, 25, 43, .16)) !important;
}

/* 2026-06-03: CRM + New dropdown model, v20. */
html body .crm-new-menu,
html body .global-header-new {
  position: relative !important;
  z-index: 90 !important;
}

html body .crm-new-menu.open .crm-new-dropdown,
html body .crm-new-menu:hover .crm-new-dropdown,
html body .crm-new-menu:focus-within .crm-new-dropdown {
  display: grid !important;
}

html body .crm-new-dropdown,
html body .global-header-new .crm-new-dropdown,
html body[data-view="crm"] .crm-new-dropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  width: 292px !important;
  min-width: 292px !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, .98) !important;
  border: 1px solid #dbe5f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 48px rgba(15, 23, 42, .16) !important;
  backdrop-filter: blur(14px) !important;
  z-index: 120 !important;
}

html body .crm-new-dropdown button,
html body .crm-new-dropdown .crm-new-option,
html body[data-view="crm"] .crm-new-dropdown button {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 46px minmax(0, 1fr) 18px !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  min-height: 72px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf2f7 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #07142b !important;
  text-align: left !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

html body .crm-new-dropdown button:last-child {
  border-bottom: 0 !important;
}

html body .crm-new-dropdown button:hover,
html body .crm-new-dropdown button:focus-visible {
  background: #f8fbff !important;
  outline: none !important;
}

html body .crm-new-dropdown button::after {
  content: "" !important;
  width: 10px !important;
  height: 10px !important;
  justify-self: end !important;
  border-right: 2px solid #64748b !important;
  border-bottom: 2px solid #64748b !important;
  transform: rotate(-45deg) !important;
}

html body .crm-new-dropdown button > svg {
  width: 46px !important;
  height: 46px !important;
  padding: 12px !important;
  border-radius: 999px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.1 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  background: #eef5ff !important;
  color: #2563eb !important;
}

html body .crm-new-dropdown button.green > svg {
  background: #eafaf1 !important;
  color: #16a34a !important;
}

html body .crm-new-dropdown button.orange > svg {
  background: #fff3e3 !important;
  color: #f97316 !important;
}

html body .crm-new-dropdown button.purple > svg {
  background: #f3eaff !important;
  color: #7c3aed !important;
}

html body .crm-new-dropdown button.red > svg {
  background: #fff0f2 !important;
  color: #ef233c !important;
}

html body .crm-new-dropdown button > span {
  display: grid !important;
  gap: 5px !important;
  min-width: 0 !important;
}

html body .crm-new-dropdown button b {
  display: block !important;
  color: #07142b !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body .crm-new-dropdown button small {
  display: block !important;
  color: #64748b !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* 2026-06-03: CRM follow-up and steel market panels, v21. */
html body[data-view="crm"] .crm-control-grid .crm-pro-followups,
html body[data-view="crm"] .crm-control-grid .crm-pro-market {
  min-height: 286px !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid #d9e5f2 !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .07) !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-followups::before {
  width: 4px !important;
  background: linear-gradient(180deg, #e1192b, #2563eb) !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-market::before {
  width: 4px !important;
  background: linear-gradient(180deg, #f97316, #e1192b) !important;
}

html body[data-view="crm"] .crm-pro-panel-head {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 70px !important;
  padding: 14px 18px 12px 22px !important;
  background: linear-gradient(180deg, #fff, #fbfdff) !important;
  border-bottom: 1px solid #edf2f7 !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span {
  width: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  color: #e1192b !important;
  background: #fff1f2 !important;
  border: 1px solid #ffe0e4 !important;
}

html body[data-view="crm"] .crm-pro-market .crm-pro-panel-head > span {
  color: #f97316 !important;
  background: #fff7ed !important;
  border-color: #fed7aa !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span svg {
  width: 19px !important;
  height: 19px !important;
}

html body[data-view="crm"] .crm-pro-panel-head h2 {
  margin: 0 !important;
  color: #07142b !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  letter-spacing: .01em !important;
  text-transform: uppercase !important;
}

html body[data-view="crm"] .crm-pro-panel-head p {
  margin: 4px 0 0 !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

html body[data-view="crm"] .crm-pro-panel-head button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  color: #e1192b !important;
  background: #fff7f8 !important;
  border: 1px solid #ffd6dc !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-pro-panel-head button svg {
  width: 15px !important;
  height: 15px !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 14px 18px 0 22px !important;
}

html body[data-view="crm"] .crm-pro-follow-columns,
html body[data-view="crm"] .crm-pro-follow-row {
  display: grid !important;
  grid-template-columns: 1.35fr .65fr .9fr .95fr .55fr !important;
  gap: 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-columns {
  padding: 12px 14px !important;
  color: #53667f !important;
  background: #f8fafc !important;
  border: 1px solid #dbe7f4 !important;
  border-radius: 13px 13px 0 0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .03em !important;
  text-transform: uppercase !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-ref-follow-list {
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid #dbe7f4 !important;
  border-top: 0 !important;
  border-radius: 0 0 14px 14px !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  position: relative !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 78px !important;
  padding: 12px 14px !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid #edf2f7 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
}

html body[data-view="crm"] .crm-pro-follow-row::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 3px !important;
  background: #e1192b !important;
}

html body[data-view="crm"] .crm-pro-follow-row.overdue::before {
  background: #f97316 !important;
}

html body[data-view="crm"] .crm-pro-follow-row.scheduled::before {
  background: #16a34a !important;
}

html body[data-view="crm"] .crm-pro-follow-row:last-child {
  border-bottom: 0 !important;
}

html body[data-view="crm"] .crm-pro-follow-customer {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  column-gap: 11px !important;
  align-items: center !important;
  min-width: 0 !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  grid-row: span 2 !important;
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  color: #e1192b !important;
  background: #fff1f2 !important;
  font-style: normal !important;
  font-size: 14px !important;
  font-weight: 950 !important;
}

html body[data-view="crm"] .crm-pro-follow-row.overdue .crm-pro-follow-customer i {
  color: #f97316 !important;
  background: #fff7ed !important;
}

html body[data-view="crm"] .crm-pro-follow-row.scheduled .crm-pro-follow-customer i {
  color: #16a34a !important;
  background: #ecfdf5 !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b,
html body[data-view="crm"] .crm-pro-follow-amount b {
  overflow: hidden !important;
  color: #07142b !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small,
html body[data-view="crm"] .crm-pro-follow-amount small {
  margin-top: 3px !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 11.5px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
}

html body[data-view="crm"] .crm-pro-follow-quote {
  color: #53667f !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

html body[data-view="crm"] .crm-pro-follow-status,
html body[data-view="crm"] .crm-pro-follow-open {
  width: fit-content !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  font-size: 11.5px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-pro-follow-status {
  color: #e1192b !important;
  background: #ffe8ec !important;
}

html body[data-view="crm"] .crm-pro-follow-row.overdue .crm-pro-follow-status {
  color: #f97316 !important;
  background: #fff1dc !important;
}

html body[data-view="crm"] .crm-pro-follow-row.scheduled .crm-pro-follow-status {
  color: #16a34a !important;
  background: #dcfce7 !important;
}

html body[data-view="crm"] .crm-pro-follow-status i {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: currentColor !important;
}

html body[data-view="crm"] .crm-pro-follow-open {
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}

html body[data-view="crm"] .crm-pro-follow-open svg {
  width: 14px !important;
  height: 14px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  margin: 14px 18px 18px 22px !important;
  padding: 12px !important;
  border: 1px solid #e6edf6 !important;
  border-radius: 13px !important;
  background: #fbfdff !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span {
  width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 11px !important;
  color: #e1192b !important;
  background: #fff1f2 !important;
}

html body[data-view="crm"] .crm-pro-follow-summary p,
html body[data-view="crm"] .crm-pro-follow-summary small {
  margin: 0 !important;
  color: #475569 !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  min-height: 0 !important;
  padding: 18px 22px !important;
}

html body[data-view="crm"] .crm-market-card {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 102px !important;
  padding: 16px !important;
  border-radius: 16px !important;
  text-align: left !important;
}

html body[data-view="crm"] .crm-market-card.uae {
  background: linear-gradient(105deg, #ffffff 0%, #f0fdf4 100%) !important;
  border: 1px solid #bbf7d0 !important;
}

html body[data-view="crm"] .crm-market-card.muscat {
  background: linear-gradient(105deg, #ffffff 0%, #fff1f2 100%) !important;
  border: 1px solid #fecdd3 !important;
}

html body[data-view="crm"] .crm-market-flag {
  width: 48px !important;
  height: 48px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 14px !important;
  color: #07142b !important;
  background: #fff !important;
  border: 1px solid #e6edf6 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
}

html body[data-view="crm"] .crm-market-card strong {
  display: block !important;
  color: #07142b !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
}

html body[data-view="crm"] .crm-market-card b {
  display: block !important;
  margin-top: 10px !important;
  color: #07142b !important;
  font-size: 25px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

html body[data-view="crm"] .crm-market-card b small {
  display: inline !important;
  padding: 0 !important;
  color: #64748b !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body[data-view="crm"] .crm-market-card em {
  justify-self: end !important;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  font-style: normal !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-market-card em.up {
  color: #16a34a !important;
  background: #dcfce7 !important;
  border: 1px solid #bbf7d0 !important;
}

html body[data-view="crm"] .crm-market-card em.down {
  color: #e1192b !important;
  background: #ffe8ec !important;
  border: 1px solid #fecdd3 !important;
}

html body[data-view="crm"] .crm-market-card > small {
  grid-column: 3 !important;
  justify-self: end !important;
  margin-top: -28px !important;
  color: #64748b !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-transform: none !important;
}

html body[data-view="crm"] .crm-market-updated {
  display: grid !important;
  grid-template-columns: 40px auto 1fr !important;
  align-items: center !important;
  gap: 10px !important;
  padding-top: 10px !important;
  border-top: 1px dashed #dbe7f4 !important;
}

html body[data-view="crm"] .crm-market-updated span {
  width: 40px !important;
  height: 40px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 12px !important;
  color: #2563eb !important;
  background: #eef5ff !important;
}

html body[data-view="crm"] .crm-market-updated small {
  color: #64748b !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-transform: none !important;
}

html body[data-view="crm"] .crm-market-updated b {
  color: #07142b !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

@media (max-width: 1320px) {
  html body[data-view="crm"] .crm-pro-follow-summary {
    display: none !important;
  }
}

@media (max-width: 980px) {
  html body[data-view="crm"] .crm-pro-follow-columns {
    display: none !important;
  }

  html body[data-view="crm"] .crm-pro-follow-row {
    grid-template-columns: 1fr auto !important;
  }

  html body[data-view="crm"] .crm-pro-follow-quote,
  html body[data-view="crm"] .crm-pro-follow-amount {
    display: none !important;
  }
}

/* 2026-06-03: Compact CRM panels and +New menu fit, v22. */
html body .crm-new-dropdown,
html body .global-header-new .crm-new-dropdown,
html body[data-view="crm"] .crm-new-dropdown {
  width: 244px !important;
  max-height: 330px !important;
  overflow-y: auto !important;
  border-radius: 13px !important;
}

html body .crm-new-dropdown button,
html body .crm-new-dropdown .crm-new-option,
html body[data-view="crm"] .crm-new-dropdown button {
  grid-template-columns: 36px minmax(0, 1fr) 10px !important;
  min-height: 56px !important;
  padding: 9px 11px !important;
  gap: 10px !important;
}

html body .crm-new-dropdown button > svg {
  width: 36px !important;
  height: 36px !important;
  padding: 9px !important;
}

html body .crm-new-dropdown button b {
  font-size: 13.5px !important;
}

html body .crm-new-dropdown button small {
  font-size: 11px !important;
}

html body .crm-new-dropdown button::after {
  width: 8px !important;
  height: 8px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-followups,
html body[data-view="crm"] .crm-control-grid .crm-pro-market {
  min-height: 248px !important;
}

html body[data-view="crm"] .crm-pro-panel-head {
  grid-template-columns: 36px minmax(0, 1fr) auto !important;
  min-height: 58px !important;
  padding: 10px 14px 9px 18px !important;
  gap: 10px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-ref-followups .crm-ref-panel-head h2::before,
html body[data-view="crm"] .crm-steel-price-panel .crm-ref-panel-head h2::before {
  display: none !important;
}

html body[data-view="crm"] .crm-pro-panel-head h2 {
  font-size: 15.5px !important;
}

html body[data-view="crm"] .crm-pro-panel-head p {
  margin-top: 2px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button {
  min-height: 32px !important;
  padding: 0 11px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 12px 14px 0 18px !important;
}

html body[data-view="crm"] .crm-pro-follow-columns {
  display: none !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-ref-follow-list {
  border-top: 1px solid #dbe7f4 !important;
  border-radius: 13px !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "customer action"
    "meta status" !important;
  min-height: 82px !important;
  padding: 10px 12px 10px 15px !important;
  gap: 7px 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer {
  grid-area: customer !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  column-gap: 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  width: 38px !important;
  height: 38px !important;
  font-size: 13px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b {
  font-size: 13.5px !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

html body[data-view="crm"] .crm-pro-follow-quote {
  grid-area: meta !important;
  margin-left: 48px !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount {
  grid-area: meta !important;
  margin-left: 112px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount b {
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount small {
  display: none !important;
}

html body[data-view="crm"] .crm-pro-follow-status {
  grid-area: status !important;
  justify-self: end !important;
  min-height: 27px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-pro-follow-open {
  grid-area: action !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  display: none !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  gap: 10px !important;
  padding: 14px 18px !important;
}

html body[data-view="crm"] .crm-market-card {
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
  min-height: 78px !important;
  padding: 12px !important;
  gap: 11px !important;
  border-radius: 14px !important;
}

html body[data-view="crm"] .crm-market-flag {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-market-card strong {
  font-size: 14px !important;
}

html body[data-view="crm"] .crm-market-card b {
  margin-top: 7px !important;
  font-size: 21px !important;
}

html body[data-view="crm"] .crm-market-card b small {
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-market-card em {
  padding: 7px 10px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-market-card > small {
  margin-top: -18px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-market-updated {
  grid-template-columns: 32px auto 1fr !important;
  padding-top: 8px !important;
}

html body[data-view="crm"] .crm-market-updated span {
  width: 32px !important;
  height: 32px !important;
}

/* 2026-06-03: CRM mid panels tighter scale, v23. */
html body[data-view="crm"] .crm-control-grid .crm-pro-followups,
html body[data-view="crm"] .crm-control-grid .crm-pro-market {
  min-height: 196px !important;
  max-height: 210px !important;
  border-radius: 12px !important;
}

html body[data-view="crm"] .crm-pro-panel-head {
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  min-height: 48px !important;
  padding: 8px 12px 7px 14px !important;
  gap: 8px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span {
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span svg {
  width: 14px !important;
  height: 14px !important;
}

html body[data-view="crm"] .crm-pro-panel-head h2 {
  font-size: 13.5px !important;
  letter-spacing: .005em !important;
}

html body[data-view="crm"] .crm-pro-panel-head p {
  margin-top: 1px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button {
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 10.5px !important;
  border-radius: 999px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button svg {
  width: 12px !important;
  height: 12px !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 10px 12px 0 14px !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  min-height: 70px !important;
  padding: 9px 10px 9px 13px !important;
  gap: 5px 8px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer {
  grid-template-columns: 32px minmax(0, 1fr) !important;
  column-gap: 9px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  width: 32px !important;
  height: 32px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b {
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small {
  font-size: 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-quote {
  margin-left: 41px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount {
  margin-left: 96px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount b {
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-pro-follow-status,
html body[data-view="crm"] .crm-pro-follow-open {
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 10.5px !important;
  border-radius: 8px !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  gap: 8px !important;
  padding: 10px 14px !important;
}

html body[data-view="crm"] .crm-market-card {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  min-height: 66px !important;
  padding: 10px !important;
  gap: 9px !important;
  border-radius: 12px !important;
}

html body[data-view="crm"] .crm-market-flag {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  font-size: 9.5px !important;
}

html body[data-view="crm"] .crm-market-card strong {
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-market-card b {
  margin-top: 5px !important;
  font-size: 18px !important;
}

html body[data-view="crm"] .crm-market-card b small {
  font-size: 10px !important;
}

html body[data-view="crm"] .crm-market-card em {
  padding: 6px 8px !important;
  font-size: 10.5px !important;
  border-radius: 9px !important;
}

html body[data-view="crm"] .crm-market-card > small {
  margin-top: -15px !important;
  font-size: 9.5px !important;
}

html body[data-view="crm"] .crm-market-updated {
  display: none !important;
}

/* 2026-06-03: CRM panels restored to requested reference model, v24. */
html body[data-view="crm"] .crm-control-grid .crm-pro-followups,
html body[data-view="crm"] .crm-control-grid .crm-pro-market {
  min-height: 520px !important;
  max-height: none !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 96% 8%, rgba(37, 99, 235, .055), transparent 28%),
    #fff !important;
}

html body[data-view="crm"] .crm-pro-panel-head {
  grid-template-columns: 58px minmax(0, 1fr) auto !important;
  min-height: 96px !important;
  padding: 22px 24px 18px 28px !important;
  gap: 16px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span {
  width: 56px !important;
  height: 56px !important;
  border-radius: 16px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span svg {
  width: 27px !important;
  height: 27px !important;
}

html body[data-view="crm"] .crm-pro-panel-head h2 {
  font-size: 22px !important;
  line-height: 1.1 !important;
}

html body[data-view="crm"] .crm-pro-panel-head p {
  margin-top: 7px !important;
  font-size: 16px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button {
  min-height: 48px !important;
  padding: 0 20px !important;
  font-size: 16px !important;
  border-radius: 18px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button svg {
  width: 18px !important;
  height: 18px !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 26px 24px 0 28px !important;
}

html body[data-view="crm"] .crm-pro-follow-columns {
  display: grid !important;
  grid-template-columns: minmax(180px, 1.28fr) minmax(86px, .55fr) minmax(120px, .75fr) minmax(130px, .82fr) minmax(88px, .5fr) !important;
  padding: 16px 18px !important;
  border-radius: 18px 18px 0 0 !important;
  font-size: 13px !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-ref-follow-list {
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  grid-template-areas: none !important;
  grid-template-columns: minmax(180px, 1.28fr) minmax(86px, .55fr) minmax(120px, .75fr) minmax(130px, .82fr) minmax(88px, .5fr) !important;
  min-height: 110px !important;
  padding: 18px !important;
  gap: 12px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer {
  grid-area: auto !important;
  grid-template-columns: 56px minmax(0, 1fr) !important;
  column-gap: 15px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  width: 56px !important;
  height: 56px !important;
  font-size: 19px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b {
  font-size: 17px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small {
  font-size: 13.5px !important;
  line-height: 1.35 !important;
}

html body[data-view="crm"] .crm-pro-follow-quote {
  grid-area: auto !important;
  margin-left: 0 !important;
  font-size: 15px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount {
  grid-area: auto !important;
  margin-left: 0 !important;
}

html body[data-view="crm"] .crm-pro-follow-amount b {
  font-size: 16px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount small {
  display: block !important;
}

html body[data-view="crm"] .crm-pro-follow-status,
html body[data-view="crm"] .crm-pro-follow-open {
  min-height: 38px !important;
  padding: 0 14px !important;
  border-radius: 13px !important;
  font-size: 14px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  display: flex !important;
  margin: 28px 24px 22px 28px !important;
  padding: 16px !important;
  border-radius: 16px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary p,
html body[data-view="crm"] .crm-pro-follow-summary small {
  font-size: 15px !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  gap: 22px !important;
  padding: 34px 30px 24px !important;
}

html body[data-view="crm"] .crm-market-card {
  grid-template-columns: 58px minmax(0, 1fr) auto !important;
  min-height: 146px !important;
  padding: 28px !important;
  gap: 18px !important;
  border-radius: 18px !important;
}

html body[data-view="crm"] .crm-market-flag {
  position: relative !important;
  width: 42px !important;
  height: 30px !important;
  border-radius: 5px !important;
  overflow: hidden !important;
  font-size: 0 !important;
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, .08) !important;
}

html body[data-view="crm"] .crm-market-card.uae .crm-market-flag {
  background:
    linear-gradient(90deg, #ef233c 0 28%, transparent 28%),
    linear-gradient(180deg, #16a34a 0 33%, #fff 33% 66%, #111827 66%) !important;
}

html body[data-view="crm"] .crm-market-card.muscat .crm-market-flag {
  background:
    linear-gradient(90deg, #ef233c 0 28%, transparent 28%),
    linear-gradient(180deg, #fff 0 33%, #ef233c 33% 66%, #16a34a 66%) !important;
}

html body[data-view="crm"] .crm-market-card strong {
  font-size: 19px !important;
}

html body[data-view="crm"] .crm-market-card b {
  margin-top: 28px !important;
  font-size: 33px !important;
}

html body[data-view="crm"] .crm-market-card b small {
  font-size: 18px !important;
}

html body[data-view="crm"] .crm-market-card em {
  padding: 13px 18px !important;
  border-radius: 15px !important;
  font-size: 17px !important;
}

html body[data-view="crm"] .crm-market-card > small {
  grid-column: 3 !important;
  margin-top: -40px !important;
  font-size: 14px !important;
}

html body[data-view="crm"] .crm-market-updated {
  display: grid !important;
  grid-template-columns: 52px auto 1fr !important;
  gap: 14px !important;
  padding: 22px 0 0 !important;
}

html body[data-view="crm"] .crm-market-updated span {
  width: 52px !important;
  height: 52px !important;
  border-radius: 15px !important;
}

html body[data-view="crm"] .crm-market-updated small {
  font-size: 15px !important;
}

html body[data-view="crm"] .crm-market-updated b {
  font-size: 18px !important;
}

/* 2026-06-03: CRM reference panels fitted to ERP viewport, v25. */
html body[data-view="crm"] .crm-control-grid .crm-pro-followups,
html body[data-view="crm"] .crm-control-grid .crm-pro-market {
  min-height: 352px !important;
  max-height: 372px !important;
  border-radius: 14px !important;
}

html body[data-view="crm"] .crm-pro-panel-head {
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  min-height: 64px !important;
  padding: 12px 16px 10px 18px !important;
  gap: 11px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span svg {
  width: 20px !important;
  height: 20px !important;
}

html body[data-view="crm"] .crm-pro-panel-head h2 {
  font-size: 17px !important;
  line-height: 1.1 !important;
}

html body[data-view="crm"] .crm-pro-panel-head p {
  margin-top: 3px !important;
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button {
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 14px !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button svg {
  width: 14px !important;
  height: 14px !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 14px 16px 0 18px !important;
}

html body[data-view="crm"] .crm-pro-follow-columns {
  grid-template-columns: minmax(150px, 1.22fr) minmax(72px, .52fr) minmax(100px, .7fr) minmax(110px, .78fr) minmax(76px, .48fr) !important;
  padding: 10px 12px !important;
  border-radius: 13px 13px 0 0 !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  grid-template-columns: minmax(150px, 1.22fr) minmax(72px, .52fr) minmax(100px, .7fr) minmax(110px, .78fr) minmax(76px, .48fr) !important;
  min-height: 72px !important;
  padding: 10px 12px !important;
  gap: 8px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer {
  grid-template-columns: 40px minmax(0, 1fr) !important;
  column-gap: 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  width: 40px !important;
  height: 40px !important;
  font-size: 13px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b {
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small {
  font-size: 10.5px !important;
  line-height: 1.18 !important;
}

html body[data-view="crm"] .crm-pro-follow-quote {
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount b {
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount small {
  font-size: 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-status,
html body[data-view="crm"] .crm-pro-follow-open {
  min-height: 28px !important;
  padding: 0 9px !important;
  border-radius: 10px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  margin: 12px 16px 14px 18px !important;
  padding: 9px 12px !important;
  border-radius: 12px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary p,
html body[data-view="crm"] .crm-pro-follow-summary small {
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  gap: 11px !important;
  padding: 16px 18px 14px !important;
}

html body[data-view="crm"] .crm-market-card {
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  min-height: 96px !important;
  padding: 14px !important;
  gap: 12px !important;
  border-radius: 14px !important;
}

html body[data-view="crm"] .crm-market-flag {
  width: 34px !important;
  height: 24px !important;
}

html body[data-view="crm"] .crm-market-card strong {
  font-size: 14.5px !important;
}

html body[data-view="crm"] .crm-market-card b {
  margin-top: 14px !important;
  font-size: 24px !important;
}

html body[data-view="crm"] .crm-market-card b small {
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-market-card em {
  padding: 8px 11px !important;
  border-radius: 11px !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-market-card > small {
  margin-top: -22px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-market-updated {
  grid-template-columns: 34px auto 1fr !important;
  gap: 10px !important;
  padding: 8px 0 0 !important;
}

html body[data-view="crm"] .crm-market-updated span {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-market-updated small {
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-market-updated b {
  font-size: 13px !important;
}

/* 2026-06-03: CRM middle panels compressed for one-window dashboard fit, v26. */
html body[data-view="crm"] .crm-control-grid .crm-pro-followups,
html body[data-view="crm"] .crm-control-grid .crm-pro-market {
  min-height: 300px !important;
  max-height: 318px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-followups {
  border-left-width: 4px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-market {
  border-left-width: 4px !important;
}

html body[data-view="crm"] .crm-pro-panel-head {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  min-height: 54px !important;
  padding: 9px 13px 8px 14px !important;
  gap: 9px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span svg {
  width: 16px !important;
  height: 16px !important;
}

html body[data-view="crm"] .crm-pro-panel-head h2 {
  font-size: 15px !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

html body[data-view="crm"] .crm-pro-panel-head p {
  margin-top: 2px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button {
  min-height: 30px !important;
  padding: 0 11px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 10px 12px 0 14px !important;
}

html body[data-view="crm"] .crm-pro-follow-columns {
  grid-template-columns: minmax(142px, 1.35fr) minmax(58px, .45fr) minmax(88px, .68fr) minmax(92px, .72fr) minmax(60px, .42fr) !important;
  padding: 8px 10px !important;
  border-radius: 11px 11px 0 0 !important;
  font-size: 9.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  grid-template-columns: minmax(142px, 1.35fr) minmax(58px, .45fr) minmax(88px, .68fr) minmax(92px, .72fr) minmax(60px, .42fr) !important;
  min-height: 56px !important;
  padding: 8px 10px !important;
  gap: 7px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer {
  grid-template-columns: 32px minmax(0, 1fr) !important;
  column-gap: 8px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  width: 32px !important;
  height: 32px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b {
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small {
  font-size: 9.5px !important;
  line-height: 1.15 !important;
}

html body[data-view="crm"] .crm-pro-follow-quote {
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount b {
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount small {
  font-size: 9px !important;
}

html body[data-view="crm"] .crm-pro-follow-status,
html body[data-view="crm"] .crm-pro-follow-open {
  min-height: 24px !important;
  padding: 0 8px !important;
  border-radius: 9px !important;
  font-size: 9.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  margin: 8px 12px 10px 14px !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span {
  width: 28px !important;
  height: 28px !important;
  border-radius: 9px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary p,
html body[data-view="crm"] .crm-pro-follow-summary small {
  font-size: 10px !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  gap: 8px !important;
  padding: 10px 13px 11px !important;
}

html body[data-view="crm"] .crm-market-card {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  min-height: 70px !important;
  padding: 10px 11px !important;
  gap: 9px !important;
  border-radius: 12px !important;
}

html body[data-view="crm"] .crm-market-flag {
  width: 28px !important;
  height: 20px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
}

html body[data-view="crm"] .crm-market-card strong {
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-market-card b {
  margin-top: 6px !important;
  font-size: 20px !important;
}

html body[data-view="crm"] .crm-market-card b small {
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-market-card em {
  padding: 6px 9px !important;
  border-radius: 10px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-market-card > small {
  margin-top: -15px !important;
  font-size: 9.5px !important;
}

html body[data-view="crm"] .crm-market-updated {
  grid-template-columns: 28px auto 1fr !important;
  gap: 8px !important;
  padding: 5px 0 0 !important;
}

html body[data-view="crm"] .crm-market-updated span {
  width: 28px !important;
  height: 28px !important;
  border-radius: 9px !important;
}

html body[data-view="crm"] .crm-market-updated small {
  font-size: 9.5px !important;
}

html body[data-view="crm"] .crm-market-updated b {
  font-size: 11px !important;
}

/* 2026-06-05: CRM dashboard clean fit pass, v34.
   Keeps the dashboard dense without clipping rows or leaving oversized blank panels. */
html body[data-view="crm"] .crm-ref-dashboard.crm-control-center {
  gap: 18px !important;
  padding: 20px 24px 18px !important;
}

html body[data-view="crm"] .crm-control-head {
  min-height: 78px !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 0 8px 14px !important;
}

html body[data-view="crm"] .crm-control-head h1 {
  font-size: 25px !important;
  line-height: 1.05 !important;
  letter-spacing: .02em !important;
}

html body[data-view="crm"] .crm-control-head p {
  margin-top: 4px !important;
  font-size: 14px !important;
}

html body[data-view="crm"] .crm-control-tools {
  gap: 12px !important;
}

html body[data-view="crm"] .crm-control-search {
  height: 48px !important;
  min-width: min(560px, 48vw) !important;
  border-radius: 14px !important;
}

html body[data-view="crm"] .crm-new-button {
  height: 48px !important;
  min-width: 112px !important;
  border-radius: 14px !important;
  font-size: 15px !important;
}

html body[data-view="crm"] .crm-control-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

html body[data-view="crm"] .crm-ref-kpi {
  min-height: 112px !important;
  padding: 16px 18px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-ref-kpi-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy small {
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy b {
  font-size: 25px !important;
  line-height: 1.05 !important;
}

html body[data-view="crm"] .crm-ref-kpi-copy strong {
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-ref-kpi em {
  height: 32px !important;
  padding: 0 18px !important;
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-ref-kpi-menu {
  top: 14px !important;
  right: 16px !important;
}

html body[data-view="crm"] .crm-control-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-followups,
html body[data-view="crm"] .crm-control-grid .crm-pro-market,
html body[data-view="crm"] .crm-control-grid .crm-ref-latest,
html body[data-view="crm"] .crm-control-grid .crm-delivery-panel {
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .055) !important;
}

html body[data-view="crm"] .crm-pro-panel-head {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  min-height: 54px !important;
  padding: 10px 14px 9px 18px !important;
  border-bottom: 1px solid #edf2f7 !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span {
  width: 30px !important;
  height: 30px !important;
  border-radius: 10px !important;
}

html body[data-view="crm"] .crm-pro-panel-head > span svg {
  width: 15px !important;
  height: 15px !important;
}

html body[data-view="crm"] .crm-pro-panel-head h2 {
  font-size: 17px !important;
  line-height: 1.1 !important;
  letter-spacing: .01em !important;
}

html body[data-view="crm"] .crm-pro-panel-head p {
  margin-top: 3px !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-pro-panel-head button {
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 12px 14px 0 18px !important;
}

html body[data-view="crm"] .crm-pro-follow-columns {
  display: none !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-ref-follow-list {
  display: grid !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  grid-template-areas:
    "customer amount action"
    "quote status action" !important;
  align-items: center !important;
  min-height: 68px !important;
  gap: 6px 12px !important;
  padding: 10px 12px 10px 15px !important;
  border: 1px solid #dbe7f4 !important;
  border-radius: 13px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html body[data-view="crm"] .crm-pro-follow-row::before {
  width: 4px !important;
  border-radius: 13px 0 0 13px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer {
  grid-area: customer !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  gap: 0 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  width: 36px !important;
  height: 36px !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b {
  font-size: 13.5px !important;
  line-height: 1.15 !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small {
  display: block !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-pro-follow-quote {
  grid-area: quote !important;
  margin-left: 46px !important;
  color: #475569 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

html body[data-view="crm"] .crm-pro-follow-amount {
  grid-area: amount !important;
  min-width: 92px !important;
  text-align: right !important;
}

html body[data-view="crm"] .crm-pro-follow-amount b {
  font-size: 13px !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-pro-follow-amount small {
  display: none !important;
}

html body[data-view="crm"] .crm-pro-follow-status {
  grid-area: status !important;
  justify-self: end !important;
}

html body[data-view="crm"] .crm-pro-follow-open {
  grid-area: action !important;
  justify-self: end !important;
}

html body[data-view="crm"] .crm-pro-follow-status,
html body[data-view="crm"] .crm-pro-follow-open {
  min-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  display: flex !important;
  min-height: 38px !important;
  margin: 10px 14px 14px 18px !important;
  padding: 8px 10px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span {
  width: 28px !important;
  height: 28px !important;
}

html body[data-view="crm"] .crm-pro-follow-summary p,
html body[data-view="crm"] .crm-pro-follow-summary small {
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-steel-price-body {
  display: grid !important;
  gap: 10px !important;
  padding: 12px 16px 14px 18px !important;
}

html body[data-view="crm"] .crm-market-card {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  min-height: 72px !important;
  padding: 11px 12px !important;
  gap: 12px !important;
  border-radius: 13px !important;
}

html body[data-view="crm"] .crm-market-flag {
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-market-card strong {
  font-size: 14px !important;
}

html body[data-view="crm"] .crm-market-card b {
  margin-top: 5px !important;
  font-size: 22px !important;
}

html body[data-view="crm"] .crm-market-card em {
  padding: 7px 10px !important;
  border-radius: 11px !important;
  font-size: 11.5px !important;
}

html body[data-view="crm"] .crm-market-card > small {
  margin-top: -16px !important;
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-market-updated {
  grid-template-columns: 30px auto 1fr !important;
  min-height: 32px !important;
  gap: 8px !important;
  padding: 7px 0 0 !important;
}

html body[data-view="crm"] .crm-market-updated span {
  width: 30px !important;
  height: 30px !important;
}

html body[data-view="crm"] .crm-market-updated small,
html body[data-view="crm"] .crm-market-updated b {
  font-size: 11px !important;
}

html body[data-view="crm"] .crm-ref-latest,
html body[data-view="crm"] .crm-delivery-panel {
  margin-top: 0 !important;
}

html body[data-view="crm"] .crm-ref-panel-head:not(.crm-pro-panel-head) {
  min-height: 50px !important;
  padding: 12px 16px !important;
}

html body[data-view="crm"] .crm-ref-table th,
html body[data-view="crm"] .crm-ref-table td {
  height: 38px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body[data-view="crm"] .crm-ref-table th {
  font-size: 11px !important;
}

@media (max-width: 1180px) {
  html body[data-view="crm"] .crm-control-kpis,
  html body[data-view="crm"] .crm-control-grid {
    grid-template-columns: 1fr !important;
  }

  html body[data-view="crm"] .crm-control-head {
    grid-template-columns: 1fr !important;
  }

  html body[data-view="crm"] .crm-control-search {
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* 2026-06-05: CRM dashboard follow-up cleanup, v35.
   Steel Market was removed from the main dashboard; follow-ups now use one-line rows. */
html body[data-view="crm"] .crm-control-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px !important;
}

html body[data-view="crm"] .crm-control-grid .crm-pro-followups {
  grid-column: 1 / -1 !important;
}

html body[data-view="crm"] .crm-pro-follow-table {
  padding: 10px 14px 12px !important;
}

html body[data-view="crm"] .crm-pro-follow-columns {
  display: grid !important;
  grid-template-columns: minmax(190px, 1.8fr) 120px 140px 150px 110px !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 0 18px !important;
  border: 1px solid #dbe7f4 !important;
  border-radius: 12px 12px 0 0 !important;
  background: #f8fbff !important;
  color: #5b6b82 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-ref-follow-list {
  gap: 0 !important;
  border: 1px solid #dbe7f4 !important;
  border-top: 0 !important;
  border-radius: 0 0 12px 12px !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  grid-template-columns: minmax(190px, 1.8fr) 120px 140px 150px 110px !important;
  grid-template-areas: "customer quote amount status action" !important;
  min-height: 58px !important;
  gap: 12px !important;
  padding: 8px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid #e7eef6 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body[data-view="crm"] .crm-pro-follow-row:last-child {
  border-bottom: 0 !important;
}

html body[data-view="crm"] .crm-pro-follow-row::before {
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 3px !important;
  border-radius: 0 !important;
}

html body[data-view="crm"] .crm-pro-follow-customer {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
}

html body[data-view="crm"] .crm-pro-follow-customer i {
  grid-row: 1 / span 2 !important;
  width: 34px !important;
  height: 34px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer b,
html body[data-view="crm"] .crm-pro-follow-customer small,
html body[data-view="crm"] .crm-pro-follow-quote,
html body[data-view="crm"] .crm-pro-follow-amount b {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small {
  font-size: 10.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small br {
  display: none !important;
}

html body[data-view="crm"] .crm-pro-follow-quote {
  margin-left: 0 !important;
  justify-self: start !important;
  font-size: 12px !important;
}

html body[data-view="crm"] .crm-pro-follow-amount {
  min-width: 0 !important;
  justify-self: start !important;
  text-align: left !important;
}

html body[data-view="crm"] .crm-pro-follow-amount b {
  font-size: 12.5px !important;
}

html body[data-view="crm"] .crm-pro-follow-status {
  justify-self: start !important;
}

html body[data-view="crm"] .crm-pro-follow-open {
  justify-self: end !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  margin: 0 14px 14px !important;
  border-top: 0 !important;
}

html body[data-view="crm"] .crm-pro-market {
  display: none !important;
}

/* 2026-06-07: Follow-up card interaction polish, v56. */
html body[data-view="crm"] .crm-pro-followups {
  position: relative !important;
}

html body[data-view="crm"] .crm-pro-panel-head button,
html body[data-view="crm"] .crm-pro-follow-row,
html body[data-view="crm"] .crm-pro-follow-summary {
  position: relative !important;
  z-index: 2 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  text-align: left !important;
  background: #fff !important;
  transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

html body[data-view="crm"] .crm-pro-follow-row:hover,
html body[data-view="crm"] .crm-pro-follow-row:focus-visible {
  background: #f8fbff !important;
  box-shadow: inset 4px 0 0 currentColor !important;
  outline: none !important;
}

html body[data-view="crm"] .crm-pro-follow-row:hover .crm-pro-follow-open,
html body[data-view="crm"] .crm-pro-follow-row:focus-visible .crm-pro-follow-open {
  background: #eaf3ff !important;
  border-color: #93c5fd !important;
}

html body[data-view="crm"] .crm-pro-follow-row > * {
  pointer-events: none !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small {
  display: block !important;
  max-width: 100% !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  width: auto !important;
  text-align: left !important;
}

html body[data-view="crm"] .crm-pro-follow-summary:hover,
html body[data-view="crm"] .crm-pro-follow-summary:focus-visible {
  background: #fff !important;
  border-color: #bfd3ea !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08) !important;
  outline: none !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span {
  flex: 0 0 auto !important;
  color: #ef1728 !important;
  background: #fff1f3 !important;
  border: 1px solid #ffd0d6 !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

@media (max-width: 980px) {
  html body[data-view="crm"] .crm-pro-follow-columns {
    display: none !important;
  }

  html body[data-view="crm"] .crm-pro-follow-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "customer action"
      "quote status"
      "amount status" !important;
  }

  html body[data-view="crm"] .crm-pro-followups .crm-ref-follow-list {
    border-top: 1px solid #dbe7f4 !important;
    border-radius: 12px !important;
  }
}

/* 2026-06-05: Professional quotation form and locked calculation fields, v36. */
html body .quotation-entry-form {
  gap: 12px !important;
}

html body .quotation-entry-form > label,
html body .quotation-form-topline,
html body .quotation-line-editor {
  border-color: #d9e5f2 !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .035) !important;
}

html body .quotation-entry-form > label {
  padding: 12px 14px !important;
}

html body .quotation-entry-form input,
html body .quotation-entry-form select,
html body .quotation-entry-form textarea {
  min-height: 42px !important;
  border-radius: 9px !important;
}

html body .quotation-form-topline {
  padding: 12px 14px !important;
}

html body .quotation-number-field {
  color: #dc1624 !important;
  font-size: 18px !important;
  letter-spacing: .03em !important;
}

html body .quotation-line-editor {
  border-left: 5px solid #dc1624 !important;
  padding: 18px !important;
}

html body .inline-section-head {
  align-items: end !important;
  margin-bottom: 10px !important;
}

html body .inline-section-head strong {
  font-size: 18px !important;
}

html body .quotation-line-row {
  grid-template-columns: minmax(280px, 1.6fr) 82px 82px 118px 118px 132px !important;
  gap: 8px !important;
}

html body .quotation-line-row:not(.quotation-line-head) {
  padding: 9px !important;
  border-color: #dce7f3 !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
}

html body .quotation-line-head {
  padding: 0 8px !important;
  color: #475569 !important;
  font-size: 11px !important;
  letter-spacing: .04em !important;
}

html body .quotation-item-field {
  grid-template-columns: minmax(0, 1fr) 78px !important;
}

html body .quotation-vat-auto-card,
html body .quotation-charge-grid label {
  display: grid !important;
  gap: 7px !important;
  min-height: 80px !important;
  padding: 12px !important;
  border: 1px solid #dce7f3 !important;
  border-radius: 12px !important;
  background: #fbfdff !important;
}

html body .quotation-vat-auto-card {
  align-content: center !important;
  border-color: #bbf7d0 !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 82%) !important;
}

html body .quotation-vat-auto-card strong {
  color: #047857 !important;
  font-size: 17px !important;
  font-weight: 900 !important;
}

html body .quotation-vat-auto-card span {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

html body .quotation-entry-form .locked-display-field,
html body .quotation-entry-form input[readonly].locked-display-field,
html body .quotation-entry-form input:disabled.locked-display-field {
  pointer-events: none !important;
  cursor: default !important;
  border-color: #e2e8f0 !important;
  background: linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%) !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  user-select: none !important;
  opacity: 1 !important;
}

html body .quotation-entry-form .quotation-line-total.locked-display-field,
html body .quotation-charge-grid .quotation-locked-label .locked-display-field {
  color: #0f172a !important;
  font-size: 15px !important;
}

html body .quotation-charge-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
}

html body .quotation-entry-form .form-actions {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 2 !important;
  padding: 14px 0 0 !important;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0), #f8fbff 28%) !important;
}

@media (max-width: 1180px) {
  html body .quotation-line-row {
    grid-template-columns: minmax(240px, 1fr) 78px 78px 108px 108px 124px !important;
  }

  html body .quotation-charge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* 2026-06-05: Compact CRM follow-up register, v38. */
html body .crm-followup-register {
  display: grid !important;
  gap: 10px !important;
  padding: 8px 0 !important;
}

html body .crm-followup-register-head,
html body .crm-followup-register-row {
  display: grid !important;
  grid-template-columns: minmax(220px, 1.4fr) 150px 150px 130px minmax(150px, .8fr) !important;
  align-items: center !important;
  gap: 14px !important;
}

html body .crm-followup-register-head {
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #dce7f3 !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
  color: #526176 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

html body .crm-followup-register-row {
  width: 100% !important;
  min-height: 58px !important;
  padding: 10px 18px !important;
  border: 1px solid #d6e3f2 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #0f172a !important;
  text-align: left !important;
  font: inherit !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .04) !important;
  cursor: pointer !important;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease !important;
}

html body .crm-followup-register-row:hover {
  transform: translateY(-1px) !important;
  border-color: #ef1d2f !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08) !important;
}

html body .crm-followup-register-row span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

html body .crm-followup-register-row .crm-followup-customer {
  font-size: 16px !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

html body .crm-followup-register-row .crm-followup-amount {
  justify-self: end !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  color: #0f172a !important;
}

html body .crm-followup-register-row .badge {
  justify-self: start !important;
  max-width: 100% !important;
}

@media (max-width: 900px) {
  html body .crm-followup-register-head {
    display: none !important;
  }

  html body .crm-followup-register-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px 12px !important;
  }

  html body .crm-followup-register-row .crm-followup-customer,
  html body .crm-followup-register-row .crm-followup-amount {
    font-size: 15px !important;
  }
}

/* 2026-06-05: Shared compact record register for ERP detail windows, v39. */
html body .compact-record-register {
  display: grid !important;
  gap: 8px !important;
  padding: 6px 0 !important;
}

html body .compact-record-head,
html body .compact-record-row {
  display: grid !important;
  align-items: center !important;
  gap: 12px !important;
}

html body .compact-record-head {
  min-height: 36px !important;
  padding: 0 14px !important;
  border: 1px solid #dce7f3 !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
  color: #526176 !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

html body .compact-record-row {
  width: 100% !important;
  min-height: 48px !important;
  padding: 9px 14px !important;
  border: 1px solid #d6e3f2 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #0f172a !important;
  text-align: left !important;
  font: inherit !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04) !important;
  cursor: pointer !important;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease !important;
}

html body .compact-record-row:hover {
  transform: translateY(-1px) !important;
  border-color: #ef1d2f !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .08) !important;
}

html body .compact-record-row span,
html body .compact-record-head span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .compact-record-row span {
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body .compact-record-row small {
  display: inline !important;
  margin-left: 6px !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

html body .compact-record-strong {
  font-weight: 950 !important;
  color: #06142b !important;
}

html body .compact-record-money {
  justify-self: end !important;
  font-weight: 950 !important;
}

html body .compact-record-action {
  justify-self: end !important;
  color: #ef1d2f !important;
  font-weight: 950 !important;
}

html body .compact-record-row .status {
  width: max-content !important;
  max-width: 100% !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}

html body .compact-record-quotation .compact-record-head,
html body .compact-record-quotation .compact-record-row,
html body .compact-record-search-list .compact-record-head,
html body .compact-record-search-list .compact-record-row {
  grid-template-columns: 110px minmax(180px, 1.3fr) 170px 130px 110px 76px !important;
}

html body .compact-record-customers .compact-record-head,
html body .compact-record-customers .compact-record-row {
  grid-template-columns: 100px minmax(220px, 1.4fr) 130px 150px 150px 76px !important;
}

html body .compact-record-deliveries .compact-record-head,
html body .compact-record-deliveries .compact-record-row {
  grid-template-columns: 120px minmax(180px, 1.2fr) minmax(180px, 1.2fr) minmax(190px, 1.1fr) 120px 76px !important;
}

html body .compact-record-stage-list .compact-record-head,
html body .compact-record-stage-list .compact-record-row {
  grid-template-columns: 110px minmax(200px, 1.4fr) 130px 120px 120px 76px !important;
}

@media (max-width: 980px) {
  html body .compact-record-head {
    display: none !important;
  }

  html body .compact-record-quotation .compact-record-row,
  html body .compact-record-customers .compact-record-row,
  html body .compact-record-deliveries .compact-record-row,
  html body .compact-record-stage-list .compact-record-row,
  html body .compact-record-search-list .compact-record-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px 10px !important;
  }

  html body .compact-record-row span:nth-child(n + 3):not(.compact-record-action) {
    font-size: 12px !important;
    color: #526176 !important;
  }
}

/* 2026-06-05: Clean Greenland Steels A4 quotation print sheet. */
.gs-quote-sheet.gs-clean-quote {
  width: 210mm !important;
  min-height: 297mm !important;
  margin: 0 auto !important;
  padding: 9mm !important;
  background: #fff !important;
  color: #07142b !important;
  font-family: Arial, Helvetica, sans-serif !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12) !important;
  border-radius: 0 !important;
}

.gs-clean-quote * {
  box-sizing: border-box !important;
  letter-spacing: 0 !important;
}

.gq-header {
  display: grid !important;
  grid-template-columns: 86mm 51mm 36mm !important;
  gap: 4.5mm !important;
  align-items: start !important;
}

.gq-brand-block,
.gq-company-block {
  border-right: 1px solid #b8c0ca !important;
  min-height: 44mm !important;
  padding-right: 5.2mm !important;
  min-width: 0 !important;
}

.gq-logo-row {
  display: flex !important;
  align-items: center !important;
  gap: 3mm !important;
  min-width: 0 !important;
}

.gq-logo-mark {
  width: 15.5mm !important;
  height: 15.5mm !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 3.6mm !important;
  background: #ed1c24 !important;
  color: #fff !important;
  font-size: 10.4mm !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  flex: 0 0 15.5mm !important;
}

.gq-logo-row strong {
  min-width: 0 !important;
  font-size: 5.7mm !important;
  line-height: .95 !important;
  font-weight: 950 !important;
  color: #090f1d !important;
  white-space: nowrap !important;
}

.gq-logo-row em {
  color: #ed1c24 !important;
  font-style: normal !important;
}

.gq-brand-block p {
  margin: 6mm 0 4.5mm !important;
  font-size: 3.65mm !important;
  color: #111827 !important;
}

.gq-sectors {
  display: flex !important;
  gap: 3.4mm !important;
  align-items: center !important;
  color: #111827 !important;
  font-size: 3mm !important;
  text-transform: uppercase !important;
}

.gq-sectors i {
  width: .5mm !important;
  height: 5mm !important;
  background: #ed1c24 !important;
  display: inline-block !important;
}

.gq-company-block {
  display: grid !important;
  gap: 2.9mm !important;
  font-size: 3.1mm !important;
  min-width: 0 !important;
}

.gq-company-block span {
  display: grid !important;
  grid-template-columns: 6.4mm minmax(0, 1fr) !important;
  gap: 2.5mm !important;
  align-items: center !important;
  line-height: 1.25 !important;
}

.gq-company-block i {
  display: inline-grid !important;
  place-items: center !important;
  width: 5.2mm !important;
  height: 5.2mm !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #07142b !important;
  font-size: 0 !important;
  font-style: normal !important;
  font-weight: 800 !important;
  border: 0 !important;
}

.gq-company-block i::before {
  content: "" !important;
  display: block !important;
  width: 4.1mm !important;
  height: 4.1mm !important;
  background: currentColor !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
}

.gq-company-block span:nth-child(1) i::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5Z'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5Z'/%3E%3C/svg%3E") !important;
}

.gq-company-block span:nth-child(2) i::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M19.95 21.5C10.85 21.5 3.5 14.15 3.5 5.05A2.55 2.55 0 0 1 6.05 2.5h3.1c.6 0 1.12.42 1.25 1l.7 3.1c.12.5-.08 1.02-.5 1.3L8.7 9.15a12.2 12.2 0 0 0 6.15 6.15l1.25-1.9c.28-.42.8-.62 1.3-.5l3.1.7c.58.13 1 .65 1 1.25v3.1a2.55 2.55 0 0 1-2.55 2.55Z'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M19.95 21.5C10.85 21.5 3.5 14.15 3.5 5.05A2.55 2.55 0 0 1 6.05 2.5h3.1c.6 0 1.12.42 1.25 1l.7 3.1c.12.5-.08 1.02-.5 1.3L8.7 9.15a12.2 12.2 0 0 0 6.15 6.15l1.25-1.9c.28-.42.8-.62 1.3-.5l3.1.7c.58.13 1 .65 1 1.25v3.1a2.55 2.55 0 0 1-2.55 2.55Z'/%3E%3C/svg%3E") !important;
}

.gq-company-block span:nth-child(3) i::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm9 7.1L4.45 7H3.9l8.1 5.5L20.1 7h-.55L12 12.1Z'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm9 7.1L4.45 7H3.9l8.1 5.5L20.1 7h-.55L12 12.1Z'/%3E%3C/svg%3E") !important;
}

.gq-company-block span:nth-child(4) i::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm7.45 9H16.8a15.2 15.2 0 0 0-1.35-5.2A8.05 8.05 0 0 1 19.45 11ZM12 4.05c.95 1.25 1.62 3.15 1.8 4.95h-3.6c.18-1.8.85-3.7 1.8-4.95ZM4.55 13H7.2c.18 1.9.65 3.7 1.35 5.2A8.05 8.05 0 0 1 4.55 13ZM7.2 11H4.55a8.05 8.05 0 0 1 4-5.2A15.2 15.2 0 0 0 7.2 11ZM12 19.95c-.95-1.25-1.62-3.15-1.8-4.95h3.6c-.18 1.8-.85 3.7-1.8 4.95ZM14.25 13h-4.5a19.6 19.6 0 0 1 0-2h4.5a19.6 19.6 0 0 1 0 2Zm1.2 5.2c.7-1.5 1.17-3.3 1.35-5.2h2.65a8.05 8.05 0 0 1-4 5.2Z'/%3E%3C/svg%3E") !important;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm7.45 9H16.8a15.2 15.2 0 0 0-1.35-5.2A8.05 8.05 0 0 1 19.45 11ZM12 4.05c.95 1.25 1.62 3.15 1.8 4.95h-3.6c.18-1.8.85-3.7 1.8-4.95ZM4.55 13H7.2c.18 1.9.65 3.7 1.35 5.2A8.05 8.05 0 0 1 4.55 13ZM7.2 11H4.55a8.05 8.05 0 0 1 4-5.2A15.2 15.2 0 0 0 7.2 11ZM12 19.95c-.95-1.25-1.62-3.15-1.8-4.95h3.6c-.18 1.8-.85 3.7-1.8 4.95ZM14.25 13h-4.5a19.6 19.6 0 0 1 0-2h4.5a19.6 19.6 0 0 1 0 2Zm1.2 5.2c.7-1.5 1.17-3.3 1.35-5.2h2.65a8.05 8.05 0 0 1-4 5.2Z'/%3E%3C/svg%3E") !important;
}

.gq-company-block b {
  color: #111827 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.gq-company-block em {
  min-width: 0 !important;
  color: #111827 !important;
  font-style: normal !important;
  overflow-wrap: normal !important;
}

.gq-title-block {
  display: grid !important;
  justify-items: stretch !important;
  gap: 3.6mm !important;
  min-width: 0 !important;
  padding-left: 1.5mm !important;
}

.gq-title-block h1 {
  margin: 0 !important;
  color: #050b16 !important;
  text-transform: uppercase !important;
  font-size: 6.4mm !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  text-align: center !important;
}

.gq-title-block strong {
  border: 1.5px solid #ed1c24 !important;
  border-radius: 1.5mm !important;
  color: #ed1c24 !important;
  width: 100% !important;
  padding: 3.1mm 1.5mm !important;
  font-size: 5.2mm !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  text-align: center !important;
}

.gq-title-block div {
  display: grid !important;
  grid-template-columns: 13mm minmax(0, 1fr) !important;
  gap: 2mm !important;
  font-size: 2.9mm !important;
  align-items: center !important;
}

.gq-title-block div span::after {
  content: ":" !important;
  float: right !important;
}

.gq-title-block div b {
  white-space: nowrap !important;
}

.gq-divider {
  height: .45mm !important;
  background: #ed1c24 !important;
  margin: 7mm 0 !important;
}

.gq-customer-grid {
  display: grid !important;
  grid-template-columns: 25mm 1fr !important;
  gap: 3.8mm 7mm !important;
  padding: 1mm 1mm 6mm !important;
  border-bottom: 1px solid #9ca3af !important;
}

.gq-customer-grid div {
  display: contents !important;
}

.gq-customer-grid span,
.gq-customer-grid b {
  font-size: 3.8mm !important;
  line-height: 1.2 !important;
}

.gq-customer-grid span::after {
  content: ":" !important;
  float: right !important;
}

.gq-items-table {
  width: 100% !important;
  margin-top: 7mm !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  font-size: 3.2mm !important;
}

.gq-items-table th {
  height: 11mm !important;
  background: linear-gradient(180deg, #fafafa, #f2f4f7) !important;
  border-top: 1px solid #9ca3af !important;
  border-bottom: 1px solid #9ca3af !important;
  border-right: 1px dotted #c7cbd2 !important;
  padding: 2.5mm 3mm !important;
  font-size: 3.2mm !important;
  text-align: left !important;
  font-weight: 800 !important;
}

.gq-items-table td {
  height: 15mm !important;
  border-bottom: 1px dotted #c7cbd2 !important;
  border-right: 1px dotted #d6d9df !important;
  padding: 2.5mm 3mm !important;
  vertical-align: middle !important;
}

.gq-items-table th:nth-child(1),
.gq-items-table td:nth-child(1) {
  width: 13mm !important;
  text-align: center !important;
}

.gq-items-table th:nth-child(3),
.gq-items-table td:nth-child(3),
.gq-items-table th:nth-child(4),
.gq-items-table td:nth-child(4),
.gq-items-table th:nth-child(5),
.gq-items-table td:nth-child(5) {
  width: 32mm !important;
  text-align: right !important;
}

.gq-items-table td:nth-child(2) {
  font-weight: 600 !important;
}

.gq-items-table small {
  display: block !important;
  margin-top: 1.2mm !important;
  color: #526176 !important;
  font-size: 2.6mm !important;
}

.gq-summary {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8mm !important;
  padding: 6mm 0 5mm !important;
  border-bottom: 1px solid #9ca3af !important;
}

.gq-words {
  border-right: 1px solid #c7cbd2 !important;
  padding-right: 8mm !important;
}

.gq-words p,
.gq-totals p {
  margin: 0 0 3.2mm !important;
}

.gq-words b,
.gq-words span {
  display: block !important;
  font-size: 3mm !important;
  line-height: 1.35 !important;
}

.gq-words b {
  text-transform: uppercase !important;
  letter-spacing: .02em !important;
}

.gq-totals p {
  display: grid !important;
  grid-template-columns: 1fr 36mm !important;
  gap: 5mm !important;
  font-size: 3.4mm !important;
}

.gq-totals b {
  text-align: right !important;
  white-space: nowrap !important;
}

.gq-grand-total {
  border-top: 1.5px solid #07142b !important;
  padding-top: 4mm !important;
  margin-top: 4mm !important;
  text-transform: uppercase !important;
  font-weight: 900 !important;
}

.gq-grand-total b {
  font-size: 4.4mm !important;
}

.gq-bottom-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8mm !important;
  padding: 5mm 0 !important;
  border-bottom: 1px solid #9ca3af !important;
}

.gq-bottom-grid > div:first-child {
  border-right: 1px solid #c7cbd2 !important;
  padding-right: 8mm !important;
}

.gq-bottom-grid h2 {
  margin: 0 0 3mm !important;
  font-size: 3.2mm !important;
  text-transform: uppercase !important;
}

.gq-bottom-grid ol {
  margin: 0 0 3mm 5mm !important;
  padding: 0 !important;
}

.gq-bottom-grid li,
.gq-bottom-grid p,
.gq-bottom-grid span,
.gq-bottom-grid small {
  font-size: 2.65mm !important;
  line-height: 1.45 !important;
}

.gq-bottom-grid strong,
.gq-bottom-grid span,
.gq-bottom-grid small {
  display: block !important;
}

.gq-bottom-grid i {
  display: block !important;
  width: 58mm !important;
  height: 1px !important;
  background: #07142b !important;
  margin: 12mm 0 3mm !important;
}

.gq-footer {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 4mm !important;
  padding-top: 4mm !important;
  color: #111827 !important;
  font-size: 3mm !important;
}

.gq-footer span:not(:last-child) {
  border-right: 1px solid #9ca3af !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html body .gs-quote-sheet.gs-clean-quote {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 !important;
    padding: 10mm !important;
    overflow: hidden !important;
    box-shadow: none !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }
}

/* 2026-06-06: Active search controls across ERP and CRM. */
html body .crm-control-search,
html body[data-view="crm"] .crm-control-search {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) 30px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 6px 0 12px !important;
}

html body .crm-control-search input,
html body[data-view="crm"] .crm-control-search input {
  min-width: 0 !important;
  width: 100% !important;
}

html body .crm-control-search button,
html body[data-view="crm"] .crm-control-search button {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #07142b !important;
  cursor: pointer !important;
}

html body .crm-control-search button:hover,
html body[data-view="crm"] .crm-control-search button:hover {
  background: #eef4ff !important;
  color: #2563eb !important;
}

html body .crm-record-searchbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 44px !important;
  gap: 8px !important;
  align-items: center !important;
}

html body .crm-record-searchbar input {
  width: 100% !important;
  min-width: 0 !important;
}

html body .crm-record-search-button {
  height: 44px !important;
  width: 44px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid #cfd9e7 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #07142b !important;
  cursor: pointer !important;
}

html body .crm-record-search-button:hover {
  border-color: #2563eb !important;
  background: #eef4ff !important;
  color: #2563eb !important;
}

html body .crm-record-search-button svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
}

/* 2026-06-07: CRM follow-up card clickable polish. */
html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-head button,
html body[data-view="crm"] .crm-pro-follow-row,
html body[data-view="crm"] .crm-pro-follow-summary {
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  text-align: left !important;
  background: #fff !important;
  transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease !important;
}

html body[data-view="crm"] .crm-pro-follow-row:hover,
html body[data-view="crm"] .crm-pro-follow-row:focus-visible {
  background: #f8fbff !important;
  box-shadow: inset 3px 0 0 currentColor !important;
  outline: none !important;
}

html body[data-view="crm"] .crm-pro-follow-row:active {
  transform: translateY(1px) !important;
}

html body[data-view="crm"] .crm-pro-follow-open {
  pointer-events: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

html body[data-view="crm"] .crm-pro-follow-open svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  width: auto !important;
  text-align: left !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease !important;
}

html body[data-view="crm"] .crm-pro-follow-summary:hover,
html body[data-view="crm"] .crm-pro-follow-summary:focus-visible {
  background: #fff !important;
  border-color: #cfe0f3 !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
  outline: none !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span {
  flex: 0 0 auto !important;
  color: #ef1728 !important;
  background: #fff1f3 !important;
  border: 1px solid #ffd0d6 !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span svg {
  width: 17px !important;
  height: 17px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body[data-view="crm"] .crm-pro-follow-summary p {
  white-space: nowrap !important;
}

html body[data-view="crm"] .crm-pro-follow-summary small {
  display: inline-flex !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
}

/* 2026-06-07: CRM follow-up panel final click and icon cleanup. */
html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-icon,
html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-head > span {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid #ffd0d6 !important;
  border-radius: 12px !important;
  background: #fff1f3 !important;
  color: #e1192b !important;
  font-size: 0 !important;
  overflow: hidden !important;
  cursor: pointer !important;
  box-shadow: 0 6px 16px rgba(225, 25, 43, 0.08) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-icon:hover,
html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-icon:focus-visible {
  border-color: #ffb8c0 !important;
  box-shadow: 0 10px 22px rgba(225, 25, 43, 0.14) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-icon svg,
html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-head > span svg,
html body[data-view="crm"] .crm-pro-follow-summary > span svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  color: currentColor !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.1 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-icon svg *,
html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-head > span svg *,
html body[data-view="crm"] .crm-pro-follow-summary > span svg * {
  fill: none !important;
  stroke: currentColor !important;
}

html body[data-view="crm"] .crm-pro-followups .crm-pro-panel-head button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

html body[data-view="crm"] .crm-pro-follow-row {
  appearance: none !important;
  -webkit-appearance: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  user-select: none !important;
}

html body[data-view="crm"] .crm-pro-follow-row > * {
  pointer-events: none !important;
}

html body[data-view="crm"] .crm-pro-follow-customer small em {
  margin-left: 4px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  color: #53667f !important;
}

html body[data-view="crm"] .crm-pro-follow-summary {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 56px !important;
  width: calc(100% - 28px) !important;
  margin: 0 14px 14px !important;
  padding: 12px 16px !important;
  border: 1px solid #dbe7f4 !important;
  border-radius: 14px !important;
  background: #fff !important;
  cursor: pointer !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 12px !important;
  color: #e1192b !important;
  background: #fff1f3 !important;
  border: 1px solid #ffd0d6 !important;
  font-size: 0 !important;
  overflow: hidden !important;
}

html body[data-view="crm"] .crm-pro-follow-summary > span::before,
html body[data-view="crm"] .crm-pro-follow-summary > span::after {
  content: none !important;
  display: none !important;
}

html body[data-view="crm"] .crm-pro-follow-summary p,
html body[data-view="crm"] .crm-pro-follow-summary small {
  margin: 0 !important;
}

/* Global ERP dense table alignment guard */
html body .table-wrap {
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

html body .table-wrap table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

html body .table-wrap th,
html body .table-wrap td {
  height: 52px !important;
  min-height: 52px !important;
  padding: 10px 12px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.2 !important;
}

html body .table-wrap th:last-child,
html body .table-wrap td:last-child {
  position: static !important;
  min-width: 150px !important;
  width: 150px !important;
  max-width: 170px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

html body .table-wrap td:last-child .split-actions,
html body .table-wrap td:last-child .form-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

html body .table-wrap td:last-child .button,
html body .table-wrap td:last-child .ghost-button,
html body .table-wrap td:last-child .danger-button,
html body .approval-table td:last-child .button,
html body .approval-table td:last-child .ghost-button,
html body .approval-table td:last-child .danger-button {
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  height: 32px !important;
  padding: 0 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1 !important;
  border-radius: 7px !important;
}

html body .approval-table {
  min-width: 0 !important;
  table-layout: fixed !important;
}

html body .approval-table th:nth-child(1),
html body .approval-table td:nth-child(1) { width: 8% !important; }
html body .approval-table th:nth-child(2),
html body .approval-table td:nth-child(2) { width: 9% !important; }
html body .approval-table th:nth-child(3),
html body .approval-table td:nth-child(3) { width: 17% !important; }
html body .approval-table th:nth-child(4),
html body .approval-table td:nth-child(4) { width: 18% !important; }
html body .approval-table th:nth-child(5),
html body .approval-table td:nth-child(5) { width: 17% !important; }
html body .approval-table th:nth-child(6),
html body .approval-table td:nth-child(6) { width: 13% !important; }
html body .approval-table th:nth-child(7),
html body .approval-table td:nth-child(7) {
  width: 18% !important;
  min-width: 0 !important;
}

html body .status {
  white-space: nowrap !important;
  max-width: 100% !important;
}

html body .muted {
  white-space: nowrap !important;
}

/* Column-aware ERP table sizing: keep rows single-line without wasting space. */
html body .table-wrap th,
html body .table-wrap td {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

html body .employee-table th,
html body .employee-table td {
  font-size: 12px !important;
}

html body .employee-table th:nth-child(1),
html body .employee-table td:nth-child(1) { width: 8% !important; }
html body .employee-table th:nth-child(2),
html body .employee-table td:nth-child(2) { width: 14% !important; }
html body .employee-table th:nth-child(3),
html body .employee-table td:nth-child(3) { width: 11% !important; }
html body .employee-table th:nth-child(4),
html body .employee-table td:nth-child(4) { width: 13% !important; }
html body .employee-table th:nth-child(5),
html body .employee-table td:nth-child(5) { width: 8% !important; }
html body .employee-table th:nth-child(6),
html body .employee-table td:nth-child(6) { width: 9% !important; }
html body .employee-table th:nth-child(7),
html body .employee-table td:nth-child(7) { width: 7% !important; }
html body .employee-table th:nth-child(8),
html body .employee-table td:nth-child(8) { width: 7% !important; }
html body .employee-table th:nth-child(9),
html body .employee-table td:nth-child(9) { width: 5% !important; }
html body .employee-table th:nth-child(10),
html body .employee-table td:nth-child(10) { width: 6% !important; }
html body .employee-table th:nth-child(11),
html body .employee-table td:nth-child(11) {
  width: 15% !important;
  min-width: 230px !important;
  max-width: none !important;
}

html body .employee-table td:nth-child(11) .split-actions {
  justify-content: flex-end !important;
}

html body .employee-table td:nth-child(11) .ghost-button,
html body .employee-table td:nth-child(11) .danger-button {
  height: 34px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

html body[data-view="vehicles"] .table-wrap th:last-child,
html body[data-view="vehicles"] .table-wrap td:last-child,
html body[data-view="branches"] .table-wrap th:last-child,
html body[data-view="branches"] .table-wrap td:last-child,
html body[data-view="attendance"] .table-wrap th:last-child,
html body[data-view="attendance"] .table-wrap td:last-child,
html body[data-view="vacations"] .table-wrap th:last-child,
html body[data-view="vacations"] .table-wrap td:last-child,
html body[data-view="purchaseRequests"] .table-wrap th:last-child,
html body[data-view="purchaseRequests"] .table-wrap td:last-child,
html body[data-view="approvals"] .table-wrap th:last-child,
html body[data-view="approvals"] .table-wrap td:last-child {
  min-width: 170px !important;
  width: 170px !important;
  max-width: none !important;
}

html body[data-view="attendance"] .table-wrap th:nth-child(2),
html body[data-view="attendance"] .table-wrap td:nth-child(2),
html body[data-view="vacations"] .table-wrap th:nth-child(2),
html body[data-view="vacations"] .table-wrap td:nth-child(2),
html body[data-view="purchaseRequests"] .table-wrap th:nth-child(2),
html body[data-view="purchaseRequests"] .table-wrap td:nth-child(2),
html body[data-view="approvals"] .table-wrap th:nth-child(3),
html body[data-view="approvals"] .table-wrap td:nth-child(3) {
  width: 16% !important;
}

html body[data-view="attendance"] .table-wrap th:nth-child(1),
html body[data-view="attendance"] .table-wrap td:nth-child(1),
html body[data-view="vacations"] .table-wrap th:nth-child(1),
html body[data-view="vacations"] .table-wrap td:nth-child(1),
html body[data-view="purchaseRequests"] .table-wrap th:nth-child(1),
html body[data-view="purchaseRequests"] .table-wrap td:nth-child(1),
html body[data-view="approvals"] .table-wrap th:nth-child(2),
html body[data-view="approvals"] .table-wrap td:nth-child(2) {
  width: 9% !important;
}

html body .table-wrap td:last-child .split-actions .ghost-button,
html body .table-wrap td:last-child .split-actions .danger-button,
html body .table-wrap td:last-child .form-actions .button,
html body .table-wrap td:last-child .form-actions .ghost-button,
html body .table-wrap td:last-child .form-actions .danger-button {
  flex: 0 0 auto !important;
}

/* Final register fit pass for employee and vehicle action-heavy rows. */
html body .employee-table,
html body .vehicle-table {
  table-layout: fixed !important;
  width: 100% !important;
}

html body .employee-table th,
html body .employee-table td,
html body .vehicle-table th,
html body .vehicle-table td {
  box-sizing: border-box !important;
  padding: 10px 8px !important;
}

html body .employee-table th:nth-child(1),
html body .employee-table td:nth-child(1) { width: 9% !important; }
html body .employee-table th:nth-child(2),
html body .employee-table td:nth-child(2) { width: 15% !important; }
html body .employee-table th:nth-child(3),
html body .employee-table td:nth-child(3) { width: 9% !important; }
html body .employee-table th:nth-child(4),
html body .employee-table td:nth-child(4) { width: 12% !important; }
html body .employee-table th:nth-child(5),
html body .employee-table td:nth-child(5) { width: 7% !important; }
html body .employee-table th:nth-child(6),
html body .employee-table td:nth-child(6) { width: 7% !important; }
html body .employee-table th:nth-child(7),
html body .employee-table td:nth-child(7) { width: 6% !important; }
html body .employee-table th:nth-child(8),
html body .employee-table td:nth-child(8) { width: 6% !important; }
html body .employee-table th:nth-child(9),
html body .employee-table td:nth-child(9) { width: 5% !important; }
html body .employee-table th:nth-child(10),
html body .employee-table td:nth-child(10) { width: 5% !important; }
html body .employee-table th:nth-child(11),
html body .employee-table td:nth-child(11) {
  width: 17% !important;
  min-width: 238px !important;
  max-width: none !important;
  overflow: visible !important;
}

html body .vehicle-table th:nth-child(1),
html body .vehicle-table td:nth-child(1) { width: 9% !important; }
html body .vehicle-table th:nth-child(2),
html body .vehicle-table td:nth-child(2) { width: 9% !important; }
html body .vehicle-table th:nth-child(3),
html body .vehicle-table td:nth-child(3) { width: 10% !important; }
html body .vehicle-table th:nth-child(4),
html body .vehicle-table td:nth-child(4) { width: 7% !important; }
html body .vehicle-table th:nth-child(5),
html body .vehicle-table td:nth-child(5) { width: 11% !important; }
html body .vehicle-table th:nth-child(6),
html body .vehicle-table td:nth-child(6) { width: 11% !important; }
html body .vehicle-table th:nth-child(7),
html body .vehicle-table td:nth-child(7) { width: 8% !important; }
html body .vehicle-table th:nth-child(8),
html body .vehicle-table td:nth-child(8) { width: 8% !important; }
html body .vehicle-table th:nth-child(9),
html body .vehicle-table td:nth-child(9) { width: 6% !important; }
html body .vehicle-table th:nth-child(10),
html body .vehicle-table td:nth-child(10) {
  width: 14% !important;
  min-width: 188px !important;
  max-width: 210px !important;
  overflow: visible !important;
}

html body .employee-table td:last-child .split-actions,
html body .vehicle-table td:last-child .split-actions {
  justify-content: flex-start !important;
  gap: 4px !important;
  overflow: visible !important;
  max-width: none !important;
}

html body .employee-table td:last-child .ghost-button,
html body .employee-table td:last-child .danger-button,
html body .vehicle-table td:last-child .ghost-button,
html body .vehicle-table td:last-child .danger-button {
  height: 32px !important;
  min-width: 0 !important;
  padding: 0 7px !important;
  font-size: 11px !important;
}

html body .employee-table td:last-child {
  padding-right: 10px !important;
}

/* Compact sidebar fit: show more menu rows and reduce label truncation. */
html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="crm"] .sidebar,
html body[data-view="commandCenter"] .sidebar {
  width: 244px !important;
  min-width: 244px !important;
  padding: 12px 12px 10px !important;
}

html body .nav,
html body #nav,
html body[data-view="crm"] .nav {
  gap: 5px !important;
  padding: 0 !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  gap: 5px !important;
  padding: 4px 0 8px !important;
  margin: 0 !important;
}

html body .nav-section + .nav-section,
html body[data-view="crm"] .nav-section + .nav-section {
  margin-top: 6px !important;
  padding-top: 8px !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  margin: 4px 0 5px !important;
  padding: 0 12px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  letter-spacing: 5px !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 10px 0 12px !important;
  gap: 12px !important;
  border-radius: 12px !important;
}

html body .nav-section:first-child button,
html body[data-view="crm"] .nav-section:first-child button,
html body .nav button.active,
html body[data-view="crm"] .nav button.active {
  min-height: 50px !important;
  height: 50px !important;
}

html body .nav-icon,
html body[data-view="crm"] .nav-icon {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  border-radius: 10px !important;
}

html body .nav-icon svg,
html body[data-view="crm"] .nav-icon svg {
  width: 19px !important;
  height: 19px !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  font-size: 15px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body .sidebar-user-card {
  margin-top: 8px !important;
  padding: 8px !important;
  min-height: 48px !important;
}

/* Pro display sidebar fit: smaller, denser, and fully page-aligned. */
html body .app-shell {
  grid-template-columns: 208px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="crm"] .sidebar,
html body[data-view="commandCenter"] .sidebar {
  width: 244px !important;
  min-width: 244px !important;
  max-width: 244px !important;
  height: 100vh !important;
  padding: 10px 10px 8px !important;
  overflow: hidden !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  height: 96px !important;
  min-height: 96px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}

html body .sidebar-aq360-logo,
html body[data-view="crm"] .sidebar-aq360-logo {
  transform: none !important;
  transform-origin: center !important;
  margin: 0 auto !important;
  height: 96px !important;
  max-height: 96px !important;
}

html body .sidebar-logo-wordmark,
html body[data-view="crm"] .sidebar-logo-wordmark {
  max-height: 86px !important;
  height: 86px !important;
  object-fit: contain !important;
}

html body .nav,
html body #nav,
html body[data-view="crm"] .nav {
  gap: 2px !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  gap: 3px !important;
  padding: 2px 0 5px !important;
}

html body .nav-section + .nav-section,
html body[data-view="crm"] .nav-section + .nav-section {
  margin-top: 4px !important;
  padding-top: 6px !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  margin: 2px 0 4px !important;
  padding: 0 8px !important;
  font-size: 8.5px !important;
  letter-spacing: 4px !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 7px !important;
  gap: 8px !important;
  border-radius: 9px !important;
}

html body .nav-section:first-child button,
html body[data-view="crm"] .nav-section:first-child button,
html body .nav button.active,
html body[data-view="crm"] .nav button.active {
  min-height: 38px !important;
  height: 38px !important;
}

html body .nav-icon,
html body[data-view="crm"] .nav-icon {
  width: 23px !important;
  min-width: 23px !important;
  height: 23px !important;
  border-radius: 8px !important;
}

html body .nav-icon svg,
html body[data-view="crm"] .nav-icon svg {
  width: 15px !important;
  height: 15px !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  font-size: 12.5px !important;
  line-height: 1 !important;
}

html body .sidebar-user-card {
  margin-top: 4px !important;
  padding: 6px !important;
  min-height: 40px !important;
}

/* Sidebar correction: keep original logo/width, only reduce row gaps. */
html body .app-shell {
  grid-template-columns: 244px minmax(0, 1fr) !important;
}

html body .sidebar,
html body[data-view] .sidebar,
html body[data-view="crm"] .sidebar,
html body[data-view="commandCenter"] .sidebar {
  width: 244px !important;
  min-width: 244px !important;
  max-width: 244px !important;
  padding: 12px 12px 10px !important;
  overflow: hidden !important;
}

html body .sidebar-brand-ref,
html body[data-view="crm"] .sidebar-brand-ref {
  height: 62px !important;
  min-height: 62px !important;
  margin: 0 0 8px !important;
  padding: 0 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

html body .sidebar-aq360-logo,
html body[data-view="crm"] .sidebar-aq360-logo {
  display: inline-flex !important;
  transform: none !important;
  height: auto !important;
  max-height: none !important;
  max-width: 190px !important;
  margin: 0 auto !important;
}

html body .sidebar-aq360-logo span,
html body[data-view="crm"] .sidebar-aq360-logo span,
html body .sidebar-aq360-logo b,
html body[data-view="crm"] .sidebar-aq360-logo b {
  font-size: 34px !important;
}

html body .sidebar-aq360-logo em,
html body[data-view="crm"] .sidebar-aq360-logo em {
  font-size: 16px !important;
}

html body .nav,
html body #nav,
html body[data-view="crm"] .nav {
  gap: 0 !important;
  padding: 0 !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  gap: 0 !important;
  padding: 0 0 4px !important;
  margin: 0 !important;
}

html body .nav-section + .nav-section,
html body[data-view="crm"] .nav-section + .nav-section {
  margin-top: 4px !important;
  padding-top: 5px !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  margin: 3px 0 2px !important;
  padding: 0 12px !important;
  font-size: 10px !important;
  letter-spacing: 5px !important;
  line-height: 1 !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  gap: 12px !important;
  border-radius: 12px !important;
}

html body .nav-section:first-child button,
html body[data-view="crm"] .nav-section:first-child button,
html body .nav button.active,
html body[data-view="crm"] .nav button.active {
  min-height: 44px !important;
  height: 44px !important;
}

html body .nav-icon,
html body[data-view="crm"] .nav-icon {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
}

html body .nav-icon svg,
html body[data-view="crm"] .nav-icon svg {
  width: 19px !important;
  height: 19px !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  font-size: 15px !important;
  line-height: 1 !important;
}

/* Sidebar menu fit pass: keep logo, compress only navigation rows so all items fit. */
html body .nav,
html body #nav,
html body[data-view="crm"] .nav {
  gap: 0 !important;
  overflow: hidden !important;
}

html body .nav-section,
html body[data-view="crm"] .nav-section {
  gap: 0 !important;
  padding: 0 0 2px !important;
  margin: 0 !important;
}

html body .nav-section + .nav-section,
html body[data-view="crm"] .nav-section + .nav-section {
  margin-top: 3px !important;
  padding-top: 4px !important;
}

html body .nav-section-title,
html body[data-view="crm"] .nav-section-title {
  margin: 2px 0 2px !important;
  padding: 0 10px !important;
  font-size: 8.8px !important;
  line-height: 1 !important;
  letter-spacing: 4px !important;
}

html body .nav button,
html body[data-view="crm"] .nav button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 11px !important;
  gap: 10px !important;
  border-radius: 10px !important;
}

html body .nav-section:first-child button,
html body[data-view="crm"] .nav-section:first-child button,
html body .nav button.active,
html body[data-view="crm"] .nav button.active {
  min-height: 38px !important;
  height: 38px !important;
}

html body .nav-icon,
html body[data-view="crm"] .nav-icon {
  width: 26px !important;
  min-width: 26px !important;
  height: 26px !important;
  border-radius: 9px !important;
}

html body .nav-icon svg,
html body[data-view="crm"] .nav-icon svg {
  width: 16px !important;
  height: 16px !important;
}

html body .nav button span:last-child,
html body[data-view="crm"] .nav button span:last-child {
  font-size: 13.2px !important;
  line-height: 1 !important;
  font-weight: 760 !important;
}

/* Header action buttons: compact app controls with proper icons. */
html body .topbar-actions,
html body[data-view] .topbar-actions,
html body[data-view="crm"] .topbar-actions,
html body[data-view="commandCenter"] .topbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 6px !important;
  border: 1px solid #d9e5f3 !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, .82) !important;
  box-shadow: 0 8px 22px rgba(16, 39, 74, .08) !important;
}

html body .topbar-actions .notification-center {
  display: flex !important;
  align-items: center !important;
  height: 38px !important;
}

html body .topbar-actions .notification-toggle {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  color: #06152c !important;
  display: inline-grid !important;
  place-items: center !important;
  box-shadow: none !important;
}

html body .topbar-actions .notification-bell,
html body .topbar-actions .notification-bell svg {
  width: 21px !important;
  height: 21px !important;
}

html body .topbar-actions .notification-toggle strong {
  top: 1px !important;
  right: 0 !important;
  min-width: 17px !important;
  height: 17px !important;
  padding: 0 4px !important;
  font-size: 10px !important;
  border: 2px solid #ffffff !important;
}

html body .topbar-actions #currentUserLabel,
html body[data-view] .topbar-actions #currentUserLabel,
html body[data-view="crm"] .topbar-actions #currentUserLabel {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 28px 0 44px !important;
  border: 0 !important;
  border-radius: 19px !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #071631 !important;
  position: relative !important;
}

html body .topbar-actions #currentUserLabel::before {
  content: "A" !important;
  position: absolute !important;
  left: 4px !important;
  top: 4px !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  background: #06152c !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

html body .topbar-actions #currentUserLabel::after {
  content: "" !important;
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  width: 8px !important;
  height: 8px !important;
  border-right: 2px solid #06152c !important;
  border-bottom: 2px solid #06152c !important;
  transform: translateY(-65%) rotate(45deg) !important;
}

html body .topbar-actions #installAppButton,
html body .topbar-actions #logoutButton,
html body[data-view] .topbar-actions #installAppButton,
html body[data-view] .topbar-actions #logoutButton {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid #d6e2f0 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  color: #071631 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

html body .topbar-actions #installAppButton::before,
html body .topbar-actions #logoutButton::before {
  content: none !important;
  display: none !important;
}

html body .topbar-actions #installAppButton svg,
html body .topbar-actions #logoutButton svg {
  width: 17px !important;
  height: 17px !important;
  stroke: currentColor !important;
  stroke-width: 2.4 !important;
  fill: none !important;
  flex: 0 0 auto !important;
}

html body .topbar-actions #installAppButton span,
html body .topbar-actions #logoutButton span {
  display: inline-block !important;
}

html body .topbar-actions #installAppButton:hover,
html body .topbar-actions #logoutButton:hover,
html body .topbar-actions .notification-toggle:hover {
  border-color: #b9cbe1 !important;
  background: #f7fbff !important;
}

html body .topbar-actions #cloudStatusLabel,
html body .topbar-actions #syncLatestButton,
html body .topbar-actions #todayLabel {
  display: none !important;
}
 
/* Final ERP table safety override: this must stay at the end of the file. */
html body .table-wrap td,
html body .table-wrap th {
  min-width: 0 !important;
}

html body .table-wrap td .status,
html body .table-wrap td .pill,
html body .table-wrap td .badge,
html body .table-wrap td .status-badge,
html body .table-wrap td .text-safe-pill {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  direction: ltr !important;
  unicode-bidi: plaintext !important;
  text-align: left !important;
  vertical-align: middle !important;
}

html body .table-wrap td .text-safe-pill {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html body .approval-table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

html body .approval-table th,
html body .approval-table td {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html body .approval-table th:nth-child(1),
html body .approval-table td:nth-child(1) { width: 7% !important; }
html body .approval-table th:nth-child(2),
html body .approval-table td:nth-child(2) { width: 9% !important; }
html body .approval-table th:nth-child(3),
html body .approval-table td:nth-child(3) { width: 16% !important; }
html body .approval-table th:nth-child(4),
html body .approval-table td:nth-child(4) { width: 18% !important; }
html body .approval-table th:nth-child(5),
html body .approval-table td:nth-child(5) { width: 13% !important; }
html body .approval-table th:nth-child(6),
html body .approval-table td:nth-child(6) { width: 17% !important; }
html body .approval-table th:nth-child(7),
html body .approval-table td:nth-child(7) {
  width: 20% !important;
  min-width: 0 !important;
  max-width: none !important;
}

html body .approval-decision-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

html body .approval-decision-actions .status {
  flex: 1 1 auto !important;
  max-width: 100% !important;
}
