/* Solve Property CRM chrome — navy, gold, cream. Loaded last so it beats Miles fallbacks. */
:root {
  /* Everything derives from the organisation's own brand variables (set in the root layout),
     so each workspace keeps its own colour. Gold stays the platform accent. */
  --sp-navy: var(--brand-primary);
  --sp-navy-deep: rgb(var(--brand-primary-900-rgb));
  --sp-navy-soft: rgb(var(--brand-primary-400-rgb));
  --sp-gold: #f5d45e;
  --sp-cream: var(--brand-cream, #f5f3ed);
  --brand-gold: #f5d45e;
}

html,
body,
#layout-wrapper {
  background-color: var(--sp-cream) !important;
}

::selection {
  background-color: var(--sp-gold);
  color: var(--sp-navy-deep);
}

/* Topbar: parchment + gold hairline, same family as the marketing header */
#layout-wrapper > .relative > .fixed.top-0,
#layout-wrapper header.sticky,
#layout-wrapper header {
  background-color: var(--sp-cream) !important;
  border-bottom-color: rgb(var(--brand-primary-rgb) / 0.12) !important;
  box-shadow: inset 0 -2px 0 var(--sp-gold) !important;
}

.crm-sidebar {
  background-color: rgb(var(--brand-sidebar-bg-rgb)) !important;
  box-shadow: 4px 0 24px rgb(var(--brand-primary-900-rgb) / 0.18);
}

.crm-sidebar-elevated {
  background-color: rgb(var(--brand-sidebar-elevated-rgb)) !important;
}

.crm-sidebar-item:hover {
  background-color: rgb(var(--brand-sidebar-hover-rgb)) !important;
}

.crm-sidebar-item-active {
  background-color: rgb(var(--brand-sidebar-active-rgb)) !important;
  box-shadow: inset 3px 0 0 var(--sp-gold);
}

.crm-sidebar-item-active,
.crm-sidebar-item-active span {
  color: #fff !important;
}

#layout-wrapper h1 {
  color: var(--sp-navy);
}

/* Cards stay white on cream — warmer edge so they read as paper, not Miles gray */
#layout-wrapper .bg-white.rounded-2xl,
#layout-wrapper .bg-white.rounded-xl,
#layout-wrapper .bg-white.rounded-lg,
#layout-wrapper .bg-white.shadow-sm,
#layout-wrapper .bg-white.shadow-md {
  border-color: rgb(var(--brand-primary-rgb) / 0.08);
}

.ant-btn-primary,
.ant-btn-primary:not(:disabled):hover,
.ant-btn-primary:not(:disabled):focus {
  background: var(--sp-navy) !important;
  border-color: var(--sp-navy) !important;
}

.ant-switch.ant-switch-checked {
  background: var(--sp-navy) !important;
}

.swal2-confirm {
  background-color: var(--sp-navy) !important;
}

.btnDashed::after {
  border-bottom-color: var(--sp-navy) !important;
}
