:root {
  --cream: #fff8fc;
  --pink: #ff8fb8;
  --rose: #ff6b9d;
  --berry: #ef5b8c;
  --lilac: #d4a5ff;
  --grape: #b57bff;
  --sky: #8ec5ff;
  --blue: #6aa8ff;
  --ink: #4a3a6b;
  --app-space-2: 0.5rem;
  --app-space-2-lg: 1.25rem;
}

html,
body {
  height: 100%;
}

body.app-body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 65% 50% at 12% 18%, rgba(255, 143, 184, 0.5), transparent 55%),
    radial-gradient(ellipse 55% 45% at 88% 22%, rgba(142, 197, 255, 0.45), transparent 50%),
    radial-gradient(ellipse 60% 50% at 78% 82%, rgba(181, 123, 255, 0.4), transparent 52%),
    linear-gradient(155deg, #fff0f6 0%, #f3f0ff 40%, #eef6ff 70%, var(--cream) 100%);
  background-attachment: fixed;
}

.brand-script {
  font-family: "Pacifico", cursive;
  font-weight: 400;
  display: inline-block;
  line-height: 1.55;
  padding: 0 0 0.22em;
  overflow: visible;
  background: linear-gradient(115deg, var(--rose) 0%, var(--lilac) 45%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--rose);
  /* Slightly expands the clip shape so Pacifico descenders aren't trimmed */
  -webkit-text-stroke: 0.75px transparent;
  paint-order: stroke fill;
}

.login-shell {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-panel {
  width: min(420px, 100%);
  padding: 2rem 1.75rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 40px rgba(106, 168, 255, 0.18);
}

.login-panel .brand-script {
  font-size: clamp(2.75rem, 10vw, 3.5rem);
  line-height: 1.5;
  margin: 0 0 0.35rem;
  padding-bottom: 0.28em;
  -webkit-text-stroke: 1px transparent;
}

.btn-crmeee {
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-bg: transparent;
  --bs-btn-hover-bg: transparent;
  --bs-btn-active-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-border-color: transparent;
  background: linear-gradient(125deg, var(--rose) 0%, var(--grape) 50%, var(--blue) 100%);
  background-size: 160% 160%;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(181, 123, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-position 0.3s ease;
}

.btn-crmeee:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(106, 168, 255, 0.4);
}

.bg-crmeee {
  background: linear-gradient(125deg, var(--rose) 0%, var(--grape) 50%, var(--blue) 100%) !important;
}

.app-shell {
  min-height: 100%;
}

.app-chrome {
  z-index: 1030;
  overflow: visible;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(74, 58, 107, 0.08);
}

.app-chrome nav,
.app-chrome-nav {
  overflow: visible;
  padding-top: 0.625rem;
  padding-bottom: 0.875rem;
}

.app-chrome nav > .row {
  align-items: center;
  overflow: visible;
}

.app-brand-col {
  gap: 0.5rem;
  align-items: center;
  overflow: visible;
}

.app-brand {
  display: inline-block;
  overflow: visible;
  line-height: 1;
  padding: 0;
  margin: 0;
  vertical-align: bottom;
}

.app-brand-text {
  display: inline-block;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  line-height: 1.55;
  padding: 0.05em 0 0.22em;
  overflow: visible;
  vertical-align: bottom;
  -webkit-text-stroke: 0.65px transparent;
}

.app-search-wrap {
  max-width: 22rem;
}

.app-search-wrap .form-control {
  border-radius: 999px;
  border: 1px solid rgba(74, 58, 107, 0.24);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.app-search-wrap .form-control::placeholder {
  color: rgba(74, 58, 107, 0.58);
  opacity: 1;
}

.app-search-wrap .form-control:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

.app-search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 1050;
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.4rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(74, 58, 107, 0.12);
  box-shadow: 0 14px 32px rgba(74, 58, 107, 0.2);
}

.app-search-empty {
  padding: 0.5rem 0.6rem;
}

.app-search-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.app-search-item:hover,
.app-search-item.is-active {
  background: rgba(181, 123, 255, 0.12);
}

.app-search-item-type {
  flex: 0 0 auto;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(74, 58, 107, 0.55);
  padding-top: 0.15rem;
}

.app-search-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-search-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-search-item-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.app-search-item-title-row .app-search-item-title {
  flex: 1 1 auto;
}

.app-search-item-status {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 600;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-search-item-subtitle {
  font-size: 0.78rem;
  color: rgba(74, 58, 107, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.app-topbar-icon-btn:hover {
  background: rgba(74, 58, 107, 0.08);
}

.app-topbar-icon {
  display: block;
}

.app-topbar-badge {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  min-width: 0.95rem;
  height: 0.95rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: var(--berry);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 0.95rem;
  text-align: center;
}

.app-topbar-panel {
  min-width: 16rem;
  padding-bottom: 0.5rem;
}

.app-notification-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: normal;
}

.app-notification-item-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
}

.app-notification-item-main:hover {
  color: inherit;
}

.app-notification-item-body {
  flex: 1 1 auto;
  min-width: 0;
}

.app-notification-item-title {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-notification-item-subtitle {
  display: block;
  font-size: 0.78rem;
  color: rgba(74, 58, 107, 0.6);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-notification-item-when {
  display: block;
  font-size: 0.72rem;
  color: rgba(74, 58, 107, 0.55);
  line-height: 1.3;
  margin-top: 0.1rem;
}

.app-notification-page-list {
  display: flex;
  flex-direction: column;
}

.app-notification-page-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(74, 58, 107, 0.1);
}

.app-notification-page-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.app-notification-page-row .app-notification-item-subtitle {
  white-space: normal;
}

.app-notification-item--unread {
  background: rgba(181, 123, 255, 0.08);
}

.app-notification-item--unread .app-notification-item-title {
  font-weight: 700;
}

.app-notification-item--read {
  opacity: 0.85;
}

.app-notification-read-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: rgba(74, 58, 107, 0.72);
  line-height: 1;
}

.app-notification-read-toggle:hover {
  background: rgba(181, 123, 255, 0.14);
  color: var(--ink);
}

.app-notification-item--unread .app-notification-read-toggle {
  color: var(--berry);
}

.app-clock-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.35rem;
  padding-bottom: var(--app-space-2-lg);
  line-height: 1;
}

.app-body-row {
  --bs-gutter-x: var(--app-space-2-lg);
  align-items: flex-start;
}

.app-clock-pill {
  padding: 0.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(74, 58, 107, 0.12);
  box-shadow: 0 4px 16px rgba(106, 168, 255, 0.14);
  max-width: 100%;
}

.app-clock-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-clock-scroll::-webkit-scrollbar {
  display: none;
}

.app-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.app-clock + .app-clock {
  padding-left: 0.55rem;
  border-left: 1px solid rgba(74, 58, 107, 0.14);
}

.app-clock-city {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(74, 58, 107, 0.62);
  line-height: 1.2;
}

.app-clock-time {
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.2;
}

.app-clock-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0 0.1rem 0 0;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(74, 58, 107, 0.14);
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: rgba(74, 58, 107, 0.5);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.app-clock-add:hover {
  color: var(--grape);
  background: rgba(181, 123, 255, 0.1);
}

@media (min-width: 768px) {
  .app-sidebar.sticky-top {
    top: 4rem;
  }
}

.app-sidebar-inner {
  box-sizing: border-box;
  width: 2.35rem;
  padding: 0.25rem 0.2rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(106, 168, 255, 0.1);
  overflow: hidden;
  transition: width 0.2s ease, padding 0.2s ease;
}

body.app-sidebar-expanded .app-sidebar-inner {
  width: 10.5rem;
  padding: 0.65rem 0.75rem;
}

.app-sidebar-heading {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

body:not(.app-sidebar-expanded) .app-sidebar-heading {
  display: none;
}

body:not(.app-sidebar-expanded) .app-side-nav.mb-2 {
  margin-bottom: 0 !important;
}

.app-sidebar-divider {
  margin: 0.2rem 0.15rem;
  border-color: rgba(74, 58, 107, 0.12);
}

body.app-sidebar-expanded .app-sidebar-divider {
  display: none;
}

.app-side-nav {
  gap: 0.1rem;
}

.app-side-nav .nav-link {
  padding: 0;
}

.app-side-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 0.5rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
}

body:not(.app-sidebar-expanded) .app-side-link {
  justify-content: center;
  width: 100%;
  padding: 0.3rem 0;
}

body:not(.app-sidebar-expanded) .app-side-link-label {
  display: none;
}

.app-side-link-icon {
  font-size: 1rem;
  line-height: 1;
  flex: 0 0 auto;
}

.app-side-link:hover,
.app-side-link:focus {
  color: var(--ink);
  background: rgba(181, 123, 255, 0.1);
}

.app-side-link.is-active {
  background: rgba(181, 123, 255, 0.16);
  color: var(--ink);
}

.app-side-subnav {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  margin: 0.05rem 0 0.25rem;
}

.app-side-sublink {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.4rem 0.2rem 1.5rem;
  border-radius: 0.45rem;
  color: rgba(74, 58, 107, 0.75);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.app-side-sublink:hover,
.app-side-sublink:focus {
  color: var(--ink);
  background: rgba(181, 123, 255, 0.1);
}

.app-side-sublink-initials {
  display: none;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(181, 123, 255, 0.18);
  color: var(--grape);
  font-size: 0.6rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15rem;
}

.app-side-sublink-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-side-sublink.is-dragging {
  opacity: 0.45;
}

body:not(.app-sidebar-expanded) .app-side-sublink {
  justify-content: center;
  padding: 0.15rem 0;
}

body:not(.app-sidebar-expanded) .app-side-sublink-initials {
  display: inline-flex;
}

body:not(.app-sidebar-expanded) .app-side-sublink-label {
  display: none;
}

@media (max-width: 767.98px) {
  .app-side-sublink-initials {
    display: inline-flex;
  }
}

.app-sidebar-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 0.35rem;
  padding: 0.25rem 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: rgba(74, 58, 107, 0.55);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

body:not(.app-sidebar-expanded) .app-sidebar-collapse-btn {
  margin-bottom: 0.25rem;
}

.app-sidebar-collapse-btn:hover {
  background: rgba(74, 58, 107, 0.06);
  color: var(--ink);
}

body.app-sidebar-expanded .app-sidebar-collapse-icon {
  transform: rotate(180deg);
}

.app-sidebar-collapse-icon {
  display: block;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.app-content-col {
  min-width: 0;
}

.app-main {
  min-width: 0;
}

.app-main > * + * {
  margin-top: var(--app-space-2-lg);
}

.app-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(74, 58, 107, 0.08);
}

.app-footer-brand {
  font-size: 1.15rem;
}

.app-footer-links a {
  color: var(--ink);
  opacity: 0.75;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.app-footer-links a:hover {
  opacity: 1;
  color: var(--grape);
}

.app-footer-divider {
  margin: 1rem 0 0.75rem;
  border-color: rgba(74, 58, 107, 0.1);
}

.app-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(74, 58, 107, 0.28);
  z-index: 1015;
}

body.crm-modal-open {
  overflow: hidden;
}

.crm-modal-root {
  position: relative;
  z-index: 1080;
}

.crm-modal-layer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(74, 58, 107, 0.35);
}

.crm-modal-dialog {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(74, 58, 107, 0.22);
  overflow: hidden;
}

.crm-modal-dialog--lg {
  width: min(720px, 100%);
}

.crm-modal-dialog--xl {
  width: min(1200px, 100%);
  max-height: min(92vh, 940px);
}

/* Sticky save docked into the peek modal footer behaves like a normal button,
   pushed to the left edge while the other actions stay on the right. */
.crm-modal-footer .app-sticky-save {
  position: static;
  margin: 0 auto 0 0;
  min-width: 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: var(--bs-border-radius-sm);
}

.crm-modal-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.crm-modal-subtitle {
  margin-top: 0.15rem;
}

.crm-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.crm-modal-save-btn,
.crm-modal-close-btn {
  line-height: 1;
  padding: 0.35rem 0.45rem;
  border: 0;
  background: transparent;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.crm-modal-save-btn:hover,
.crm-modal-save-btn:focus-visible {
  color: var(--bs-success) !important;
  background: rgba(25, 135, 84, 0.1);
}

.crm-modal-close-btn:hover,
.crm-modal-close-btn:focus-visible {
  color: var(--bs-danger) !important;
  background: rgba(220, 53, 69, 0.1);
}

.crm-modal-header,
.crm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(74, 58, 107, 0.08);
}

.crm-modal-footer {
  border-bottom: 0;
  border-top: 1px solid rgba(74, 58, 107, 0.08);
}

.crm-modal-body {
  padding: 1rem 1.1rem;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.clock-editor-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.clock-editor-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(74, 58, 107, 0.08);
}

.clock-editor-row.is-dragging {
  opacity: 0.55;
}

.clock-editor-row.drag-over {
  border-color: var(--grape);
  box-shadow: 0 0 0 2px rgba(181, 123, 255, 0.25);
}

.clock-editor-handle {
  cursor: grab;
  user-select: none;
  letter-spacing: -0.12em;
  color: rgba(74, 58, 107, 0.55);
  padding: 0.25rem;
}

.clock-editor-fields {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.45rem;
}

@media (max-width: 767.98px) {
  .app-sidebar-inner {
    width: auto;
    padding: 1rem;
  }

  .app-sidebar-heading,
  .app-side-link-label {
    display: block;
  }

  .app-side-link {
    justify-content: flex-start;
    padding: 0.45rem 0.65rem;
  }

  .app-sidebar-divider {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    padding: 1rem;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    background: transparent;
    z-index: 1025;
    overflow-y: auto;
  }

  body.app-sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .clock-editor-fields {
    grid-template-columns: 1fr;
  }
}

.app-panel {
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 20px rgba(106, 168, 255, 0.1);
}

.statuses-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.statuses-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(74, 58, 107, 0.08);
  cursor: grab;
}

.statuses-list--deal .statuses-row {
  grid-template-columns: auto 1fr auto auto auto auto;
}

.statuses-active-deals {
  white-space: nowrap;
}

.statuses-active-deals .form-check-input {
  float: none;
  margin-top: 0;
}

.statuses-add-row {
  grid-template-columns: auto 1fr;
  width: 100%;
  margin-top: 0.65rem;
  background: rgba(255, 255, 255, 0.35);
  border-style: dashed;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.statuses-add-row:hover,
.statuses-add-row:focus-visible {
  background: rgba(181, 123, 255, 0.12);
  border-color: var(--grape);
}

.statuses-add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--grape);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.statuses-add-label {
  font-weight: 600;
}

.statuses-color-field {
  display: flex;
  align-items: center;
  min-width: 0;
}

.statuses-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  max-width: 9rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(74, 58, 107, 0.12);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.statuses-swatch-btn {
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.statuses-swatch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 58, 107, 0.18);
}

.statuses-ring-swatch-btn {
  box-shadow:
    0 0 0 3px var(--preview-ring, #E8B020),
    0 0 10px color-mix(in srgb, var(--preview-ring, #E8B020) 55%, transparent);
}

.statuses-ring-picker {
  min-width: 0;
}

.status-color-picker-heading {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(74, 58, 107, 0.65);
}

.status-color-picker-heading:not(:first-child) {
  margin-top: 1rem;
}

.status-color-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  gap: 0.45rem;
}

.status-color-swatch-option {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.6 / 1;
  min-height: 2.75rem;
  padding: 0;
  border: 2px solid rgba(74, 58, 107, 0.14);
  border-radius: 0.45rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.status-color-swatch-option.is-gradient {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.status-color-swatch-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 58, 107, 0.16);
  border-color: rgba(74, 58, 107, 0.28);
}

.status-color-swatch-option.is-selected {
  border-color: var(--grape);
  box-shadow: 0 0 0 2px rgba(181, 123, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.status-color-picker {
  max-height: min(70vh, 36rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.app-sticky-save {
  position: fixed;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  z-index: 1040;
  width: fit-content;
  min-width: 10rem;
  margin-inline: auto;
  transform: none;
}

.app-flash-root {
  position: fixed;
  top: 5rem;
  left: 50%;
  z-index: 1050;
  width: min(32rem, calc(100vw - 2rem));
  transform: translateX(-50%);
  pointer-events: none;
}

.app-flash-alert {
  pointer-events: auto;
  margin: 0;
  box-shadow: 0 10px 28px rgba(36, 28, 52, 0.16);
}

.app-body:has(.app-sticky-save:not(.d-none)) .app-main {
  padding-bottom: 4.5rem;
}

.lead-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1019;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid rgba(36, 28, 52, 0.12);
  box-shadow: 0 6px 18px rgba(36, 28, 52, 0.08);
  font-size: 0.9rem;
}

.lead-header-meta {
  row-gap: 0.35rem;
}

.lead-header-meta > * + * {
  border-left: 1px solid rgba(36, 28, 52, 0.18);
  padding-left: 1rem;
}

.lead-about-facts dt {
  font-size: 0.78rem;
}

.statuses-row.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.statuses-row.drag-over {
  border-color: var(--grape);
  box-shadow: 0 0 0 2px rgba(181, 123, 255, 0.25);
}

.statuses-handle {
  cursor: grab;
  line-height: 1;
  letter-spacing: -0.12em;
  user-select: none;
}

.statuses-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (max-width: 767.98px) {
  .statuses-row {
    grid-template-columns: auto 1fr;
  }

  .statuses-fields,
  .statuses-color-field {
    grid-column: 1 / -1;
  }

  .statuses-fields {
    grid-template-columns: 1fr;
  }

  .statuses-usage,
  .statuses-delete {
    justify-self: start;
  }
}

.role-matrix-table caption {
  color: var(--ink);
  font-weight: 600;
  caption-side: top;
  padding-bottom: 0.5rem;
}

.role-matrix-table th,
.role-matrix-table td {
  vertical-align: middle;
}

.role-matrix-table input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
}

.form-check-input,
.form-check-input:checked,
.form-check-input:indeterminate,
.form-check-input:focus {
  border: 2px solid #000 !important;
}

.role-full-access {
  background: linear-gradient(125deg, rgba(255, 143, 184, 0.18), rgba(142, 197, 255, 0.18));
}

.role-status-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  margin-right: 0.45rem;
  border: 1px solid rgba(74, 58, 107, 0.15);
}

/* Lead pipeline stage bar */
.lead-stage-bar {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 2px;
}

.lead-stage-bar--dead .lead-stage-segment:not(.is-current):not(.lead-stage-segment--menu.is-current) {
  opacity: 0.92;
}

.lead-stage-track {
  display: grid;
  grid-template-columns: repeat(var(--stage-count, 1), minmax(0, 1fr));
  width: 100%;
  min-width: calc(var(--stage-count, 1) * 3.25rem);
  min-height: 0;
  overflow: visible;
  border-radius: 0.375rem;
  border: 1px solid rgba(74, 58, 107, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.lead-stage-bar::-webkit-scrollbar {
  height: 4px;
}

.lead-stage-bar::-webkit-scrollbar-thumb {
  background: rgba(74, 58, 107, 0.22);
  border-radius: 999px;
}

.lead-stage-segment {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: stretch;
  min-width: 0;
  background: var(--stage-bg, var(--stage-color));
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.lead-stage-segment::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.14);
  pointer-events: none;
  z-index: 0;
  transition: background-color 0.12s ease;
}

.lead-stage-segment:last-child {
  border-right: 0;
}

.lead-stage-segment.is-past::before {
  background: rgba(0, 0, 0, 0.08);
}

.lead-stage-segment.is-inactive::before {
  background: rgba(0, 0, 0, 0.22);
}

.lead-stage-segment:not(.is-current):hover {
  z-index: 1;
}

.lead-stage-segment:not(.is-current):hover::before {
  background: rgba(0, 0, 0, 0.04);
}

.lead-stage-segment.is-past:not(.is-current):hover::before {
  background: rgba(0, 0, 0, 0.02);
}

.lead-stage-segment.is-inactive:hover::before {
  background: rgba(0, 0, 0, 0.1);
}

.lead-stage-segment--dial {
  border-left: 2px solid rgba(255, 255, 255, 0.18);
}

.lead-stage-segment.is-current::before {
  content: none;
}

.lead-stage-segment.is-current:not(.lead-stage-segment--menu) {
  border-radius: 0.3125rem;
  background: var(--stage-bg, var(--stage-color));
  z-index: 2;
  box-shadow:
    0 2px 12px rgba(15, 23, 42, 0.32),
    0 0 0 3px var(--stage-ring),
    0 0 10px color-mix(in srgb, var(--stage-ring) 55%, transparent);
}

.lead-stage-segment--menu.is-current::before {
  content: none;
}

.lead-stage-form,
.lead-stage-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lead-stage-form {
  flex: 1;
}

.lead-stage-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  font: inherit;
  cursor: pointer;
}

.lead-stage-btn--static {
  cursor: default;
}

a.lead-stage-btn,
a.lead-stage-btn:hover {
  color: #fff;
  text-decoration: none;
}

.lead-stage-segment.is-current .lead-stage-btn {
  font-weight: 800;
}

.lead-stage-label {
  display: block;
  padding: 0.15rem 0.12rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}

.lead-stage-segment.is-current .lead-stage-label {
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lead-stage-more {
  position: relative;
  display: flex;
  align-self: stretch;
  min-width: 0;
}

.lead-stage-segment--menu.is-current {
  z-index: 2;
  border-radius: 0.3125rem;
}

.lead-stage-segment--menu.is-current .lead-stage-more-btn,
.lead-stage-segment--menu.is-selected .lead-stage-more-btn {
  box-shadow:
    0 2px 12px rgba(15, 23, 42, 0.32),
    0 0 0 3px var(--stage-ring),
    0 0 10px color-mix(in srgb, var(--stage-ring) 55%, transparent);
}

.lead-stage-more-btn {
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.lead-stage-more-btn.is-active {
  font-weight: 700;
}

.lead-stage-bar--compact {
  margin-top: 0;
}

.lead-stage-bar--compact .lead-stage-label {
  padding: 0.12rem 0.1rem;
  font-size: 0.625rem;
}

.lead-stage-bar--compact .lead-stage-track {
  min-width: calc(var(--stage-count, 1) * 2.75rem);
}

.lead-stage-more .btn {
  flex: 1;
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding: 0.12rem 0.45rem;
  font-size: 0.625rem;
  line-height: 1.1;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  border-radius: 0.375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-stage-bar--compact .lead-stage-more .btn {
  padding: 0.1rem 0.4rem;
}

.lead-notes-scroll {
  max-height: 28rem;
  overflow-y: auto;
}

.lead-list-scroll {
  overflow-x: auto;
}

/* --------------------------------------------------------------------- */
/* Leads/Deals: AJAX filter bar, saved views, sticky FAB stack           */
/* --------------------------------------------------------------------- */

.list-views-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
}

.list-view-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.3rem 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(74, 58, 107, 0.15);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
}

.list-view-pill.is-active {
  border-color: var(--grape);
  box-shadow: 0 0 0 2px rgba(181, 123, 255, 0.2);
}

.list-view-pill.is-starred .list-view-pill-star i {
  color: #f5a524;
}

.list-view-pill-star,
.list-view-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(74, 58, 107, 0.55);
  font-size: 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.list-view-pill-star:hover,
.list-view-pill-remove:hover {
  background: rgba(74, 58, 107, 0.08);
  color: var(--ink);
}

.list-view-pill-label {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.list-filter-card {
  border-color: rgba(74, 58, 107, 0.12);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.list-filter-card.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.lead-stage-segment--menu .lead-stage-more,
.lead-stage-segment--menu .lead-stage-more-btn {
  position: relative;
  z-index: 1;
}

.list-filter-stage-bar {
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.list-filter-stage-bar--solo {
  width: 100%;
}

.list-filter-dead-item.is-selected {
  background: rgba(181, 123, 255, 0.1);
  font-weight: 600;
}

.list-filter-terminal-menu {
  min-width: 12rem;
}

.list-filter-stage-track {
  width: 100%;
}

.list-filter-stage-segment {
  cursor: pointer;
}

.list-filter-stage-segment.is-selected {
  z-index: 2;
  border-radius: 0.3125rem;
  box-shadow:
    0 2px 12px rgba(15, 23, 42, 0.32),
    0 0 0 3px var(--stage-ring),
    0 0 10px color-mix(in srgb, var(--stage-ring) 55%, transparent);
}

.list-filter-stage-segment.is-selected::before {
  content: none;
}

.list-filter-stage-segment.is-selected .lead-stage-btn {
  font-weight: 800;
}

.list-filter-stage-segment.is-selected .lead-stage-label {
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.list-filter-accordion .accordion-item,
.list-filter-accordion .accordion-body {
  background: transparent;
}

.list-filter-options-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 1rem;
}

.list-filter-option-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.list-filter-option-label {
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(74, 58, 107, 0.55);
  white-space: nowrap;
}

.list-filter-option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  min-width: 0;
}

.list-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 58, 107, 0.16);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.list-filter-chip:hover {
  border-color: rgba(74, 58, 107, 0.28);
  background: rgba(255, 255, 255, 1);
}

.list-filter-chip.is-checked {
  border-color: var(--grape);
  background: rgba(181, 123, 255, 0.12);
  color: var(--grape-dark, var(--ink));
  box-shadow: 0 0 0 1px rgba(181, 123, 255, 0.18);
}

.list-filter-chip-count {
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(74, 58, 107, 0.55);
}

.list-filter-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.list-filter-clear-btn,
.list-filter-save-btn {
  white-space: nowrap;
}

.notification-prefs-table {
  min-width: 28rem;
}

.notification-prefs-table .notification-prefs-action-col {
  min-width: 10rem;
}

.notification-prefs-table .form-check-input {
  float: none;
}

.dashboard-planner-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dashboard-planner-link {
  text-decoration: none;
  font-size: 0.875rem;
}

.dashboard-planner-time {
  display: inline-block;
  min-width: 3.25rem;
  margin-right: 0.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--bs-secondary-color);
}

.dashboard-new-list,
.dashboard-queue-list,
.dashboard-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dashboard-new-row,
.dashboard-queue-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-queue-row-deal {
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-queue-deal-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.dashboard-new-deal-main {
  min-width: 0;
}

.dashboard-feed-row {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(74, 58, 107, 0.1);
}

.dashboard-feed-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.dashboard-feed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.dashboard-feed-meta {
  margin-left: auto;
  white-space: nowrap;
}

.dashboard-feed-kind {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(74, 58, 107, 0.08);
  color: var(--bs-secondary-color);
}

.dashboard-feed-kind-created,
.dashboard-feed-kind-deal_added {
  background: rgba(25, 135, 84, 0.12);
  color: #146c43;
}

.dashboard-feed-kind-status,
.dashboard-feed-kind-deal_status {
  background: rgba(13, 110, 253, 0.1);
  color: #0a58ca;
}

.dashboard-feed-kind-comment {
  background: rgba(74, 58, 107, 0.1);
  color: #4a3a6b;
}

.dashboard-feed-kind-assignment {
  background: rgba(255, 193, 7, 0.18);
  color: #997404;
}

.dashboard-feed-body {
  margin-top: 0.35rem;
  padding-left: 0.25rem;
}

.dashboard-feed-status {
  font-weight: 700;
  text-decoration: underline;
  color: inherit;
}

.dashboard-feed-tabs {
  border-bottom-color: rgba(74, 58, 107, 0.12);
  gap: 0.15rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

.dashboard-feed-tabs .nav-link {
  white-space: nowrap;
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
  color: var(--bs-secondary-color);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.dashboard-feed-tabs .nav-link.active {
  color: var(--bs-body-color);
  font-weight: 600;
  background: transparent;
  border-bottom-color: #6b4fa0;
}

.dashboard-funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0;
}

.dashboard-funnel-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: var(--funnel-width);
  max-width: 100%;
  min-width: 6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 6px rgba(74, 58, 107, 0.1);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.dashboard-funnel-stage:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 4px 10px rgba(74, 58, 107, 0.14);
}

.dashboard-funnel-stage.is-empty {
  opacity: 0.72;
}

.dashboard-funnel-stage-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-funnel-stage-count {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.list-fab-stack {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1030;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.65rem;
}

.list-fab-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(74, 58, 107, 0.15);
  box-shadow: 0 10px 22px rgba(74, 58, 107, 0.25);
  text-decoration: none;
  cursor: pointer;
}

.list-fab-btn:hover {
  background: #fff;
  color: var(--grape);
}

.list-fab-btn--primary {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.4rem;
  background: var(--grape);
  color: #fff;
  border-color: transparent;
}

.list-fab-btn--primary:hover {
  background: var(--grape);
  filter: brightness(1.08);
  color: #fff;
}

.user-presence {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.user-presence-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(74, 58, 107, 0.25);
  flex-shrink: 0;
}

.user-presence-dot.is-online {
  background: var(--bs-success);
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.2);
}

.lead-list-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 0.8125rem;
  border-collapse: separate;
  border-spacing: 0;
}

.lead-list-table th,
.lead-list-table td {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}

.lead-list-table .lead-list-col--latest_note,
.lead-list-table .lead-list-col--note {
  min-width: 18rem;
  text-align: left;
}

.lead-list-cell-flex {
  justify-content: center;
}

.lead-list-wrap {
  display: inline-block;
  max-width: 18rem;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
  line-height: 1.35;
  vertical-align: middle;
}

.lead-list-col--latest_note .lead-list-wrap,
.lead-list-col--note .lead-list-wrap {
  max-width: 26rem;
}

.lead-list-group {
  box-shadow: inset 0 -4px 0 rgba(74, 58, 107, 0.22);
}

.lead-list-group + .lead-list-group .lead-list-status-row td {
  padding-top: 0.85rem;
}

/* Limit Bootstrap table-hover to data rows — not the full-width status/header rows. */
.lead-list-table.table-hover > tbody > tr.lead-list-status-row:hover > *,
.lead-list-table.table-hover > tbody > tr.lead-list-header-row:hover > * {
  --bs-table-bg-state: transparent;
  --bs-table-color-state: var(--bs-table-color);
  box-shadow: none;
}

/* Alternate white / grey per lead group. */
.lead-list-group:nth-of-type(odd) .lead-list-status-row td {
  background: rgba(255, 255, 255, 0.72);
}

.lead-list-group:nth-of-type(odd) .lead-list-header-row th {
  background: rgba(255, 255, 255, 0.85);
}

.lead-list-group:nth-of-type(odd) .lead-list-data-row td:not(.lead-list-col--status) {
  background: rgba(255, 255, 255, 0.65);
}

.lead-list-group:nth-of-type(even) .lead-list-status-row td {
  background: rgba(74, 58, 107, 0.06);
}

.lead-list-group:nth-of-type(even) .lead-list-header-row th {
  background: rgba(74, 58, 107, 0.09);
}

.lead-list-group:nth-of-type(even) .lead-list-data-row td:not(.lead-list-col--status) {
  background: rgba(74, 58, 107, 0.05);
}

.lead-list-status-row td {
  padding: 0.35rem 0 0.3rem;
  border-bottom: 0;
  overflow: hidden;
}

/* Pin the stage bar to the visible card width instead of the full table width.
   leads.js sets the width to the scroll container's client width. */
.lead-list-status-holder {
  position: sticky;
  left: 0;
  padding: 0 0.55rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.lead-list-status-holder .lead-stage-bar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.lead-list-status-holder .lead-stage-track {
  width: 100%;
  min-width: 0;
}

.lead-list-name {
  font-size: 0.8125rem;
  line-height: 1.25;
}

.lead-list-meta {
  font-size: 0.6875rem;
  line-height: 1.2;
}

.lead-list-location-hint {
  font-size: 0.625rem;
  line-height: 1.2;
  margin-top: 0.125rem;
}

.lead-list-note {
  color: rgba(74, 58, 107, 0.88);
}

.lead-list-icon-btn {
  --bs-btn-padding-x: 0.35rem;
  --bs-btn-padding-y: 0.15rem;
  --bs-btn-font-size: 0.8125rem;
  line-height: 1;
}

.lead-list-no-answer-btn {
  --bs-btn-color: #dc3545;
  --bs-btn-border-color: #dc3545;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #dc3545;
  --bs-btn-hover-border-color: #dc3545;
}

/* Form builder: live canvas + right-side inspector -------------------- */

.form-editor-shell {
  align-items: flex-start;
}

.form-editor-canvas {
  min-height: 12rem;
}

.form-editor-canvas [data-editor-section],
.form-editor-canvas [data-editor-row],
.form-editor-canvas [data-editor-group] {
  position: relative;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: background-color 0.12s ease, outline-color 0.12s ease;
}

.form-editor-canvas [data-editor-section] {
  padding: 0.6rem 0.6rem 0.85rem;
  margin: 0 0 0.5rem;
}

.form-editor-canvas [data-editor-row] {
  padding: 0.35rem;
  margin: -0.35rem -0.35rem 0.35rem !important;
}

.form-editor-canvas [data-editor-group] {
  padding: 0.3rem;
  margin: -0.3rem;
  border-radius: 0.5rem;
}

.form-editor-canvas [data-editor-section]:hover,
.form-editor-canvas [data-editor-row]:hover,
.form-editor-canvas [data-editor-group]:hover {
  background: rgba(106, 168, 255, 0.08);
  outline: 1px dashed rgba(106, 168, 255, 0.55);
  outline-offset: -1px;
}

.form-editor-canvas .form-editor-selected {
  background: rgba(181, 123, 255, 0.14) !important;
  outline: 2px solid var(--grape) !important;
  outline-offset: -2px;
  z-index: 1;
}

.form-editor-canvas .form-editor-empty-placeholder {
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(74, 58, 107, 0.32);
  border-radius: 0.5rem;
  color: rgba(74, 58, 107, 0.55);
  font-size: 0.78rem;
  padding: 0.4rem;
  text-align: center;
}

.form-editor-inspector {
  position: sticky;
  top: 4.75rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

.form-editor-inspector .form-editor-crumbs {
  font-size: 0.8rem;
}

.form-editor-inspector .form-editor-crumbs a {
  text-decoration: none;
}

.form-editor-inspector .form-editor-catalog-item {
  cursor: pointer;
}

.form-editor-status-saving {
  color: rgba(74, 58, 107, 0.6);
}

.form-editor-status-saved {
  color: #2fbf71;
}

.form-editor-status-error {
  color: #dc3545;
}

.lead-list-icon-btn .bi {
  font-size: 0.9rem;
  line-height: 1;
}

.lead-list-header-row th {
  padding: 0.25rem 0.55rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(74, 58, 107, 0.72);
  border-bottom: 1px solid rgba(74, 58, 107, 0.12);
  background: rgba(255, 255, 255, 0.65);
}

.lead-list-data-row td {
  padding: 0.35rem 0.55rem 0.65rem;
  border-top: 0;
}

.lead-list-table td.lead-list-col--status {
  color: #fff;
  font-weight: 700;
}

.lead-columns-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lead-columns-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(74, 58, 107, 0.1);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.85);
}

.lead-columns-row.is-dragging {
  opacity: 0.55;
}

.lead-columns-row.drag-over {
  border-color: var(--grape);
}

.lead-columns-handle {
  cursor: grab;
  line-height: 1;
  letter-spacing: -0.12em;
  user-select: none;
}

.lead-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lead-note {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(74, 58, 107, 0.08);
}

.lead-note--system .lead-note-body,
.lead-note--status .lead-note-body {
  color: var(--bs-secondary-color);
  font-style: italic;
}

.lead-note:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.lead-comment-actions .btn,
.lead-detail-row-actions .btn {
  --bs-btn-padding-x: 0.35rem;
  --bs-btn-padding-y: 0.15rem;
  line-height: 1;
}

/* Deal cards on the lead record */
.lead-deal-card {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(74, 58, 107, 0.12) !important;
}

.lead-deal-statusband {
  display: block;
  width: 100%;
  padding: 0.3rem 0.75rem;
  border: 0;
  border-radius: calc(var(--bs-border-radius-lg) - 1px) calc(var(--bs-border-radius-lg) - 1px) 0 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.lead-deal-summary {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}

.lead-deal-summary:hover {
  background: rgba(106, 168, 255, 0.08);
}

.lead-deal-title {
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-deal-meta,
.lead-deal-byline {
  font-weight: 400;
}

.lead-deal-status-pill.dropdown-toggle {
  cursor: pointer;
}

.lead-deal-chevron-btn {
  border: 0;
  box-shadow: none;
  line-height: 1;
}

.lead-deal-chevron {
  transition: transform 0.2s ease;
}

.lead-deal-chevron-btn[aria-expanded="true"] .lead-deal-chevron,
.lead-deal-summary[aria-expanded="true"] .lead-deal-chevron {
  transform: rotate(180deg);
}

.lead-deal-note {
  white-space: normal;
}

/* Thin clickable pipeline strip on deal cards */
.lead-deal-stagestrip {
  display: flex;
  align-items: center;
  gap: 3px;
}

.lead-deal-stageseg {
  position: relative;
  flex: 1 1 0;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(74, 58, 107, 0.14);
  transition: height 0.12s ease, background-color 0.12s ease;
}

button.lead-deal-stageseg {
  cursor: pointer;
}

button.lead-deal-stageseg:hover {
  height: 12px;
  background: var(--seg-color);
}

/* Instant tooltip with the stage name */
.lead-deal-stageseg::after {
  content: attr(data-seg-name);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  background: rgba(47, 38, 64, 0.95);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
}

.lead-deal-stageseg:hover::after {
  opacity: 1;
  visibility: visible;
}

.lead-deal-stageseg.is-past,
.lead-deal-stageseg.is-current {
  background: var(--seg-color);
}

.lead-deal-stageseg.is-current {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 3.5px var(--seg-color);
}

.lead-deal-stagestrip.is-dropped .lead-deal-stageseg {
  opacity: 0.35;
}

/* --------------------------------------------------------------------- */
/* Planner: agenda + calendar                                            */
/* --------------------------------------------------------------------- */

.planner-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1030;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.4rem;
  box-shadow: 0 10px 25px rgba(74, 58, 107, 0.35);
}

.reminder-row {
  background: #fff;
  transition: opacity 0.15s ease;
}

.reminder-row.is-completed {
  opacity: 0.6;
}

.reminder-complete-form {
  margin: 0;
}

.reminder-complete-btn {
  border-radius: 999px;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.85rem;
}

.reminder-title-btn {
  color: inherit;
}

.reminder-title-btn:hover {
  text-decoration: underline !important;
}

.reminder-row-actions .btn {
  border-radius: 999px;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.85rem;
}

.reminder-row-actions .dropdown-toggle::after {
  display: none;
}

.reminder-row-actions {
  gap: 0.3rem !important;
}

/* Optional "Repeat"/"Set a reminder" sections on the appointment form —
   softer than a hard border so two side-by-side panels don't read as boxy. */
.planner-widget-panel {
  padding: 0.85rem;
  border-radius: 0.75rem;
  background: rgba(74, 58, 107, 0.04);
  border: 1px solid rgba(74, 58, 107, 0.08);
}

.planner-swatch {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.planner-calendar-weekdays {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(74, 58, 107, 0.55);
  padding-bottom: 0.35rem;
}

.planner-calendar-weekday {
  text-align: center;
  padding: 0.2rem 0;
}

.planner-calendar-week {
  border-top: 1px solid rgba(74, 58, 107, 0.12);
}

.planner-calendar-day {
  height: 6.5rem;
  padding: 0.35rem;
  border-right: 1px solid rgba(74, 58, 107, 0.12);
  vertical-align: top;
  cursor: pointer;
  overflow: hidden;
}

.planner-calendar-day:hover {
  background: rgba(74, 58, 107, 0.05);
}

.planner-calendar-day.is-selected {
  background: rgba(106, 168, 255, 0.14);
  box-shadow: inset 0 0 0 2px var(--blue);
}

.planner-calendar-day:last-child {
  border-right: none;
}

.planner-calendar-day.is-muted {
  background: rgba(74, 58, 107, 0.03);
  color: rgba(47, 38, 64, 0.4);
}

.planner-calendar-day.is-today .planner-calendar-daynum {
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
}

.planner-calendar-daynum {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.planner-calendar-chips {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

.planner-chip {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  border: none;
  background: color-mix(in srgb, var(--chip-color) 18%, white);
  color: rgba(47, 38, 64, 0.9);
  border-left: 3px solid var(--chip-color);
  border-radius: 0.2rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.68rem;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
}

.planner-chip-title,
.planner-chip-linked,
.planner-chip-time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-chip-title {
  font-weight: 700;
}

.planner-chip-linked {
  color: rgba(47, 38, 64, 0.75);
}

.planner-chip-time {
  color: rgba(47, 38, 64, 0.55);
}

.planner-chip.is-completed {
  opacity: 0.5;
  text-decoration: line-through;
}

.planner-chip-more {
  font-size: 0.68rem;
  color: rgba(74, 58, 107, 0.6);
  padding: 0 0.35rem;
}

[data-recurrence-widget] .form-check-inline {
  margin-right: 0.6rem;
}

/* Agenda column shrinks to col-3 alongside the calendar — condense its rows
   so four buckets stay glanceable in a narrow column. */
.planner-layout {
  margin-top: 0;
}

.planner-agenda-compact {
  max-height: calc(100vh - 9.5rem);
  overflow-y: auto;
}

.planner-agenda-compact .app-panel {
  padding: 0.75rem 0.85rem;
}

.planner-agenda-compact .appointment-row,
.planner-agenda-compact .reminder-row {
  padding: 0.5rem !important;
  font-size: 0.82rem;
}

.planner-agenda-compact .appointment-row .bi-calendar-event {
  display: none;
}

/* --------------------------------------------------------------------- */
/* Planner: day view (click a calendar day)                              */
/* --------------------------------------------------------------------- */

.planner-dayview {
  height: 44rem;
  max-height: calc(100vh - 10rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.planner-dayview-sticky {
  flex: 0 0 auto;
}

.planner-dayview-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.planner-dayview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.planner-dayview-allday {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(74, 58, 107, 0.12);
}

.planner-dayview-allday:empty {
  display: none;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.planner-dayview-grid {
  border-top: 1px solid rgba(74, 58, 107, 0.12);
}

.planner-dayview-hour {
  display: flex;
  border-bottom: 1px solid rgba(74, 58, 107, 0.12);
}

.planner-dayview-hourlabel {
  flex: 0 0 3.5rem;
  padding: 0.2rem 0.5rem 0 0;
  text-align: right;
  font-size: 0.7rem;
  color: rgba(74, 58, 107, 0.55);
  transform: translateY(-0.5em);
}

.planner-dayview-slots {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.planner-dayview-slot {
  min-height: 1.5rem;
  border-top: 1px dashed rgba(74, 58, 107, 0.08);
  cursor: pointer;
  padding: 0.05rem 0.35rem;
  position: relative;
}

.planner-dayview-slot:first-child {
  border-top: none;
}

.planner-dayview-slot:hover {
  background: rgba(106, 168, 255, 0.1);
}

.planner-dayview-appt {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-left: 3px solid var(--rose);
  background: color-mix(in srgb, var(--rose) 16%, white);
  color: rgba(47, 38, 64, 0.9);
  border-radius: 0.2rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.72rem;
  line-height: 1.3;
  margin-bottom: 0.15rem;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------- */
/* Lead upload                                                         */
/* --------------------------------------------------------------------- */

.upload-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.upload-source-card,
.upload-sheet-card,
.upload-results-card {
  border-color: rgba(74, 58, 107, 0.12);
}

.upload-sheet-scroll {
  max-height: 28rem;
  overflow: auto;
  border: 1px solid rgba(74, 58, 107, 0.14);
  border-radius: 0.375rem;
  background: #fff;
}

.upload-sheet-scroll:focus {
  outline: 2px solid rgba(181, 123, 255, 0.35);
  outline-offset: 1px;
}

.upload-sheet-grid {
  table-layout: fixed;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.upload-sheet-grid th,
.upload-sheet-grid td {
  padding: 0;
  vertical-align: middle;
  border-color: rgba(74, 58, 107, 0.12);
}

.upload-sheet-corner,
.upload-sheet-row-num {
  width: 2.25rem;
  min-width: 2.25rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(74, 58, 107, 0.55);
  background: rgba(74, 58, 107, 0.04);
  position: sticky;
  left: 0;
  z-index: 2;
}

.upload-sheet-corner {
  top: 0;
  z-index: 4;
}

.upload-sheet-row-num {
  z-index: 1;
}

.upload-sheet-header-cell {
  min-width: 9.5rem;
  width: 9.5rem;
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(74, 58, 107, 0.12);
}

.upload-sheet-data-cell {
  min-width: 9.5rem;
  width: 9.5rem;
}

.upload-map-select {
  border: none;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 600;
  background: transparent;
  box-shadow: none;
}

.upload-map-select:focus {
  background: rgba(181, 123, 255, 0.08);
}

.upload-sheet-cell {
  border: none;
  border-radius: 0;
  font-size: 0.8rem;
  padding: 0.3rem 0.45rem;
  background: transparent;
  box-shadow: none;
  width: 100%;
}

.upload-sheet-cell:focus {
  background: rgba(181, 123, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(181, 123, 255, 0.45);
  outline: none;
}

.upload-sheet-grid tbody tr:hover .upload-sheet-row-num {
  background: rgba(181, 123, 255, 0.08);
  color: var(--grape);
}
