/* React Web CRM: small adjustments on top of the Xintra theme. Loaded only under /crm. */

/* Page background and text follow the theme mode set on .xintra-root. */
body:has(.xintra-root) {
  background: rgb(249, 250, 252);
  font-family: var(--font-poppins), "Poppins", sans-serif;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.xintra-root {
  min-height: 100vh;
  background: var(--default-body-bg-color);
  color: var(--default-text-color);
  font-family: var(--default-font-family);
  font-size: 0.8125rem;
}

/* The site's Tailwind base makes images and SVGs block-level; Bootstrap expects inline. */
.xintra-root img,
.xintra-root svg,
.xintra-root video {
  display: inline-block;
  vertical-align: middle;
}

/* Brand mark in the sidebar header: full name when open, mark only when collapsed. */
.rw-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
}
.rw-brand-text {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  white-space: nowrap;
}
.rw-brand-text small {
  display: block;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}
[data-toggled="icon-overlay-close"] .app-sidebar:not(:hover) .rw-brand-text {
  display: none;
}
[data-theme-mode="light"][data-menu-styles="light"] .rw-brand {
  color: var(--default-text-color);
}

/* Font icons sit where the template uses inline SVG icons. */
.side-menu__item > i.side-menu__icon {
  font-size: 1.15rem;
  line-height: 1;
  width: 1.15rem;
  text-align: center;
}

/* Dropdowns are driven by React rather than Popper, so position them explicitly. */
.xintra-root .dropdown-menu.show {
  display: block;
  position: absolute;
  inset-block-start: 100%;
  margin-top: 0.25rem;
}
.xintra-root .dropdown-menu.dropdown-menu-end.show {
  inset-inline-end: 0;
  inset-inline-start: auto;
}

/* Header avatar initials. */
.rw-initials {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Chart containers keep their height before ApexCharts has drawn. */
.rw-chart {
  min-height: var(--rw-chart-h, 120px);
}

@media print {
  .xintra-root .app-sidebar,
  .xintra-root .app-header,
  .xintra-root .footer,
  .xintra-root .no-print {
    display: none !important;
  }
  .xintra-root .app-content {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Collapsible create forms (<details>). */
.rw-disclosure > summary {
  cursor: pointer;
  list-style: none;
}
.rw-disclosure > summary::-webkit-details-marker {
  display: none;
}
.rw-disclosure:not([open]) > summary {
  border-bottom: 0;
}
.xintra-root .rw-disclosure > .rw-disclosure-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.85rem;
  border-radius: inherit;
  transition: background-color 0.15s;
}
.rw-disclosure > .rw-disclosure-bar:hover {
  background-color: rgba(var(--primary-rgb), 0.05);
}
.rw-disclosure > .rw-disclosure-bar:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}
.rw-disclosure[open] > .rw-disclosure-bar {
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}
.rw-disclosure-icon {
  display: inline-block;
  transition: transform 0.2s;
}
.rw-disclosure[open] .rw-disclosure-icon {
  transform: rotate(180deg);
}

/* Header search (CRM and portal): room for the magnifier on the left so it never covers the text, centred on the box. */
.xintra-root .rw-header-search {
  position: relative;
}
.xintra-root .rw-header-search .header-search-bar {
  min-width: 17rem;
  padding-inline-start: 2.25rem;
}
.xintra-root .rw-header-search .header-search-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 0.6rem;
  transform: translateY(-50%);
  padding: 0;
  line-height: 1;
}

/* Sidebar (CRM and portal): it never scrolls sideways. A label longer than the sidebar is cut with "…" (the full name
   shows on hover) instead of widening the menu past the sidebar's edge. */
.xintra-root .app-sidebar .main-sidebar {
  overflow-x: hidden;
}
.xintra-root .app-sidebar .main-menu,
.xintra-root .app-sidebar .slide,
.xintra-root .app-sidebar .side-menu__item {
  min-width: 0;
  max-width: 100%;
}
.xintra-root .app-sidebar .side-menu__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Leads → Import: the list of rows that weren't imported scrolls rather than stretching the dialog. */
.rw-import-list {
  max-height: 12rem;
  overflow-y: auto;
}

/* Dashboard stat cards (.crm-card): the theme's faint background picture shows as a lighter, narrower panel inside
   each card on the dark theme, so it is left out there. */
[data-theme-mode="dark"] .crm-card::after {
  display: none;
}

/* Form grid: a field marked .rw-wide spans the whole row. */
.rw-form-grid > .rw-wide {
  flex: 0 0 auto;
  width: 100%;
}

/* Cards used as links keep their text colour. */
a.card.custom-card:hover {
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.06);
}

/* Deal pipeline board: six columns that scroll sideways on small screens. */
.rw-board {
  overflow-x: auto;
}
.rw-board-col {
  flex: 1 0 15rem;
  min-height: 60vh;
}
.rw-board-card {
  cursor: grab;
}
.rw-board-card:active {
  cursor: grabbing;
}
[data-theme-mode="dark"] .rw-board-card {
  background: var(--custom-white) !important;
}

/* Tabular figures for money and quantities. */
.rw-num {
  font-variant-numeric: tabular-nums;
}
.rw-pre-line {
  white-space: pre-line;
}

/* Printable invoice. */
.rw-invoice-mark {
  width: 2.25rem;
  height: 2.25rem;
}
@media print {
  .xintra-root .rw-invoice {
    border: 0 !important;
    box-shadow: none !important;
  }
  .xintra-root .row > :has(> .rw-invoice) {
    width: 100%;
  }
}

/* CRM sign-in page (outside the CRM shell). */
.rw-auth {
  background: var(--default-body-bg-color, rgb(249, 250, 252));
}
.rw-auth-mark {
  width: 2.5rem;
  height: 2.5rem;
}
.rw-auth-brand {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--default-text-color);
}
.rw-auth-brand small {
  display: block;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* /login: the emailed sign-in code, spaced out like the code in the email. */
.rw-otp {
  letter-spacing: 0.5em;
  font-variant-numeric: tabular-nums;
}
.xintra-root .authentication-cover-main .authentication-cover {
  min-height: 100vh;
}

/* Phones: keep the sidebar hidden before the client sets data-toggled, so it doesn't flash open on load. */
@media (max-width: 991.98px) {
  .xintra-root:not([data-toggled]) .app-sidebar {
    transform: translateX(-100%);
    transition: none;
  }
}

/* Dashboard rows: every card in a row stretches to the tallest one (.rw-fixed keeps its own height). */
.rw-eq > [class*="col"] {
  display: flex;
  flex-direction: column;
}
.rw-eq > [class*="col"] > .card {
  flex: 1 1 auto;
}
.rw-eq > [class*="col"] > .card.rw-fixed {
  flex: 0 0 auto;
}
.rw-eq .crm-card .card-body {
  display: flex;
  flex-direction: column;
}

/* Customers: inactive rows are dimmed but stay readable. */
.rw-row-inactive > td {
  color: var(--text-muted);
}
.rw-row-inactive > td a:not(.btn) {
  opacity: 0.75;
}

/* Leads: compact icon buttons on kanban cards, and the inline status picker. */
.btn.btn-icon.btn-xs {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.75rem;
  padding: 0;
}
.rw-status-select {
  min-width: 8rem;
  font-weight: 500;
}

/* Lead journey stepper. */
.rw-journey {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}
.rw-journey-step {
  flex: 1 0 6.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  gap: 0.25rem;
}
.rw-journey-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1rem;
  left: calc(50% + 1.25rem);
  right: calc(-50% + 1.25rem - 0.5rem);
  height: 2px;
  background: var(--default-border);
}
.rw-journey-step.is-done:not(:last-child)::after {
  background: rgb(var(--success-rgb));
}
.rw-journey-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: var(--default-background);
  border: 2px solid var(--default-border);
  color: var(--text-muted);
}
.is-done .rw-journey-dot {
  background: rgb(var(--success-rgb));
  border-color: rgb(var(--success-rgb));
  color: #fff;
}
.is-current .rw-journey-dot {
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary01);
}
.is-lost .rw-journey-dot {
  background: rgb(var(--danger-rgb));
  border-color: rgb(var(--danger-rgb));
  color: #fff;
}
.rw-journey-label {
  font-weight: 500;
  font-size: 0.75rem;
}
.rw-journey-note {
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.d-contents {
  display: contents;
}

/* Leads kanban: tinted columns with a coloured accent, clean cards, quick actions on hover. */
.rw-kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
}
.rw-kanban-col {
  --rw-tone: var(--primary-rgb);
  display: flex;
  flex-direction: column;
  min-height: 26rem;
  max-height: 72vh;
  padding: 0.75rem;
  border-radius: 0.875rem;
  background: rgba(var(--rw-tone), 0.045);
  border: 1px solid rgba(var(--rw-tone), 0.12);
  scroll-snap-align: start;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.rw-kanban-col.is-over {
  background: rgba(var(--rw-tone), 0.1);
  border: 1px dashed rgba(var(--rw-tone), 0.7);
  box-shadow: inset 0 0 0 3px rgba(var(--rw-tone), 0.08);
}
.rw-kanban-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem 0.75rem;
  border-bottom: 2px solid rgba(var(--rw-tone), 0.35);
  margin-bottom: 0.75rem;
}
.rw-kanban-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgb(var(--rw-tone));
  box-shadow: 0 0 0 3px rgba(var(--rw-tone), 0.18);
}
.rw-kanban-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
}
.rw-kanban-count {
  min-width: 1.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: rgb(var(--rw-tone));
  background: rgba(var(--rw-tone), 0.14);
}
.rw-kanban-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: -0.25rem 0.25rem 0.75rem;
}
.rw-kanban-list {
  list-style: none;
  margin: 0;
  padding: 0.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  overflow-y: auto;
  flex: 1;
}
.rw-kanban-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.75rem 0.5rem;
  border: 1px dashed rgba(var(--rw-tone), 0.3);
  border-radius: 0.625rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.rw-kanban-empty i {
  font-size: 1.25rem;
  color: rgba(var(--rw-tone), 0.6);
}
.rw-kanban-card {
  position: relative;
  padding: 0.75rem 0.75rem 0.65rem 0.9rem;
  border-radius: 0.625rem;
  background: var(--custom-white);
  border: 1px solid var(--default-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.04);
  cursor: grab;
  transition: box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
}
.rw-kanban-card::before {
  content: "";
  position: absolute;
  inset: 0.65rem auto 0.65rem 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: rgb(var(--rw-tone));
}
/* Hover highlights with shadow and border only: moving the card would slide it out from under the pointer and flicker. */
.rw-kanban-card:hover {
  border-color: rgba(var(--rw-tone), 0.45);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06), 0 12px 24px rgba(15, 23, 42, 0.08);
}
.rw-kanban-card:active {
  cursor: grabbing;
}
.rw-kanban-card.is-dragging {
  opacity: 0.45;
  transform: rotate(1.5deg);
}
.rw-kanban-card.is-locked {
  cursor: default;
}
.rw-kanban-avatar {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgb(var(--rw-tone));
  background: rgba(var(--rw-tone), 0.12);
}
.rw-kanban-name {
  display: block;
  font-weight: 600;
  color: var(--default-text-color);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rw-kanban-name:hover {
  color: var(--primary-color);
}
.rw-kanban-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rw-kanban-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.65rem 0;
}
.rw-kanban-tag {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--default-background);
  border: 1px solid var(--default-border);
  color: var(--default-text-color);
}
.rw-kanban-tag.is-value {
  background: rgba(var(--success-rgb), 0.1);
  border-color: rgba(var(--success-rgb), 0.2);
  color: rgb(var(--success-rgb));
}
.rw-kanban-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--default-border);
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.rw-kanban-actions {
  position: absolute;
  bottom: 0.35rem;
  right: 0.5rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--custom-white);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.rw-kanban-card:hover .rw-kanban-actions,
.rw-kanban-card:focus-within .rw-kanban-actions {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
@media (hover: none) {
  /* Touch screens have no hover: keep the actions in the card instead. */
  .rw-kanban-actions {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    box-shadow: none;
    padding: 0.5rem 0 0;
    background: none;
  }
}
.rw-kanban-add {
  margin-top: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.625rem;
  border: 1px dashed rgba(var(--rw-tone), 0.45);
  background: transparent;
  color: rgb(var(--rw-tone));
  font-weight: 500;
  font-size: 0.8125rem;
  transition: background-color 0.15s;
}
.rw-kanban-add:hover {
  background: rgba(var(--rw-tone), 0.08);
}

/* Rich text email editor (TipTap). */
.rw-rte {
  border: 1px solid var(--input-border, var(--default-border));
  border-radius: 0.5rem;
  background: var(--custom-white);
  overflow: hidden;
}
.rw-rte:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem var(--primary01);
}
.rw-rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem;
  padding: 0.35rem;
  border-bottom: 1px solid var(--default-border);
  background: var(--default-background);
}
.rw-rte-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--default-text-color);
  font-size: 1rem;
}
.rw-rte-btn:hover:not(:disabled) {
  background: var(--primary01);
  color: var(--primary-color);
}
.rw-rte-btn.is-active {
  background: var(--primary-color);
  color: #fff;
}
.rw-rte-btn:disabled {
  opacity: 0.35;
}
.rw-rte-sep {
  width: 1px;
  height: 1.25rem;
  margin: 0 0.25rem;
  background: var(--default-border);
}
.rw-rte-content {
  min-height: 12rem;
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.75rem 0.9rem;
  outline: none;
  font-size: 0.875rem;
  line-height: 1.6;
}
.rw-rte-content.rw-rte-compact {
  min-height: 5.5rem;
  max-height: 14rem;
}
.rw-rte-content p {
  margin: 0 0 0.6rem;
}
.rw-rte-content h2 {
  font-size: 1.1rem;
  margin: 0.4rem 0 0.5rem;
}
.rw-rte-content ul,
.rw-rte-content ol {
  padding-left: 1.4rem;
  margin: 0 0 0.6rem;
}
.rw-rte-content blockquote {
  border-left: 3px solid var(--primary-color);
  margin: 0 0 0.6rem;
  padding-left: 0.75rem;
  color: var(--text-muted);
}
.rw-rte-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* AI writer panel in the email dialog. */
.rw-ai-box {
  padding: 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(var(--secondary-rgb), 0.25);
  background: linear-gradient(135deg, rgba(var(--secondary-rgb), 0.07), rgba(var(--primary-rgb), 0.05));
}
.rw-ai-badge {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, rgb(var(--secondary-rgb)), rgb(var(--primary-rgb)));
}

/* Customer document pages (e.g. /proposal/<link>). */
.rw-doc-page {
  min-height: 100vh;
  background: var(--default-body-bg-color);
}

/* Customer invoice link: the payment card stays in view beside the invoice from tablet width; on phones it stacks
   under the invoice and a bar at the bottom of the screen jumps to it. */
@media (min-width: 768px) {
  .card.custom-card.rw-pay-aside {
    position: sticky;
    top: 1.5rem;
  }
  /* In the customer portal it sits below the portal's sticky header. */
  .card.custom-card.rw-pay-aside-portal {
    top: calc(var(--rw-portal-header, 4.5rem) + 1rem);
  }
}
.rw-pay-aside {
  scroll-margin-top: 1rem;
}
.rw-pay-aside-portal {
  scroll-margin-top: calc(var(--rw-portal-header, 4.5rem) + 1rem);
}
/* Narrow screens: the line items wrap instead of scrolling sideways. */
@media (max-width: 575.98px) {
  .rw-invoice-lines th,
  .rw-invoice-lines td {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    font-size: 0.8rem;
  }
}
.rw-pay-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--custom-white, #fff);
  border-top: 1px solid var(--default-border);
}
@media (max-width: 767.98px) {
  .rw-pay-page {
    padding-bottom: 5rem !important;
  }
}

/* Contracts: the wording as the customer sees it, signatures, the signing pad and the printed contract. */
/* The theme strips list markers; wording and the editor need them back. */
.rw-rte-content ul,
.rw-contract-body ul {
  list-style: disc;
}
.rw-rte-content ol,
.rw-contract-body ol {
  list-style: decimal;
}
.rw-contract-body ul,
.rw-contract-body ol {
  padding-left: 1.4rem;
  margin-bottom: 0.75rem;
}
.rw-contract-body {
  line-height: 1.65;
}
.rw-contract-body h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}
.rw-contract-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 0.4rem;
}
.rw-contract-body blockquote {
  border-left: 3px solid var(--default-border);
  padding-left: 0.75rem;
  color: var(--text-muted);
}
.rw-signature {
  display: block;
  max-width: min(100%, 380px);
  max-height: 140px;
  background: #fff;
  border-bottom: 1px solid var(--default-border);
}
.rw-signature-pad {
  display: block;
  width: 100%;
  height: 160px;
  background: #fff;
  border: 1px dashed var(--default-border);
  border-radius: 0.5rem;
  touch-action: none;
  cursor: crosshair;
}
@media print {
  .xintra-root .rw-contract-print {
    color: #000;
  }
}

/* Date picker: days outside the allowed range read as unavailable. */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
}

/* Project tasks kanban: one column per status, scrolling sideways on small screens. */
.rw-task-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.rw-task-col {
  background: var(--default-background, rgba(var(--light-rgb), 0.6));
  border: 1px dashed transparent;
  border-radius: 0.5rem;
  padding: 0.6rem;
  min-height: 8rem;
}
.rw-task-col.is-droppable {
  border-color: var(--primary03, var(--default-border));
}
.rw-task-card {
  background: var(--custom-white);
  border: 1px solid var(--default-border);
  border-radius: 0.5rem;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.5rem;
  cursor: grab;
}
.rw-task-card:hover {
  border-color: var(--primary03, var(--primary-color));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.rw-task-move {
  font-size: 0.75rem;
}

/* Project Gantt chart. */
.rw-gantt {
  position: relative;
  --rw-gantt-name: 200px;
  overflow-x: auto;
}
.rw-gantt-row {
  display: grid;
  grid-template-columns: var(--rw-gantt-name) minmax(480px, 1fr);
  align-items: center;
  min-height: 2rem;
  border-bottom: 1px solid var(--default-border);
}
.rw-gantt-head {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-height: 1.75rem;
}
.rw-gantt-name {
  padding: 0.25rem 0.5rem 0.25rem 0;
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rw-gantt-track {
  position: relative;
  height: 2rem;
}
.rw-gantt-head .rw-gantt-track {
  height: 1.75rem;
}
.rw-gantt-week {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--default-border);
  padding-left: 0.25rem;
  line-height: 1.75rem;
  white-space: nowrap;
}
.rw-gantt-bar {
  position: absolute;
  top: 0.5rem;
  height: 1rem;
  border-radius: 0.5rem;
  min-width: 6px;
  opacity: 0.85;
}
.rw-gantt-milestone {
  position: absolute;
  top: 0.55rem;
  width: 0.9rem;
  height: 0.9rem;
  margin-left: -0.45rem;
  transform: rotate(45deg);
  background: var(--primary-color);
  border-radius: 2px;
}
.rw-gantt-lines {
  position: absolute;
  top: 0;
  bottom: 1.75rem;
  left: var(--rw-gantt-name);
  right: 0;
  pointer-events: none;
}
.rw-gantt-today,
.rw-gantt-deadline {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 2px solid rgb(var(--danger-rgb));
}
.rw-gantt-deadline {
  border-left: 2px dashed rgb(var(--warning-rgb));
}
.rw-gantt-key {
  display: inline-block;
  width: 14px;
  height: 0;
  vertical-align: middle;
  border-top: 2px solid rgb(var(--danger-rgb));
}
.rw-gantt-key-deadline {
  border-top: 2px dashed rgb(var(--warning-rgb));
}
/* Gantt hover popup (after Perfex's): dark box with the name, a rule, then the dates. */
.rw-gantt-bar,
.rw-gantt-milestone {
  cursor: pointer;
  transition: opacity 0.15s, filter 0.15s;
}
.rw-gantt-bar:hover,
.rw-gantt-bar:focus-visible {
  opacity: 1;
  filter: brightness(1.15);
}
.rw-gantt-milestone:hover,
.rw-gantt-milestone:focus-visible {
  filter: brightness(1.2);
}
.rw-gantt-bar:focus-visible,
.rw-gantt-milestone:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
.rw-gantt-tip {
  position: fixed;
  z-index: 1080;
  transform: translateX(-50%);
  min-width: 11rem;
  max-width: 20rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: rgb(33, 37, 41);
  color: #fff;
  font-size: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
.rw-gantt-tip-above {
  transform: translate(-50%, -100%);
}
.rw-gantt-tip-title {
  color: rgba(255, 255, 255, 0.75);
  padding-bottom: 0.35rem;
  margin-bottom: 0.35rem;
  border-bottom: 2px solid var(--primary-color);
  overflow-wrap: anywhere;
}
.rw-gantt-tip-dates {
  font-weight: 600;
}
.rw-gantt-tip-detail {
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.15rem;
}

/* Analytics: the pulsing "live" dot on the realtime card. */
.rw-live-dot {
  box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.6);
  animation: rw-live-pulse 2s ease-out infinite;
}
@keyframes rw-live-pulse {
  70% {
    box-shadow: 0 0 0 6px rgba(25, 135, 84, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rw-live-dot {
    animation: none;
  }
}

/* Analytics: cards side by side in a row share the row's height; in a column with two cards, the last one stretches. */
.rw-equal > [class*="col-"] {
  display: flex;
  flex-direction: column;
}
.rw-equal > [class*="col-"] > .card:last-child {
  flex: 1 1 auto;
}
/* Charts sit in the middle of a stretched card instead of leaving a gap underneath. */
.rw-center > .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 18.75rem;
}
/* Report tables in a row: one line per row, long titles and addresses cut short (the full text shows on hover). */
.rw-table-card tbody th,
.rw-table-card tbody td.text-wrap {
  max-width: 15rem !important;
  min-width: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}
/* Only sideways scrolling inside the table, so the mouse wheel always scrolls the page. */
.rw-table-card .table-responsive {
  overflow-y: hidden;
}
/* Analytics: all eight metric tabs visible at once, four to a row (two on phones). */
.rw-metric-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.rw-metric-tabs > [role="tab"] {
  border-inline-end: 1px solid var(--default-border) !important;
}
.rw-metric-tabs > [role="tab"]:nth-child(4n) {
  border-inline-end: 0 !important;
}
@media (max-width: 575.98px) {
  .rw-metric-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rw-metric-tabs > [role="tab"]:nth-child(2n) {
    border-inline-end: 0 !important;
  }
}
/* Analytics: a heading over each group of cards. */
.rw-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.5rem;
  row-gap: 0.125rem;
  margin: 0.5rem 0 0.75rem;
}
/* The title keeps its one line; the description wraps underneath it on narrow screens instead of squeezing it. */
.rw-section-head > :first-child {
  flex: 0 0 auto;
  white-space: nowrap;
}
.rw-section-head > :not(:first-child) {
  flex: 1 1 16rem;
  min-width: 0;
}
/* Analytics: the two page tables scroll inside the same fixed height, with the column headings kept in view. */
.rw-scroll-table .table-responsive {
  height: 26rem;
  overflow-y: auto;
}
.rw-scroll-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--custom-white);
  box-shadow: inset 0 -1px 0 var(--default-border);
}
/* Social: a post's image stays a thumbnail on phones. */
@media (max-width: 767.98px) {
  .rw-social-thumb {
    max-width: 10rem;
  }
}

/* Social calendar: a week of posts, Monday to Sunday; one column per day on wide screens, stacked on phones. */
.rw-week {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 992px) {
  .rw-week {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .rw-week-day {
    min-height: 16rem;
  }
}
.rw-week-day {
  border: 1px solid var(--default-border);
  border-radius: 0.5rem;
  padding: 0.625rem;
  min-width: 0;
}
.rw-week-today {
  border-color: var(--primary-color);
  box-shadow: inset 0 0 0 1px var(--primary-color);
}
.rw-week-post {
  display: block;
  padding: 0.5rem;
  border-radius: 0.375rem;
  background: var(--light);
  color: var(--default-text-color);
  text-decoration: none;
}
.rw-week-post:hover,
.rw-week-post:focus-visible {
  background: var(--primary01, rgba(var(--primary-rgb), 0.1));
  color: var(--default-text-color);
}
.rw-week-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.25rem;
}

/* Customer portal projects list: long names and briefs are cut to one line (the full text is on hover and the page). */
.rw-project-title {
  max-width: 16rem;
}
.rw-project-brief {
  max-width: 18rem;
}
/* Team initials overlap like the template's stacked photos, so each gets a solid ring to stay readable. */
.avatar-list-stacked.rw-team .avatar {
  border-color: var(--custom-white);
}
/* Portal contract: "Sign" (#sign) lands below the portal's sticky header. */
.rw-sign-anchor {
  scroll-margin-top: calc(var(--rw-portal-header, 4.5rem) + 1rem);
}

/* Proposals as a document, laid out like our PDF proposals (components/proposal/ProposalDocument.tsx). */
.rw-pdoc {
  --rw-pdoc-ink: #08090d;
  background: #fff;
  color: #1f2128;
  border: 1px solid var(--default-border);
  border-radius: 0.75rem;
  padding: clamp(1rem, 4vw, 2.75rem);
  margin-bottom: 1.5rem;
  font-size: 0.975rem;
  line-height: 1.65;
}
.rw-pdoc-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1.5px solid var(--rw-pdoc-ink);
}
.rw-pdoc-brand {
  background: var(--rw-pdoc-ink);
  color: #fff;
  border-radius: 0.4rem;
  padding: 0.3rem 0.9rem;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rw-pdoc-bar-meta {
  text-align: right;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #444;
}
.rw-pdoc-cover {
  margin-top: clamp(1.5rem, 5vw, 3.5rem);
  background: var(--rw-pdoc-ink);
  color: #fff;
  border-radius: 0.75rem;
  padding: clamp(1.25rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2.5rem);
}
.rw-pdoc-cover h1 {
  color: #fff;
  font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.6rem);
  line-height: 1.12;
  font-weight: 700;
  margin: 0 0 1rem;
}
.rw-pdoc-cover-meta {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}
.rw-pdoc-tagline {
  font-weight: 700;
  margin: 0;
}
.rw-pdoc-confidential {
  color: #8b1a1a;
  font-style: italic;
  margin: 0.85rem 0 0;
}
.rw-pdoc-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--rw-pdoc-ink);
  margin: 2rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2.5px solid var(--rw-pdoc-ink);
  break-after: avoid;
}
.rw-pdoc-body h3,
.rw-pdoc-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rw-pdoc-ink);
  margin: 1.4rem 0 0.5rem;
  break-after: avoid;
}
.rw-pdoc-body h4 {
  font-size: 1rem;
}
.rw-pdoc-body p {
  margin: 0 0 0.9rem;
}
.rw-pdoc-body ul,
.rw-pdoc-body ol {
  padding-left: 1.4rem;
  margin: 0 0 0.9rem;
}
.rw-pdoc-body ul {
  list-style: disc;
}
.rw-pdoc-body ol {
  list-style: decimal;
}
.rw-pdoc-body li {
  margin-bottom: 0.2rem;
}
.rw-pdoc-body strong,
.rw-pdoc-body b {
  color: var(--rw-pdoc-ink);
}
.rw-pdoc-body a {
  color: rgb(var(--primary-rgb));
  text-decoration: underline;
}
.rw-pdoc-body blockquote {
  background: #f2f3f5;
  border-left: 5px solid var(--rw-pdoc-ink);
  padding: 0.85rem 1.1rem;
  margin: 0 0 1rem;
  break-inside: avoid;
}
.rw-pdoc-body blockquote p:last-child {
  margin-bottom: 0;
}
.rw-pdoc-body hr {
  margin: 1.5rem 0;
}
/* Tables: the black header row and ruled rows of the PDF; wide ones scroll on phones. */
.rw-pdoc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.93rem;
}
.rw-pdoc-table {
  overflow-x: auto;
}
.rw-pdoc-body thead th {
  background: var(--rw-pdoc-ink);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  text-align: left;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.rw-pdoc-body td,
.rw-pdoc-body tbody th {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #dcdde1;
  vertical-align: top;
}
.rw-pdoc-body tr {
  break-inside: avoid;
}
.rw-pdoc-body th[align="right"],
.rw-pdoc-body td[align="right"],
.rw-pdoc-body .text-end {
  text-align: right;
}
.rw-pdoc-body th[align="center"],
.rw-pdoc-body td[align="center"] {
  text-align: center;
}
.rw-pdoc-body tfoot th,
.rw-pdoc-body tfoot td {
  background: #f0f1f3;
  font-weight: 700;
  color: var(--rw-pdoc-ink);
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #dcdde1;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.rw-pdoc-note {
  display: block;
  white-space: pre-line;
  font-size: 0.82rem;
  color: #6b6f78;
}
.rw-pdoc-muted {
  font-size: 0.82rem;
  color: #6b6f78;
}
.rw-pdoc-items {
  break-inside: avoid-page;
}
.rw-pdoc-valid {
  font-size: 0.85rem;
  color: #6b6f78;
}
.rw-pdoc-signature {
  break-inside: avoid;
}
.rw-pdoc-foot {
  margin-top: 2.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid #c9cbd0;
  font-size: 0.72rem;
  color: #555;
}
.rw-pdoc-foot strong {
  color: var(--rw-pdoc-ink);
}
@media print {
  .xintra-root .rw-pdoc {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    font-size: 10.5pt;
  }
  .xintra-root .rw-pdoc-cover,
  .xintra-root .rw-pdoc-brand {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* The page's running foot (an @page rule in the document) prints this line on every page instead. */
  .xintra-root .rw-pdoc-foot {
    display: none;
  }
  .xintra-root .row > :has(> .rw-pdoc) {
    width: 100%;
  }
  /* White paper edge to edge. The site declares a dark colour scheme, which Chrome uses for the page margins. */
  html:has(.xintra-root) {
    color-scheme: light;
    background: #fff;
  }
  html:has(.rw-pdoc) body,
  .xintra-root.rw-doc-page {
    background: #fff !important;
  }
  .xintra-root .rw-pdoc-table {
    overflow: visible;
  }
}

/* Header Quick create tiles (HeaderTools). */
.rw-quick-create { transition: background-color .15s; }
.rw-quick-create:hover, .rw-quick-create:focus-visible { background-color: var(--primary01, rgba(97, 97, 255, .08)); }
/* The header shortcut menus (HeaderTools, PortalHeaderTools): wide enough for a line of detail, never past the screen. */
.main-header-dropdown.rw-header-menu { width: 320px; max-width: calc(100vw - 24px); }
/* On phones they open full width under the header, so a menu from an icon near the left never runs off the screen. */
@media (max-width: 575.98px) {
  .main-header-dropdown.rw-header-menu.show {
    position: fixed !important;
    inset: 64px 12px auto 12px !important;
    width: auto;
    max-width: none;
    transform: none !important;
  }
}
/* Header menus (bell, profile and the shortcuts) open just below the header bar, not over its icons: the template's
   top: 15px was meant for Popper, which isn't used here. The icon sits centred in the 68px bar, so 100% + 18px is its
   bottom edge, plus a small gap. Phones use the full-width rule above. */
@media (min-width: 576px) {
  .app-header .header-element > .main-header-dropdown {
    top: calc(100% + 22px) !important;
    margin-top: 0 !important;
  }
}

/* ---------- /login: bright and colourful, in the spirit of monday.com's sign-in ---------- */
.rw-login {
  --rw-violet: #6c4bff;
  --rw-pink: #f24fd8;
  --rw-cyan: #3ec6ff;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #ffffff;
  font-family: var(--font-figtree), system-ui, sans-serif;
}
@media (min-width: 1200px) {
  .rw-login { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}
.rw-login h1, .rw-login h2, .rw-login .rw-auth-brand { font-family: var(--font-poppins), system-ui, sans-serif; }

/* Form side */
.rw-login-form-side {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 2rem;
}
.rw-login-stripe {
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, #ff3d57 0 16%, #fdab3d 16% 32%, #ffcb00 32% 48%, #00c875 48% 64%, #579bfc 64% 80%, #a25ddc 80% 100%);
}
.rw-login-dot {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.18;
  pointer-events: none;
}
.rw-login-dot-a { width: 220px; height: 220px; background: var(--rw-cyan); top: -80px; left: -90px; }
.rw-login-dot-b { width: 160px; height: 160px; background: #ffcb00; bottom: -60px; right: -50px; }
.rw-login-form-wrap { position: relative; width: 100%; max-width: 440px; }
.rw-login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-bottom: 1.75rem;
}
.rw-login-brand .rw-auth-brand { color: #181b34; }
.rw-login-gradient-text {
  background: linear-gradient(90deg, #1f9fd6, #5b3fe0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rw-login-card {
  background: #ffffff;
  border: 1px solid #e6e9f2;
  border-radius: 20px;
  padding: 2rem 1.75rem;
  box-shadow: 0 1px 2px rgba(24, 27, 52, 0.04), 0 18px 40px -18px rgba(108, 75, 255, 0.28);
}
@media (min-width: 576px) { .rw-login-card { padding: 2.5rem 2.25rem; } }
.rw-login-card h1 {
  font-size: 1.75rem !important;
  font-weight: 700;
  color: #181b34;
  text-align: left !important;
  letter-spacing: -0.02em;
}
.rw-login-card h1 + p { text-align: left !important; color: #676879 !important; }
.rw-login-card .form-label { font-weight: 600; color: #323338; }
.rw-login-card .form-control {
  border: 1.5px solid #d0d4e4;
  border-radius: 12px;
  padding: 0.7rem 0.95rem;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rw-login-card .form-control:hover { border-color: #a9b0c8; }
.rw-login-card .form-control:focus {
  border-color: var(--rw-violet);
  box-shadow: 0 0 0 4px rgba(108, 75, 255, 0.15);
}
.rw-login-card .show-password-button { top: 50%; transform: translateY(-50%); }
.rw-login-card .btn-primary {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(90deg, var(--rw-violet), #a25ddc 55%, var(--rw-pink));
  background-size: 200% 100%;
  box-shadow: 0 10px 22px -10px rgba(108, 75, 255, 0.7);
  transition: background-position 0.4s, transform 0.15s, box-shadow 0.15s;
}
.rw-login-card .btn-primary:hover:not(:disabled) {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -10px rgba(242, 79, 216, 0.6);
}
.rw-login-card .btn-primary:disabled { opacity: 0.75; }
.rw-login-card .btn-link { color: var(--rw-violet); font-weight: 600; text-decoration: none; }
.rw-login-card a { color: var(--rw-violet); }
.rw-login-card .alert { border-radius: 12px; }
.rw-login-foot { margin: 1.25rem 0 0; text-align: center; font-size: 0.8125rem; color: #676879; }
.rw-login-foot a { color: var(--rw-violet); font-weight: 600; }

/* Colour side */
.rw-login-art {
  display: none;
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #5b3fe0 0%, #7b5cff 38%, #c04ff0 72%, #f24fd8 100%);
  color: #fff;
}
@media (min-width: 1200px) { .rw-login-art { display: flex; align-items: center; justify-content: center; } }
.rw-login-blob { position: absolute; border-radius: 50%; filter: blur(8px); }
.rw-login-blob-1 { width: 340px; height: 340px; background: #3ec6ff; opacity: 0.55; top: -120px; right: -90px; }
.rw-login-blob-2 { width: 260px; height: 260px; background: #ffcb00; opacity: 0.45; bottom: -90px; left: -70px; }
.rw-login-blob-3 { width: 140px; height: 140px; background: #00c875; opacity: 0.5; bottom: 18%; right: 8%; }
.rw-login-art-inner { position: relative; width: 100%; max-width: 520px; padding: 3rem 2.5rem; }
.rw-login-kicker {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.rw-login-headline {
  font-size: 2.35rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem;
  color: #fff;
}
.rw-login-headline span { color: #ffe066; }
.rw-login-board {
  background: #ffffff;
  border-radius: 18px;
  padding: 0.6rem;
  box-shadow: 0 30px 60px -25px rgba(24, 12, 80, 0.55);
  color: #323338;
}
.rw-login-board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.65rem 0.65rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #181b34;
}
.rw-login-board-dots { display: flex; gap: 5px; }
.rw-login-board-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.rw-login-board-row {
  display: grid;
  grid-template-columns: 6px 20px minmax(0, 1fr) 28px 128px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.5rem 0.5rem 0;
  border-top: 1px solid #eef0f6;
  font-size: 0.86rem;
  animation: rw-login-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.rw-login-board-bar { align-self: stretch; border-radius: 0 4px 4px 0; }
.rw-login-board-row > i { color: #8a8fa8; font-size: 1rem; }
.rw-login-board-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-login-board-who {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--rw-cyan), var(--rw-violet));
}
.rw-login-pill {
  text-align: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.42rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}
.rw-login-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.rw-login-chips span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
@keyframes rw-login-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rw-login-board-row { animation: none; } }
/* Without the colour panel (phones and tablets), a soft wash of the brand colours behind the form. */
@media (max-width: 1199.98px) {
  .rw-login-form-side {
    min-height: 100vh;
    background:
      radial-gradient(60% 40% at 0% 0%, rgba(62, 198, 255, 0.22), transparent 70%),
      radial-gradient(55% 35% at 100% 15%, rgba(242, 79, 216, 0.2), transparent 70%),
      radial-gradient(70% 40% at 50% 100%, rgba(255, 203, 0, 0.2), transparent 70%),
      linear-gradient(180deg, #f7f5ff, #ffffff 45%);
  }
}
/* The login boards: two of them, icon + name and detail + status (no assignee column). */
.rw-login-board + .rw-login-board { margin-top: 0.9rem; }
.rw-login-board .rw-login-board-row { grid-template-columns: 6px 20px minmax(0, 1fr) 128px; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.rw-login-board-name small { display: block; font-weight: 500; font-size: 0.74rem; color: #8a8fa8; }
.rw-login-board-head i { color: var(--rw-violet); }

/* ---------- Dashboards (CRM and portal): colourful but formal ---------- */
.rw-tone-violet { --rw-c: 108, 75, 255; }
.rw-tone-cyan { --rw-c: 14, 165, 233; }
.rw-tone-amber { --rw-c: 245, 158, 11; }
.rw-tone-green { --rw-c: 16, 185, 129; }
.rw-tone-rose { --rw-c: 244, 63, 94; }

/* Welcome band: the brand gradient, deep enough to stay formal, with white text. */
.rw-welcome {
  position: relative;
  overflow: hidden;
  margin: 0.25rem 0 1.5rem;
  padding: 1.5rem 1.6rem 1.35rem;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(115deg, #2f2696 0%, #5b3fe0 38%, #8b4fe6 70%, #c74fd8 100%);
  box-shadow: 0 18px 40px -24px rgba(59, 45, 184, 0.75);
}
.rw-welcome-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  right: -110px;
  top: -190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 198, 255, 0.45), transparent 65%);
  pointer-events: none;
}
.rw-welcome-top { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.rw-welcome-date { margin: 0 0 0.2rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.rw-welcome-title { margin: 0; font-size: 1.45rem; font-weight: 600; letter-spacing: -0.01em; color: #fff; }
.rw-welcome-sub { margin: 0.25rem 0 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.82); }
.rw-welcome-actions .btn-light { background: #fff; color: #2f2696; border: 0; font-weight: 600; }
.rw-welcome-actions .btn-light:hover { background: #f1eeff; color: #2f2696; }
.rw-welcome-chips { position: relative; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.rw-welcome-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background-color 0.15s;
}
.rw-welcome-chip:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.rw-welcome-chip i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.8rem;
  background: rgb(var(--rw-c));
  color: #fff;
}

/* KPI cards: a slim coloured top edge and a faint wash of the same colour. */
.rw-kpi-primary { --rw-k: var(--primary-rgb); }
.rw-kpi-primary1 { --rw-k: var(--primary-tint1-rgb); }
.rw-kpi-primary2 { --rw-k: var(--primary-tint2-rgb); }
.rw-kpi-primary3 { --rw-k: var(--primary-tint3-rgb); }
.rw-kpi-secondary { --rw-k: var(--secondary-rgb); }
.rw-kpi-warning { --rw-k: var(--warning-rgb); }
.rw-kpi-danger { --rw-k: var(--danger-rgb); }
.rw-kpi-info { --rw-k: var(--info-rgb); }
.rw-kpi-success { --rw-k: var(--success-rgb); }
.xintra-root .card.custom-card.rw-kpi {
  position: relative;
  overflow: hidden;
  border-top: 3px solid rgb(var(--rw-k));
  background-image: linear-gradient(180deg, rgba(var(--rw-k), 0.07), rgba(var(--rw-k), 0) 65%);
  transition: transform 0.15s, box-shadow 0.15s;
}
.xintra-root a.card.custom-card.rw-kpi:hover,
.xintra-root .card.custom-card.rw-kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px rgba(var(--rw-k), 0.65); }

/* Card titles get a short brand-gradient accent. */
.rw-dash .card-header .card-title { position: relative; padding-left: 0.8rem; }
.rw-dash .card-header .card-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 1.05em;
  transform: translateY(-50%);
  border-radius: 4px;
  background: linear-gradient(180deg, #3ec6ff, #7b5cff 55%, #f24fd8);
}

/* The CRM's revenue card: the brand gradient instead of flat blue. */
.rw-dash .earnings-card.card-bg-primary { background: linear-gradient(140deg, #3b2db8 0%, #6c4bff 50%, #b14fe0 100%) !important; }

/* Portal quick links: a soft tile with a solid coloured icon. */
.rw-quick-tile {
  border-radius: 12px;
  text-decoration: none;
  color: var(--default-text-color);
  background: rgba(var(--rw-c), 0.07);
  border: 1px solid rgba(var(--rw-c), 0.16);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: transform 0.15s, background-color 0.15s;
}
.rw-quick-tile:hover { transform: translateY(-2px); background: rgba(var(--rw-c), 0.13); color: var(--default-text-color); }
.rw-quick-tile-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgb(var(--rw-c)); color: #fff; }
.rw-dash > .rw-welcome:first-child { margin-top: 1.5rem; }
@media (max-width: 575.98px) {
  .rw-welcome { padding: 1.2rem 1.1rem 1.1rem; }
  .rw-welcome-title { font-size: 1.2rem; }
}

/* Lead email: the "Attach our company profile" row. */
.rw-attach { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.8rem; border: 1px dashed var(--default-border); border-radius: 10px; background: rgba(var(--primary-rgb), 0.04); }

/* AEO: table cards beside a chart scroll inside the chart's height; the question list scrolls instead of growing. */
.rw-scroll-table.rw-short .table-responsive {
  height: 19rem;
}
.rw-aeo-questions {
  max-height: 22rem;
  overflow-y: auto;
}

/* CRM → AEO latest-check table: the "Pampanga, Clark and Angeles" / "Philippines-wide" group rows. Bootstrap's
   table-light keeps a white background in dark mode, so its theme text (50% white) disappeared; these follow the
   theme: a light primary band with dark text, or a darker band with light text. */
.rw-scope-row > th {
  --bs-table-bg: rgba(var(--primary-rgb), 0.08);
  --bs-table-accent-bg: transparent;
  --bs-table-color: var(--default-text-color);
  background-color: rgba(var(--primary-rgb), 0.08) !important;
  color: var(--default-text-color) !important;
  letter-spacing: 0.03em;
  border-top: 1px solid var(--default-border);
}
[data-theme-mode="dark"] .rw-scope-row > th {
  --bs-table-bg: rgba(var(--primary-rgb), 0.18);
  background-color: rgba(var(--primary-rgb), 0.18) !important;
}
