/* main.css — clean baseline for REPortal
   Includes: header + desktop nav + mobile hamburger dropdown + left sidebar + full-width content
   Ensures: sidebar stacks above content on small screens
*/

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* =====================================================
   CRM Event Forms
   ===================================================== */
.event-form-shell{
  --event-ink:#0f172a;
  --event-muted:#64748b;
  --event-border:rgba(148,163,184,.30);
  --event-border-strong:rgba(100,116,139,.36);
  --event-shadow:0 18px 46px rgba(15,23,42,.09);
  --event-shadow-soft:0 12px 30px rgba(15,23,42,.06);
  width:100%;
  padding:0;
  overflow:visible;
  color:var(--event-ink);
  background:linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,252,.90)), #ffffff;
  border:1px solid var(--event-border);
  border-radius:18px;
  box-shadow:var(--event-shadow);
}

.event-form{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.event-form__hero{
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:18px 20px 16px;
  overflow:hidden;
  background:linear-gradient(135deg, rgba(239,246,255,.92), rgba(255,255,255,.78)), #ffffff;
  border-bottom:1px solid rgba(148,163,184,.22);
}

.event-form__hero::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:linear-gradient(180deg, #2563eb, #14b8a6);
}

.event-form__icon{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  flex:0 0 42px;
  margin-left:2px;
  color:#1d4ed8;
  background:#ffffff;
  border:1px solid rgba(37,99,235,.18);
  border-radius:14px;
  box-shadow:0 10px 24px rgba(37,99,235,.12);
}

.event-form__title-wrap{
  position:relative;
  z-index:1;
  min-width:0;
}

.event-form__eyebrow{
  margin-bottom:4px;
  color:#2563eb;
  font-size:11px;
  font-weight:850;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.event-form__title{
  margin:0;
  color:var(--event-ink);
  font-size:clamp(1.25rem, 2.4vw, 1.7rem);
  line-height:1.12;
  letter-spacing:0;
}

.event-form__subtitle{
  margin:.35rem 0 0;
  color:var(--event-muted);
  font-size:.94rem;
  line-height:1.42;
}

.event-form-shell > .field,
.event-form-shell > .field-card{
  margin-inline:18px;
}

.event-form-shell > .field:first-child,
.event-form-shell > .field-card:first-child{
  margin-top:18px;
}

.event-form-card.field-card,
.event-form-shell > .field-card{
  overflow:visible;
  background:linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,252,.88)), #ffffff;
  border:1px solid var(--event-border);
  border-radius:16px;
  box-shadow:var(--event-shadow-soft);
}

.event-form-card .field-card__header,
.event-form-shell > .field-card .field-card__header{
  padding:15px 17px;
  background:linear-gradient(135deg, rgba(239,246,255,.90), rgba(255,255,255,.78));
  border-bottom:1px solid rgba(148,163,184,.20);
}

.event-form-card .field-card__title,
.event-form-shell > .field-card .field-card__title{
  display:flex;
  align-items:center;
  gap:8px;
  color:#0f172a;
  font-size:15px;
  font-weight:850;
}

.event-form-card .field-card__title .icon,
.event-form-shell > .field-card .field-card__title .icon{
  color:#2563eb !important;
}

.event-form-card .field-card__body,
.event-form-shell > .field-card .field-card__body{
  padding:17px;
}

.event-form-shell .field > label,
.event-form-shell .field .label{
  color:#334155;
  font-size:12px;
  font-weight:850;
  letter-spacing:.02em;
}

.event-form-shell .field input[type="text"],
.event-form-shell .field input[type="search"],
.event-form-shell .field input[type="email"],
.event-form-shell .field input[type="tel"],
.event-form-shell .field input[type="url"],
.event-form-shell .field input[type="date"],
.event-form-shell .field input[type="datetime-local"],
.event-form-shell .field input[type="number"],
.event-form-shell .field select,
.event-form-shell .field textarea{
  width:100%;
  min-height:44px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(148,163,184,.38);
  border-radius:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
  transition:border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.event-form-shell .field textarea{
  min-height:108px;
  padding-top:12px;
  line-height:1.45;
}

.event-form-shell .field input:focus,
.event-form-shell .field select:focus,
.event-form-shell .field textarea:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
  outline:none;
}

.event-form-shell .suggest{
  border-color:rgba(148,163,184,.32);
  border-radius:14px;
  box-shadow:0 18px 42px rgba(15,23,42,.14);
}

.event-form-meta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  min-height:40px;
  padding:9px 11px;
  color:#334155;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.28);
  border-radius:12px;
}

.event-form-check{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  margin-top:6px;
  padding:10px 12px;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.28);
  border-radius:12px;
}

.event-form-check input[type="checkbox"]{
  width:18px;
  height:18px;
  flex:0 0 auto;
  accent-color:#2563eb;
}

.event-form-check label{
  margin:0;
}

.event-quick-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
}

.event-quick-label{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 10px;
  color:#475569;
  background:#f1f5f9;
  border:1px solid rgba(148,163,184,.28);
  border-radius:12px;
  font-size:12px;
  font-weight:800;
}

.event-form-shell .event-quick-actions .btn,
.event-form-shell button[data-qdate],
.event-form-shell button[data-qtime]{
  min-height:34px;
  padding:.4rem .7rem;
  border-radius:999px;
  border-color:rgba(148,163,184,.34);
  background:#ffffff;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.event-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin:0;
  padding:0 18px 18px;
}

.event-form-actions .btn{
  min-height:42px;
  border-radius:12px;
}

.event-form-actions .btn-primary{
  box-shadow:0 12px 24px rgba(15,23,42,.16);
}

.event-form-unsupported{
  padding:18px;
}

.event-form-unsupported__card{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:16px;
  background:#ffffff;
  border:1px solid var(--event-border);
  border-radius:16px;
  box-shadow:var(--event-shadow-soft);
}

.dialog-card.dialog--tall,
.modal-card.dialog--tall{
  width:min(760px, calc(100vw - 32px));
}

@media (max-width: 760px){
  .event-form-shell{
    border-radius:16px;
  }

  .event-form__hero{
    padding:16px;
  }

  .event-form__icon{
    width:38px;
    height:38px;
    flex-basis:38px;
    border-radius:12px;
  }

  .event-form-shell > .field,
  .event-form-shell > .field-card{
    margin-inline:12px;
  }

  .event-form-card .field-card__body,
  .event-form-shell > .field-card .field-card__body{
    padding:14px;
  }

  .event-form-shell .sub-grid,
  .event-form-shell .sub-grid--2,
  .event-form-shell .sub-grid--3,
  .event-form-shell .sub-grid--4{
    grid-template-columns:1fr;
  }

  .event-form-shell .span-2,
  .event-form-shell .span-3,
  .event-form-shell .span-4{
    grid-column:auto;
  }

  .event-quick-actions .btn,
  .event-form-actions .btn{
    width:100%;
    justify-content:center;
  }

  .event-form-actions{
    position:sticky;
    bottom:0;
    z-index:2;
    display:grid;
    grid-template-columns:1fr;
    padding:12px;
    background:rgba(255,255,255,.94);
    border-top:1px solid rgba(148,163,184,.22);
    backdrop-filter:blur(10px);
  }
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f5f5f5;
  color: #111827;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: auto;
}

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

body.crm-modal-open .crm-mobile-footer,
body.crm-modal-open .crm-mobile-footer__bar {
  pointer-events: none;
}

.crm-mobile-footer{
  display:none;
}

/* ---------- Header ---------- */
header {
  background: #1f2937;
  color: #ffffff;
  padding: 0.75rem 1rem;
}

@supports (padding-top: env(safe-area-inset-top)) {
  @media (max-width: 768px) {
    .app-header {
      padding-top: calc(env(safe-area-inset-top) + 0.75rem);
      min-height: calc(64px + env(safe-area-inset-top));
      height: auto;
      position: relative;
      z-index: 1000;
    }
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative; /* needed for mobile dropdown positioning */
  width: 100%;
}
/* Right-aligned container */
.header-right {
  margin-left: auto; /* THIS pushes menu + user icon right */
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Ensure HTML hidden attribute always wins */
[hidden] { display: none !important; }
.is-hidden { display: none !important; }

#ac-portal-menu {
  right: auto;
  bottom: auto;
  max-height: 280px;
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.logo {
  height: 40px;
  width: auto;
  display: block;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Desktop nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.25rem;
  border-radius: 10px;
}

.main-nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #e5e7eb;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  padding: 0.35rem 0.25rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.nav-dropdown__trigger:hover,
.nav-dropdown__trigger:focus-visible,
.nav-dropdown.is-open .nav-dropdown__trigger {
  color: #ffffff;
}

.nav-dropdown__trigger:hover {
  text-decoration: underline;
}

.nav-dropdown__trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.nav-dropdown__chevron {
  width: 0.44rem;
  height: 0.44rem;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.15s ease;
}

.nav-dropdown.is-open .nav-dropdown__chevron {
  transform: translateY(1px) rotate(225deg);
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0;
  min-width: 210px;
  padding: 8px;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  z-index: 3000;
}

.nav-dropdown__menu::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 22px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
  transform: rotate(45deg);
}

.nav-dropdown__menu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-dropdown__menu a .icon {
  flex: 0 0 auto;
  color: #6b7280;
}

.nav-dropdown__menu a:hover,
.nav-dropdown__menu a:focus-visible {
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
}

.nav-dropdown__menu a:hover .icon,
.nav-dropdown__menu a:focus-visible .icon {
  color: #374151;
}

.nav-dropdown__menu a:focus-visible {
  outline: none;
  border-color: #e5e7eb;
}

/* Hamburger button (hidden on desktop) */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  line-height: 1;
  background: transparent;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-search__toggle,
.header-search__close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search__toggle:hover,
.header-search__close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.header-search__toggle:focus-visible,
.header-search__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.header-search__field {
  position: relative;
  display: flex;
  align-items: center;
  width: clamp(260px, 24vw, 380px);
  min-width: 220px;
}

.header-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.68);
  pointer-events: none;
}

.header-search__field input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 0 42px 0 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 10px 24px rgba(0, 0, 0, 0.10);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  outline: none;
}

.header-search__field input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
  line-height: 20px;
}

.header-search__field input[type="text"]:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14), 0 12px 26px rgba(0, 0, 0, 0.14);
}

@media (max-width: 1180px) and (min-width: 901px) {
  .header-right {
    gap: 0.7rem;
  }

  .main-nav {
    gap: 0.75rem;
  }

  .header-search__field {
    width: clamp(220px, 20vw, 300px);
  }
}

/* ---------- Layout (Sidebar + Content) ---------- */
.layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: calc(100vh - 64px); /* header height approx */
  overflow-x: hidden;
  overflow-x: clip;
}

@supports (height: 100svh){
  .layout{
    min-height: calc(100svh - 64px);
  }
}
.layout--nosidebar {
  grid-template-columns: 1fr;
}

.layout--nosidebar > * {
  grid-column: 1 / -1;
}

/* Sidebar */
.sidebar {
  background: #111827;
  padding: 1.25rem 1rem;
  border-right: 1px solid #0f172a;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: 6px 0 18px rgba(15, 23, 42, 0.16);
}

.sidebar-title {
  margin-bottom: 0.75rem;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-link {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  color: #dbeafe;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  background: rgba(59, 130, 246, 0.16);
  color: #ffffff;
  outline: none;
}

.sidebar-link.is-active {
  background: #2563eb;
  color: #ffffff;
}

.crm-dashboard-sidebar .sidebar-title {
  color: #cbd5e1;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.crm-dashboard-sidebar .sidebar-link {
  color: #dbeafe;
  font-size: 0.9rem;
  font-weight: 700;
}

.crm-dashboard-sidebar .sidebar-link:hover,
.crm-dashboard-sidebar .sidebar-link:focus-visible {
  background: rgba(59, 130, 246, 0.16);
  color: #ffffff;
  outline: none;
}

.crm-dashboard-sidebar .sidebar-link.is-active {
  background: #2563eb;
  color: #ffffff;
}

/* Content takes all remaining space with 10px padding */
.content {
  background: #f5f5f5;
  padding: 10px;
  min-width: 0; /* critical in grid layouts */
}
.content-full {
  padding: 20px;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
}

.content-inner {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
}

.page {
  width: 100%;
  max-width: 100%;
  padding: 1rem;
}

/* Allow specific pages to use full width */
.page--wide{
  max-width: 100% !important;
  margin: 0;
}

/* ---------- Showing form helpers ---------- */
.showing-context-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.showing-context-help{
  margin: 0;
}

.showing-inline-hint{
  margin-bottom: 10px;
}

@media (max-width: 720px){
  .showing-context-grid{
    grid-template-columns: 1fr;
  }
}

/* ---------- User Menu ---------- */
.user-menu {
  position: relative;
  margin-left: auto; /* pushes it to the far right */
  display: flex;
  align-items: center;
}

.user-avatar,
.user-avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #374151;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.user-avatar-btn {
  border: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}

.workspace-chip:hover .user-avatar,
.workspace-chip:hover .user-avatar-btn {
  background: #4b5563;
}
.user-dropdown {
  position: fixed;
  top: 64px;
  right: 16px;
  width: min(320px, calc(100vw - 24px));
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  z-index: 4000;
}

.user-dropdown__section {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-dropdown__label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px 4px;
}

.user-dropdown__current {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-weight: 700;
  color: #111827;
}

.user-dropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: #111827;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.user-dropdown__item:hover {
  background: #f3f4f6;
  text-decoration: none;
}

.user-dropdown__item.is-active {
  background: #f9fafb;
  border-color: #e5e7eb;
  font-weight: 600;
}

.user-dropdown__item--danger {
  color: #b91c1c;
}

.user-dropdown__item--danger:hover {
  background: #fef2f2;
}

.user-dropdown__item--simple{
  justify-content: flex-start;
}

.user-dropdown__item--simple .icon{
  flex: 0 0 auto;
}
.workspace-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 6px 4px 12px;

  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;

  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;

  appearance: none;
  -webkit-appearance: none;
}

.workspace-chip:hover {
  background: rgba(255, 255, 255, 0.14);
}

.workspace-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.workspace-chip__name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
}
.account-inline{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.account-inline__name{
  font-weight:700;
  color:#111827;
}

.account-inline__email{
  margin:0;
  font-size:.92rem;
}

.workspace-current-row{
  display:block;
}

.user-dropdown__current--workspace{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;

  background:#dbeafe;
  border-color:#bfdbfe;
  color:#1e3a8a;
}

.workspace-current-row__name{
  min-width:0;
  flex:1 1 auto;
}

.tag--workspace-role{
  background:#eff6ff;
  color:#1d4ed8;
  border-color:#bfdbfe;
}

.field-readonly{
  display:flex;
  align-items:center;
  min-height:48px;
  padding:0 14px;
  border:1px solid var(--border-color);
  border-radius:12px;
  background:#f8fafc; /* slightly muted vs input */
}

.field-readonly-value{
  font-size:15px;
  color:#111827;
  font-weight:500;
}

@media (max-width: 900px) {
  .workspace-chip {
    padding-left: 8px;
    gap: 8px;
  }

  .workspace-chip__name {
    max-width: 110px;
    font-size: 0.88rem;
  }
}

/* =====================================================
   CRM Settings
   ===================================================== */

.crm-settings-nav{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.crm-settings-nav__title{
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#6b7280;
  padding:4px 8px 8px;
}

.crm-settings-nav__link{
  display:flex;
  align-items:center;
  gap:10px;
}

.crm-settings-nav__link.is-active,
.sidebar-link.crm-settings-nav__link.is-active{
  background:#2563eb;
  color:#ffffff;
  font-weight:700;
  border-radius:10px;
}

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

.settings-card-link{
  display:block;
  text-decoration:none;
  color:inherit;
}

.settings-card{
  height:100%;
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:16px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.04);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.settings-card:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(0,0,0,.08);
  border-color:#d1d5db;
}

.settings-card__icon{
  flex:0 0 auto;
  width:38px;
  height:38px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#f3f4f6;
  color:#111827;
}

.settings-card__body{
  flex:1 1 auto;
  min-width:0;
}

.settings-card__title{
  font-weight:800;
  color:#111827;
  margin-bottom:4px;
}

.settings-card__desc{
  color:#6b7280;
  font-size:.94rem;
  line-height:1.45;
}

.settings-card__cta{
  flex:0 0 auto;
  align-self:flex-start;
}

.settings-placeholder{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.settings-placeholder__title{
  font-weight:800;
  color:#111827;
}

.settings-bullets{
  margin:0;
  padding-left:18px;
  color:#111827;
}

.settings-bullets li + li{
  margin-top:6px;
}

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

.settings-mini-link{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  color:#111827;
  text-decoration:none;
}

.settings-mini-link:hover{
  background:#f9fafb;
  text-decoration:none;
}

.settings-mini-link.is-active{
  background:#eaf2ff;
  border-color:#bfdbfe;
  font-weight:700;
}

.template-file-hint{
  margin-top:18px;
  color:#94a3b8;
  font-size:10px;
  line-height:1.4;
  letter-spacing:.02em;
  text-align:right;
}

@media (max-width: 1100px){
  .settings-overview-grid,
  .settings-links-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px){
  .settings-overview-grid,
  .settings-links-grid{
    grid-template-columns:1fr;
  }
}

.settings-hub{
  display:grid;
  gap:18px;
  color:#0f172a;
}

.settings-hub-hero{
  position:relative;
  overflow:hidden;
  padding:clamp(22px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.88)),
    #ffffff;
  border:1px solid rgba(148,163,184,.26);
  border-radius:20px;
  box-shadow:0 18px 48px rgba(15,23,42,.08);
}

.settings-hub-hero::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:6px;
  background:linear-gradient(180deg, #64748b, #a16207);
}

.settings-hub-eyebrow{
  margin:0 0 8px;
  color:#6b5d3e;
  font-size:12px;
  font-weight:850;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.settings-hub-hero h1{
  margin:0;
  color:#0f172a;
  font-size:clamp(2rem, 4vw, 3.35rem);
  line-height:1;
  letter-spacing:0;
}

.settings-hub-subtitle{
  max-width:760px;
  margin:12px 0 0;
  color:#475569;
  font-size:clamp(1rem, 1.6vw, 1.12rem);
  line-height:1.65;
}

.settings-hub-sections{
  display:grid;
  gap:14px;
}

.settings-hub-section{
  overflow:hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,252,.86)),
    #ffffff;
  border:1px solid rgba(148,163,184,.28);
  border-radius:18px;
  box-shadow:0 14px 34px rgba(15,23,42,.06);
}

.settings-hub-section__toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  color:inherit;
  font:inherit;
  text-align:left;
  background:transparent;
  border:0;
  cursor:pointer;
}

.settings-hub-section__toggle:hover{
  background:rgba(248,250,252,.72);
}

.settings-hub-section__toggle[aria-controls="settings-group-super-admin"]{
  background:linear-gradient(135deg, rgba(245,158,11,.14), rgba(255,251,235,.82));
  border-bottom:1px solid rgba(217,119,6,.18);
}

.settings-hub-section__toggle[aria-controls="settings-group-super-admin"]:hover{
  background:linear-gradient(135deg, rgba(245,158,11,.18), rgba(255,251,235,.95));
}

.settings-hub-section__toggle[aria-controls="settings-group-super-admin"] .settings-hub-section__icon{
  color:#92400e;
  background:rgba(254,243,199,.82);
  border-color:rgba(217,119,6,.24);
}

.settings-hub-section__toggle[aria-controls="settings-group-super-admin"] .settings-hub-section__title{
  color:#92400e;
}

.settings-hub-section__toggle:focus-visible{
  outline:3px solid rgba(100,116,139,.22);
  outline-offset:-3px;
}

.settings-hub-section__heading{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:13px;
}

.settings-hub-section__icon,
.settings-hub-card__icon{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#475569;
  background:rgba(241,245,249,.9);
  border:1px solid rgba(148,163,184,.25);
  box-shadow:0 10px 22px rgba(15,23,42,.05);
}

.settings-hub-section__icon{
  width:42px;
  height:42px;
  border-radius:14px;
}

.settings-hub-section__title,
.settings-hub-section__description,
.settings-hub-card__title,
.settings-hub-card__description,
.settings-hub-card__cta{
  display:block;
}

.settings-hub-section__title{
  color:#111827;
  font-size:1.05rem;
  font-weight:850;
  line-height:1.2;
}

.settings-hub-section__description{
  margin-top:4px;
  color:#64748b;
  font-size:.94rem;
  line-height:1.45;
}

.settings-hub-section__chevron{
  display:inline-flex;
  width:34px;
  height:34px;
  flex:0 0 34px;
  align-items:center;
  justify-content:center;
  color:#64748b;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(148,163,184,.24);
  border-radius:12px;
  transition:transform 180ms ease;
}

.settings-hub-section__chevron svg{
  width:18px;
  height:18px;
}

.settings-hub-section__panel{
  display:grid;
  grid-template-rows:1fr;
  transition:grid-template-rows 220ms ease;
}

.settings-hub-section__panel-inner{
  overflow:hidden;
}

.settings-hub-section.is-collapsed .settings-hub-section__panel{
  grid-template-rows:0fr;
}

.settings-hub-section.is-collapsed .settings-hub-section__chevron{
  transform:rotate(-90deg);
}

.settings-hub-card-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  padding:0 20px 20px;
}

.settings-hub-card{
  min-height:128px;
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:12px;
  align-items:start;
  padding:15px;
  color:#111827;
  text-decoration:none;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(148,163,184,.24);
  border-radius:16px;
  box-shadow:0 10px 26px rgba(15,23,42,.045);
  transition:transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.settings-hub-card:hover{
  transform:translateY(-2px);
  background:#ffffff;
  border-color:rgba(100,116,139,.34);
  box-shadow:0 18px 36px rgba(15,23,42,.09);
  text-decoration:none;
}

.settings-hub-card:focus-visible{
  outline:3px solid rgba(100,116,139,.22);
  outline-offset:3px;
}

.settings-hub-card__icon{
  width:38px;
  height:38px;
  border-radius:13px;
}

.settings-hub-card__body{
  min-width:0;
}

.settings-hub-card__title{
  color:#0f172a;
  font-weight:850;
  line-height:1.25;
}

.settings-hub-card__description{
  margin-top:5px;
  color:#64748b;
  font-size:.92rem;
  line-height:1.45;
}

.settings-hub-card__cta{
  grid-column:2;
  margin-top:2px;
  color:#6b5d3e;
  font-size:.88rem;
  font-weight:850;
}

@media (max-width: 1180px){
  .settings-hub-card-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px){
  .settings-hub{
    gap:14px;
  }

  .settings-hub-hero{
    border-radius:16px;
  }

  .settings-hub-section{
    border-radius:16px;
  }

  .settings-hub-section__toggle{
    padding:15px;
  }

  .settings-hub-section__heading{
    gap:11px;
  }

  .settings-hub-section__icon{
    width:38px;
    height:38px;
    border-radius:13px;
  }

  .settings-hub-card-grid{
    grid-template-columns:1fr;
    padding:0 14px 14px;
  }

  .settings-hub-card{
    min-height:0;
    border-radius:14px;
  }
}

/* ---------- List Widget (premium tables) ---------- */
.list-widget{
  --list-ink:#0f172a;
  --list-muted:#64748b;
  --list-border:rgba(148,163,184,.28);
  --list-border-strong:rgba(100,116,139,.36);
  --list-soft:#f8fafc;
  --list-blue:#2563eb;
  width:100%;
  overflow:hidden;
  color:var(--list-ink);
  background:linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,252,.90)), #ffffff;
  border:1px solid var(--list-border);
  border-radius:16px;
  box-shadow:0 14px 36px rgba(15,23,42,.07);
}

.field-card__body > .list-widget{
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}

.list-widget-header{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, auto) auto;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  background:linear-gradient(135deg, rgba(239,246,255,.90), rgba(255,255,255,.78));
  border-bottom:1px solid rgba(148,163,184,.20);
}

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

.list-title{
  margin:0;
  color:var(--list-ink);
  font-size:15px;
  font-weight:850;
  line-height:1.25;
}

.list-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex:1 1 420px;
}

.list-widget .list-search{
  display:block;
  box-sizing:border-box;
  width:min(360px, 100%);
  height:44px;
  min-height:44px;
  padding:0 14px 0 42px;
  color:var(--list-ink);
  font-size:14px;
  background-color:rgba(255,255,255,.92);
  border:1px solid rgba(148,163,184,.36);
  border-radius:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9), 0 8px 18px rgba(15,23,42,.04);
  outline:none;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
}

.list-widget .list-search:focus{
  border-color:var(--list-blue);
  box-shadow:0 0 0 4px rgba(37,99,235,.12), 0 10px 24px rgba(15,23,42,.07);
}

.list-page-size{
  height:44px;
  min-width:116px;
  padding:0 36px 0 12px;
  color:var(--list-ink);
  font:inherit;
  font-size:13px;
  font-weight:750;
  background:
    linear-gradient(45deg, transparent 50%, #64748b 50%) calc(100% - 18px) 18px / 6px 6px no-repeat,
    linear-gradient(135deg, #64748b 50%, transparent 50%) calc(100% - 14px) 18px / 6px 6px no-repeat,
    #ffffff;
  border:1px solid rgba(148,163,184,.36);
  border-radius:12px;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
  outline:none;
  appearance:none;
  -webkit-appearance:none;
}

.list-page-size:focus{
  border-color:var(--list-blue);
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

.list-add-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:42px;
  padding:0 14px;
  flex:0 0 auto;
  color:#ffffff;
  font-size:13px;
  font-weight:850;
  line-height:1.2;
  text-decoration:none;
  background:linear-gradient(135deg, #2563eb, #14b8a6);
  border:1px solid rgba(37,99,235,.38);
  border-radius:12px;
  box-shadow:0 12px 24px rgba(37,99,235,.22), inset 0 1px 0 rgba(255,255,255,.26);
  transition:transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}

.list-add-btn:hover,
.list-add-btn:focus-visible{
  color:#ffffff;
  background:linear-gradient(135deg, #2563eb, #14b8a6);
  border-color:rgba(37,99,235,.38);
  box-shadow:0 16px 30px rgba(37,99,235,.28), 0 0 0 4px rgba(37,99,235,.12);
  transform:translateY(-1px);
  outline:none;
}

.list-bulk-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 16px;
  background:#f8fbff;
  border-bottom:1px solid rgba(148,163,184,.18);
}

.list-bulk-bar[hidden]{
  display:none !important;
}

.bulk-count{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 10px;
  color:#1e3a8a;
  font-size:12px;
  font-weight:850;
  background:#eff6ff;
  border:1px solid #bfdbfe;
  border-radius:999px;
}

.bulk-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.bulk-actions .btn{
  min-height:34px;
  padding:.45rem .7rem;
  border-radius:10px;
}

.list-table-wrap,
.list-widget .table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.list-table-wrap:focus{
  outline:3px solid rgba(37,99,235,.16);
  outline-offset:-3px;
}

.list-mobile-cards{
  display:none;
}

.list-table,
.list-widget .table{
  width:100%;
  min-width:720px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:auto;
}

.list-table th,
.list-table td,
.list-widget .table th,
.list-widget .table td{
  padding:12px 14px;
  text-align:left;
  vertical-align:middle;
  border-bottom:1px solid rgba(226,232,240,.92);
}

.list-table th,
.list-widget .table th{
  position:sticky;
  top:0;
  z-index:1;
  color:#334155;
  font-size:11px;
  font-weight:850;
  line-height:1.25;
  letter-spacing:.04em;
  text-transform:uppercase;
  background:rgba(248,250,252,.96);
  backdrop-filter:blur(8px);
}

.list-table td,
.list-widget .table td{
  color:#1f2937;
  font-size:14px;
  line-height:1.42;
  background:#ffffff;
}

.list-table tbody tr,
.list-widget .table tbody tr{
  transition:background-color .14s ease, box-shadow .14s ease;
}

.list-table tbody tr:hover td,
.list-widget .table tbody tr:hover td{
  background:#f8fbff;
}

.list-table tr.is-clickable,
.list-widget .table tr.is-clickable{
  cursor:pointer;
}

.list-table tr.is-clickable:hover td,
.list-widget .table tr.is-clickable:hover td{
  color:#0f172a;
}

.list-table tr.is-highlighted td,
.list-widget .table tr.is-highlighted td{
  background:#f8fafc;
  box-shadow:inset 3px 0 0 #94a3b8;
}

.list-table th.sortable,
.list-widget .table th.sortable{
  cursor:pointer;
  user-select:none;
}

.list-table th.sortable:hover,
.list-widget .table th.sortable:hover{
  color:#1d4ed8;
  background:#eff6ff;
}

.list-table th.sortable::after,
.list-widget .table th.sortable::after{
  content:"";
  display:inline-block;
  width:0;
  height:0;
  margin-left:6px;
  vertical-align:middle;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid #94a3b8;
  opacity:.55;
}

.list-table th.sortable[data-dir="asc"]::after,
.list-widget .table th.sortable[data-dir="asc"]::after{
  border-top:0;
  border-bottom:5px solid var(--list-blue);
  opacity:1;
}

.list-table th.sortable[data-dir="desc"]::after,
.list-widget .table th.sortable[data-dir="desc"]::after{
  border-top-color:var(--list-blue);
  opacity:1;
}

.lw-select-all,
.lw-checkbox{
  width:17px;
  height:17px;
  accent-color:var(--list-blue);
  cursor:pointer;
}

.lw-select-col{
  width:44px;
  min-width:44px;
  text-align:center !important;
}

.lw-actions-col{
  width:1%;
  white-space:nowrap;
  text-align:right;
}

.lw-icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  color:#64748b;
  background:#ffffff;
  border:1px solid rgba(148,163,184,.34);
  border-radius:10px;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
  cursor:pointer;
  transition:background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.lw-icon-btn:hover,
.lw-icon-btn:focus-visible{
  color:#b91c1c;
  background:#fff7f7;
  border-color:#fecaca;
  box-shadow:0 10px 20px rgba(185,28,28,.10);
}

.lw-icon{
  width:18px;
  height:18px;
}

.lw-icon--asset{
  display:inline-block;
  background:currentColor;
  -webkit-mask:var(--lw-icon-url) center / contain no-repeat;
  mask:var(--lw-icon-url) center / contain no-repeat;
}

.list-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  background:rgba(248,250,252,.78);
}

.list-meta,
.page-indicator{
  color:var(--list-muted);
  font-size:13px;
  font-weight:700;
}

.list-pager{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.list-pager .btn{
  min-height:36px;
  padding:.5rem .75rem;
  border-radius:10px;
}

.list-pager .btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  box-shadow:none;
}

.list-table .muted,
.list-widget .table .muted,
.list-mobile-card .muted{
  color:#94a3b8;
}

.list-cell-link{
  color:#0f766e;
  font-weight:750;
  text-decoration:none;
  text-underline-offset:3px;
  overflow-wrap:anywhere;
}

.list-cell-link:hover,
.list-cell-link:focus-visible{
  color:#0f4f49;
  text-decoration:underline;
  outline:none;
}

.list-cell-icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  color:#334155;
  text-decoration:none;
  background:linear-gradient(180deg, #ffffff, #f8fafc);
  border:1px solid rgba(148,163,184,.36);
  border-radius:10px;
  box-shadow:0 8px 18px rgba(15,23,42,.055);
  transition:transform .14s ease, background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.list-cell-icon-btn:hover,
.list-cell-icon-btn:focus-visible{
  color:#0f766e;
  background:linear-gradient(180deg, #ffffff, #f0fdfa);
  border-color:rgba(20,184,166,.34);
  box-shadow:0 12px 24px rgba(15,118,110,.12);
  outline:none;
  transform:translateY(-1px);
}

.list-cell-icon-btn .icon{
  flex:0 0 auto;
}

.list-empty,
.list-mobile-empty{
  padding:28px 16px !important;
  color:#64748b !important;
  text-align:center !important;
  font-weight:750;
  background:#ffffff !important;
}

.btn-sm{
  min-height:34px;
  padding:.45rem .7rem;
  border-radius:10px;
  font-size:13px;
}

.child-list-card.field-card{
  border-color:rgba(148,163,184,.28);
  border-radius:16px;
  box-shadow:0 14px 36px rgba(15,23,42,.07);
}

.child-list-card .field-card__header{
  background:linear-gradient(135deg, rgba(239,246,255,.90), rgba(255,255,255,.78));
  border-bottom-color:rgba(148,163,184,.20);
}

.child-list-card .field-card__body{
  gap:12px;
}

.child-list-card .field-card__body > .list-widget{
  background:#ffffff;
  border-color:rgba(226,232,240,.95);
  border-radius:12px;
  box-shadow:none;
}

.child-list-card .list-widget-header{
  padding:10px 12px;
  background:#f8fafc;
}

.child-list-card__add{
  min-height:38px;
  padding:.55rem .8rem;
  border-radius:11px;
}

@media (max-width: 768px){
  .list-widget{
    border-radius:14px;
    overflow:hidden;
  }

  .list-widget-header{
    align-items:stretch;
    grid-template-columns:minmax(0, 1fr) auto;
    padding:12px;
  }

  .list-widget-header,
  .list-controls,
  .list-bulk-bar,
  .list-footer{
    flex-direction:column;
  }

  .list-controls{
    grid-column:1 / -1;
    width:100%;
    flex:1 1 auto;
    align-items:stretch;
  }

  .list-add-btn{
    justify-self:end;
    min-height:40px;
    padding:0 12px;
  }

  .list-widget .list-search,
  .list-page-size,
  .list-pager,
  .list-pager .btn,
  .bulk-actions,
  .bulk-actions .btn{
    width:100%;
  }

  .list-bulk-bar,
  .list-footer{
    align-items:stretch;
    padding:12px;
  }

  .bulk-actions,
  .list-pager{
    justify-content:stretch;
  }

  .page-indicator,
  .list-meta{
    text-align:center;
  }

  .list-table-wrap{
    display:none;
  }

  .list-mobile-cards{
    display:grid;
    gap:12px;
    width:100%;
    min-width:0;
    padding:12px;
    background:linear-gradient(180deg, rgba(248,250,252,.82), rgba(255,255,255,.96));
  }

  .list-mobile-card{
    width:100%;
    min-width:0;
    padding:14px;
    color:#0f172a;
    background:rgba(255,255,255,.94);
    border:1px solid rgba(203,213,225,.78);
    border-radius:16px;
    box-shadow:0 14px 32px rgba(15,23,42,.08);
  }

  .list-mobile-card.is-clickable{
    cursor:pointer;
  }

  .list-mobile-card.is-highlighted{
    border-color:#94a3b8;
    box-shadow:0 16px 36px rgba(15,23,42,.10);
  }

  .list-mobile-card.is-clickable:focus-visible{
    outline:3px solid rgba(37,99,235,.24);
    outline-offset:2px;
  }

  .list-mobile-card__top{
    display:flex;
    align-items:flex-start;
    gap:10px;
    min-width:0;
  }

  .list-mobile-select{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:26px;
    min-height:28px;
    padding-top:2px;
  }

  .list-mobile-card__main{
    flex:1 1 auto;
    min-width:0;
  }

  .list-mobile-card__header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    min-width:0;
  }

  .list-mobile-card__title{
    min-width:0;
    color:#0f172a;
    font-size:15px;
    font-weight:850;
    line-height:1.28;
    overflow-wrap:anywhere;
  }

  .list-mobile-card__title .tag{
    font-size:12px;
    line-height:18px;
  }

  .list-mobile-card__badge{
    flex:0 0 auto;
    max-width:45%;
  }

  .list-mobile-card__badge .tag{
    max-width:100%;
    padding:4px 9px;
    border-radius:999px;
    font-size:11px;
    line-height:16px;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .list-mobile-card__subtitle{
    margin-top:4px;
    color:#64748b;
    font-size:13px;
    font-weight:650;
    line-height:1.35;
    overflow-wrap:anywhere;
  }

  .list-widget[data-list-name="open_houses"] .list-mobile-card__subtitle{
    display:none;
  }

  .list-mobile-card__tags{
    margin-top:10px;
  }

  .list-mobile-card__tags .tag-row,
  .list-mobile-card__details .tag-row{
    gap:5px;
  }

  .list-mobile-card .tag{
    display:inline-flex;
    max-width:100%;
    min-height:22px;
    padding:3px 8px;
    border-radius:999px;
    font-size:11px;
    line-height:16px;
    text-decoration:none;
    white-space:normal;
  }

  .list-mobile-card .list-cell-icon-btn{
    width:34px;
    height:34px;
    border-radius:11px;
  }

  .list-mobile-card__details{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px 12px;
    margin:12px 0 0;
    padding-top:12px;
    border-top:1px solid rgba(226,232,240,.88);
  }

  .list-mobile-detail{
    min-width:0;
  }

  .list-mobile-detail dt{
    margin:0 0 3px;
    color:#64748b;
    font-size:11px;
    font-weight:850;
    line-height:1.2;
    text-transform:uppercase;
  }

  .list-mobile-detail dd{
    margin:0;
    min-width:0;
    color:#1f2937;
    font-size:13px;
    font-weight:650;
    line-height:1.34;
    overflow-wrap:anywhere;
  }

  .list-mobile-card__actions{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    margin-top:12px;
    padding-top:10px;
    border-top:1px solid rgba(226,232,240,.72);
  }

  .list-mobile-empty{
    border:1px solid rgba(226,232,240,.92);
    border-radius:14px;
    box-shadow:0 10px 24px rgba(15,23,42,.05);
  }
}

@media (max-width: 430px){
  .list-mobile-card__header{
    align-items:flex-start;
  }

  .list-mobile-card__badge{
    max-width:42%;
  }

  .list-mobile-card__details{
    grid-template-columns:1fr;
  }
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 7px;

  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
  align-items: center;
  justify-content: center;

  background: #f1f5f9;       /* soft slate */
  color: #334155;            /* slate text */
  border: 1px solid #e2e8f0; /* subtle border */
}

:root{
  --opp-buy-bg: rgba(37, 99, 235, 0.14);
  --opp-buy-fg: #1d4ed8;

  --opp-sell-bg: rgba(22, 163, 74, 0.14);
  --opp-sell-fg: #166534;

  --opp-rent-bg: rgba(245, 158, 11, 0.16);
  --opp-rent-fg: #92400e;

  --opp-rentout-bg: rgba(124, 58, 237, 0.14);
  --opp-rentout-fg: #5b21b6;
}

.pill--buy{ background:var(--opp-buy-bg); color:var(--opp-buy-fg); }
.pill--sell{ background:var(--opp-sell-bg); color:var(--opp-sell-fg); }
.pill--rent{ background:var(--opp-rent-bg); color:var(--opp-rent-fg); }
.pill--rentout{ background:var(--opp-rentout-bg); color:var(--opp-rentout-fg); }


@keyframes danger-pulse {
  0% {
    background-color: rgba(239, 68, 68, 0.18);
  }
  50% {
    background-color: rgba(239, 68, 68, 0.35);
  }
  100% {
    background-color: rgba(239, 68, 68, 0.18);
  }
}

.tag--flash {
  animation: danger-pulse 1.3s ease-in-out infinite;
}
/* OK: more than 30 days */
.tag--ok{
  background: rgba(22, 163, 74, 0.15);   /* green */
  color: #166534;
}

/* Warning: less than 30 days */
.tag--warning{
  background: rgba(245, 158, 11, 0.18);  /* orange */
  color: #92400e;
}

/* Danger: overdue or today */
.tag--danger{
  background: rgba(239, 68, 68, 0.18);   /* red */
  color: #991b1b;
}

.muted { color: #6b7280; }

/* Default pages stay centered/narrow */
.page{
  max-width: 920px;
  margin: 0 auto;
  padding: 1.25rem;
}

/* Wide pages (like boards) use full width */
.page.page--wide{
  max-width: none !important;
  margin: 0 !important;
  padding: 1rem;
  min-width:0;
  overflow-x:hidden;
  overflow-x:clip;
}

.content-full:has(.crm-board-page),
.content-inner:has(.crm-board-page),
.crm-board-page{
  max-width:100%;
  min-width:0;
  overflow-x:hidden;
  overflow-x:clip;
  contain:inline-size;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem 0;
}

.page h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.muted {
  margin: 0.25rem 0 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
  padding: 1.25rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Normalize form controls */
.form input[type="text"],
.form input[type="number"],
.form input[type="date"],
.form select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
  color: #111827;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
/* Apply same styling as other form inputs */

/* Remove number spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}


/* =====================================================
   Board widget (premium CRM lanes)
   ===================================================== */
.board{
  --board-ink:#0f172a;
  --board-muted:#64748b;
  --board-border:rgba(148,163,184,.28);
  --board-border-strong:rgba(100,116,139,.36);
  --board-blue:#2563eb;
  --board-shadow:0 18px 48px rgba(15,23,42,.08);
  --board-shadow-hover:0 22px 52px rgba(15,23,42,.13);
  max-width:100%;
  min-width:0;
  overflow:hidden;
  overflow-x:clip;
  color:var(--board-ink);
  contain:inline-size;
}

.board-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom:16px;
  padding:18px 20px;
  background:linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.84)), #ffffff;
  border:1px solid var(--board-border);
  border-radius:18px;
  box-shadow:var(--board-shadow);
}

.board-title-wrap{
  min-width:0;
  flex:1 1 360px;
  display:flex;
  flex-direction:column;
  gap:7px;
}

.board-eyebrow{
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--board-blue);
  font-size:12px;
  font-weight:850;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.board-title{
  margin:0;
  color:var(--board-ink);
  font-size:clamp(1.45rem, 2.7vw, 2.1rem);
  line-height:1.08;
  letter-spacing:0;
}

.board-title-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  color:var(--board-muted);
}

.board-stat{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:5px 10px;
  color:#334155;
  font-size:12px;
  font-weight:850;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(148,163,184,.32);
  border-radius:999px;
}

.board-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex:0 0 auto;
}

.board-add-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding-inline:16px;
  border-radius:12px;
  box-shadow:0 14px 28px rgba(15,23,42,.18);
}

.board-cols{
  display:flex;
  align-items:stretch;
  gap:12px;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  padding:2px 2px 14px;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
}

.board-cols::-webkit-scrollbar{
  height:10px;
}

.board-cols::-webkit-scrollbar-track{
  background:rgba(226,232,240,.62);
  border-radius:999px;
}

.board-cols::-webkit-scrollbar-thumb{
  background:rgba(100,116,139,.38);
  border-radius:999px;
}

.board-col{
  flex:0 0 clamp(228px, 20vw, 300px);
  min-width:228px;
  max-width:320px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(248,250,252,.94), rgba(241,245,249,.72));
  border:1px solid var(--board-border);
  border-radius:16px;
  box-shadow:0 12px 30px rgba(15,23,42,.06);
  scroll-snap-align:start;
  container-type:inline-size;
}

.board-col__head{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  padding:14px;
  background:linear-gradient(135deg, rgba(239,246,255,.88), rgba(255,255,255,.70));
  border-bottom:1px solid rgba(148,163,184,.20);
}

.board-col__title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.board-col__title{
  min-width:0;
  overflow:hidden;
  color:var(--board-ink);
  font-size:14px;
  font-weight:850;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.board-col__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:26px;
  padding:0 8px;
  color:#1e3a8a;
  font-size:12px;
  font-weight:850;
  background:#eff6ff;
  border:1px solid #bfdbfe;
  border-radius:999px;
}

.board-col__meta{
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
  color:var(--board-muted);
  font-size:12px;
  font-weight:750;
  line-height:1.25;
}

.board-col__body{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  gap:10px;
  min-height:180px;
  padding:10px;
  container-type:inline-size;
}

.board-card{
  position:relative;
  width:100%;
  margin:0;
  padding:10px;
  overflow:hidden;
  color:var(--board-ink);
  background:rgba(255,255,255,.96);
  border:1px solid rgba(226,232,240,.96);
  border-radius:14px;
  box-shadow:0 8px 18px rgba(15,23,42,.05);
  cursor:pointer;
  touch-action:manipulation;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.board-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:linear-gradient(180deg, #2563eb, #14b8a6);
  opacity:.78;
}

.board-card:hover,
.board-card:focus-visible{
  transform:translateY(-2px);
  background:#ffffff;
  border-color:var(--board-border-strong);
  box-shadow:var(--board-shadow-hover);
  outline:none;
}

.board-card:focus-visible{
  box-shadow:0 0 0 4px rgba(37,99,235,.14), var(--board-shadow-hover);
}

.board-card.sortable-chosen,
.board-card.sortable-drag{
  border-color:#93c5fd;
  box-shadow:0 20px 44px rgba(37,99,235,.18);
}

.board-card.sortable-ghost{
  opacity:.45;
  background:#eff6ff;
  border-style:dashed;
}

.board-card.dragging{
  opacity:.65;
}

.board-card--deleted{
  color:#94a3b8;
  font-weight:800;
  cursor:default;
}

.board-card--deleted::before{
  background:#cbd5e1;
}

.board-card__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.board-card__identity{
  min-width:0;
  flex:1 1 auto;
}

.board-card__title{
  min-width:0;
  overflow:hidden;
  color:#0f172a;
  font-size:14px;
  font-weight:850;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.board-card__header-right{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex:0 0 auto;
  flex-wrap:wrap;
  max-width:52%;
}

.board-card__header-right .tag{
  width:max-content;
  max-width:100%;
  white-space:nowrap;
}

.board-card__details{
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
  margin-top:10px;
}

.board-card__detail{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  overflow:hidden;
  color:#475569;
  font-size:12px;
  font-weight:700;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.board-card__detail .icon{
  flex:0 0 auto;
  color:#64748b;
}

.board-card__footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px;
  margin-top:11px;
}

.board-card__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin-left:auto;
}

.board-card__actions .remove-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  padding:0;
  color:#64748b;
  background:#ffffff;
  border:1px solid rgba(148,163,184,.34);
  border-radius:10px;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
  cursor:pointer;
  opacity:.78;
  appearance:none;
  transition:background-color .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease, box-shadow .14s ease;
}

.board-card__actions .remove-icon:hover,
.board-card__actions .remove-icon:focus-visible{
  color:#b91c1c;
  background:#fff7f7;
  border-color:#fecaca;
  box-shadow:0 10px 20px rgba(185,28,28,.10);
  opacity:1;
  outline:none;
}

.board-card__date-pills{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  flex:1 1 auto;
  min-width:0;
  gap:4px;
}

.board-card__date-pills--offers{
  flex-basis:100%;
  max-width:100%;
}

.board-card__date-pill--deed{
  color:#1d4ed8;
  background:rgba(37,99,235,.14);
  border-color:rgba(37,99,235,.22);
}

.board-card__date-pill--occupancy{
  color:#92400e;
  background:rgba(245,158,11,.18);
  border-color:rgba(245,158,11,.28);
}

.board-card__date-pill--condition{
  color:#334155;
  background:#f8fafc;
  border-color:#dbe3ef;
  white-space:normal;
}

.board-card__date-pill--inspection{
  color:#075985;
  background:rgba(14,165,233,.14);
  border-color:rgba(14,165,233,.24);
}

.board-card__date-pill--financing{
  color:#166534;
  background:rgba(34,197,94,.14);
  border-color:rgba(34,197,94,.24);
}

.board-card__date-pill--documents{
  color:#6d28d9;
  background:rgba(139,92,246,.14);
  border-color:rgba(139,92,246,.24);
}

.board-card .tag{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:22px;
  padding:3px 7px;
  border:1px solid transparent;
  border-radius:999px;
  font-size:10px;
  font-weight:850;
  line-height:1.1;
  letter-spacing:.01em;
}

.board-card .tag.board-card__offer-pill{
  flex:0 1 auto;
  max-width:100%;
  min-width:0;
  white-space:normal;
}

.board-card .tag.board-card__offer-pill--default{
  color:#334155;
  background:#f8fafc;
  border-color:#dbe3ef;
}

.board-card .tag.board-card__offer-pill--success{
  color:#166534;
  background:rgba(22,163,74,.14);
  border-color:rgba(22,163,74,.22);
}

.board-card .tag.board-card__offer-pill--danger{
  color:#991b1b;
  background:rgba(239,68,68,.16);
  border-color:rgba(239,68,68,.24);
}

.board-card .tag--buy{
  color:#1d4ed8;
  background:rgba(37,99,235,.14);
  border-color:rgba(37,99,235,.18);
}

.board-card .tag--sell{
  color:#166534;
  background:rgba(22,163,74,.14);
  border-color:rgba(22,163,74,.18);
}

.board-card .tag--rent{
  color:#92400e;
  background:rgba(245,158,11,.16);
  border-color:rgba(245,158,11,.22);
}

.board-card .tag--rentout{
  color:#5b21b6;
  background:rgba(124,58,237,.14);
  border-color:rgba(124,58,237,.18);
}

.tag--revenue{
  color:#111827;
  background:rgba(17,24,39,.08);
  border:1px solid rgba(17,24,39,.14);
}

.board-contract-badge--active{
  color:#166534;
  background:rgba(22,163,74,.14);
  border-color:rgba(22,163,74,.22);
}

.board-contract-badge--expired{
  color:#991b1b;
  background:rgba(239,68,68,.16);
  border-color:rgba(239,68,68,.24);
}

.board-contract-badge--warning{
  color:#92400e;
  background:rgba(245,158,11,.16);
  border-color:rgba(245,158,11,.24);
}

.board-contract-badge--none{
  color:#475569;
  background:#f1f5f9;
  border-color:#e2e8f0;
}

.board-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:112px;
  width:100%;
  margin:0;
  padding:16px 12px;
  color:#64748b;
  font-size:13px;
  font-weight:800;
  text-align:center;
  background:rgba(255,255,255,.62);
  border:1px dashed rgba(148,163,184,.44);
  border-radius:14px;
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2,
  .form-grid .span-3,
  .form-grid .span-4 {
    grid-column: span 1;
  }

  .board-header{
    padding:14px;
    border-radius:16px;
  }

  .board-actions,
  .board-add-btn{
    width:100%;
  }

  .board-add-btn{
    justify-content:center;
  }

  .board-cols{
    gap:10px;
    margin-inline:0;
    padding-inline:2px;
  }

  .board-col{
    flex-basis:min(82vw, 292px);
    min-width:min(82vw, 292px);
    max-width:min(82vw, 292px);
  }
}


.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: #111827;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.login-card input[type="password"]{
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  font-size: 1rem;
  outline: none;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

/* --- Make ALL inputs in .field match (date/time/number were using browser defaults) --- */
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="search"]{
  width: 100%;
  display: block;
  box-sizing: border-box;

  padding: 0.7rem 0.8rem;
  height: 48px;
  line-height: 1.2;
  font-size: 1rem;
  font-family: inherit;

  color: #111827;
  background-color: #ffffff;

  border: 1px solid #d1d5db;
  border-radius: 12px;

  outline: none;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* List search: add magnifying glass icon (reliable, Safari-proof) */
.list-widget .list-search{
  padding-left: 2.6rem; /* room for icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-4.35-4.35M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.85rem center;
  background-size: 1.15rem;
}

/* Keep your focus style consistent */
.field input[type="date"]:focus,
.field input[type="time"]:focus,
.field input[type="number"]:focus{
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

/* Optional: make date/time icons less aggressive on Safari */
.field input[type="date"]::-webkit-calendar-picker-indicator,
.field input[type="time"]::-webkit-calendar-picker-indicator{
  opacity: 0.7;
}

/* Remove number spinners only inside fields (nice + consistent) */
.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
.field input[type="number"]{
  -moz-appearance: textfield;
}
/* ---------- Date + Time (datetime-local) ---------- */
.field input[type="datetime-local"]{
  width: 100%;
  display: block;
  box-sizing: border-box;

  height: 48px;
  padding: 0.7rem 0.8rem;
  line-height: 1.2;
  font-size: 1rem;
  font-family: inherit;

  color: #111827;
  background-color: #ffffff;

  border: 1px solid #d1d5db;
  border-radius: 12px;

  outline: none;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.field input[type="datetime-local"]:focus{
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

/* If your select is inside .field-row, force it to expand */
.field-row {
  align-items: stretch; /* not baseline */
}

.field-row select {
  flex: 1 1 auto;
  min-width: 0;
}

.field input:focus{
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

.field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
/* ---------- Selects inside .field (match inputs exactly) ---------- */
.field select {
  width: 100%;
  display: block;
  box-sizing: border-box;

  /* match input sizing */
  padding: 0.7rem 2.6rem 0.7rem 0.8rem;
  height: 48px;              /* matches your input visual height */
  line-height: 1.2;
  font-size: 1rem;
  font-family: inherit;

  color: #111827;
  background-color: #ffffff;

  border: 1px solid #d1d5db;
  border-radius: 12px;

  outline: none;
  cursor: pointer;

  /* remove native look */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* custom arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

.field select:hover {
  border-color: #9ca3af;
}

.field select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

/* optional: placeholder option color */
.field select option[value=""] {
  color: #9ca3af;
}

.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: var(--card, #fff);
  font: inherit;
  resize: vertical;
}

.hint {
  color: #6b7280;
  font-size: 0.9rem;
}

.divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0.25rem 0;
}

/* ---------- “Pill” Checkbox Group ---------- */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
  cursor: pointer;
  user-select: none;
}

.pill input {
  width: 18px;
  height: 18px;
}

.pill span {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

/* Make checked pills feel “selected” */
.pill:has(input:checked) {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.55);
}

.pill.pill--buy{ background:var(--opp-buy-bg); color:var(--opp-buy-fg); }
.pill.pill--sell{ background:var(--opp-sell-bg); color:var(--opp-sell-fg); }
.pill.pill--rent{ background:var(--opp-rent-bg); color:var(--opp-rent-fg); }
.pill.pill--rentout{ background:var(--opp-rentout-bg); color:var(--opp-rentout-fg); }

/* ---------- Actions ---------- */
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

form[action^="/crm"] .btn-primary,
form[action^="/crm"] .btn--primary,
form[action*="/crm/"] .btn-primary,
form[action*="/crm/"] .btn--primary,
.contact-workspace [form="contactForm"].btn-primary,
.opportunity-workspace [form="opportunityForm"].btn-primary,
.contact-workspace form .btn-primary,
.opportunity-workspace form .btn-primary,
.opportunity-form .btn-primary,
.event-form-shell .btn-primary,
.workspace-settings-page form .btn-primary,
form[data-dialog-form] .btn-primary,
form[data-dialog-form] .btn--primary,
form[data-qual-form] .btn-primary {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border-color: rgba(37,99,235,.38);
}

.btn-ghost {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

.btn-ghost:hover {
  background: #f9fafb;
}

/* Red outline, white background */
.btn-danger-outline{
  background:#ffffff;
  color:#b91c1c;
  border:1px solid #ef4444;
}

.btn-danger-outline:hover{
  background:#fef2f2;
}

.btn-danger-outline:focus-visible{
  outline:3px solid rgba(239,68,68,.25);
  outline-offset:2px;
}

/* ---------- Public Legal Pages ---------- */
.content-inner:has(.legal-page){
  background:#ffffff;
  padding:0;
}

.legal-page{
  width:min(920px, 100%);
  margin:0 auto;
  padding:clamp(24px, 5vw, 56px) clamp(18px, 4vw, 44px);
  color:#111827;
}

.legal-page__header{
  padding:clamp(24px, 4vw, 42px);
  margin-bottom:28px;
  color:#f8fafc;
  background:linear-gradient(135deg, #111827, #0f172a);
  border-bottom:1px solid rgba(148,163,184,.24);
  border-radius:0 0 8px 8px;
}

.legal-page__back{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  margin-bottom:18px;
  color:#bfdbfe;
  font-size:.95rem;
  font-weight:750;
  text-decoration:none;
}

.legal-page__back:hover{
  color:#dbeafe;
  text-decoration:underline;
}

.legal-page__header h1{
  max-width:760px;
  margin:0;
  color:#f8fafc;
  font-size:clamp(2rem, 5vw, 3.25rem);
  line-height:1.05;
  letter-spacing:0;
}

.legal-page__date{
  margin:14px 0 0;
  color:#cbd5e1;
  font-size:1rem;
}

.legal-page__body{
  max-width:760px;
  color:#1f2937;
  font-size:1.02rem;
  line-height:1.72;
}

.legal-page__body h2{
  margin:2.1rem 0 .65rem;
  color:#0f172a;
  font-size:1.35rem;
  line-height:1.25;
  letter-spacing:0;
}

.legal-page__body p,
.legal-page__body ul{
  margin:0 0 1rem;
}

.legal-page__body ul{
  padding-left:1.3rem;
}

.legal-page__body li{
  margin:.42rem 0;
}

.legal-page__body a{
  color:#2563eb;
  font-weight:650;
}

@media (max-width: 640px){
  .content-full:has(.legal-page){
    padding:10px;
  }

  .legal-page{
    padding:24px 16px 34px;
  }

  .legal-page__header{
    margin-bottom:22px;
    padding:24px 18px;
  }
}

/* ---------- Premium Modules Page ---------- */
.modules-page {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 160px);
  margin: -2rem;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(124, 58, 237, 0.12), transparent 32rem),
    radial-gradient(circle at 92% 16%, rgba(20, 184, 166, 0.12), transparent 30rem),
    linear-gradient(135deg, #f8fafc 0%, #f4f7fb 48%, #eef2f7 100%);
  border-radius: 12px;
}

.modules-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 75%);
}

.modules-hero {
  max-width: 860px;
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
}

.modules-eyebrow {
  margin: 0 0 0.75rem;
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modules-hero h1 {
  margin: 0;
  max-width: 760px;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.modules-subtitle {
  max-width: 700px;
  margin: 1rem 0 0;
  color: #475569;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.module-card {
  --module-accent: #4f46e5;
  --module-accent-soft: rgba(79, 70, 229, 0.16);
  --module-accent-glow: rgba(79, 70, 229, 0.24);
  position: relative;
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 265px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(1.25rem, 2.5vw, 1.65rem);
  color: #111827;
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.93), rgba(248, 250, 252, 0.82)),
    #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

button.module-card {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, var(--module-accent-soft), transparent 44%);
  opacity: 0.85;
}

.module-card__shine {
  position: absolute;
  top: -44px;
  right: -36px;
  width: 150px;
  height: 150px;
  pointer-events: none;
  background: radial-gradient(circle, var(--module-accent-glow), transparent 68%);
}

.module-card__top,
.module-card__body,
.module-card__cta {
  position: relative;
  z-index: 1;
}

.module-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.module-card__icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  color: var(--module-accent);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.module-card__icon svg {
  width: 30px;
  height: 30px;
}

.module-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.32rem 0.7rem;
  color: #9f1239;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(255, 241, 242, 0.94);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 999px;
}

.module-card__body {
  display: grid;
  gap: 0.7rem;
  margin-top: 2.25rem;
}

.module-card__title {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
}

.module-card__text {
  max-width: 30rem;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.6;
}

.module-card__cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  color: var(--module-accent);
  font-size: 0.92rem;
  font-weight: 800;
}

.module-card:hover {
  transform: translateY(-4px);
  border-color: var(--module-accent);
  box-shadow: 0 26px 64px rgba(15, 23, 42, 0.14);
}

.module-card:focus-visible {
  outline: 4px solid var(--module-accent-soft);
  outline-offset: 4px;
  border-color: var(--module-accent);
}

.module-card--academy {
  --module-accent: #7c3aed;
  --module-accent-soft: rgba(124, 58, 237, 0.16);
  --module-accent-glow: rgba(124, 58, 237, 0.24);
}

.module-card--marketplace {
  --module-accent: #d97706;
  --module-accent-soft: rgba(217, 119, 6, 0.15);
  --module-accent-glow: rgba(245, 158, 11, 0.24);
}

.module-card--crm {
  --module-accent: #2563eb;
  --module-accent-soft: rgba(37, 99, 235, 0.15);
  --module-accent-glow: rgba(99, 102, 241, 0.23);
}

.module-card--acm {
  --module-accent: #0f766e;
  --module-accent-soft: rgba(20, 184, 166, 0.16);
  --module-accent-glow: rgba(20, 184, 166, 0.24);
}

.module-card--ai {
  --module-accent: #e11d48;
  --module-accent-soft: rgba(225, 29, 72, 0.16);
  --module-accent-glow: rgba(225, 29, 72, 0.3);
}

.module-card--settings {
  --module-accent: #6b5d3e;
  --module-accent-soft: rgba(107, 93, 62, 0.13);
  --module-accent-glow: rgba(100, 116, 139, 0.18);
}

.module-card--compact {
  min-height: 132px;
  padding: clamp(1rem, 2vw, 1.25rem);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.module-card--compact .module-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.module-card--compact .module-card__icon svg {
  width: 24px;
  height: 24px;
}

.module-card--compact .module-card__body {
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.module-card--compact .module-card__title {
  font-size: 1.1rem;
}

.module-card--compact .module-card__text {
  font-size: 0.9rem;
  line-height: 1.4;
}

.module-card--compact .module-card__cta {
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

.module-card--featured {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 242, 0.84)),
    #ffffff;
  border-color: rgba(225, 29, 72, 0.22);
  box-shadow: 0 20px 58px rgba(159, 18, 57, 0.15);
}

.module-card--featured::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: 21px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.module-card--toggle.is-expanded {
  transform: translateY(-4px);
  border-color: var(--module-accent);
  box-shadow: 0 28px 70px rgba(159, 18, 57, 0.19);
}

.module-card__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.module-card--toggle.is-expanded .module-card__chevron {
  transform: rotate(180deg);
}

.ai-subtiles {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.8vw, 1.1rem);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  opacity: 0;
  transform: translateY(-8px) scaleY(0.98);
  transform-origin: top;
  transition:
    max-height 320ms ease,
    opacity 220ms ease,
    padding 320ms ease,
    transform 320ms ease;
}

.ai-subtiles[hidden] {
  display: none;
}

.ai-subtiles.is-open {
  max-height: 620px;
  padding: 0.15rem 0 0.35rem;
  opacity: 1;
  transform: translateY(0) scaleY(1);
}

.ai-subtile {
  --module-accent: #e11d48;
  --module-accent-soft: rgba(225, 29, 72, 0.13);
  position: relative;
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 154px;
  gap: 1rem;
  overflow: hidden;
  padding: clamp(1rem, 2vw, 1.25rem);
  color: #111827;
  text-decoration: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 248, 0.88)),
    #ffffff;
  border: 1px solid rgba(225, 29, 72, 0.16);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.ai-subtile::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, var(--module-accent-soft), transparent 48%);
}

.ai-subtile__icon,
.ai-subtile__body {
  position: relative;
  z-index: 1;
}

.ai-subtile__icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  color: var(--module-accent);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 15px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ai-subtile__icon svg {
  width: 24px;
  height: 24px;
}

.ai-subtile__body {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.ai-subtile__title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.ai-subtile__text {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-subtile:hover {
  transform: translateY(-3px);
  border-color: var(--module-accent);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.12);
}

.ai-subtile:focus-visible {
  outline: 4px solid var(--module-accent-soft);
  outline-offset: 4px;
  border-color: var(--module-accent);
}

.modules-footer-hint {
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

@media (max-width: 1100px) {
  .modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ai-subtiles.is-open {
    max-height: 1120px;
  }
}

@media (max-width: 720px) {
  .content-full:has(.modules-page),
  .content-inner:has(.modules-page) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .content-full:has(.modules-page) {
    padding-inline: 0;
  }

  .content-inner:has(.modules-page) {
    padding: 0;
  }

  .modules-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 1.25rem 1rem;
    border-radius: 12px;
    overflow: hidden;
  }

  .modules-hero {
    margin-bottom: 1.25rem;
    max-width: 100%;
  }

  .modules-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .module-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 232px;
    padding: 1.15rem;
    border-radius: 18px;
  }

  .module-card--compact {
    min-height: 150px;
  }

  .module-card__body {
    margin-top: 1.75rem;
  }

  .module-card--compact .module-card__body {
    margin-top: 0.9rem;
  }

  .ai-subtiles {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .ai-subtiles.is-open {
    max-height: 1760px;
  }

  .ai-subtile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: auto;
  }
}
/* ---------- Global Select (Dropdown) Styling ---------- */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  height: 44px;
  padding: 0 44px 0 14px;

  font-size: 0.95rem;
  font-family: inherit;
  color: #111827;
  background-color: #ffffff;

  border: 1px solid #d1d5db;
  border-radius: 12px;

  cursor: pointer;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

/* Hover */
select:hover {
  border-color: #9ca3af;
}

/* Focus */
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Disabled */
select:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Placeholder-like option */
select option[value=""] {
  color: #9ca3af;
}

.suggest{
  position: absolute;          /* <-- key change */
  top: calc(100% + 6px);
  left: 0;
  right: 0;

  margin-top: 0;               /* don't push layout */
  z-index: 5000;               /* above dialog body */

  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  overflow: hidden;

  max-height: 280px;
  overflow: auto;
}


.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.suggest-item:hover,
.suggest-item.active {
  background: #f3f4f6;
}

.suggest-name {
  color: var(--text, #111827);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.28;
}

.suggest-meta {
  font-size: 13px;
  line-height: 1.28;
  color: var(--muted, #6b7280);
  margin-top: 3px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---------- Bulletproof select styling (Safari-proof) ---------- */
.select-wrap {
  position: relative;
  width: 100%;
}

.select-wrap select {
  width: 100% !important;
  display: block;
  box-sizing: border-box;

  height: 48px;
  padding: 0.7rem 3rem 0.7rem 0.8rem;

  font: inherit;
  font-size: 1rem;
  line-height: 1.2;

  color: #111827;
  background: #ffffff;

  border: 1px solid #d1d5db;
  border-radius: 12px;

  outline: none;
  cursor: pointer;

  /* kill native select look */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* ensure Safari doesn't apply weird inner styles */
  background-image: none !important;
}

/* draw arrow ourselves */
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;

  background-repeat: no-repeat;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.select-wrap select:hover {
  border-color: #9ca3af;
}

.select-wrap select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

/* ===== DEBUG: if you don't see a pink dropdown, CSS isn't applying ===== */
#preferred_contact_method {
  background: #ffd1dc !important; /* pink */
  border: 2px solid #ff3b30 !important;
}

/* ===== FORCE: bulletproof dropdown styling ===== */
.form-grid .field select,
.form-grid .field .select-wrap select,
#preferred_contact_method {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;

  height: 48px !important;
  padding: 0.7rem 3rem 0.7rem 0.8rem !important;

  font: inherit !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;

  color: #111827 !important;
  background-color: #ffffff !important;

  border: 1px solid #d1d5db !important;
  border-radius: 12px !important;

  outline: none !important;
  cursor: pointer !important;

  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;

  background-image: none !important; /* we'll draw arrow via wrapper if desired */
}

/* ---------- Nested / Mini grids ---------- */
.sub-grid{
  display:grid;
  gap: 1rem;
}

/* Column variants */
.sub-grid--2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sub-grid--3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sub-grid--4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Mobile: always stack */
@media (max-width: 720px){
  .sub-grid--2,
  .sub-grid--3,
  .sub-grid--4{
    grid-template-columns: 1fr;
  }
}

/* ---------- Reusable Field Group Card ---------- */
.field-card{
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

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

  padding: 14px 16px;
  background: #EAF2FF;
  border-bottom: 1px solid #e5e7eb;
}

.field-card__title{
  font-weight: 700;
  color: #111827;
  font-size: 15px;
}

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

.field-card__body{
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.btn-icon{
  width:32px;
  height:32px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#ffffff;
  color: #111827;
  text-decoration: none;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover{
  background:#f9fafb;
}

/* Dialog */
.dialog{
  border:none;
  padding:0;
  background:transparent;
}

.dialog::backdrop{
  background: rgba(0,0,0,0.35);
}

.dialog-card{
  width:min(520px, calc(100vw - 32px));
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#fff;
  padding:16px;
}

/* When a dialog is forced tall, ensure the body can grow */
.dialog-card.dialog--tall,
.modal-card.dialog--tall { display: flex; flex-direction: column; }
.dialog-card.dialog--tall .dialog-body,
.modal-card.dialog--tall .modal-body { flex: 1 1 auto; min-height: 0; }

.dialog-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.dialog-title{
  font-size:16px;
  font-weight:800;
  color:#111827;
}

.dialog-body{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
}

/* ===== Dialog: make the dialog itself fixed + scroll inside ===== */
.dialog[open]{
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 16px;              /* space around the card on small screens */
  display: grid;
  place-items: center;
  background: transparent;
  z-index: 3000;
}

/* Card should never exceed viewport height */
.dialog-card{
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); /* d(vh) is best on mobile */
  display: flex;
  flex-direction: column;
  overflow: hidden;           /* keep header/footer fixed, body scrolls */
}

/* Only the body scrolls */
.dialog-body{
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;              /* critical so flex children can shrink */
}

/* Optional: keep actions visible */
.dialog-actions{
  flex: 0 0 auto;
}

/* Lock page scroll when any dialog is open (modern browsers) */
body:has(dialog[open]){
  overflow: hidden;
}

.hidden { display: none !important; }

/* hide but keep accessible */
.sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* segmented control */
.type-toggle{
  display:flex;
  gap:8px;
  flex-wrap:wrap;              /* wraps nicely on smaller screens */
  margin-top:6px;
}

.type-btn{
  appearance:none;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#111827;
  padding:8px 12px;
  border-radius:999px;
  font-weight:600;
  cursor:pointer;
  transition:transform .05s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.type-btn:active{ transform:scale(0.98); }
.type-btn:focus{ outline:none; box-shadow:0 0 0 3px rgba(59,130,246,.25); }

/* Active base */
.type-btn.is-active{
  background:#2563eb; /* blue */
  border-color:transparent;
  color:#fff;
}

/* Color coding by type */
.type-btn[data-value="Buy"].is-active{ background:#2563eb; }     /* blue */
.type-btn[data-value="Sell"].is-active{ background:#16a34a; }    /* green */
.type-btn[data-value="Rent"].is-active{ background:#f59e0b; }    /* purple */
.type-btn[data-value="RentOut"].is-active{ background:#7c3aed; } /* amber */


/* Grid helpers (works with your 2-col .form-grid) */
.span-2{ grid-column: span 2; } /* full width */
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

/* spacer remains useful when you want a half-width “solo row” */
.grid-spacer{ min-height: 1px; }
@media (max-width: 720px){
  .grid-spacer{ display:none; }
}

.contract-group {
  grid-column: 1 / 2; /* one column only */
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.contract-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;

  font-weight: 700;
  color: #111827;
}
.contract-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}


.contract-title{
  font-weight: 700;
  color: #111827;
}

.contract-dates{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.grid-spacer {
  grid-column: 2 / 3;
}

.property-form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* On mobile your form-grid becomes 1 column; the spacer should disappear */
@media (max-width: 720px){
  .grid-spacer{ display:none; }
  .property-form-grid{ grid-template-columns: 1fr; }

}


/* ---------- Tabs (Contact edit: below intentions) ---------- */
.tabs {
  margin-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.tabs-header {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.tab-btn.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tabs-panels {
  margin-top: 1rem;
}

.tab-panel {
  display: none;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px; /* match your card-ish feel */
  padding: 1rem;
}

.tab-panel.is-active {
  display: block;
}

.tab-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.tab-title {
  margin: 0;
  font-size: 1.05rem;
}

/* table inside tabs */
.tabs-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.tabs-table {
  width: 100%;
  border-collapse: collapse;
}

.tabs-table th,
.tabs-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid #e5e7eb;
}

.tabs-right {
  text-align: right;
  white-space: nowrap;
}

.tabs-link {
  color: #2563eb;
  text-decoration: none;
}

.tabs-link:hover {
  text-decoration: underline;
}

.tabs-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.modal-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.55); z-index: 1000; }
.modal { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; z-index: 1001; padding: 16px; }
.modal-card { width: min(760px, 100%); max-height: calc(100dvh - 48px); min-height: 0; display:flex; flex-direction:column; background:#fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow:hidden; }
.modal-header { display:flex; flex:0 0 auto; justify-content:space-between; align-items:center; padding: 16px 18px; border-bottom: 1px solid #e5e7eb; }
.modal-body { min-height:0; flex:1 1 auto; padding: 16px 18px 6px; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.modal-footer { display:flex; flex:0 0 auto; justify-content:flex-end; gap:10px; padding: 14px 18px 18px; }
/* Icon buttons: make <a> and <button> look the same */
.icon-btn{
  border:0;
  background:transparent;
  cursor:pointer;

  /* key: stop <a> from turning icons blue */
  color: inherit;
  text-decoration: none;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding: 4px;
  border-radius: 10px;
}

/* Ensure visited/hover links don't change icon color unless you want it */
a.icon-btn:link,
a.icon-btn:visited{
  color: inherit;
  text-decoration: none;
}

.icon-btn:hover{
  background:#f3f4f6;
}

/* Optional: standardize icon sizing inside icon-btn */
.icon-btn .icon{
  width:14px;
  height:14px;
}
.icon-btn--danger:hover{ color:#b91c1c; background:#fef2f2; }

.autocomplete {
  position:absolute; top: calc(100% + 6px); left:0; right:0;
  background:#fff; border:1px solid #e5e7eb; border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
  max-height: 260px; overflow:auto; z-index: 2000;
}
.ac-item { width:100%; text-align:left; border:0; background:transparent; padding:10px 12px; cursor:pointer; }
.ac-item:hover, .ac-item.active { background:#f3f4f6; }
.ac-title { font-weight:600; }
.ac-sub { font-size:12px; color:#6b7280; margin-top:2px; }
.ac-wrap{
  position: relative;
}

.btn-link { border:0; background:transparent; color:#4f46e5; cursor:pointer; padding:0; margin-top:6px; }
.form-error { margin: 8px 0 14px; padding: 10px 12px; background:#fee2e2; color:#7f1d1d; border-radius:10px; }
.opportunity-workspace .field-error { margin-top: 6px; color: #991b1b; font-size: 12px; font-weight: 700; }
.opportunity-workspace .field.has-error input { border-color: #ef4444; }

.row-between{display:flex;align-items:center;justify-content:space-between;gap:12px}
.label{font-weight:650}
.hint{margin:.35rem 0 0;color:#6b7280;font-size:.9rem}

/* Toggle switch */
.switch{position:relative;display:inline-block;width:46px;height:28px}
.switch input{opacity:0;width:0;height:0}
.switch .slider{
  position:absolute;inset:0;border-radius:999px;
  background:#e5e7eb; transition:200ms;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.switch .slider::before{
  content:""; position:absolute; height:22px; width:22px;
  left:3px; top:3px; border-radius:999px; background:#fff;
  transition:200ms; box-shadow:0 6px 14px rgba(0,0,0,.12);
}
.switch input:checked + .slider{
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
}
.switch input:checked + .slider::before{transform:translateX(18px)}
.switch input:focus-visible + .slider{
  outline:3px solid rgba(37,99,235,.25);
  outline-offset:2px;
}

/* Percentage number as a pill */
.pct-wrap{
  position:relative; display:inline-flex; align-items:center;
  border-radius:12px; padding:10px 12px;
  background:#f9fafb; border:1px solid #e5e7eb;
  box-shadow:0 1px 0 rgba(0,0,0,.03);
  width:140px;
}
.pct-number{
  border:0; outline:0; background:transparent;
  width:90px; font-size:1.05rem; font-weight:650;
}
.pct-suffix{color:#6b7280;font-weight:650}

/* Range slider */
.pct-range{width:100%; margin-top:12px}
.pct-range:focus-visible{outline:3px solid rgba(37,99,235,.25); outline-offset:2px}
.pct-meta{
  display:flex; justify-content:space-between;
  color:#9ca3af; font-size:.85rem; margin-top:6px;
}

/* Shared row */
.form-row{
  display:flex;
  gap:24px;
  align-items:flex-start;
}

/* Ownership row specifics */
.form-row--ownership{
  margin-top:16px;
}

/* Grow vs compact */
.field--grow{
  flex:1 1 auto;
}
.field--compact{
  flex:0 0 220px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

/* Align switch nicely */
.field--compact .switch{
  align-self:flex-start;
}

/* Responsive: stack on small screens */
@media (max-width: 640px){
  .form-row{
    flex-direction:column;
  }
  .field--compact{
    flex:1 1 auto;
  }
}

/* Shared row */
.form-row{
  display:flex;
  gap:24px;
  align-items:flex-start;
}

/* Ownership row specifics */
.form-row--ownership{
  margin-top:16px;
}

/* Grow vs compact */
.field--grow{
  flex:1 1 auto;
}
.field--compact{
  flex:0 0 220px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

/* Align switch nicely */
.field--compact .switch{
  align-self:flex-start;
}

/* Responsive: stack on small screens */
@media (max-width: 900px){
  .form-row{
    flex-direction:column;
  }
  .field--compact{
    flex:1 1 auto;
  }
}

/* =====================================================
   Tools page
   ===================================================== */

.tools-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tools-page-header {
  margin-bottom: 0;
}

.tools-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.tools-hero__content {
  max-width: 760px;
}

.tools-hero__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.tools-hero__title {
  margin: 0;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #111827;
}

.tools-hero__text {
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.6;
}

.tools-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  min-width: 280px;
}

.tools-stat {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
}

.tools-stat__value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
}

.tools-stat__label {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6b7280;
}

.tools-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tools-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.tools-section__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
}

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

.tools-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 230px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
  color: inherit;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.tools-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
  text-decoration: none;
}

.tools-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tools-card__icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tools-card__icon--blue { background: #e8f0ff; color: #2563eb; }
.tools-card__icon--violet { background: #efeaff; color: #6d28d9; }
.tools-card__icon--green { background: #e9f8ee; color: #15803d; }
.tools-card__icon--orange { background: #fff1e8; color: #ea580c; }
.tools-card__icon--amber { background: #fff6df; color: #a16207; }
.tools-card__icon--sky { background: #eaf6ff; color: #0284c7; }
.tools-card__icon--purple { background: #f2ebff; color: #7c3aed; }
.tools-card__icon--emerald { background: #e8fbf4; color: #059669; }
.tools-card__icon--pink { background: #fdeaf1; color: #be185d; }
.tools-card__icon--indigo { background: #eaf0ff; color: #4f46e5; }
.tools-card__icon--mint { background: #e8f8ef; color: #0f766e; }
.tools-card__icon--sand { background: #f9f1dc; color: #92400e; }

.tools-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.tools-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.tools-card__title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  font-weight: 800;
  color: #111827;
}

.tools-card__desc {
  margin: 0;
  color: #4b5563;
  line-height: 1.55;
  font-size: 0.95rem;
}

.tools-card__arrow {
  align-self: flex-end;
  font-size: 1.25rem;
  line-height: 1;
  color: #6b7280;
}

@media (max-width: 980px) {
  .tools-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .tools-hero__stats {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tools-card {
    min-height: 0;
  }

  .tools-card__top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Mobile / Small Screens ---------- */
@media (max-width: 900px) {
  .app-header,
  .header-inner,
  .header-right,
  .workspace-chip {
    box-sizing: border-box;
  }

  .header-inner {
    width: 100%;
    max-width: 100%;
    gap: 0.5rem;
    overflow: hidden;
  }

  .header-inner:has(.main-nav.open) {
    overflow: visible;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .brand-name {
    display: none;
  }

  .header-right {
    flex: 0 1 auto;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0;
    min-width: 0;
    max-width: 100%;
  }

  .header-inner:has(.header-search.is-open) {
    gap: 0.5rem;
  }

  .header-inner:has(.header-search.is-open) .brand {
    display: none;
  }

  .header-inner:has(.header-search.is-open) .header-right {
    width: 100%;
    gap: 0.5rem;
  }

  .header-inner:has(.header-search.is-open) .workspace-chip {
    padding-left: 6px;
  }

  .header-inner:has(.header-search.is-open) .workspace-chip__name {
    max-width: 0;
    opacity: 0;
  }

  /* Show hamburger */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 1;
    flex: 0 0 auto;
  }

  .header-search {
    order: 2;
    flex: 0 0 auto;
  }

  .header-search__toggle {
    display: inline-flex;
  }

  .header-search__field {
    display: none;
  }

  .header-search.is-open {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-search.is-open .header-search__toggle {
    display: none;
  }

  .header-search.is-open .header-search__field {
    display: flex;
    width: 100%;
    min-width: 0;
  }

  .header-search.is-open .header-search__close {
    position: absolute;
    right: 4px;
    display: inline-flex;
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.08);
    border-color: transparent;
  }

  .header-search.is-open .header-search__field input[type="text"] {
    min-width: 0;
    min-height: 46px;
    padding-right: 40px;
    font-size: 16px;
    line-height: 22px;
  }

  .header-search.is-open .header-search__field input[type="text"]::placeholder {
    font-size: 16px;
    line-height: 22px;
  }

  .header-search input,
  .header-search textarea,
  .header-search select {
    font-size: 16px;
  }

  .header-right .user-menu {
    order: 3;
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 0;
  }

  .header-right .workspace-chip {
    max-width: clamp(140px, 38vw, 210px);
    min-width: 0;
    overflow: hidden;
    gap: 8px;
    padding-left: 10px;
  }

  .header-right .workspace-chip__name {
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-right .workspace-chip .user-avatar,
  .header-right .workspace-chip .user-avatar-btn {
    flex: 0 0 34px;
  }

  .header-inner:has(.header-search.is-open) .header-right .workspace-chip {
    padding-left: 6px;
  }

  .header-inner:has(.header-search.is-open) .header-right .workspace-chip__name {
    max-width: 0;
    opacity: 0;
  }

  /* Mobile dropdown nav: hidden until JS adds .open */
  .main-nav {
    display: none;
    position: absolute;
    right: 0.5rem;
    top: 56px; /* dropdown under header; adjust if needed */
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 220px;
    z-index: 1000;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
  }

  .main-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown__trigger {
    width: 100%;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
  }

  .nav-dropdown__trigger:hover,
  .nav-dropdown.is-open .nav-dropdown__trigger {
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
  }

  .nav-dropdown__menu {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 0.35rem;
    padding: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: none;
  }

  .nav-dropdown__menu::before {
    display: none;
  }

  .nav-dropdown__menu a {
    color: #e5e7eb;
    padding: 0.5rem 0.75rem;
  }

  .nav-dropdown__menu a .icon {
    color: rgba(229, 231, 235, 0.8);
  }

  .nav-dropdown__menu a:hover,
  .nav-dropdown__menu a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .nav-dropdown__menu a:hover .icon,
  .nav-dropdown__menu a:focus-visible .icon {
    color: #ffffff;
  }

  .layout {
    grid-template-columns: 1fr; /* single column */
    grid-auto-rows: min-content;
  }

  /* Sidebar content is available from the hamburger menu on mobile. */
  .sidebar {
    display: none;
  }

  /* Content stays full width with 10px padding */
  .content {
    padding: 10px;
  }

  .content-inner {
    padding: 1.25rem;
  }

}

.note-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--panel, #fff);
}
.note-summary { cursor: pointer; font-weight: 600; }
.note-body { margin-top: 8px; white-space: pre-wrap; }
/* =====================================================
   Auth landing / pricing page
   Reuses existing: .card, .form-grid, .field, .actions, .btn
   ===================================================== */

.auth-landing{
  --auth-gold:#d6b46a;
  --auth-gold-soft:#f0d997;
  --auth-ink:#fff7e8;
  --auth-muted:#b9ad98;
  --auth-panel:rgba(11, 10, 8, .74);
  --auth-border:rgba(214, 180, 106, .24);
  position:relative;
  isolation:isolate;
  width:100%;
  min-height:calc(100vh - 112px);
  height:auto;
  margin:-2rem;
  padding:clamp(22px, 4vw, 58px);
  overflow:visible;
  overflow-x:clip;
  color:var(--auth-ink);
  background:
    radial-gradient(circle at 18% 14%, rgba(214,180,106,.20), transparent 30%),
    radial-gradient(circle at 86% 84%, rgba(122,90,38,.26), transparent 34%),
    linear-gradient(135deg, #030303 0%, #0b0907 48%, #15100a 100%);
}

@supports (height: 100svh){
  .auth-landing{
    min-height:calc(100svh - 112px);
  }
}

.auth-landing::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background:
    linear-gradient(rgba(214,180,106,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214,180,106,.035) 1px, transparent 1px);
  background-size:72px 72px;
  mask-image:radial-gradient(circle at center, #000 0%, transparent 72%);
}

.auth-landing::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(90deg, rgba(0,0,0,.72), transparent 42%, rgba(0,0,0,.70));
}

.auth-ambient{
  position:absolute;
  width:34vw;
  max-width:520px;
  aspect-ratio:1;
  border-radius:999px;
  filter:blur(42px);
  opacity:.42;
  pointer-events:none;
  animation:authGlow 10s ease-in-out infinite alternate;
}

.auth-ambient--one{
  top:8%;
  left:4%;
  background:rgba(214,180,106,.24);
}

.auth-ambient--two{
  right:-8%;
  bottom:8%;
  background:rgba(111,75,26,.36);
  animation-delay:-3s;
}

.auth-shell{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0, 1.04fr) minmax(430px, .82fr);
  gap:clamp(22px, 4vw, 54px);
  align-items:center;
  max-width:1480px;
  min-height:calc(100vh - 188px);
  height:auto;
  margin:0 auto;
}

@supports (height: 100svh){
  .auth-shell{
    min-height:calc(100svh - 188px);
  }
}

.auth-landing--centered{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#111827;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.auth-landing--centered::before,
.auth-landing--centered::after{
  display:none;
}

.auth-shell--login{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  max-width:560px;
  min-height:calc(100vh - 188px);
}

@supports (height: 100svh){
  .auth-shell--login{
    min-height:calc(100svh - 188px);
  }
}

.auth-hero{
  position:relative;
  min-width:0;
  padding:min(4vw, 42px) 0;
}

.auth-hero__media{
  position:absolute;
  inset:-6% 8% auto auto;
  z-index:-1;
  width:min(44vw, 620px);
  aspect-ratio:4 / 5;
  overflow:hidden;
  border:1px solid rgba(214,180,106,.18);
  border-radius:8px;
  opacity:.40;
  background:
    linear-gradient(90deg, rgba(3,3,3,.72), rgba(3,3,3,.10) 44%, rgba(3,3,3,.78)),
    linear-gradient(180deg, rgba(3,3,3,.12), rgba(3,3,3,.82)),
    url("/mnt/data/78838bbc-5d49-46c3-8627-d1f5cd1fd8a6.png") center / cover no-repeat,
    linear-gradient(135deg, rgba(214,180,106,.22), rgba(13,10,7,.92));
  box-shadow:0 34px 90px rgba(0,0,0,.62), inset 0 0 80px rgba(0,0,0,.72);
}

.auth-hero__media::after{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 42% 36%, rgba(240,217,151,.18), transparent 34%);
}

.auth-hero__content{
  position:relative;
  max-width:760px;
}

.auth-hero__eyebrow,
.auth-card__eyebrow,
.selected-plan-badge__label,
.auth-exclusive-card__label{
  color:var(--auth-gold-soft);
  font-size:11px;
  font-weight:850;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.auth-hero__eyebrow{
  max-width:520px;
  margin-bottom:16px;
}

.auth-hero__title{
  max-width:760px;
  margin:0;
  color:#fff8ea;
  font-size:clamp(2.75rem, 6vw, 6.65rem);
  font-weight:850;
  line-height:.92;
  letter-spacing:0;
  text-wrap:balance;
}

.auth-hero__text{
  max-width:680px;
  margin-top:24px;
  color:var(--auth-muted);
  font-size:clamp(1rem, 1.45vw, 1.18rem);
  line-height:1.68;
}

.auth-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  max-width:760px;
  margin-top:28px;
}

.auth-chip{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:8px 12px;
  color:#ead9b6;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(214,180,106,.20);
  border-radius:999px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(14px);
  font-size:13px;
  font-weight:750;
}

.auth-chip--vip{
  color:#1b1308;
  background:linear-gradient(135deg, #f2d995, #bb8c3b);
  border-color:rgba(240,217,151,.72);
}

.auth-exclusive-card{
  display:grid;
  gap:12px;
  max-width:620px;
  margin-top:30px;
  padding:18px 20px;
  background:linear-gradient(135deg, rgba(214,180,106,.14), rgba(255,255,255,.045));
  border:1px solid rgba(214,180,106,.30);
  border-radius:8px;
  box-shadow:0 24px 70px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(18px);
}

.auth-exclusive-card strong{
  display:block;
  margin-top:5px;
  color:#fff3d8;
  font-size:1.02rem;
}

.auth-exclusive-card p{
  margin:0;
  color:#c9bda8;
  line-height:1.58;
}

/* Registration card */
.auth-card{
  position:relative;
  max-width:none;
  margin:0;
  padding:clamp(18px, 2.2vw, 28px);
  scroll-margin-top:24px;
  overflow:hidden;
  color:var(--auth-ink);
  background:linear-gradient(145deg, rgba(16,14,11,.82), rgba(4,4,4,.68));
  border:1px solid rgba(214,180,106,.26);
  border-radius:8px;
  box-shadow:0 32px 100px rgba(0,0,0,.56), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter:blur(22px);
}

.auth-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(240,217,151,.86), transparent);
}

.auth-card__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.auth-card__header--stack{
  display:block;
}

.auth-card__title{
  margin:6px 0 0;
  color:#fff5de;
  font-size:clamp(1.35rem, 2vw, 1.9rem);
  font-weight:850;
  line-height:1.08;
}

.auth-card__text{
  margin-top:8px;
  max-width:780px;
  color:#b9ad98;
}

.auth-card__text--compact{
  max-width:560px;
}

.auth-card--login{
  width:100%;
  max-width:520px;
  color:#111827;
  background:#ffffff;
  border:1px solid rgba(31,41,55,.12);
  box-shadow:0 24px 70px rgba(31,41,55,.14), 0 1px 2px rgba(31,41,55,.06);
}

.auth-card--login::before{
  background:linear-gradient(90deg, transparent, rgba(31,41,55,.38), transparent);
}

.auth-card--login .auth-card__eyebrow{
  color:#4b5563;
}

.auth-card--login .auth-card__title{
  color:#111827;
}

.auth-card--login .auth-card__text{
  color:#6b7280;
}

.auth-login-form{
  display:grid;
  gap:14px;
}

.auth-login-form .field{
  margin-bottom:0;
}

.auth-login-row{
  display:flex;
  justify-content:flex-end;
  margin-top:-2px;
}

.auth-login-row a{
  color:#1f2937;
  font-size:.94rem;
  font-weight:750;
  text-decoration:none;
}

.auth-login-row a:hover{
  text-decoration:underline;
}

.auth-card--login .field label{
  color:#374151;
}

.auth-card--login .auth-submit-btn{
  color:#ffffff;
  background:#1f2937;
  border-color:#1f2937;
  box-shadow:0 14px 28px rgba(31,41,55,.18);
}

.auth-card--login .auth-submit-btn:hover{
  background:#111827;
  border-color:#111827;
  box-shadow:0 18px 36px rgba(31,41,55,.24);
}

.selected-plan-badge{
  flex:0 0 auto;
  min-width:168px;
  padding:10px 12px;
  color:#fff5de;
  background:rgba(214,180,106,.10);
  border:1px solid rgba(214,180,106,.30);
  border-radius:8px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

.selected-plan-badge__label{
  display:block;
  margin-bottom:4px;
  font-size:10px;
}

/* Plan tiles */
.plan-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  align-items:stretch;
  margin-bottom:20px;
  scroll-margin-top:24px;
}

.plan-card{
  position:relative;
  width:100%;
  min-height:168px;
  padding:15px;
  overflow:hidden;
  cursor:pointer;
  color:#eadfc9;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(214,180,106,.16);
  border-radius:8px;
  box-shadow:0 14px 36px rgba(0,0,0,.20);
  text-align:left;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.plan-card::after{
  content:"";
  position:absolute;
  inset:auto 12px 0;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(214,180,106,.55), transparent);
  opacity:0;
  transition:opacity .18s ease;
}

.plan-card:hover{
  transform:translateY(-2px);
  background:rgba(214,180,106,.075);
  border-color:rgba(214,180,106,.38);
  box-shadow:0 18px 46px rgba(0,0,0,.32), 0 0 28px rgba(214,180,106,.08);
}

.plan-card:hover::after,
.plan-card.is-selected::after{
  opacity:1;
}

.plan-card.is-selected{
  background:linear-gradient(145deg, rgba(214,180,106,.18), rgba(255,255,255,.055));
  border-color:rgba(240,217,151,.70);
  box-shadow:0 0 0 1px rgba(240,217,151,.16), 0 20px 48px rgba(0,0,0,.34), 0 0 34px rgba(214,180,106,.13);
}

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

.plan-card__title{
  color:#fff4dc;
  font-size:1.02rem;
  font-weight:850;
}

.plan-card__description{
  margin:0;
  color:#b9ad98;
  font-size:.91rem;
  line-height:1.45;
}

.plan-card__features{
  margin:12px 0 0;
  padding-left:17px;
  color:#d7c9ad;
  font-size:.88rem;
  line-height:1.4;
}

.plan-card__features li + li{
  margin-top:4px;
}

/* Auth form tweaks that sit on top of existing .form-grid / .field */
.auth-form-grid{
  margin-bottom:8px;
}

.auth-form-grid--compact{
  gap:12px;
}

.auth-form-grid--compact .field{
  margin-bottom:0;
}

.auth-form-grid--compact .field label{
  margin-bottom:5px;
  color:#eadfca;
  font-size:.86rem;
  font-weight:800;
}

.auth-card:not(.auth-card--login) .field input[type="text"],
.auth-card:not(.auth-card--login) .field input[type="email"],
.auth-card:not(.auth-card--login) .field input[type="password"],
.auth-card:not(.auth-card--login) .field input[type="tel"]{
  min-height:44px;
  padding:10px 12px;
  color:#fff7e8;
  background:rgba(0,0,0,.32);
  border:1px solid rgba(214,180,106,.22);
  border-radius:8px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
  transition:border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.auth-card:not(.auth-card--login) .field input::placeholder{
  color:rgba(233,218,184,.45);
}

.auth-card:not(.auth-card--login) .field input:focus{
  border-color:rgba(240,217,151,.76);
  box-shadow:0 0 0 4px rgba(214,180,106,.14), inset 0 1px 0 rgba(255,255,255,.08);
}

.auth-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:10px;
  color:#cdbf9f;
  font-size:.94rem;
  line-height:1.5;
}

.auth-check input{
  flex:0 0 auto;
  width:17px;
  height:17px;
  margin-top:3px;
  accent-color:#d6b46a;
}

.auth-check a,
.auth-footnote a{
  color:#f0d997;
  font-weight:700;
  text-decoration:none;
}

.auth-check a:hover,
.auth-footnote a:hover{
  text-decoration:underline;
}

.auth-actions{
  margin-top:16px;
  justify-content:flex-end;
}

.auth-actions--center{
  justify-content:center;
}

.auth-submit-btn{
  min-width:240px;
  min-height:48px;
  color:#171006;
  background:linear-gradient(135deg, #f4dda0, #c59747);
  border:1px solid rgba(240,217,151,.74);
  border-radius:8px;
  box-shadow:0 18px 36px rgba(0,0,0,.32), 0 0 28px rgba(214,180,106,.16);
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.auth-submit-btn:hover{
  transform:translateY(-1px);
  background:linear-gradient(135deg, #ffe8aa, #d2a558);
  box-shadow:0 24px 46px rgba(0,0,0,.40), 0 0 34px rgba(214,180,106,.24);
  filter:saturate(1.04);
}

.auth-footnote{
  color:#a99c86;
}

.auth-landing .form-error,
.auth-landing .form-success,
.auth-landing .form-note{
  position:relative;
  z-index:2;
  max-width:1480px;
  margin-left:auto;
  margin-right:auto;
  border-radius:8px;
}

.auth-landing .form-error{
  background:rgba(127,29,29,.24);
  color:#fecaca;
  border:1px solid rgba(248,113,113,.28);
}

.auth-card--login .form-error{
  color:#991b1b;
  background:#fef2f2;
  border:1px solid #fecaca;
  font-weight:700;
}

@keyframes authGlow{
  from{ transform:translate3d(0, 0, 0) scale(1); opacity:.28; }
  to{ transform:translate3d(3%, -2%, 0) scale(1.08); opacity:.48; }
}

@media (prefers-reduced-motion: reduce){
  .auth-ambient{
    animation:none;
  }

  .plan-card,
  .auth-submit-btn{
    transition:none;
  }
}

/* Responsive */
@media (max-width: 1180px){
  .auth-shell{
    grid-template-columns:1fr;
    align-items:start;
    min-height:auto;
  }

  .auth-hero{
    padding:10px 0 0;
  }

  .auth-hero__media{
    inset:-5% -10% auto auto;
    width:min(72vw, 560px);
    opacity:.28;
  }
}

@media (max-width: 720px){
  .auth-landing{
    min-height:calc(100vh - 92px);
    height:auto;
    margin:0;
    padding:24px 14px 32px;
    overflow:visible;
    overflow-x:clip;
  }

  @supports (height: 100svh){
    .auth-landing{
      min-height:calc(100svh - 92px);
    }
  }

  .auth-shell{
    gap:22px;
    min-height:auto;
    width:100%;
    max-width:100%;
  }

  .auth-hero__media{
    inset:0 -30% auto auto;
    width:94vw;
    opacity:.20;
  }

  .auth-hero__title{
    font-size:clamp(2.25rem, 12vw, 4.2rem);
    overflow-wrap:anywhere;
  }

  .auth-hero__text,
  .auth-exclusive-card p,
  .plan-card__description,
  .plan-card__features,
  .auth-check,
  .auth-footnote{
    overflow-wrap:anywhere;
  }

  .auth-chip-row{
    gap:8px;
  }

  .auth-chip{
    min-height:32px;
    padding:7px 10px;
    font-size:12px;
  }

  .auth-exclusive-card{
    padding:15px;
  }

  .auth-card{
    width:100%;
    max-width:100%;
    padding:17px;
  }

  .auth-card__header{
    flex-direction:column;
    align-items:flex-start;
  }

  .selected-plan-badge{
    width:100%;
  }

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

  .auth-submit-btn{
    width:100%;
    min-width:0;
  }
}

/* =====================================================
   CRM Dashboard
   ===================================================== */
.crm-dashboard{
  --crm-ink:#0f172a;
  --crm-muted:#64748b;
  --crm-border:rgba(148,163,184,.28);
  --crm-shadow:0 18px 48px rgba(15,23,42,.08);
  --crm-shadow-hover:0 24px 60px rgba(15,23,42,.13);
  padding:clamp(12px, 2vw, 24px);
}

.crm-dashboard-hero{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-bottom:18px;
  padding:20px;
  overflow:visible;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.84)),
    #ffffff;
  border:1px solid var(--crm-border);
  border-radius:18px;
  box-shadow:var(--crm-shadow);
}

.dashboard-top__row{
  width:100%;
}

.dashboard-top__row--header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}

.dashboard-top__title-wrap{
  min-width:0;
  flex:1 1 360px;
}

.crm-dashboard-eyebrow{
  margin-bottom:7px;
  color:#2563eb;
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.crm-dashboard .page-header h1{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 6px;
  color:var(--crm-ink);
  font-size:clamp(1.7rem, 3vw, 2.45rem);
  line-height:1.05;
  letter-spacing:0;
}

.crm-dashboard .muted{
  color:var(--crm-muted);
  line-height:1.45;
}

.crm-dashboard-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.crm-workspace-badge,
.crm-quick-action{
  min-height:42px;
}

.crm-workspace-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  color:#334155;
  font-size:13px;
  font-weight:800;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(148,163,184,.32);
  border-radius:999px;
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}

.crm-quick-action{
  gap:8px;
  height:42px;
  padding:6px 10px;
  border-color:rgba(148,163,184,.34);
  background:rgba(255,255,255,.78);
}

.dashboard-add-control{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:6px 10px;
  border-radius:12px;
  background:linear-gradient(135deg, #2563eb, #14b8a6);
  border-color:rgba(37,99,235,.38);
  color:#ffffff;
  box-shadow:0 14px 28px rgba(15,23,42,.20);
}

.dashboard-add-control:hover{
  background:linear-gradient(135deg, #2563eb, #14b8a6);
  border-color:rgba(37,99,235,.38);
}

.dashboard-add-control__select,
.dashboard-add-control__button{
  color:inherit;
  font:inherit;
  background:transparent;
  border:0;
  cursor:pointer;
}

.dashboard-add-control__select{
  max-width:180px;
  padding:4px 18px 4px 4px;
  outline:none;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
}

.dashboard-add-control__select option{
  color:#111827;
}

.dashboard-add-control__divider{
  width:1px;
  height:22px;
  background:rgba(255,255,255,.28);
}

.dashboard-add-control__button{
  min-height:30px;
  min-width:74px;
  padding:4px 8px;
  border-radius:9px;
  font-weight:800;
  white-space:nowrap;
}

.dashboard-add-control__button:hover{
  background:rgba(255,255,255,.12);
}

.dashboard-board-links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.dashboard-board-links .btn{
  min-height:40px;
  gap:4px;
  padding:.62rem .82rem;
  border-radius:12px;
}

.tag--crm-potential{
  display:inline-flex;
  align-items:center;
  gap:6px;
  max-width:100%;
  padding:4px 10px;
  color:#1e3a8a;
  background:#dbeafe;
  border-color:#bfdbfe;
}

.tag--crm-annual-kpi{
  padding-inline:9px 10px;
  color:#075985;
  background:linear-gradient(135deg, #e0f2fe, #dbeafe);
  border-color:#bae6fd;
  box-shadow:0 8px 18px rgba(14,116,144,.10);
}

.tag--crm-annual-kpi .icon{
  flex:0 0 auto;
}

.tag--crm-annual-kpi span{
  min-width:0;
  white-space:normal;
}

.crm-report-nav-link{
  white-space:nowrap;
}

.transactions-report{
  color:#111827;
}

.crm-report-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}

.transactions-report__hero{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-bottom:16px;
}

.transactions-report__metric,
.transactions-report__annual-total,
.transactions-report__empty,
.transactions-report__notice{
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  box-shadow:0 14px 30px rgba(15,23,42,.08);
}

.transactions-report__metric{
  padding:16px;
}

.transactions-report__metric span,
.transactions-report__annual-grid span{
  display:block;
  color:#6b7280;
  font-size:13px;
  font-weight:700;
}

.transactions-report__metric strong,
.transactions-report__annual-grid strong{
  display:block;
  margin-top:6px;
  font-size:24px;
  line-height:1.1;
}

.transactions-report__filters{
  display:flex;
  flex-wrap:wrap;
  align-items:end;
  gap:10px;
  margin:0 0 16px;
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
}

.transactions-report__filters label{
  display:grid;
  gap:5px;
  min-width:160px;
  font-size:13px;
  font-weight:700;
  color:#374151;
}

.transactions-report__filters select{
  min-height:38px;
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:8px 32px 8px 10px;
  background:#fff;
  color:#111827;
}

.transactions-report__print-summary{
  display:none;
}

.transactions-report__notice{
  margin-bottom:16px;
  padding:12px 14px;
  color:#7c2d12;
  background:#fff7ed;
  border-color:#fed7aa;
  box-shadow:none;
}

.outbound-recipient-page .muted{
  color:#64748b;
}

.outbound-recipient-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.outbound-recipient-header h1{
  margin-bottom:6px;
}

.outbound-recipient-selector{
  display:grid;
  gap:14px;
  min-width:0;
}

.outbound-draft-form,
.outbound-composer,
.outbound-preview{
  display:grid;
  gap:16px;
  min-width:0;
}

.outbound-composer,
.outbound-preview{
  padding:16px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
}

.outbound-draft-saved{
  padding:8px 10px;
  border:1px solid #bbf7d0;
  border-radius:8px;
  color:#166534;
  background:#f0fdf4;
  font-size:13px;
  font-weight:800;
}

.outbound-provider-reconnect-form{
  display:none;
}

.outbound-provider-panel{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  min-width:0;
  padding:16px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
}

.outbound-provider-panel__main{
  min-width:0;
}

.outbound-provider-panel h2{
  margin:0 0 8px;
  font-size:16px;
}

.outbound-provider-account{
  color:#111827;
  font-weight:800;
}

.outbound-provider-panel__actions{
  flex:0 0 auto;
}

.outbound-provider-feedback{
  margin-top:10px;
  border-radius:8px;
  padding:10px 12px;
  font-size:14px;
}

.outbound-provider-feedback--success{
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  color:#166534;
}

.outbound-provider-feedback--error{
  border:1px solid #fecaca;
  background:#fef2f2;
  color:#991b1b;
}

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

.outbound-tab{
  min-height:36px;
  padding:7px 12px;
  border:1px solid #dbe3ef;
  border-radius:8px;
  color:#334155;
  background:#f8fafc;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
}

.outbound-tab.is-active{
  color:#fff;
  background:#0f766e;
  border-color:#0f766e;
}

.outbound-language-panel{
  display:grid;
  gap:14px;
}

.outbound-language-panel[hidden],
.outbound-preview-panel[hidden]{
  display:none;
}

.outbound-field{
  display:grid;
  gap:6px;
  color:#374151;
  font-size:13px;
  font-weight:800;
}

.outbound-field input{
  min-height:40px;
  width:100%;
  border:1px solid #d1d5db;
  border-radius:8px;
  padding:8px 10px;
  color:#111827;
  background:#fff;
  font-size:15px;
}

.outbound-editor{
  min-height:220px;
  color:#111827;
  font-size:15px;
  font-weight:400;
}

.outbound-editor--fallback{
  padding:12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
}

.outbound-composer .ql-toolbar.ql-snow{
  border-color:#d1d5db;
  border-radius:8px 8px 0 0;
}

.outbound-composer .ql-container.ql-snow{
  min-height:220px;
  border-color:#d1d5db;
  border-radius:0 0 8px 8px;
  font-size:15px;
}

.outbound-editor-history{
  width:auto !important;
  min-width:44px;
  padding:0 7px !important;
  color:#334155;
  font-size:12px;
  font-weight:800;
}

.outbound-language-warning{
  padding:10px 12px;
  border:1px solid #fed7aa;
  border-radius:8px;
  color:#7c2d12;
  background:#fff7ed;
  font-size:13px;
  font-weight:800;
}

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

.outbound-preview__header h2{
  margin:0;
  font-size:18px;
}

.outbound-preview-panel{
  display:grid;
  gap:10px;
  min-width:0;
}

.outbound-preview-meta{
  color:#64748b;
  font-size:13px;
  font-weight:800;
}

.outbound-preview-panel h3{
  margin:0;
  padding-bottom:10px;
  border-bottom:1px solid #e5e7eb;
  color:#0f172a;
  font-size:18px;
  line-height:1.3;
  overflow-wrap:anywhere;
}

.outbound-preview-body{
  min-height:120px;
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  color:#111827;
  background:#fbfdff;
  overflow-wrap:anywhere;
}

.outbound-preview-body :first-child{
  margin-top:0;
}

.outbound-preview-body :last-child{
  margin-bottom:0;
}

.outbound-form-actions{
  display:flex;
  justify-content:flex-end;
}

.outbound-recipient-filters{
  display:flex;
  flex-wrap:wrap;
  align-items:end;
  gap:10px;
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
}

.outbound-recipient-filters label{
  display:grid;
  gap:5px;
  flex:1 1 180px;
  min-width:160px;
  color:#374151;
  font-size:13px;
  font-weight:700;
}

.outbound-recipient-filters input,
.outbound-recipient-filters select{
  width:100%;
  min-height:38px;
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:8px 32px 8px 10px;
  background:#fff;
  color:#111827;
  font-size:14px;
}

.outbound-recipient-summary,
.outbound-recipient-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.outbound-recipient-count{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 10px;
  color:#334155;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:999px;
  font-size:13px;
  font-weight:750;
}

.outbound-recipient-select-visible{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:7px 10px;
  color:#0f172a;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:10px;
  font-size:14px;
  font-weight:750;
}

.outbound-recipient-checkbox,
.outbound-recipient-select-visible input{
  width:17px;
  height:17px;
  accent-color:#2563eb;
}

.outbound-recipient-status{
  min-height:20px;
  font-size:13px;
  font-weight:700;
}

.outbound-recipient-status[hidden]{
  display:none;
}

.outbound-recipient-table-wrap{
  width:100%;
  min-width:0;
  overflow-x:auto;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
}

.outbound-recipient-table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
  color:#0f172a;
  font-size:14px;
}

.outbound-recipient-table th,
.outbound-recipient-table td{
  padding:10px 12px;
  border-bottom:1px solid #edf2f7;
  text-align:left;
  vertical-align:middle;
}

.outbound-recipient-table th{
  color:#475569;
  background:#f8fafc;
  font-size:12px;
  font-weight:850;
  text-transform:uppercase;
}

.outbound-recipient-table tr:last-child td{
  border-bottom:0;
}

.outbound-recipient-check-col{
  width:56px;
}

.outbound-recipient-table .is-disabled,
.outbound-recipient-card.is-disabled{
  color:#64748b;
  background:#fbfdff;
}

.outbound-recipient-link{
  color:inherit;
  font-weight:750;
  text-decoration:none;
  text-underline-offset:3px;
  overflow-wrap:anywhere;
}

.outbound-recipient-link:hover,
.outbound-recipient-link:focus-visible{
  color:#0f766e;
  text-decoration:underline;
  outline:none;
}

.outbound-recipient-cards{
  display:none;
}

@media (max-width: 720px){
  .outbound-recipient-header{
    display:block;
  }

  .outbound-recipient-filters{
    align-items:stretch;
    padding:12px;
  }

  .outbound-recipient-filters label{
    flex:1 1 100%;
    min-width:0;
  }

  .outbound-composer,
  .outbound-preview{
    padding:12px;
  }

  .outbound-preview__header{
    display:grid;
    align-items:stretch;
  }

  .outbound-tab{
    flex:1 1 auto;
  }

  .outbound-form-actions{
    display:grid;
  }

  .outbound-provider-panel{
    flex-direction:column;
    padding:12px;
  }

  .outbound-provider-panel__actions,
  .outbound-provider-panel__actions .btn{
    width:100%;
  }

  .outbound-recipient-summary,
  .outbound-recipient-actions{
    align-items:stretch;
  }

  .outbound-recipient-count,
  .outbound-recipient-select-visible{
    flex:1 1 auto;
    justify-content:center;
  }

  .outbound-recipient-table-wrap{
    display:none;
  }

  .outbound-recipient-cards{
    display:grid;
    gap:10px;
  }

  .outbound-recipient-card{
    display:grid;
    gap:9px;
    min-width:0;
    padding:12px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#fff;
  }

  .outbound-recipient-card__top{
    display:flex;
    align-items:flex-start;
    gap:10px;
    min-width:0;
  }

  .outbound-recipient-card__title{
    min-width:0;
    font-size:15px;
    line-height:1.3;
  }

  .outbound-recipient-card__line{
    display:grid;
    grid-template-columns:minmax(92px, 36%) minmax(0, 1fr);
    gap:10px;
    min-width:0;
    color:#475569;
    font-size:13px;
  }

  .outbound-recipient-card__line strong{
    min-width:0;
    color:#0f172a;
    font-weight:750;
    overflow-wrap:anywhere;
  }
}

.transactions-report__notice p{
  margin:0 0 8px;
}

.transactions-report__omitted-list{
  margin:0;
  padding-left:20px;
}

.transactions-report__omitted-list a{
  color:#7c2d12;
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:2px;
}

.transactions-report__month{
  margin-bottom:22px;
  page-break-inside:avoid;
}

.transactions-report__month-heading{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
}

.transactions-report__month-heading h2,
.transactions-report__annual-total h2,
.transactions-report__empty h2{
  margin:0;
  font-size:20px;
}

.transactions-report__month-heading span{
  color:#6b7280;
  font-weight:700;
}

.transactions-report__table-wrap{
  overflow-x:visible;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
}

.transactions-report__table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  font-size:13px;
}

.transactions-col-contact{
  width:15%;
}

.transactions-col-type{
  width:8%;
}

.transactions-col-address{
  width:22%;
}

.transactions-col-state{
  width:10%;
}

.transactions-col-amount{
  width:10%;
}

.transactions-col-date{
  width:11%;
}

.transactions-col-percent{
  width:7%;
}

.transactions-col-commission{
  width:10%;
}

.transactions-col-paid{
  width:7%;
}

.transactions-report__table th,
.transactions-report__table td{
  min-width:0;
  padding:.75rem .6rem;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
  vertical-align:top;
  overflow-wrap:normal;
  word-break:normal;
}

.transactions-report__table th{
  background:#f9fafb;
  color:#374151;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0;
  line-height:1.2;
  white-space:normal;
  overflow-wrap:break-word;
  word-break:normal;
  vertical-align:top;
}

.transactions-report__table .amount{
  text-align:right;
  white-space:nowrap;
}

.transactions-report__table td:nth-child(7){
  white-space:nowrap;
}

.transactions-report__table td:nth-child(1),
.transactions-report__table td:nth-child(2),
.transactions-report__table td:nth-child(3),
.transactions-report__table td:nth-child(6),
.transactions-report__table td:nth-child(9):not(.transactions-report__paid-cell){
  white-space:normal;
  overflow-wrap:anywhere;
}

.transactions-report__state-cell,
.transactions-report__paid-cell{
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:keep-all;
}

.transactions-report__month-row th{
  padding:12px 14px;
  color:#111827;
  background:#eef2ff;
  border-top:1px solid #c7d2fe;
  border-bottom:1px solid #c7d2fe;
  text-transform:none;
  font-size:14px;
  letter-spacing:0;
}

.transactions-report__month-row-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.transactions-report__month-name{
  font-weight:850;
}

.transactions-report__month-count{
  color:#4b5563;
  font-weight:750;
  white-space:nowrap;
}

.transactions-contact-link{
  color:inherit;
  font:inherit;
  text-decoration:none;
}

.transactions-contact-link:hover{
  color:inherit;
  text-decoration:underline;
  text-underline-offset:.15em;
}

.transactions-contact-link:focus-visible{
  color:inherit;
  text-decoration:underline;
  text-underline-offset:.15em;
  outline:2px solid currentColor;
  outline-offset:2px;
}

.transactions-report__state{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  gap:6px;
  max-width:100%;
  inline-size:max-content;
  padding:4px 9px;
  border:2px solid currentColor;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:keep-all;
  line-height:1.15;
}

.transactions-report__state::before{
  content:"";
  flex:0 0 auto;
  width:7px;
  height:7px;
  border-radius:50%;
  background:currentColor;
}

.transactions-report__state--sold{
  color:#1d4ed8;
  background:#eff6ff;
}

.transactions-report__state--notarized{
  color:#047857;
  background:#ecfdf5;
  font-size:10px;
}

.transactions-report__subtotal td{
  font-weight:800;
  background:#f9fafb;
  border-top:2px solid #d1d5db;
  border-bottom:0;
}

.transactions-report__paid-stamp{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  max-width:100%;
  inline-size:max-content;
  padding:3px 8px;
  border:2px solid #15803d;
  border-radius:7px;
  color:#166534;
  background:rgba(34,197,94,.08);
  font-size:11px;
  font-weight:900;
  line-height:1;
  letter-spacing:0;
  text-transform:uppercase;
  transform:rotate(-4deg);
  transform-origin:center;
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:keep-all;
}

.transactions-report__not-paid{
  display:inline-flex;
  align-items:center;
  flex-shrink:0;
  max-width:100%;
  inline-size:max-content;
  color:#374151;
  font-weight:650;
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:keep-all;
}

.transactions-report__annual-total,
.transactions-report__empty{
  padding:18px;
  margin-top:18px;
}

.transactions-report__annual-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:12px;
}

.transactions-report__empty p{
  margin:8px 0 0;
  color:#6b7280;
}

@media (max-width: 768px){
  .crm-report-nav-link{
    display:none;
  }

  .transactions-report__hero,
  .transactions-report__annual-grid{
    grid-template-columns:1fr;
  }

  .crm-report-header{
    display:grid;
  }

  .transactions-report__print-btn{
    width:100%;
    justify-content:center;
  }
}

@media print{
  @page{
    margin:14mm 10mm;
  }

  html,
  body{
    background:#fff !important;
    color:#111 !important;
  }

  .app-header,
  .sidebar,
  .crm-mobile-footer,
  .transactions-report__filters,
  .transactions-report__print-btn,
  .transactions-report__screen-header .muted,
  #ac-portal-menu,
  dialog{
    display:none !important;
  }

  .layout,
  .layout--nosidebar,
  .content,
  .content-full,
  .content-inner,
  .page,
  .page--wide{
    display:block !important;
    width:100% !important;
    max-width:none !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
  }

  .transactions-report__screen-header{
    display:block;
    margin-bottom:10px;
  }

  .transactions-report__screen-header h1{
    margin:0 0 6px;
    color:#111 !important;
  }

  .transactions-report__print-summary{
    display:flex;
    flex-wrap:wrap;
    gap:8px 16px;
    margin:0 0 12px;
    font-size:12px;
  }

  .transactions-report__hero,
  .transactions-report__annual-grid{
    grid-template-columns:repeat(3, 1fr);
    gap:8px;
  }

  .transactions-report__metric,
  .transactions-report__annual-total,
  .transactions-report__empty,
  .transactions-report__notice,
  .transactions-report__table-wrap{
    box-shadow:none !important;
    border-color:#999 !important;
    background:#fff !important;
  }

  .transactions-report__metric{
    padding:9px;
  }

  .transactions-report__metric strong,
  .transactions-report__annual-grid strong{
    font-size:16px;
  }

  .transactions-report__month{
    break-inside:avoid;
    page-break-inside:avoid;
  }

  .transactions-report__month-heading{
    break-after:avoid;
    page-break-after:avoid;
  }

  .transactions-report__table-wrap{
    overflow:visible;
    border-radius:0;
  }

  .transactions-report__table{
    width:100%;
    min-width:0;
    font-size:10px;
  }

  .transactions-col-contact{
    width:14%;
  }

  .transactions-col-type{
    width:8%;
  }

  .transactions-col-address{
    width:20%;
  }

  .transactions-col-state{
    width:12%;
  }

  .transactions-col-amount{
    width:10%;
  }

  .transactions-col-date{
    width:10%;
  }

  .transactions-col-percent{
    width:7%;
  }

  .transactions-col-commission{
    width:11%;
  }

  .transactions-col-paid{
    width:8%;
  }

  .transactions-contact-link{
    color:#111 !important;
    text-decoration:none !important;
  }

  .transactions-report__table thead{
    display:table-header-group;
  }

  .transactions-report__table tr{
    break-inside:avoid;
    page-break-inside:avoid;
  }

  .transactions-report__month-row{
    break-after:avoid;
    page-break-after:avoid;
  }

  .transactions-report__subtotal{
    break-inside:avoid;
    page-break-inside:avoid;
  }

  .transactions-report__table th,
  .transactions-report__table td{
    padding:4px;
  }

  .transactions-report__state-cell,
  .transactions-report__paid-cell{
    min-width:56px;
  }

  .transactions-report__table th{
    white-space:normal;
    overflow-wrap:break-word;
    word-break:normal;
  }

  .transactions-report__table th,
  .transactions-report__month-row th,
  .transactions-report__subtotal td{
    background:#fff !important;
  }

  .transactions-report__month-row th{
    border-top:1px solid #999 !important;
    border-bottom:1px solid #999 !important;
  }

  .transactions-report__state{
    color:#111 !important;
    background:#fff !important;
    border-style:solid;
    max-width:none;
  }

  .transactions-report__paid-stamp{
    color:#111 !important;
    background:#fff !important;
    border-color:#111 !important;
    max-width:none;
  }

  .transactions-report__not-paid{
    color:#111 !important;
    max-width:none;
  }

  .transactions-report__omitted-list a{
    color:#111 !important;
    text-decoration:none;
  }

  .transactions-report a[href]::after{
    content:"" !important;
  }

  .transactions-report__state--sold{
    border-width:1px;
  }

  .transactions-report__state--notarized{
    border-width:2px;
  }
}

#ac-portal-menu .suggest-meta{
  opacity:.75;
  font-size:13px;
  line-height:1.28;
}

#ac-portal-menu .suggest-item{
  padding:12px 13px;
}

#ac-portal-menu .suggest-title{
  font-size:15.5px;
  font-weight:650;
  line-height:1.25;
}

@media (max-width: 640px){
  #ac-portal-menu .suggest-title{
    font-size:1rem;
    line-height:1.28;
  }

  #ac-portal-menu .suggest-meta{
    font-size:.9rem;
    line-height:1.28;
  }
}

.crm-dashboard-grid{
  align-items:start;
  animation:crmFadeIn .28s ease both;
}

@media (min-width: 1200px){
  .crm-dashboard-grid{
    grid-template-columns:repeat(12, minmax(0, 1fr));
  }

  .crm-dashboard-grid > .span-2{
    grid-column:1 / -1;
  }

  .crm-dashboard-grid > .dashboard-card--one-third{
    grid-column:span 4;
  }
}

@media (min-width: 768px) and (max-width: 1199px){
  .crm-dashboard-grid > .dashboard-card--one-third{
    grid-column:1 / -1;
  }
}

.crm-card.field-card{
  overflow:hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(248,250,252,.86)),
    #ffffff;
  border:1px solid var(--crm-border);
  border-radius:16px;
  box-shadow:var(--crm-shadow);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.crm-card.field-card:hover{
  transform:translateY(-2px);
  border-color:rgba(100,116,139,.36);
  box-shadow:var(--crm-shadow-hover);
}

.crm-card .field-card__header{
  padding:16px 18px;
  background:linear-gradient(135deg, rgba(239,246,255,.88), rgba(255,255,255,.76));
  border-bottom:1px solid rgba(148,163,184,.20);
}

.crm-card .field-card__title{
  display:flex;
  align-items:center;
  gap:8px;
  color:#0f172a;
  font-size:15px;
  font-weight:850;
}

.crm-card .field-card__actions{
  gap:8px;
}

.crm-card .field-card__body{
  padding:18px;
  gap:12px;
}

.crm-card--today{
  border-color:rgba(37,99,235,.24);
}

.crm-card--today .field-card__header{
  background:linear-gradient(135deg, rgba(219,234,254,.92), rgba(255,255,255,.78));
}

.crm-card--tomorrow .field-card__header{
  background:linear-gradient(135deg, rgba(236,253,245,.88), rgba(255,255,255,.78));
}

.crm-card--week .field-card__header,
.crm-card--month .field-card__header{
  background:linear-gradient(135deg, rgba(241,245,249,.94), rgba(255,255,255,.78));
}

.crm-card--past{
  opacity:.88;
}

.crm-card--past .field-card__header{
  background:linear-gradient(135deg, rgba(248,250,252,.96), rgba(255,255,255,.78));
}

.crm-card--inbox{
  border-color:rgba(225,29,72,.22);
  box-shadow:0 20px 58px rgba(159,18,57,.10);
}

.crm-card--inbox .field-card__header{
  background:linear-gradient(135deg, rgba(255,241,242,.94), rgba(255,255,255,.80));
}

.dashboard-secondary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start;}
.dashboard-secondary-grid>.field-card{min-width:0;}
.crm-card--todos .field-card__body{display:grid;gap:12px;}
.todo-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.crm-card--outbound-communications .field-card__body{display:grid;gap:12px;}
.outbound-dashboard-card{display:grid;gap:12px;}
.outbound-dashboard-actions{display:flex;justify-content:flex-end;}
.outbound-dashboard-list{display:grid;gap:8px;}
.outbound-dashboard-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start;padding:9px 10px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;text-decoration:none;color:inherit;}
.outbound-dashboard-row:hover{background:#f8fafc;border-color:#cbd5e1;}
.outbound-dashboard-row:focus-visible{outline:2px solid #2563eb;outline-offset:2px;}
.outbound-dashboard-row__main{min-width:0;display:grid;gap:3px;}
.outbound-dashboard-row__title{min-width:0;font-size:.9rem;font-weight:750;color:#111827;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.outbound-dashboard-row__meta{min-width:0;font-size:.78rem;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.outbound-dashboard-row__side{display:grid;justify-items:end;gap:4px;}
.outbound-dashboard-status{font-size:.68rem;padding:2px 6px;line-height:1.2;background:#eef2ff;color:#3730a3;border-color:#c7d2fe;white-space:nowrap;}
.outbound-dashboard-date{font-size:.72rem;color:#64748b;white-space:nowrap;}
.outbound-dashboard-empty{font-size:.86rem;padding:4px 0;}
.todo-opportunity-groups{display:grid;gap:14px;}
.todo-group{min-width:0;}
.todo-group__title{margin:0 0 8px;font-size:.86rem;font-weight:800;color:#334155;}
.todo-list{display:grid;gap:6px;}
.todo-row{display:grid;grid-template-columns:18px minmax(0,1fr);gap:9px;align-items:start;padding:8px 9px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;cursor:pointer;}
.todo-row:hover{background:#f8fafc;border-color:#cbd5e1;}
.todo-row:focus-visible{outline:2px solid #2563eb;outline-offset:2px;}
.todo-row.is-completed{opacity:.68;}
.todo-row.is-completed .todo-row__title{text-decoration:line-through;}
.todo-row.is-overdue{border-color:#fecaca;background:#fff7f7;}
.todo-row__check{width:16px;height:16px;margin-top:2px;}
.todo-row__body{min-width:0;display:grid;gap:3px;}
.todo-row__main{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap;}
.todo-row__title{min-width:0;max-width:100%;font-size:.9rem;font-weight:750;color:#111827;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.todo-row__opp,.todo-row__note{min-width:0;font-size:.78rem;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.todo-row__opp{text-decoration:none;}
.todo-row__opp:hover{color:#1d4ed8;text-decoration:underline;}
.todo-badge{font-size:.68rem;padding:2px 6px;line-height:1.2;}
.todo-badge--urgent{background:#fff7ed;color:#9a3412;border-color:#fed7aa;}
.todo-badge--overdue{background:#fee2e2;color:#991b1b;border-color:#fecaca;}
.todo-empty{font-size:.86rem;padding:4px 0;}
.todo-recent{border-top:1px solid #e5e7eb;padding-top:10px;}
.todo-tab-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.todo-dialog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.todo-dialog-field--full{grid-column:1 / -1;}
.todo-clear-opportunity{margin-top:6px;}
.todo-recommendations__list{display:flex;flex-wrap:wrap;gap:6px;}
.todo-recommendation{border:1px solid #dbe2ea;border-radius:8px;background:#fff;padding:6px 8px;text-align:left;cursor:pointer;}
.todo-recommendation:hover{background:#f8fafc;border-color:#bfdbfe;}
.todo-recommendation span,.todo-recommendation small{display:block;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.todo-recommendation span{font-size:.82rem;font-weight:750;color:#111827;}
.todo-recommendation small{margin-top:1px;color:#64748b;}
.todo-dialog-actions{justify-content:flex-end;}
.todo-dialog-actions [data-todo-delete]{margin-right:auto;}

@media (max-width: 760px){
  .dashboard-secondary-grid,.todo-dashboard-grid,.todo-dialog-grid{grid-template-columns:1fr;}
  .outbound-dashboard-row{grid-template-columns:1fr;}
  .outbound-dashboard-row__side{justify-items:start;}
  .outbound-dashboard-row__title,.outbound-dashboard-row__meta{white-space:normal;}
  .todo-row__title{white-space:normal;}
}

.crm-card--opportunity-mix{
  display:flex;
  flex-direction:column;
  min-height:clamp(360px, 30vw, 420px);
  border-color:rgba(37,99,235,.20);
}

.crm-card--opportunity-mix .field-card__header{
  flex:0 0 auto;
  background:linear-gradient(135deg, rgba(239,246,255,.94), rgba(255,255,255,.82));
}

.crm-card--opportunity-mix .field-card__body{
  flex:1 1 auto;
  min-height:0;
  padding:12px;
}

.opportunity-mix-widget{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:300px;
  min-width:0;
}

.opportunity-mix-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:center;
  gap:4px;
  width:auto;
  max-width:100%;
  margin:0 auto;
  padding:4px;
  background:var(--surface-muted, rgba(241,245,249,.90));
  border:1px solid var(--border-subtle, rgba(148,163,184,.28));
  border-radius:999px;
}

.opportunity-mix-tab{
  min-height:32px;
  padding:7px 11px;
  color:#475569;
  font:inherit;
  font-size:12px;
  font-weight:800;
  line-height:1.15;
  white-space:nowrap;
  background:transparent;
  border:0;
  border-radius:999px;
  cursor:pointer;
}

.opportunity-mix-tab:hover,
.opportunity-mix-tab:focus-visible{
  color:#1d4ed8;
  background:#ffffff;
  outline:0;
}

.opportunity-mix-tab.is-active{
  color:var(--text-strong, #0f172a);
  background:#ffffff;
  box-shadow:0 1px 4px rgba(15,23,42,.08);
}

.opportunity-mix-layout{
  display:grid;
  grid-template-columns:minmax(320px, 1fr) minmax(280px, .9fr);
  align-items:center;
  gap:2rem;
  flex:1 1 auto;
  min-width:0;
}

.dashboard-card--one-third .opportunity-mix-layout{
  grid-template-columns:1fr;
  justify-items:center;
  gap:10px;
  min-height:0;
}

.dashboard-card--one-third .opportunity-mix-widget{
  gap:8px;
}

.dashboard-card--one-third .opportunity-mix-legend{
  width:100%;
}

.opportunity-mix-chart-column,
.opportunity-mix-legend-column{
  display:flex;
  align-items:center;
  min-width:0;
  height:100%;
}

.opportunity-mix-chart-column{
  justify-content:center;
}

.opportunity-mix-legend-column{
  justify-content:stretch;
}

.opportunity-mix-chart-wrap{
  position:relative;
  display:grid;
  place-items:center;
  width:min(480px, 100%, 78vw);
  aspect-ratio:1;
  margin:8px auto;
  min-width:0;
}

.dashboard-card--one-third .opportunity-mix-chart-wrap{
  width:min(205px, 54vw, 58%);
  margin:2px auto;
}

.dashboard-card--one-third .opportunity-mix-row{
  padding:7px 9px;
}

.dashboard-card--one-third .opportunity-mix-row strong{
  font-size:12px;
}

.dashboard-card--one-third .opportunity-mix-row span{
  font-size:11px;
}

.opportunity-mix-chart{
  --buyer-share:50%;
  --opportunity-mix-buyer:#2A5ADE;
  --opportunity-mix-seller:#25A1A6;
  width:100%;
  height:100%;
  border-radius:50%;
  background:
    conic-gradient(
      var(--opportunity-mix-buyer) 0 var(--buyer-share),
      var(--opportunity-mix-seller) var(--buyer-share) 100%
    );
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.65), 0 18px 38px rgba(15,23,42,.12);
}

.opportunity-mix-chart-wrap canvas,
.opportunity-mix-chart-wrap svg{
  display:block;
  width:100% !important;
  height:100% !important;
}

.opportunity-mix-chart.is-empty-metric{
  background:conic-gradient(#e2e8f0 0 100%);
}

.opportunity-mix-chart-center{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:1rem;
  text-align:center;
  pointer-events:none;
}

.opportunity-mix-chart-center::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  z-index:0;
  width:58%;
  aspect-ratio:1;
  background:#ffffff;
  border:1px solid rgba(148,163,184,.22);
  border-radius:50%;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  transform:translate(-50%, -50%);
}

.opportunity-mix-chart-center > *{
  position:relative;
  z-index:1;
}

.donut-center-title{
  color:#334155;
  font-size:.95rem;
  font-weight:700;
  line-height:1.05;
}

.donut-center-value{
  max-width:none;
  overflow:visible;
  color:#0f172a;
  font-size:clamp(2rem, 4vw, 3rem);
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  text-overflow:unset;
}

.donut-center-subtitle{
  color:#64748b;
  font-size:.95rem;
  font-weight:600;
  line-height:1.05;
}

.opportunity-mix-legend{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
  height:100%;
  min-width:0;
}

.opportunity-mix-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  grid-template-rows:1fr auto;
  gap:8px 12px;
  align-items:center;
  flex:1 1 0;
  min-width:0;
  padding:12px 14px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(148,163,184,.20);
  border-radius:14px;
}

.opportunity-mix-row-content{
  display:grid;
  grid-template-columns:12px minmax(0, 1fr);
  gap:10px;
  align-items:flex-start;
  min-width:0;
}

.opportunity-mix-dot{
  width:10px;
  height:10px;
  margin-top:4px;
  background:#2A5ADE;
  border-radius:999px;
}

.opportunity-mix-row--seller .opportunity-mix-dot{
  background:#25A1A6;
}

.opportunity-mix-row strong,
.opportunity-mix-row span{
  display:block;
  min-width:0;
}

.opportunity-mix-row strong{
  color:#0f172a;
  font-size:13px;
  font-weight:900;
  line-height:1.25;
}

.opportunity-mix-row span{
  margin-top:2px;
  color:#64748b;
  font-size:12px;
  font-weight:750;
  line-height:1.2;
  white-space:pre-line;
}

.opportunity-mix-percent{
  align-self:center;
  justify-self:end;
  padding:4px 8px;
  color:#1e3a8a;
  font-size:13px;
  font-weight:900;
  line-height:1;
  background:#dbeafe;
  border:1px solid #bfdbfe;
  border-radius:999px;
}

.opportunity-mix-progress{
  display:block;
  grid-column:1 / -1;
  width:100%;
  height:4px;
  margin-top:0;
  overflow:hidden;
  color:inherit;
  font-size:0;
  font-weight:normal;
  line-height:0;
  white-space:normal;
  background:rgba(148,163,184,.18);
  border-radius:999px;
}

.opportunity-mix-progress-fill{
  display:block;
  width:0;
  height:100%;
  margin-top:0;
  font-size:0;
  line-height:0;
  white-space:normal;
  background:#2A5ADE;
  border-radius:inherit;
  transition:width .28s ease;
}

.opportunity-mix-row--seller .opportunity-mix-progress-fill{
  background:#25A1A6;
}

.opportunity-mix-empty,
.opportunity-mix-no-data{
  padding:16px;
  text-align:center;
  background:rgba(248,250,252,.84);
  border:1px dashed rgba(148,163,184,.34);
  border-radius:12px;
}

@media (min-width: 1200px){
  .crm-card--monthly-revenue{
    aspect-ratio:2 / 1.5;
  }
}

@media (min-width: 992px){
  .dashboard-card--one-third .opportunity-mix-layout{
    grid-template-columns:minmax(150px, 1fr) minmax(160px, .95fr);
    justify-items:stretch;
    gap:1rem;
  }

  .dashboard-card--one-third .opportunity-mix-widget{
    gap:10px;
  }

  .dashboard-card--one-third .opportunity-mix-chart-wrap{
    width:min(205px, 100%);
    margin:auto;
  }

  .dashboard-card--one-third .opportunity-mix-row{
    padding:10px 12px;
    border-radius:14px;
  }

  .dashboard-card--one-third .opportunity-mix-row strong{
    font-size:13px;
  }

  .dashboard-card--one-third .opportunity-mix-row span{
    font-size:12px;
  }
}

@media (max-width: 991px){
  .opportunity-mix-layout{
    grid-template-columns:1fr;
    justify-items:center;
    gap:14px;
  }

  .opportunity-mix-chart-column,
  .opportunity-mix-legend-column{
    width:100%;
    height:auto;
  }
}

@media (min-width: 900px) and (max-width: 1280px){
  .crm-card--opportunity-mix.dashboard-card--one-third .field-card__header{
    padding:10px 12px;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .field-card__title{
    gap:6px;
    min-width:0;
    font-size:clamp(13px, 1vw, 14px);
    line-height:1.15;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .field-card__body{
    padding:9px;
    gap:8px;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-widget{
    gap:8px;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-toggle{
    gap:3px;
    padding:3px;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-tab{
    min-height:28px;
    padding:6px 8px;
    font-size:clamp(10.5px, .85vw, 11.5px);
    line-height:1.1;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-layout{
    grid-template-columns:minmax(118px, .82fr) minmax(0, 1fr);
    justify-items:stretch;
    gap:8px;
    width:100%;
    min-width:0;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-chart-column,
  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-legend-column{
    width:100%;
    min-width:0;
    height:100%;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-chart-wrap{
    width:min(176px, 100%);
    margin:auto;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-chart-center{
    gap:4px;
    padding:.65rem;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .donut-center-title,
  .crm-card--opportunity-mix.dashboard-card--one-third .donut-center-subtitle{
    font-size:clamp(10px, .82vw, 11px);
    line-height:1;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .donut-center-value{
    max-width:72%;
    overflow:hidden;
    font-size:clamp(1.25rem, 2.1vw, 1.8rem);
    text-overflow:ellipsis;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-legend{
    gap:7px;
    min-width:0;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-row{
    gap:7px 8px;
    min-width:0;
    padding:8px;
    border-radius:13px;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-row-content{
    grid-template-columns:9px minmax(0, 1fr);
    gap:7px;
    min-width:0;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-row-body{
    min-width:0;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-dot{
    width:8px;
    height:8px;
    margin-top:3px;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-row-body strong{
    overflow:hidden;
    font-size:clamp(11px, .9vw, 12px);
    line-height:1.15;
    white-space:nowrap;
    text-overflow:ellipsis;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-row-body span{
    margin-top:2px;
    overflow-wrap:normal;
    font-size:clamp(10px, .82vw, 11px);
    line-height:1.22;
  }

  .crm-card--opportunity-mix.dashboard-card--one-third .opportunity-mix-percent{
    padding:3px 6px;
    font-size:clamp(10.5px, .85vw, 11.5px);
    line-height:1;
    white-space:nowrap;
  }
}

.crm-card--pipeline-funnel{
  display:flex;
  flex-direction:column;
  min-height:clamp(360px, 30vw, 420px);
  border-color:rgba(15,111,120,.20);
}

.crm-card--pipeline-funnel .field-card__header{
  background:linear-gradient(135deg, rgba(240,253,250,.96), rgba(255,255,255,.82));
}

.crm-card--pipeline-funnel .field-card__body{
  flex:1 1 auto;
  min-height:0;
  padding:12px;
}

.pipeline-funnel-widget{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:300px;
  min-width:0;
}

.pipeline-funnel-subtitle{
  margin:0;
  color:#64748b;
  font-size:12px;
  font-weight:750;
  line-height:1.25;
}

.pipeline-funnel-body{
  display:grid;
  grid-template-rows:repeat(6, minmax(38px, auto));
  gap:5px;
  flex:1 1 auto;
  min-width:0;
  min-height:0;
}

.pipeline-funnel-row{
  --pipeline-tier-color:#7ED9DA;
  display:grid;
  grid-template-columns:minmax(82px, 34%) minmax(0, 1fr);
  align-items:stretch;
  gap:10px;
  min-width:0;
  min-height:38px;
}

.pipeline-funnel-row--2{ --pipeline-tier-color:#63CDD0; }
.pipeline-funnel-row--3{ --pipeline-tier-color:#4DBFC4; }
.pipeline-funnel-row--4{ --pipeline-tier-color:#36B1B8; }
.pipeline-funnel-row--5{ --pipeline-tier-color:#20989F; }
.pipeline-funnel-row--6{ --pipeline-tier-color:#0F6F78; }

.pipeline-funnel-segment-wrap{
  display:flex;
  align-items:stretch;
  justify-content:center;
  min-width:0;
  min-height:0;
}

.pipeline-funnel-segment{
  align-self:center;
  width:var(--pipeline-tier-width, 100%);
  min-width:20px;
  height:86%;
  background:
    linear-gradient(135deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.14) 22%, rgba(255,255,255,0) 48%),
    linear-gradient(180deg, color-mix(in srgb, var(--pipeline-tier-color) 88%, #ffffff 12%), var(--pipeline-tier-color) 64%, color-mix(in srgb, var(--pipeline-tier-color) 86%, #062f35 14%));
  border:1px solid color-mix(in srgb, var(--pipeline-tier-color) 45%, #ffffff 55%);
  border-radius:9px;
  box-shadow:
    0 9px 16px color-mix(in srgb, var(--pipeline-tier-color) 25%, transparent),
    inset 0 1px 0 rgba(255,255,255,.38);
  clip-path:polygon(0 0, 100% 0, 93% 100%, 7% 100%);
}

.pipeline-tier-card{
  display:flex;
  flex-direction:column;
  justify-content:center;
  position:relative;
  min-width:0;
  min-height:0;
  padding:5px 7px 5px 10px;
  overflow:hidden;
  background:#ffffff;
  border:1px solid rgba(148,163,184,.18);
  border-radius:10px;
}

.pipeline-tier-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:var(--pipeline-tier-color);
  border-radius:10px 0 0 10px;
}

.pipeline-funnel-row__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  min-width:0;
}

.pipeline-funnel-row__top > strong{
  min-width:0;
  color:#0f172a;
  font-size:12px;
  font-weight:900;
  line-height:1.15;
  overflow-wrap:anywhere;
}

.pipeline-funnel-count{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:20px;
  padding:3px 7px;
  color:color-mix(in srgb, var(--pipeline-tier-color) 72%, #0f172a 28%);
  font-size:10px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
  background:color-mix(in srgb, var(--pipeline-tier-color) 18%, #ffffff 82%);
  border:1px solid color-mix(in srgb, var(--pipeline-tier-color) 32%, #ffffff 68%);
  border-radius:999px;
}

.pipeline-funnel-values{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:5px;
  margin-top:3px;
  min-width:0;
}

.pipeline-funnel-values span,
.pipeline-funnel-values em,
.pipeline-funnel-values strong{
  display:block;
  min-width:0;
}

.pipeline-funnel-values em{
  color:#64748b;
  font-size:9px;
  font-style:normal;
  font-weight:850;
  letter-spacing:.04em;
  line-height:1.1;
  text-transform:uppercase;
}

.pipeline-funnel-values strong{
  color:#0f172a;
  font-size:12px;
  font-weight:900;
  line-height:1.15;
  white-space:nowrap;
  overflow-wrap:anywhere;
}

.pipeline-funnel-values span:last-child strong{
  color:var(--pipeline-tier-color);
}

.pipeline-funnel-empty{
  padding:18px;
  text-align:center;
  background:rgba(248,250,252,.84);
  border:1px dashed rgba(20,184,166,.34);
  border-radius:12px;
}

@media (min-width: 900px) and (max-width: 1280px){
  .crm-card--pipeline-funnel.dashboard-card--one-third .field-card__header{
    padding:8px 10px;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .field-card__title{
    gap:5px;
    min-width:0;
    font-size:clamp(12px, .95vw, 13px);
    line-height:1.1;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .field-card__body{
    padding:7px;
    gap:5px;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-widget{
    gap:4px;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-subtitle{
    font-size:clamp(9.5px, .78vw, 10.5px);
    line-height:1.1;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-body{
    grid-template-rows:repeat(6, minmax(38px, auto));
    gap:3px;
    min-width:0;
    min-height:auto;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-row{
    grid-template-columns:minmax(54px, 28%) minmax(0, 1fr);
    align-items:stretch;
    gap:5px;
    min-width:0;
    min-height:38px;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-segment-wrap{
    min-width:0;
    min-height:0;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-segment{
    min-width:16px;
    height:86%;
    border-radius:7px;
    box-shadow:
      0 5px 10px color-mix(in srgb, var(--pipeline-tier-color) 18%, transparent),
      inset 0 1px 0 rgba(255,255,255,.32);
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-tier-card{
    min-width:0;
    min-height:0;
    padding:3px 5px 3px 7px;
    overflow:visible;
    border-radius:8px;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-tier-card::before{
    width:3px;
    border-radius:8px 0 0 8px;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-row__top{
    gap:4px;
    min-width:0;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-row__top > strong{
    min-width:0;
    font-size:clamp(9.5px, .78vw, 10.5px);
    line-height:1.08;
    overflow-wrap:anywhere;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-count{
    min-height:15px;
    padding:1px 4px;
    font-size:clamp(7.5px, .62vw, 8.5px);
    line-height:1;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-values{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:3px;
    margin-top:2px;
    min-width:0;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-values span{
    display:flex;
    align-items:baseline;
    gap:2px;
    min-width:0;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-values em{
    flex:0 0 auto;
    font-size:clamp(6.5px, .54vw, 7.5px);
    letter-spacing:.025em;
    line-height:1.05;
  }

  .crm-card--pipeline-funnel.dashboard-card--one-third .pipeline-funnel-values strong{
    min-width:0;
    font-size:clamp(8.5px, .7vw, 9.5px);
    line-height:1.08;
    white-space:nowrap;
    overflow-wrap:normal;
  }
}

.crm-card--monthly-revenue{
  display:flex;
  flex-direction:column;
  border-color:rgba(42,90,222,.20);
}

.crm-card--monthly-revenue .field-card__header{
  background:linear-gradient(135deg, rgba(238,242,255,.96), rgba(255,255,255,.82));
}

.crm-card--monthly-revenue .field-card__body{
  flex:1 1 auto;
  min-height:0;
  padding:12px;
}

.monthly-revenue-widget{
  display:flex;
  flex-direction:column;
  gap:10px;
  height:100%;
  min-width:0;
}

.monthly-revenue-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}

.monthly-revenue-subtitle{
  margin:0;
  color:#64748b;
  font-size:12px;
  font-weight:750;
  line-height:1.25;
}

.monthly-revenue-legend{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
  min-width:0;
}

.monthly-revenue-legend span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#475569;
  font-size:10px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}

.monthly-revenue-dot{
  width:8px;
  height:8px;
  border-radius:999px;
}

.monthly-revenue-dot--current{ background:#2A5ADE; }
.monthly-revenue-dot--previous{ background:#94a3b8; }

.monthly-revenue-chart-wrap{
  display:grid;
  grid-template-columns:34px minmax(0, 1fr);
  gap:8px;
  flex:1 1 auto;
  min-width:0;
  min-height:0;
  padding:8px 8px 4px;
  background:linear-gradient(180deg, rgba(248,250,252,.72), rgba(255,255,255,.78));
  border:1px solid rgba(148,163,184,.18);
  border-radius:12px;
}

.monthly-revenue-scale{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:0;
  padding:2px 0 18px;
  color:#94a3b8;
  font-size:9px;
  font-weight:850;
  line-height:1;
  text-align:right;
}

.monthly-revenue-chart{
  position:relative;
  display:grid;
  grid-template-columns:repeat(12, minmax(0, 1fr));
  align-items:stretch;
  gap:4px;
  min-width:0;
  min-height:0;
}

.monthly-revenue-chart::before{
  content:"";
  position:absolute;
  inset:0 0 18px;
  pointer-events:none;
  background:
    linear-gradient(to bottom, rgba(148,163,184,.22) 1px, transparent 1px) 0 0 / 100% 33.333%;
  opacity:.72;
}

.monthly-revenue-month{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-rows:minmax(0, 1fr) 14px;
  gap:4px;
  min-width:0;
  min-height:0;
}

.monthly-revenue-bars{
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:2px;
  min-width:0;
  min-height:0;
}

.monthly-revenue-bar{
  display:block;
  width:min(10px, 45%);
  height:var(--bar-height, 0%);
  border-radius:999px 999px 4px 4px;
  transition:height .22s ease, transform .16s ease, filter .16s ease;
}

.monthly-revenue-bar:hover,
.monthly-revenue-bar:focus-visible{
  filter:saturate(1.08);
  transform:translateY(-1px);
}

.monthly-revenue-bar--current{
  background:
    linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, #4f7cff, #2A5ADE);
  box-shadow:0 8px 16px rgba(42,90,222,.24), inset 0 1px 0 rgba(255,255,255,.36);
}

.monthly-revenue-bar--previous{
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, #cbd5e1, #94a3b8);
  box-shadow:0 7px 14px rgba(100,116,139,.16), inset 0 1px 0 rgba(255,255,255,.34);
}

.monthly-revenue-month strong{
  display:block;
  min-width:0;
  color:#64748b;
  font-size:10px;
  font-weight:900;
  line-height:14px;
  text-align:center;
  white-space:nowrap;
}

.monthly-revenue-summary{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}

.monthly-revenue-summary span{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  padding:8px 10px;
  background:#ffffff;
  border:1px solid rgba(148,163,184,.20);
  border-radius:10px;
}

.monthly-revenue-summary em,
.monthly-revenue-summary strong{
  min-width:0;
  font-style:normal;
  line-height:1;
  white-space:nowrap;
}

.monthly-revenue-summary em{
  color:#64748b;
  font-size:10px;
  font-weight:900;
}

.monthly-revenue-summary strong{
  color:#0f172a;
  font-size:13px;
  font-weight:950;
  overflow:hidden;
  text-overflow:ellipsis;
}

.monthly-revenue-empty{
  padding:18px;
  text-align:center;
  background:rgba(248,250,252,.84);
  border:1px dashed rgba(99,102,241,.28);
  border-radius:12px;
}

.crm-dashboard .tag{
  border-radius:999px;
  font-size:11px;
  letter-spacing:.01em;
}

.crm-dashboard .tabs-table{
  border-collapse:separate;
  border-spacing:0 8px;
}

.crm-dashboard .tabs-table tbody{
  display:grid;
  gap:8px;
}

.crm-dashboard .tabs-table tr{
  display:grid;
  grid-template-columns:70px minmax(0, 1fr);
  column-gap:10px;
  row-gap:2px;
  align-items:start;
  padding:10px;
  background:#ffffff;
  border:1px solid rgba(226,232,240,.95);
  border-radius:12px;
  box-shadow:0 6px 14px rgba(15,23,42,.035);
  transition:transform .14s ease, box-shadow .14s ease, background-color .14s ease, border-color .14s ease;
}

.crm-dashboard .tabs-table tr:hover{
  transform:translateY(-1px);
  background:#f8fbff;
  border-color:#cbd5e1;
  box-shadow:0 10px 20px rgba(15,23,42,.07);
}

.crm-dashboard .tabs-table td{
  display:block;
  padding:0;
  border:0;
  min-width:0;
}

.crm-dashboard .tabs-table td:first-child strong{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:56px;
  min-height:28px;
  padding:3px 7px;
  color:#1e3a8a;
  font-size:12px;
  line-height:1.15;
  background:#eff6ff;
  border:1px solid #dbeafe;
  border-radius:999px;
}

.crm-event-content-cell{
  grid-column:2;
  min-width:0;
  line-height:1.22;
}

.crm-event-top-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}

.crm-event-title-line{
  display:flex;
  align-items:flex-start;
  gap:6px;
  flex:1 1 auto;
  min-width:0;
  line-height:1.22;
}

.crm-event-title-line .icon{
  flex:0 0 auto;
  margin-top:1px;
}

.crm-event-muted{
  margin-top:2px;
  padding-left:22px;
  line-height:1.25;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:auto;
}

.crm-dashboard .tabs-link{
  color:#0f172a;
  font-weight:800;
  text-decoration:none;
  line-height:1.22;
  overflow-wrap:normal;
  word-break:normal;
}

.crm-dashboard .tabs-link.event-title--cancelled{
  text-decoration:line-through;
  opacity:.65;
}

.crm-dashboard .tabs-link:hover{
  color:#2563eb;
  text-decoration:none;
}

.crm-dashboard .tabs-link.event-title--cancelled:hover{
  text-decoration:line-through;
}

.contact-inline{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.contact-inline .quick-actions{
  display:inline-flex;
  gap:4px;
  margin-left:4px;
}

.contact-inline .icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:8px;
}

.crm-event-actions{
  display:grid;
  align-items:start;
  justify-content:flex-end;
  gap:6px;
  flex:0 0 auto;
  margin-left:auto;
}

.crm-event-actions--cols-3{
  grid-template-columns:repeat(3, 30px);
  width:102px;
}

.crm-event-actions--cols-4{
  grid-template-columns:repeat(4, 30px);
  width:138px;
}

.crm-event-action-btn.icon-btn{
  width:30px;
  height:30px;
  padding:0;
  color:#475569;
  background:#ffffff;
  border:1px solid rgba(148,163,184,.32);
  border-radius:8px;
  box-shadow:0 4px 10px rgba(15,23,42,.035);
}

.crm-event-action-btn.icon-btn:hover,
.crm-event-action-btn.icon-btn:focus-visible{
  color:#1d4ed8;
  background:#eff6ff;
  border-color:#bfdbfe;
  box-shadow:0 10px 20px rgba(37,99,235,.10);
  outline:0;
}

.crm-event-map-menu{
  position:fixed;
  z-index:1200;
  display:grid;
  min-width:148px;
  padding:6px;
  background:#ffffff;
  border:1px solid rgba(148,163,184,.36);
  border-radius:10px;
  box-shadow:0 18px 40px rgba(15,23,42,.18);
}

.crm-event-map-menu__item{
  display:flex;
  align-items:center;
  min-height:38px;
  padding:8px 10px;
  color:#0f172a;
  font-size:13px;
  font-weight:800;
  line-height:1.2;
  text-decoration:none;
  border-radius:7px;
}

.crm-event-map-menu__item:hover,
.crm-event-map-menu__item:focus-visible{
  color:#1d4ed8;
  background:#eff6ff;
  outline:0;
}

.section-toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:4px 8px;
  color:#475569;
  font:inherit;
  font-size:12px;
  font-weight:800;
  background:#ffffff;
  border:1px solid rgba(148,163,184,.32);
  border-radius:999px;
  cursor:pointer;
}

.section-toggle__chevron{
  display:inline-block;
  transition:transform .2s ease;
}

.section-toggle[aria-expanded="true"] .section-toggle__chevron{
  transform:rotate(90deg);
}

.field-card--toggle .field-card__header{
  cursor:pointer;
}

.crm-widget-spacer{
  height:12px;
}

.crm-card--inbox .list-widget{
  background:#ffffff;
  border:1px solid rgba(226,232,240,.95);
  border-radius:14px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.crm-card--inbox .list-widget-header{
  background:linear-gradient(135deg, rgba(255,241,242,.82), rgba(255,255,255,.78));
}

.crm-card--inbox .list-widget .list-table th,
.crm-card--inbox .list-widget .list-table td,
.crm-card--inbox .list-widget .table th,
.crm-card--inbox .list-widget .table td{
  border-bottom-color:#edf2f7;
}

.crm-card--inbox .list-widget .list-table tbody tr,
.crm-card--inbox .list-widget .table tbody tr{
  transition:background-color .14s ease;
}

.crm-card--inbox .list-widget .list-table tbody tr:hover td,
.crm-card--inbox .list-widget .table tbody tr:hover{
  background:#fff7ed;
}

.crm-sync-footer{
  margin-top:20px;
  text-align:center;
  color:#64748b;
  font-size:11px;
  opacity:.75;
}

@keyframes crmFadeIn{
  from{ opacity:0; transform:translateY(6px); }
  to{ opacity:1; transform:translateY(0); }
}

@media (max-width: 980px){
  .crm-dashboard-actions{
    justify-content:flex-start;
    width:100%;
  }
}

@media (max-width: 720px){
  .content:has(.page--wide.crm-dashboard){
    padding:8px;
  }

  .content-full:has(.page--wide.crm-dashboard){
    padding:0;
    margin:0;
  }

  .content-inner:has(.page--wide.crm-dashboard){
    padding:0;
    background:transparent;
    border-radius:0;
  }

  .page.page--wide.crm-dashboard{
    padding:0;
    margin:0 !important;
    width:100%;
    min-width:0;
    overflow-x:hidden;
  }

  .crm-dashboard{
    padding:0;
  }

  .crm-dashboard-hero{
    position:sticky;
    top:0;
    z-index:30;
    margin:0 0 12px;
    padding:12px;
    border-radius:16px;
  }

  .crm-dashboard-grid{
    gap:12px;
  }

  .crm-card.field-card{
    width:100%;
    min-width:0;
    border-radius:15px;
  }

  .dashboard-top__row--header{
    align-items:stretch;
  }

  .crm-dashboard-actions,
  .dashboard-board-links{
    display:grid;
    grid-template-columns:1fr;
  }

  .crm-workspace-badge,
  .crm-quick-action,
  .dashboard-add-control{
    width:100%;
    justify-content:center;
  }

  .dashboard-add-control{
    justify-content:space-between;
  }

  .dashboard-add-control__select{
    max-width:none;
    flex:1 1 auto;
  }

  .crm-card .field-card__header,
  .crm-card .field-card__body{
    padding:12px;
  }

  .opportunity-mix-tab{
    min-height:34px;
    padding-inline:10px;
    font-size:12px;
  }

  .opportunity-mix-layout{
    grid-template-columns:1fr;
    justify-items:center;
    gap:14px;
  }

  .opportunity-mix-chart{
    width:100%;
  }

  .opportunity-mix-legend{
    width:100%;
  }

  .opportunity-mix-row{
    padding:11px;
  }

  .pipeline-funnel-body{
    gap:10px;
  }

  .pipeline-funnel-row{
    grid-template-columns:minmax(76px, 30%) minmax(0, 1fr);
    gap:10px;
    min-height:56px;
  }

  .pipeline-funnel-segment{
    border-radius:10px;
  }

  .pipeline-tier-card{
    padding:9px;
  }

  .pipeline-funnel-values strong{
    white-space:normal;
  }

  .crm-card--monthly-revenue .field-card__body{
    min-height:360px;
  }

  .monthly-revenue-widget{
    min-height:336px;
  }

  .monthly-revenue-chart-wrap{
    min-height:210px;
  }

  .crm-dashboard .tabs-table tr{
    grid-template-columns:58px minmax(0, 1fr);
    column-gap:8px;
    row-gap:2px;
    padding:10px;
  }

  .crm-dashboard .tabs-table td:first-child{
    grid-column:1;
  }

  .crm-dashboard .tabs-table td:first-child strong{
    min-width:52px;
  }

  .crm-event-content-cell{
    grid-column:2;
  }

  .crm-event-top-row{
    gap:8px;
  }

  .crm-event-actions{
    gap:6px;
  }

  .crm-event-actions--cols-3{
    grid-template-columns:repeat(3, 34px);
    width:114px;
  }

  .crm-event-actions--cols-4{
    grid-template-columns:repeat(4, 34px);
    width:154px;
  }

  .crm-event-action-btn.icon-btn{
    width:34px;
    height:34px;
  }

  .crm-dashboard .span-2{
    grid-column:span 1;
  }
}

@media (max-width: 768px){
  .crm-dashboard .crm-mobile-duplicate-nav{
    display:none;
  }

  .crm-dashboard .dashboard-add-control__button{
    padding-inline:10px;
  }
}

@media (max-width: 767px){
  .crm-dashboard-grid{
    grid-template-columns:1fr;
  }

  .crm-dashboard-grid > .span-2,
  .crm-dashboard-grid > .dashboard-card--one-third{
    grid-column:1 / -1;
  }
}

/* =====================================================
   CRM Opportunity Form
   ===================================================== */
.opportunity-workspace{
  --opp-ink:#0f172a;
  --opp-muted:#64748b;
  --opp-border:rgba(148,163,184,.28);
  --opp-border-strong:rgba(100,116,139,.34);
  --opp-shadow:0 18px 48px rgba(15,23,42,.08);
  --opp-shadow-hover:0 24px 60px rgba(15,23,42,.12);
  padding:clamp(12px, 2vw, 24px);
  color:var(--opp-ink);
}

.opportunity-hero{
  position:relative;
  z-index:20;
  align-items:flex-start;
  gap:10px;
  margin-bottom:14px;
  padding:14px 16px;
  overflow:visible;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,246,255,.82)),
    #ffffff;
  border:1px solid var(--opp-border);
  border-radius:18px;
  box-shadow:var(--opp-shadow);
}

.opportunity-workspace .opportunity-hero{
  display:flex;
  flex-direction:column;
  align-items:stretch;
}

.opportunity-hero::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:linear-gradient(180deg, #2563eb, #14b8a6);
}

.opportunity-hero__main{
  min-width:0;
  width:100%;
  flex:1 1 auto;
  padding-left:4px;
}

.opportunity-hero__top-row{
  display:block;
}

.opportunity-hero__back{
  min-height:34px;
  margin-bottom:8px;
  padding:.45rem .7rem;
  border-color:rgba(148,163,184,.34);
  background:rgba(255,255,255,.74);
}

.opportunity-hero__eyebrow{
  margin-bottom:4px;
  color:#2563eb;
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.opportunity-workspace .page-header h1{
  display:block;
  max-width:100%;
  margin:0 0 4px;
  color:var(--opp-ink);
  font-size:clamp(1.55rem, 2.6vw, 2.25rem);
  line-height:1.04;
  letter-spacing:0;
}

.opportunity-workspace .muted{
  color:var(--opp-muted);
  line-height:1.35;
}

.opportunity-hero__badges,
.opportunity-board-tags,
.opportunity-hero__actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.opportunity-hero__meta{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  min-width:0;
  margin-top:8px;
  flex-wrap:nowrap;
}

.opportunity-hero__badges{
  flex:0 1 auto;
  min-width:0;
  justify-content:flex-start;
  flex-wrap:wrap;
}

.opportunity-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  flex:0 0 auto;
  border-radius:999px;
  font-size:11px;
  letter-spacing:.01em;
  white-space:nowrap;
}

.opportunity-badge .icon{
  flex:0 0 auto;
}

.opportunity-badge[data-tooltip]{
  position:relative;
  cursor:pointer;
}

.opportunity-badge[data-tooltip]:focus-visible{
  outline:2px solid rgba(37,99,235,.45);
  outline-offset:2px;
}

.opportunity-badge[data-tooltip]::after{
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 8px);
  transform:translateX(-50%) translateY(4px);
  z-index:40;
  width:max-content;
  max-width:min(280px, calc(100vw - 32px));
  padding:7px 9px;
  border-radius:9px;
  background:#0f172a;
  color:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.22);
  font-size:11px;
  font-weight:700;
  line-height:1.25;
  letter-spacing:0;
  white-space:pre-line;
  text-align:left;
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.opportunity-badge[data-tooltip]::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:calc(100% + 3px);
  transform:translateX(-50%);
  z-index:41;
  border:5px solid transparent;
  border-top-color:#0f172a;
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:opacity .14s ease, visibility .14s ease;
}

.opportunity-badge[data-tooltip]:hover::after,
.opportunity-badge[data-tooltip]:focus::after{
  opacity:1;
  transform:translateX(-50%) translateY(0);
  visibility:visible;
}

.opportunity-badge[data-tooltip]:hover::before,
.opportunity-badge[data-tooltip]:focus::before{
  opacity:1;
  visibility:visible;
}

.opportunity-badge--type{
  color:#1e3a8a;
  background:#dbeafe;
  border-color:#bfdbfe;
}

.opportunity-badge--stage{
  color:#115e59;
  background:#ccfbf1;
  border-color:#99f6e4;
}

.hero-pill--step-new{
  background:#60A5FA;
  color:#FFFFFF;
  border-color:#60A5FA;
}

.hero-pill--step-qualified{
  background:#2563EB;
  color:#FFFFFF;
  border-color:#2563EB;
}

.hero-pill--step-consultation-scheduled{
  background:#8B5CF6;
  color:#FFFFFF;
  border-color:#8B5CF6;
}

.hero-pill--step-consultation-done{
  background:#6366F1;
  color:#FFFFFF;
  border-color:#6366F1;
}

.hero-pill--step-contract-sent{
  background:#F59E0B;
  color:#FFFFFF;
  border-color:#F59E0B;
}

.hero-pill--step-contract-signed,
.hero-pill--step-active{
  background:#10B981;
  color:#FFFFFF;
  border-color:#10B981;
}

.hero-pill--step-active-without-contract{
  background:#D97706;
  color:#FFFFFF;
  border-color:#D97706;
}

.hero-pill--step-offer-pending{
  background:#FACC15;
  color:#111827;
  border-color:#FACC15;
}

.hero-pill--step-closed-completed{
  background:#111827;
  color:#FFFFFF;
  border-color:#111827;
}

.hero-pill--step-closed-lost,
.hero-pill--step-lost-or-dormant{
  background:#DC2626;
  color:#FFFFFF;
  border-color:#DC2626;
}

.opportunity-badge--pending{
  color:#422006;
  background:#fde047;
  border-color:#facc15;
}

.hero-pill--offer-pending{
  background:#fff3bf;
  color:#111827;
  border-color:rgba(0, 0, 0, 0.08);
}

.hero-pill--offer-pending .icon{
  color:#111827;
}

.hero-pill--step-sold,
.hero-pill--step-notarized{
  background:#000000;
  color:#FFFFFF;
  border-color:#000000;
}

.hero-pill--deed-sale,
.hero-pill--occupation{
  background:#374151;
  color:#fff;
  border-color:#374151;
}

.hero-pill--step-sold .icon,
.hero-pill--step-notarized .icon,
.hero-pill--step-new .icon,
.hero-pill--step-qualified .icon,
.hero-pill--step-consultation-scheduled .icon,
.hero-pill--step-consultation-done .icon,
.hero-pill--step-contract-sent .icon,
.hero-pill--step-contract-signed .icon,
.hero-pill--step-active .icon,
.hero-pill--step-active-without-contract .icon,
.hero-pill--step-closed-completed .icon,
.hero-pill--step-closed-lost .icon,
.hero-pill--step-lost-or-dormant .icon,
.hero-pill--deed-sale .icon,
.hero-pill--occupation .icon{
  color:#fff;
}

.hero-pill--step-offer-pending .icon{
  color:#111827;
}

.opportunity-badge--accepted{
  color:#ffffff;
  background:#22c55e;
  border-color:#16a34a;
}

.opportunity-hero__aside{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:4px;
  min-width:0;
  margin-left:auto;
  flex:0 1 auto;
  text-align:right;
  justify-content:flex-end;
}

.opportunity-hero__aside-label{
  flex:0 0 auto;
  margin:0;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  white-space:nowrap;
}

.opportunity-board-tags{
  min-width:0;
  justify-content:flex-end;
  flex-wrap:nowrap;
}

.opportunity-board-dropdown{
  position:relative;
  display:inline-flex;
  justify-content:flex-end;
  width:max-content;
  max-width:100%;
  min-width:max-content;
  overflow:visible;
}

.hero-board-combo{
  position:relative;
  z-index:5;
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:0;
  max-width:100%;
  padding:0;
  overflow:visible;
}

.hero-board-combo .opportunity-board-dropdown{
  flex:1 1 auto;
  width:auto;
  min-width:0;
  max-width:100%;
}

.opportunity-board-dropdown__trigger{
  min-height:34px;
  max-width:100%;
  min-width:min(132px, 100%);
  justify-content:space-between;
  gap:10px;
  padding:6px 10px 6px 14px;
  border:1px solid rgba(37,99,235,.38);
  border-radius:14px;
  font:inherit;
  font-size:13px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
}

.hero-board-selector{
  width:max-content;
  min-width:max-content;
  max-width:100%;
  border-radius:14px;
}

.hero-board-combo__select{
  min-height:42px;
  min-width:0;
  width:100%;
  border:0;
  border-radius:12px 0 0 12px;
  background:transparent;
  color:inherit;
  box-shadow:none;
}

.hero-board-combo__divider{
  flex:0 0 1px;
  margin-block:9px;
}

.hero-board-combo__action{
  flex:0 0 60px;
  width:60px;
  min-width:60px;
  height:42px;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border-radius:0 12px 12px 0;
  color:inherit;
  text-decoration:none;
}

.hero-board-combo__action img{
  display:block;
  width:20px;
  height:20px;
  filter:brightness(0) invert(1);
  pointer-events:none;
}

.hero-board-combo__select:hover,
.hero-board-combo__action:hover{
  background:rgba(255,255,255,.12);
}

.hero-board-combo__action:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px rgba(37,99,235,.16), 0 14px 28px rgba(15,23,42,.20);
}

.opportunity-board-dropdown__trigger:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px rgba(37,99,235,.16), 0 14px 28px rgba(15,23,42,.20);
}

.opportunity-board-dropdown__label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.opportunity-board-dropdown__chevron{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  opacity:.92;
  transition:transform .16s ease;
}

.opportunity-board-dropdown.is-open .opportunity-board-dropdown__chevron{
  transform:rotate(180deg);
}

.opportunity-board-dropdown__menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:1200;
  display:grid;
  gap:4px;
  width:max-content;
  min-width:160px;
  max-width:min(220px, calc(100vw - 32px));
  padding:6px;
  border:1px solid rgba(148,163,184,.30);
  border-radius:16px;
  background:rgba(255,255,255,.96);
  box-shadow:0 18px 42px rgba(15,23,42,.16);
  backdrop-filter:blur(14px);
}

.opportunity-board-dropdown__menu[hidden]{
  display:none;
}

.opportunity-board-dropdown__item{
  width:100%;
  min-width:0;
  min-height:34px;
  padding:8px 10px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:#334155;
  font:inherit;
  font-size:13px;
  font-weight:750;
  line-height:1.15;
  text-align:left;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  cursor:pointer;
}

.opportunity-board-dropdown__item:hover,
.opportunity-board-dropdown__item:focus-visible{
  color:#1e3a8a;
  background:#eff6ff;
  outline:none;
}

.opportunity-board-dropdown__item.is-active{
  color:#ffffff;
  background:linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow:0 10px 20px rgba(37,99,235,.18);
}

.opportunity-board-pill{
  flex:0 0 auto;
  min-height:26px;
  padding:4px 9px;
  border-radius:999px;
  font-family:inherit;
  font-size:13px;
  font-weight:400;
  line-height:16px;
  text-decoration:none;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}

.opportunity-board-pill--active{
  color:#ffffff;
  font-size:13px;
  font-weight:400;
  background:linear-gradient(135deg, #2563eb, #14b8a6);
  border-color:rgba(37,99,235,.38);
  box-shadow:0 12px 24px rgba(37,99,235,.22);
}

.opportunity-board-pill--button{
  cursor:pointer;
  color:#334155;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(148,163,184,.36);
}

.opportunity-board-pill--button:hover{
  color:#1e3a8a;
  background:#eff6ff;
  border-color:#bfdbfe;
}

.opportunity-hero__actions{
  position:absolute;
  top:14px;
  right:16px;
  z-index:2;
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
  justify-content:flex-end;
  width:auto;
}

.opportunity-hero__actions .btn-primary{
  width:132px;
  min-height:50px;
  padding-inline:18px;
  border-radius:16px;
  box-shadow:
    0 1px 2px rgba(15,23,42,.06),
    0 10px 24px rgba(15,23,42,.16);
}

.entity-quick-actions,
.opportunity-quick-actions{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.entity-quick-action{
  position:relative;
  flex:0 0 auto;
}

.entity-quick-action__btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:50px;
  min-width:50px;
  min-height:50px;
  height:50px;
  padding:0;
  border-radius:16px;
  color:#1e293b;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:
    0 1px 2px rgba(15,23,42,.04),
    0 6px 18px rgba(15,23,42,.06);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  white-space:nowrap;
  transition:
    color .16s ease,
    background-color .16s ease,
    border-color .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

.entity-quick-action__btn .icon{
  width:19px;
  height:19px;
}

.entity-quick-action__btn:hover,
.entity-quick-action__btn:focus-visible{
  color:#1d4ed8;
  background:rgba(255,255,255,.94);
  border-color:rgba(37,99,235,.22);
  box-shadow:
    0 10px 24px rgba(15,23,42,.10);
}

.entity-quick-action__btn:not([disabled]):hover,
.entity-quick-action__btn:not([disabled]):focus-visible{
  transform:translateY(-1px);
}

.entity-quick-action__btn[disabled]{
  color:#94a3b8;
  cursor:not-allowed;
  background:rgba(248,250,252,.72);
  box-shadow:none;
}

.entity-quick-action__menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:50;
  width:max-content;
  min-width:260px;
  max-width:min(360px, calc(100vw - 24px));
  padding:6px;
  border:1px solid rgba(148,163,184,.32);
  border-radius:14px;
  background:rgba(255,255,255,.98);
  box-shadow:0 22px 48px rgba(15,23,42,.18);
  opacity:0;
  visibility:hidden;
  transform:translateY(-4px) scale(.98);
  transform-origin:top right;
  transition:opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.entity-quick-action.is-open .entity-quick-action__menu{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}

.entity-quick-action__item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  width:100%;
  min-height:48px;
  padding:9px 10px;
  color:#0f172a;
  text-decoration:none;
  border-radius:10px;
}

.entity-quick-action__item:hover,
.entity-quick-action__item:focus-visible{
  color:#1d4ed8;
  background:#eff6ff;
  outline:none;
}

.entity-quick-action__item--all{
  min-height:44px;
  margin-bottom:4px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(148,163,184,.22);
  color:#0f172a;
  font-weight:900;
  background:linear-gradient(135deg, rgba(239,246,255,.78), rgba(255,255,255,.64));
}

.entity-quick-action__item-main{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.entity-quick-action__item--all .icon{
  flex:0 0 auto;
  color:#2563eb;
}

.entity-quick-action__name{
  overflow:hidden;
  font-size:13px;
  font-weight:850;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.entity-quick-action__value{
  flex:0 0 auto;
  max-width:170px;
  overflow:hidden;
  color:#64748b;
  font-size:12px;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.opportunity-shell{
  padding:0;
  overflow:visible;
  background:rgba(255,255,255,.78);
  border:1px solid var(--opp-border);
  border-radius:18px;
  box-shadow:var(--opp-shadow);
}

.opportunity-form{
  gap:0;
}

.opportunity-form-grid{
  gap:16px;
  padding:18px;
  align-items:start;
}

.opportunity-form > .actions{
  margin:0;
}

.opportunity-workspace .field > label,
.opportunity-workspace .field .label{
  color:#334155;
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
}

.opportunity-workspace .field input[type="text"],
.opportunity-workspace .field input[type="email"],
.opportunity-workspace .field input[type="number"],
.opportunity-workspace .field input[type="tel"],
.opportunity-workspace .field input[type="date"],
.opportunity-workspace .field input[type="datetime-local"],
.opportunity-workspace .field select,
.opportunity-workspace .field textarea{
  min-height:44px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(148,163,184,.38);
  border-radius:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
  transition:border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.opportunity-workspace .field textarea{
  min-height:92px;
  padding-top:12px;
}

.opportunity-workspace .field input:focus,
.opportunity-workspace .field select:focus,
.opportunity-workspace .field textarea:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

.opportunity-property-type-options{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:6px;
}

.opportunity-property-type-option{
  display:flex;
  align-items:center;
  gap:.5rem;
  min-width:0;
  max-width:100%;
  line-height:1.25;
  white-space:nowrap;
  word-break:normal;
  overflow-wrap:normal;
  justify-content:flex-start;
  text-align:left;
}

.opportunity-property-type-option input[type="checkbox"]{
  flex:0 0 auto;
  width:auto;
}

.opportunity-property-type-option span{
  min-width:0;
}

.opportunity-workspace .type-toggle{
  gap:10px;
}

.opportunity-workspace .type-btn{
  min-height:42px;
  border-color:rgba(148,163,184,.34);
  border-radius:999px;
  background:#ffffff;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.opportunity-form-card.field-card,
.opportunity-related-card,
.opportunity-empty-card{
  overflow:hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,252,.88)),
    #ffffff;
  border:1px solid var(--opp-border);
  border-radius:16px;
  box-shadow:0 14px 36px rgba(15,23,42,.07);
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.opportunity-form-card.field-card:hover{
  transform:translateY(-1px);
  border-color:var(--opp-border-strong);
  box-shadow:var(--opp-shadow-hover);
}

.opportunity-form-card .field-card__header{
  padding:16px 18px;
  background:linear-gradient(135deg, rgba(239,246,255,.90), rgba(255,255,255,.78));
  border-bottom:1px solid rgba(148,163,184,.20);
}

.opportunity-form-card .field-card__title{
  display:flex;
  align-items:center;
  gap:8px;
  color:#0f172a;
  font-size:15px;
  font-weight:850;
}

.opportunity-form-card .field-card__title .icon{
  color:#2563eb !important;
}

.opportunity-form-card .field-card__body{
  padding:18px;
}

.opportunity-form-card--contact .field-card__header{
  background:linear-gradient(135deg, rgba(219,234,254,.92), rgba(255,255,255,.78));
}

.opportunity-form-card--property .field-card__header{
  background:linear-gradient(135deg, rgba(204,251,241,.86), rgba(255,255,255,.78));
}

.opportunity-form-card--contract .field-card__header,
.opportunity-form-card--closing .field-card__header{
  background:linear-gradient(135deg, rgba(254,243,199,.80), rgba(255,255,255,.80));
}

.opportunity-acm-card{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:14px;
  border:1px solid rgba(20,184,166,.26);
  border-radius:14px;
  background:
    linear-gradient(135deg, rgba(240,253,250,.92), rgba(255,255,255,.95)),
    #ffffff;
  box-shadow:0 10px 26px rgba(15,23,42,.06);
}

.opportunity-acm-card__main{
  min-width:0;
}

.opportunity-acm-card__eyebrow{
  margin-bottom:8px;
  color:#0f766e;
  font-size:12px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.opportunity-acm-card__summary{
  display:grid;
  gap:4px;
  min-width:0;
  color:#0f172a;
  text-decoration:none;
}

.opportunity-acm-card__summary:hover .opportunity-acm-card__title{
  color:#0f766e;
}

.opportunity-acm-card__title{
  font-weight:850;
}

.opportunity-acm-card__date,
.opportunity-acm-card__values,
.opportunity-acm-card__empty{
  color:#64748b;
  font-size:13px;
  line-height:1.35;
}

.opportunity-acm-card__values{
  color:#334155;
  font-weight:750;
}

.opportunity-acm-card__action{
  white-space:nowrap;
}

@media (max-width:720px){
  .opportunity-acm-card{
    grid-template-columns:1fr;
  }

  .opportunity-acm-card__action{
    width:100%;
  }
}

.linked-contacts{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.linked-contact-row{
  display:flex;
  gap:8px;
  align-items:center;
}

.linked-contact-row .ac-wrap{
  min-width:0;
}

#opportunityForm[data-debug="1"] [data-group="buyer"] label{
  color:#2563eb;
}

#opportunityForm[data-debug="1"] [data-group="seller"] label{
  color:#16a34a;
}

.opportunity-tabs{
  margin-top:4px;
  position:relative;
}

.opportunity-tabs .tabs-header{
  gap:0;
  align-items:flex-end;
  padding:0 10px;
  overflow-x:auto;
  overflow-y:hidden;
  flex-wrap:nowrap;
  background:rgba(248,250,252,.82);
  border:1px solid var(--opp-border);
  border-bottom:0;
  border-radius:16px 16px 0 0;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.opportunity-tabs .tabs-header::-webkit-scrollbar{
  display:none;
}

.opportunity-tabs .tab-btn{
  position:relative;
  min-height:46px;
  margin:8px 4px 0 0;
  padding:.78rem 1rem .72rem;
  color:#475569;
  font-weight:800;
  white-space:nowrap;
  background:transparent;
  border:1px solid transparent;
  border-bottom:none;
  border-radius:13px 13px 0 0;
}

.opportunity-tabs .tab-btn:hover{
  color:#0f172a;
  background:rgba(226,232,240,.58);
}

.opportunity-tabs .tab-btn.is-active{
  color:#0f172a;
  background:#ffffff;
  border-color:var(--opp-border);
  box-shadow:0 -8px 18px rgba(15,23,42,.04);
}

.opportunity-tabs .tab-btn.is-active::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:1px;
  background:#ffffff;
}

.opportunity-tabs .tabs-panels{
  margin-top:0;
}

.opportunity-tabs .tab-panel{
  padding:18px;
  background:#ffffff;
  border:1px solid var(--opp-border);
  border-radius:0 0 16px 16px;
  box-shadow:0 14px 34px rgba(15,23,42,.06);
}

.opportunity-tabs .tab-panel > .form-grid{
  gap:16px;
}

.opportunity-mobile-tabs{
  display:none;
  position:relative;
  z-index:30;
  margin-bottom:12px;
}

.opportunity-mobile-tabs__trigger{
  width:100%;
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 15px;
  border:1px solid rgba(148,163,184,.38);
  border-radius:16px;
  color:#0f172a;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
  box-shadow:0 12px 28px rgba(15,23,42,.08);
  cursor:pointer;
}

.opportunity-mobile-tabs__trigger:focus-visible,
.opportunity-mobile-tabs__item:focus-visible{
  outline:2px solid rgba(37,99,235,.44);
  outline-offset:2px;
}

.opportunity-mobile-tabs__current,
.opportunity-mobile-tabs__item-main{
  display:flex;
  align-items:center;
  min-width:0;
  gap:10px;
}

.opportunity-mobile-tabs__current span,
.opportunity-mobile-tabs__item-main span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.opportunity-mobile-tabs__icon{
  flex:0 0 auto;
  color:#2563eb;
}

.opportunity-mobile-tabs__current{
  font-size:1rem;
  font-weight:850;
}

.opportunity-mobile-tabs__chevron{
  width:10px;
  height:10px;
  flex:0 0 auto;
  border-right:2px solid #64748b;
  border-bottom:2px solid #64748b;
  transform:translateY(-2px) rotate(45deg);
  transition:transform .18s ease;
}

.opportunity-mobile-tabs.is-open .opportunity-mobile-tabs__chevron{
  transform:translateY(2px) rotate(225deg);
}

.opportunity-mobile-tabs__panel{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 8px);
  display:grid;
  gap:4px;
  padding:8px;
  border:1px solid rgba(148,163,184,.34);
  border-radius:16px;
  background:rgba(255,255,255,.98);
  box-shadow:0 22px 52px rgba(15,23,42,.18);
  opacity:0;
  visibility:hidden;
  transform:translateY(-6px) scale(.99);
  transform-origin:top center;
  transition:opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.opportunity-mobile-tabs.is-open .opportunity-mobile-tabs__panel{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}

.opportunity-mobile-tabs__item{
  width:100%;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:11px 12px;
  border:0;
  border-radius:12px;
  color:#475569;
  background:transparent;
  font-weight:800;
  text-align:left;
  cursor:pointer;
}

.opportunity-mobile-tabs__item:hover{
  color:#0f172a;
  background:rgba(241,245,249,.9);
}

.opportunity-mobile-tabs__item.is-active{
  color:#0f172a;
  background:rgba(37,99,235,.1);
}

.opportunity-mobile-tabs__item.is-active .opportunity-mobile-tabs__icon,
.opportunity-mobile-tabs__item.is-active .opportunity-mobile-tabs__check{
  color:#1d4ed8;
}

.opportunity-mobile-tabs__check{
  flex:0 0 auto;
  color:transparent;
  font-size:1rem;
  font-weight:900;
}

.opportunity-related-card,
.opportunity-empty-card{
  padding:18px;
}

.opportunity-empty-card{
  background:linear-gradient(135deg, rgba(248,250,252,.96), rgba(255,255,255,.88));
  text-align:center;
}

.email-conversation{
  display:flex;
  flex-direction:column;
  gap:.8rem;
  max-height:calc(100vh - 20rem);
  max-height:calc(100dvh - 20rem);
  min-height:14rem;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:.35rem;
  scroll-behavior:smooth;
}

.email-conversation__row{
  display:grid;
  grid-template-columns:120px minmax(0, 1fr);
  gap:.75rem;
  align-items:start;
}

.email-conversation__time{
  padding-top:.4rem;
  color:#64748b;
  font-size:.78rem;
  line-height:1.35;
  text-align:left;
}

.email-conversation__bubble{
  display:inline-flex;
  max-width:min(100%, 420px);
  padding:.75rem .9rem;
  color:#111827;
  text-decoration:none;
  background:#f8fafc;
  border:1px solid #dbe4f0;
  border-radius:18px;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}

.email-conversation__bubble-inner{
  display:flex;
  align-items:center;
  gap:.6rem;
  min-width:0;
}

.email-conversation__bubble:hover{
  background:#f0f7ff;
  border-color:#93c5fd;
}

.email-conversation__row--outbound .email-conversation__bubble{
  justify-self:end;
  background:#dbeafe;
  border-color:#bfdbfe;
}

.email-conversation__row--inbound .email-conversation__bubble{
  justify-self:start;
}

.email-conversation__subject{
  display:block;
  min-width:0;
  font-weight:600;
  line-height:1.35;
  word-break:break-word;
}

.email-conversation__attachments{
  flex:0 0 auto;
}

.opportunity-actions{
  position:sticky;
  bottom:0;
  z-index:20;
  padding:14px 18px;
  background:rgba(255,255,255,.92);
  border-top:1px solid var(--opp-border);
  border-radius:0 0 18px 18px;
  box-shadow:0 -12px 30px rgba(15,23,42,.06);
  backdrop-filter:blur(12px);
}

.opportunity-actions__primary,
.opportunity-actions__danger{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.opportunity-actions__primary .btn,
.opportunity-actions__danger .btn{
  min-height:42px;
}

.opportunity-delete-btn{
  color:#dc2626;
  background:#ffffff;
  border:1px solid #fecaca;
}

.opportunity-delete-btn:hover{
  color:#b91c1c;
  background:#fff1f2;
  border-color:#fca5a5;
}

@media (max-width: 980px){
	  .opportunity-workspace,
	  .opportunity-shell,
	  .opportunity-form,
	  .opportunity-form-grid,
  .opportunity-hero,
  .opportunity-tabs,
  .opportunity-tabs .tabs-panels,
  .opportunity-tabs .tab-panel{
    max-width:100%;
    min-width:0;
  }

  .opportunity-workspace{
    overflow-x:hidden;
  }

  .opportunity-hero__main,
  .opportunity-hero__aside{
    min-width:0;
  }

  .opportunity-hero__aside,
  .opportunity-hero__actions{
    text-align:right;
    justify-content:flex-end;
  }

  .opportunity-hero__actions{
    width:auto;
    text-align:right;
    justify-content:flex-end;
  }

  .opportunity-board-tags,
  .opportunity-board-dropdown{
    justify-content:flex-end;
  }

  .opportunity-board-tags,
  .opportunity-board-dropdown,
  .opportunity-board-dropdown__trigger,
  .opportunity-hero__badges,
  .opportunity-hero__actions,
  .opportunity-actions__primary,
  .opportunity-actions__danger,
  .linked-contact-row,
  .ac-wrap,
  .opportunity-workspace .field,
  .opportunity-workspace .field > div[style*="display:flex"],
  .opportunity-workspace .field input,
  .opportunity-workspace .field select,
  .opportunity-workspace .field textarea{
    min-width:0;
    max-width:100%;
  }

  .opportunity-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
  }

  .opportunity-actions__primary{
    order:-1;
  }

  .opportunity-workspace .field > div[style*="display:flex"],
  .linked-contact-row{
    flex-wrap:wrap;
  }

  .opportunity-property-type-options{
    display:grid;
    grid-template-columns:1fr;
    gap:.5rem;
  }

  .opportunity-property-type-option{
    width:100%;
    min-width:0;
  }

  .opportunity-workspace .field > div[style*="display:flex"] > .ac-wrap,
  .linked-contact-row .ac-wrap{
    flex:1 1 min(100%, 260px) !important;
  }
}

@media (max-width: 768px){
  body:has(.crm-mobile-footer){
    padding-bottom:calc(96px + env(safe-area-inset-bottom));
  }

  body:has(.crm-mobile-footer) .content,
  body:has(.crm-mobile-footer) .content-full{
    padding-bottom:calc(96px + env(safe-area-inset-bottom));
  }

  .crm-mobile-footer{
    position:fixed;
    left:max(8px, env(safe-area-inset-left));
    right:max(8px, env(safe-area-inset-right));
    bottom:0;
    z-index:9000;
    display:block;
    width:auto;
    max-width:calc(100vw - 16px);
    margin-inline:auto;
    padding:0 0 calc(10px + env(safe-area-inset-bottom));
    pointer-events:none;
  }

  .crm-mobile-footer__bar{
    display:grid;
    grid-template-columns:repeat(5, minmax(0, 1fr));
    align-items:end;
    gap:4px;
    width:min(100%, 430px);
    min-height:68px;
    margin:0 auto;
    padding:8px 8px 9px;
    pointer-events:auto;
    background:rgba(255,255,255,.94);
    border:1px solid rgba(148,163,184,.28);
    border-radius:24px;
    box-shadow:0 24px 60px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.86);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
  }

  .crm-mobile-footer__item{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:48px;
    padding:5px 2px;
    color:#64748b;
    text-decoration:none;
    border-radius:16px;
    transition:background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
    -webkit-tap-highlight-color:transparent;
  }

  .crm-mobile-footer__item:hover,
  .crm-mobile-footer__item:focus-visible,
  .crm-mobile-footer__item.is-active{
    color:#1d4ed8;
    background:rgba(37,99,235,.08);
    outline:none;
  }

  .crm-mobile-footer__icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:26px;
    height:24px;
    flex:0 0 24px;
  }

  .crm-mobile-footer__label{
    display:block;
    max-width:100%;
    margin-top:2px;
    overflow:hidden;
    color:currentColor;
    font-size:10.5px;
    font-weight:700;
    line-height:1.1;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .crm-mobile-footer__item.is-action{
    min-height:58px;
    margin-top:-18px;
    color:#ffffff;
    background:transparent;
    transform:translateY(-3px);
  }

  .crm-mobile-footer__item.is-action:hover,
  .crm-mobile-footer__item.is-action:focus-visible{
    color:#ffffff;
    background:transparent;
  }

  .crm-mobile-footer__item.is-action .crm-mobile-footer__icon{
    width:54px;
    height:54px;
    flex-basis:54px;
    color:#ffffff;
    background:linear-gradient(135deg, #2563eb, #14b8a6);
    border:1px solid rgba(255,255,255,.34);
    border-radius:999px;
    box-shadow:0 18px 34px rgba(37,99,235,.30), inset 0 1px 0 rgba(255,255,255,.30);
  }

  .crm-mobile-footer__plus{
    display:block;
    margin-top:-2px;
    color:currentColor;
    font-size:36px;
    font-weight:600;
    line-height:1;
  }

  .crm-mobile-footer__label--action{
    margin-top:3px;
    color:#334155;
    font-size:10px;
  }

  .opportunity-tabs .tabs-header{
    display:none;
  }

  .opportunity-mobile-tabs{
    display:block;
  }

  .opportunity-tabs .tab-panel{
    border-radius:16px;
  }
}

@media (max-width: 720px){
  .opportunity-workspace{
    padding:10px;
  }

  .opportunity-hero{
    padding:12px;
    border-radius:16px;
  }

  .opportunity-hero__actions{
    top:12px;
    right:12px;
  }

  .opportunity-hero__meta{
    flex-wrap:wrap;
  }

  .opportunity-hero__badges{
    flex-wrap:nowrap;
  }

  .opportunity-hero__aside{
    width:100%;
  }

  .opportunity-board-tags{
    flex-wrap:wrap;
  }

  .opportunity-board-dropdown{
    width:max-content;
    min-width:max-content;
    max-width:100%;
  }

  .opportunity-board-dropdown__trigger{
    width:max-content;
    min-width:max-content;
    max-width:100%;
    border-radius:14px;
  }

  .opportunity-hero__actions,
  .opportunity-hero__actions .btn,
  .opportunity-hero__aside form,
  .opportunity-hero__aside .btn{
    width:100%;
  }

  .opportunity-hero__actions,
  .opportunity-hero__actions .btn{
    width:auto;
  }

  .entity-quick-actions,
  .opportunity-quick-actions{
    gap:5px;
  }

  .entity-quick-action__btn{
    width:48px;
    min-width:48px;
    height:48px;
    min-height:48px;
    border-radius:15px;
    padding:0;
    justify-content:center;
  }

  .entity-quick-action__menu{
    position:fixed;
    top:calc(var(--app-header-height, 72px) + env(safe-area-inset-top, 0px) + 8px);
    right:16px;
    left:16px;
    z-index:900;
    width:auto;
    min-width:0;
    max-width:none;
    max-height:calc(100dvh - var(--app-header-height, 72px) - env(safe-area-inset-top, 0px) - 24px);
    overflow-y:auto;
    scroll-padding-top:6px;
    -webkit-overflow-scrolling:touch;
    transform-origin:top right;
  }

  .entity-quick-action__item{
    min-height:44px;
    gap:10px;
  }

  .entity-quick-action__value{
    max-width:48vw;
  }

  .opportunity-hero__actions .btn-primary{
    width:112px;
    min-height:48px;
    border-radius:15px;
  }

  .opportunity-form-grid,
  .opportunity-tabs .tab-panel{
    padding:14px;
  }

  .opportunity-form-grid,
  .opportunity-tabs .tab-panel > .form-grid{
    grid-template-columns:1fr;
  }

  .opportunity-workspace .span-2,
  .opportunity-workspace .span-3,
  .opportunity-workspace .span-4{
    grid-column:span 1;
  }

  .opportunity-form-card .field-card__header,
  .opportunity-form-card .field-card__body{
    padding:14px;
  }

  .opportunity-tabs .tab-btn{
    min-height:44px;
    padding-inline:.85rem;
    font-size:.95rem;
  }

  .linked-contact-row{
    align-items:stretch;
  }

  .linked-contact-row .btn{
    min-width:44px;
    padding-inline:10px;
  }

  .email-conversation__row{
    grid-template-columns:88px minmax(0, 1fr);
    gap:.55rem;
  }

  .email-conversation__bubble{
    max-width:100%;
  }

  .opportunity-actions{
    padding:12px;
  }

  .opportunity-actions__primary{
    display:grid;
    grid-template-columns:1fr;
  }

  .opportunity-actions__danger{
    align-items:flex-start;
  }
}

@media (max-width: 520px){
  .opportunity-hero__badges,
  .opportunity-board-tags{
    flex-wrap:wrap;
  }
}

/* =====================================================
   Contact form workspace
   Premium CRM card layout aligned with dashboard/opportunity UI
   ===================================================== */

.contact-workspace{
  --contact-ink:#0f172a;
  --contact-muted:#64748b;
  --contact-border:rgba(148,163,184,.28);
  --contact-border-strong:rgba(100,116,139,.34);
  --contact-shadow:0 18px 48px rgba(15,23,42,.08);
  --contact-shadow-hover:0 24px 60px rgba(15,23,42,.12);
  color:var(--contact-ink);
}

.contact-hero{
  position:relative;
  overflow:visible;
  align-items:flex-start;
  padding:18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.88)),
    #ffffff;
  border:1px solid var(--contact-border);
  border-radius:18px;
  box-shadow:var(--contact-shadow);
}

.contact-workspace .contact-hero{
  display:flex;
  flex-direction:column;
  align-items:stretch;
}

.contact-hero::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:linear-gradient(180deg, #2563eb, #14b8a6);
}

.contact-hero__main{
  min-width:0;
  width:100%;
  flex:1 1 auto;
  padding-left:4px;
}

.contact-hero__back{
  min-height:38px;
  margin-bottom:12px;
  padding:.55rem .75rem;
  border-color:rgba(148,163,184,.34);
  background:rgba(255,255,255,.74);
}

.contact-hero__eyebrow{
  margin-bottom:7px;
  color:#2563eb;
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.contact-workspace .page-header h1{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 7px;
  color:var(--contact-ink);
  font-size:clamp(1.7rem, 3vw, 2.4rem);
  line-height:1.08;
  letter-spacing:0;
}

.contact-hero__quick-actions{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-left:4px;
  vertical-align:middle;
  min-width:0;
}

.contact-workspace .muted{
  color:var(--contact-muted);
  line-height:1.45;
}

.contact-hero__badges,
.contact-hero__actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.contact-hero__badges{
  margin-top:12px;
  flex-wrap:wrap;
}

.contact-hero__actions{
  position:absolute;
  top:14px;
  right:16px;
  z-index:2;
  flex:0 0 auto;
  justify-content:flex-end;
  width:auto;
}

.contact-hero__action-group{
  flex-wrap:nowrap;
}

.contact-hero__actions .btn-primary{
  width:132px;
  min-height:50px;
  padding-inline:18px;
  border-radius:16px;
  box-shadow:
    0 1px 2px rgba(15,23,42,.06),
    0 10px 24px rgba(15,23,42,.16);
}

.contact-hero__opportunity-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  max-width:min(360px, 100%);
  min-height:40px;
  padding:8px 12px 8px 10px;
  color:#0f172a;
  font-size:13px;
  font-weight:800;
  line-height:1;
  text-decoration:none;
  border:1px solid rgba(37,99,235,.22);
  border-radius:999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,246,255,.95)),
    #ffffff;
  box-shadow:
    0 12px 26px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.9);
  white-space:nowrap;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.contact-hero__opportunity-pill span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}

.contact-hero__opportunity-pill:hover{
  color:#1d4ed8;
  border-color:rgba(37,99,235,.42);
  background:
    linear-gradient(135deg, #ffffff, #dbeafe),
    #ffffff;
  box-shadow:
    0 16px 34px rgba(37,99,235,.16),
    inset 0 1px 0 rgba(255,255,255,.95);
  text-decoration:none;
  transform:translateY(-1px);
}

.contact-hero__opportunity-pill .icon{
  flex:0 0 auto;
  color:#2563eb;
}

.contact-badge{
  border-radius:999px;
  font-size:11px;
  letter-spacing:.01em;
}

.contact-badge--status{
  color:#115e59;
  background:#ccfbf1;
  border-color:#99f6e4;
}

.contact-badge--name{
  color:#1e3a8a;
  background:#dbeafe;
  border-color:#bfdbfe;
}

.contact-badge--intention{
  color:#422006;
  background:#fef3c7;
  border-color:#fde68a;
}

.contact-shell{
  padding:0;
  overflow:visible;
  background:rgba(255,255,255,.78);
  border:1px solid var(--contact-border);
  border-radius:18px;
  box-shadow:var(--contact-shadow);
}

.contact-form{
  gap:0;
}

.contact-form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
  padding:18px;
  align-items:start;
}

.contact-related-grid{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.contact-form-card.field-card{
  overflow:hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,252,.88)),
    #ffffff;
  border:1px solid var(--contact-border);
  border-radius:16px;
  box-shadow:0 14px 36px rgba(15,23,42,.07);
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.contact-form-card.field-card:hover{
  transform:translateY(-1px);
  border-color:var(--contact-border-strong);
  box-shadow:var(--contact-shadow-hover);
}

.contact-form-card .field-card__header{
  padding:16px 18px;
  background:linear-gradient(135deg, rgba(239,246,255,.90), rgba(255,255,255,.78));
  border-bottom:1px solid rgba(148,163,184,.20);
}

.contact-form-card .field-card__title{
  display:flex;
  align-items:center;
  gap:8px;
  color:#0f172a;
  font-size:15px;
  font-weight:850;
}

.contact-form-card .field-card__title .icon{
  color:#2563eb !important;
}

.contact-form-card .field-card__body{
  padding:18px;
}

.contact-form-card--communication .field-card__header{
  background:linear-gradient(135deg, rgba(219,234,254,.92), rgba(255,255,255,.78));
}

.contact-form-card--real-estate .field-card__header{
  background:linear-gradient(135deg, rgba(204,251,241,.86), rgba(255,255,255,.78));
}

.contact-form-card--intentions .field-card__header,
.contact-form-card--related .field-card__header{
  background:linear-gradient(135deg, rgba(254,243,199,.80), rgba(255,255,255,.80));
}

.contact-workspace .field > label,
.contact-workspace .field .label,
.contact-workspace .field-row label{
  color:#334155;
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
}

.contact-workspace .field input[type="text"],
.contact-workspace .field input[type="email"],
.contact-workspace .field input[type="number"],
.contact-workspace .field input[type="tel"],
.contact-workspace .field input[type="date"],
.contact-workspace .field input[type="datetime-local"],
.contact-workspace .field select,
.contact-workspace .field textarea{
  min-height:44px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(148,163,184,.38);
  border-radius:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
  transition:border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.contact-workspace .field textarea{
  min-height:104px;
  padding-top:12px;
}

.contact-workspace .field input:focus,
.contact-workspace .field select:focus,
.contact-workspace .field textarea:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

.contact-primary-field input{
  font-weight:750;
}

.contact-field-head{
  min-height:32px;
  align-items:flex-start;
}

.contact-quick-actions{
  display:flex;
  align-items:center;
  gap:6px;
}

.contact-workspace .btn-icon{
  width:34px;
  height:34px;
  border-color:rgba(148,163,184,.34);
  border-radius:10px;
  background:#ffffff;
  color:#334155;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.contact-workspace .btn-icon:hover{
  color:#0f172a;
  background:#f8fafc;
  border-color:rgba(100,116,139,.38);
}

.contact-checkbox-field{
  padding:12px 14px;
  background:rgba(248,250,252,.74);
  border:1px solid rgba(148,163,184,.24);
  border-radius:14px;
}

.contact-checkbox-field label{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
}

.contact-checkbox-field input[type="checkbox"]{
  width:18px;
  height:18px;
  accent-color:#2563eb;
}

.contact-intentions-field .field-row{
  align-items:center;
  margin-bottom:10px;
}

.contact-workspace .pill-group{
  gap:10px;
}

.contact-workspace .pill{
  min-height:40px;
  background:#ffffff;
  border-color:rgba(148,163,184,.34);
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.contact-workspace .pill:has(input:checked){
  background:rgba(37,99,235,.12);
  border-color:rgba(37,99,235,.34);
}

.contact-tabs{
  margin:0;
}

.contact-tabs .tabs-header{
  gap:0;
  padding:0 10px;
  overflow-x:auto;
  flex-wrap:nowrap;
  background:rgba(248,250,252,.82);
  border:1px solid var(--contact-border);
  border-bottom:0;
  border-radius:14px 14px 0 0;
}

.contact-tabs .tab-btn{
  position:relative;
  min-height:44px;
  margin:8px 4px 0 0;
  padding:.72rem 1rem;
  color:#475569;
  font-weight:800;
  white-space:nowrap;
  background:transparent;
  border:1px solid transparent;
  border-bottom:none;
  border-radius:12px 12px 0 0;
}

.contact-tabs .tab-panel{
  padding:18px;
  background:#ffffff;
  border:1px solid var(--contact-border);
  border-radius:0 0 14px 14px;
  box-shadow:0 12px 28px rgba(15,23,42,.05);
}

.contact-tabs .tab-title{
  margin-top:0;
}

.contact-related-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.contact-related-pill{
  max-width:100%;
}

.contact-related-pill a{
  color:#0f172a;
  text-decoration:none;
}

.contact-related-pill a:hover{
  text-decoration:underline;
}

.contact-actions{
  position:sticky;
  bottom:0;
  z-index:20;
  margin:0;
  padding:14px 18px;
  background:rgba(255,255,255,.92);
  border-top:1px solid var(--contact-border);
  border-radius:0 0 18px 18px;
  box-shadow:0 -12px 30px rgba(15,23,42,.06);
  backdrop-filter:blur(12px);
}

.contact-delete-btn{
  margin-right:auto;
  color:#dc2626;
  background:#ffffff;
  border:1px solid #fecaca;
}

.contact-delete-btn:hover{
  color:#b91c1c;
  background:#fff1f2;
  border-color:#fca5a5;
}

.contact-delete-btn:disabled{
  color:#94a3b8;
  background:#f8fafc;
  border-color:#e2e8f0;
  cursor:not-allowed;
}

@media (max-width: 980px){
  .contact-hero{
    flex-direction:column;
  }

  .contact-hero__main{
    flex:0 0 auto;
  }

  .contact-hero__actions{
    justify-content:flex-end;
  }

  .contact-hero__opportunity-pill{
    width:100%;
    max-width:100%;
    justify-content:flex-start;
  }
}

@media (max-width: 720px){
  .contact-workspace{
    padding:10px;
  }

  .contact-hero{
    padding:14px;
    border-radius:16px;
  }

  .contact-hero__actions{
    top:12px;
    right:12px;
  }

  .contact-hero__actions .btn-primary{
    width:112px;
    min-height:48px;
    border-radius:15px;
  }

  .contact-form-grid,
  .contact-related-grid{
    grid-template-columns:1fr;
    gap:14px;
  }

  .contact-form-grid{
    padding:14px;
  }

  .contact-workspace .span-2,
  .contact-workspace .span-3,
  .contact-workspace .span-4{
    grid-column:span 1;
  }

  .contact-form-card .field-card__header,
  .contact-form-card .field-card__body{
    padding:14px;
  }

  .contact-field-head{
    align-items:center;
  }

  .contact-tabs .tabs-header{
    padding:0 6px;
  }

  .contact-tabs .tab-panel{
    padding:14px;
  }

  .contact-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    padding:12px;
  }

  .contact-actions .btn,
  .contact-actions a{
    width:100%;
    min-height:44px;
  }

  .contact-delete-btn{
    margin-right:0;
    order:3;
  }
}

/* =====================================================
   CRM mobile form/detail width
   Keep dashboards intact while letting edit/detail screens use the viewport.
   ===================================================== */
@media (max-width: 768px){
  html,
  body{
    max-width:100%;
    overflow-x:hidden;
  }

  *,
  *::before,
  *::after{
    box-sizing:border-box;
  }

  .content:not(:has(.crm-dashboard)){
    width:100%;
    max-width:none;
    min-width:0;
    padding:8px;
    overflow-x:hidden;
  }

  .content-full:not(:has(.crm-dashboard)){
    width:100%;
    max-width:none;
    min-width:0;
    margin:0;
    padding:8px;
    overflow-x:hidden;
  }

  .content-inner:not(:has(.crm-dashboard)){
    width:100%;
    max-width:none;
    min-width:0;
    padding:8px;
    border-radius:0;
    background:transparent;
    overflow-x:hidden;
  }

  .content-full:has(.auth-landing),
  .content-inner:has(.auth-landing){
    padding:0;
    overflow:visible;
  }

  .content-inner:has(.auth-landing){
    border-radius:0;
    background:transparent;
  }

  .auth-landing,
  .auth-shell,
  .auth-hero,
  .auth-card,
  .plan-grid,
  .plan-card,
  .auth-form-grid{
    max-width:100%;
    min-width:0;
  }

  .page:not(.crm-dashboard),
  .page.page--wide:not(.crm-dashboard),
  .opportunity-workspace,
  .contact-workspace,
  .property-workspace{
    width:100%;
    max-width:none !important;
    min-width:0;
    margin:0 !important;
    padding-inline:0;
    overflow-x:hidden;
  }

  .page-header:not(.crm-dashboard-hero),
  .opportunity-hero,
  .contact-hero{
    width:100%;
    max-width:100%;
    min-width:0;
    margin-inline:0;
    padding:14px 12px;
    border-radius:14px;
  }

  .card:not(.crm-card),
  .opportunity-shell,
  .contact-shell{
    width:100%;
    max-width:none;
    min-width:0;
    margin-inline:0;
    padding:0;
    border-radius:14px;
    box-shadow:0 10px 24px rgba(15,23,42,.06);
    overflow:hidden;
  }

  .form,
  .form-card,
  .form-grid,
  .property-form-grid,
  .opportunity-form,
  .opportunity-form-grid,
  .contact-form,
  .contact-form-grid,
  .contact-related-grid,
  .tabs,
  .tabs-panels,
  .tabs-panel,
  .tab-panel,
  .dialog-body,
  .page:not(.crm-dashboard) .field-card,
  .field-card__body,
  .sub-grid{
    width:100%;
    max-width:100%;
    min-width:0;
  }

  .form-card,
  .page:not(.crm-dashboard) .field-card,
  .opportunity-form-card.field-card,
  .contact-form-card.field-card,
  .opportunity-related-card,
  .opportunity-empty-card{
    margin-inline:0;
    border-radius:13px;
    box-shadow:0 8px 22px rgba(15,23,42,.055);
  }

  .page:not(.crm-dashboard) .field-card__header,
  .page:not(.crm-dashboard) .field-card__body,
  .opportunity-form-card .field-card__header,
  .opportunity-form-card .field-card__body,
  .contact-form-card .field-card__header,
  .contact-form-card .field-card__body{
    padding-inline:12px;
  }

  .page:not(.crm-dashboard) .field-card__body,
  .opportunity-form-card .field-card__body,
  .contact-form-card .field-card__body{
    padding-block:12px;
  }

  .form-card,
  .tabs-panel,
  .tab-panel,
  .opportunity-tabs .tab-panel,
  .contact-tabs .tab-panel,
  .dialog-body{
    padding-inline:12px;
  }

  .opportunity-form-grid,
  .contact-form-grid,
  .contact-related-grid,
  .property-form-grid,
  .form-grid,
  .sub-grid,
  .sub-grid--2,
  .sub-grid--3,
  .sub-grid--4{
    grid-template-columns:1fr;
    gap:12px;
  }

  .opportunity-form-grid,
  .contact-form-grid{
    padding:10px;
  }

  .opportunity-tabs .tab-panel,
  .contact-tabs .tab-panel{
    padding:12px;
    border-radius:13px;
  }

  .opportunity-workspace .span-2,
  .opportunity-workspace .span-3,
  .opportunity-workspace .span-4,
  .contact-workspace .span-2,
  .contact-workspace .span-3,
  .contact-workspace .span-4,
  .form-grid .span-2,
  .form-grid .span-3,
  .form-grid .span-4,
  .sub-grid .span-2,
  .sub-grid .span-3,
  .sub-grid .span-4{
    grid-column:1 / -1;
  }

  .mobile-edge-to-edge{
    width:100%;
    max-width:none;
    margin-inline:0;
    padding-inline:0;
  }

  input,
  select,
  textarea,
  button,
  .btn,
  .tag,
  .card,
  .page:not(.crm-dashboard) .field-card,
  .tab-panel,
  .tabs-header,
  .tabs-panels,
  .tabs-table-wrap,
  .list-table-wrap,
  .list-widget,
  .table-wrap{
    max-width:100%;
  }

  input,
  select,
  textarea{
    width:100%;
  }

  .tabs-header{
    overflow-x:auto;
    overflow-y:hidden;
    flex-wrap:nowrap;
    -webkit-overflow-scrolling:touch;
  }

  .tabs-table-wrap,
  .list-table-wrap,
  .list-widget .table-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  .field-card__title,
  .tab-title,
  .page-header h1,
  .muted,
  .tag,
  .btn,
  th,
  td{
    overflow-wrap:anywhere;
  }
}

@media (max-width: 720px){
  .content-full:has(.modules-page),
  .content-inner:has(.modules-page){
    width:100%;
    max-width:100%;
    min-width:0;
    padding:0;
    overflow-x:hidden;
  }
}

@media (max-width: 640px){
  .opportunity-property-type-field,
  .opportunity-property-type-options{
    min-width:0 !important;
    width:100% !important;
    max-width:100% !important;
    overflow:visible !important;
  }

  .opportunity-property-type-options{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:wrap !important;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    gap:.65rem 1rem !important;
  }

  .opportunity-property-type-option{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:.45rem !important;
    width:auto !important;
    max-width:100% !important;
    min-width:0 !important;
    flex:0 1 auto !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    text-align:left !important;
  }

  .opportunity-property-type-option input[type="checkbox"]{
    flex:0 0 auto !important;
    width:auto !important;
    min-width:0 !important;
    margin:0 !important;
  }

  .opportunity-property-type-option span{
    min-width:0 !important;
    max-width:100% !important;
  }
}

/* Opportunity edit: mobile overflow containment */
@media (max-width: 768px){
  html,
  body,
  body.crm-layout,
  body.has-mobile-bottom-nav{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
    overflow-x:clip;
  }

  .opportunity-hero{
    z-index:100;
  }

  body.crm-layout .layout,
  body.crm-layout .content-full:has(.opportunity-workspace),
  body.crm-layout .content-inner:has(.opportunity-workspace),
  .opportunity-workspace,
  .opportunity-shell,
  .opportunity-form,
  .opportunity-form-grid,
  .opportunity-hero,
  .opportunity-tabs,
  .opportunity-tabs .tabs-panels,
  .opportunity-tabs .tab-panel,
  .opportunity-form-card.field-card,
  .opportunity-related-card,
	  .opportunity-empty-card{
	    box-sizing:border-box;
	    width:100%;
	    max-width:100%;
	    min-width:0;
	    margin-left:auto;
	    margin-right:auto;
	    overflow-x:clip;
	  }

  .opportunity-hero,
  .opportunity-hero__main,
  .opportunity-hero__meta,
  .opportunity-hero__aside,
  .hero-board-combo,
  .opportunity-board-dropdown{
    overflow:visible;
  }

  body.crm-layout .content-full:has(.opportunity-workspace),
  body.crm-layout .content-inner:has(.opportunity-workspace){
    padding-left:8px;
    padding-right:8px;
  }

  .opportunity-workspace{
    padding-left:8px;
    padding-right:8px;
  }

  .opportunity-hero{
    padding-left:10px;
    padding-right:10px;
  }

  .opportunity-hero__main,
  .opportunity-hero__top-row,
  .opportunity-hero__meta,
  .opportunity-hero__aside,
  .opportunity-hero__actions,
  .opportunity-hero__badges,
  .opportunity-board-tags,
  .hero-board-combo,
  .opportunity-board-dropdown,
  .entity-quick-actions,
  .opportunity-quick-actions{
    max-width:100%;
    min-width:0;
  }

  .entity-quick-actions,
  .opportunity-quick-actions{
    flex-wrap:wrap;
  }

  .opportunity-hero__actions{
    position:absolute;
    top:16px;
    right:16px;
    z-index:2;
    display:flex;
    align-items:flex-start;
    justify-content:flex-end;
    gap:6px;
    flex-wrap:nowrap;
    width:auto;
    max-width:min(520px, calc(100% - 88px));
    margin-left:auto;
    text-align:right;
    white-space:nowrap;
  }

  .opportunity-hero__actions .entity-quick-actions,
  .opportunity-hero__actions .opportunity-quick-actions{
    flex-wrap:nowrap;
    justify-content:flex-end;
    gap:5px;
    white-space:nowrap;
  }

  .opportunity-hero__actions .btn-primary{
    flex:0 0 auto;
    width:auto;
    max-width:160px;
    min-width:0;
    min-height:40px;
    padding-inline:12px;
    white-space:nowrap;
  }

  .opportunity-hero__actions .entity-quick-action__btn{
    width:40px;
    min-width:40px;
    height:40px;
    min-height:40px;
    border-radius:13px;
  }

  .opportunity-hero__actions .btn{
    width:auto;
  }

  .opportunity-hero__meta{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    flex-wrap:nowrap;
    width:100%;
    max-width:100%;
    overflow:visible;
  }

  .opportunity-hero__badges,
  .opportunity-board-tags,
  .hero-board-combo,
  .opportunity-board-dropdown{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
  }

  .opportunity-hero__badges{
    flex:1 1 auto;
    flex-wrap:wrap;
    justify-content:flex-start;
  }

  .opportunity-hero__aside{
    flex:0 0 auto;
    flex-direction:column;
    align-items:flex-end;
    justify-content:flex-end;
    gap:6px;
    max-width:48%;
    min-width:0;
    margin-left:auto;
    text-align:right;
    overflow:visible;
  }

  .opportunity-board-tags,
  .hero-board-combo,
  .opportunity-board-dropdown{
    flex:0 1 auto;
    flex-wrap:nowrap;
    justify-content:flex-end;
    max-width:100%;
  }

  .opportunity-badge,
  .opportunity-board-pill,
  .opportunity-board-dropdown__trigger{
    flex:0 1 auto;
    min-width:0;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .opportunity-board-dropdown,
  .opportunity-board-dropdown__trigger.hero-board-selector{
    width:auto;
    min-width:0;
    max-width:100%;
    overflow:visible;
  }

  .opportunity-board-dropdown__trigger.hero-board-selector{
    width:100%;
    min-width:0;
  }

  .hero-board-combo{
    width:100%;
    gap:0;
  }

  .hero-board-combo .opportunity-board-dropdown{
    flex:1 1 auto;
    gap:0;
  }

  .hero-board-combo__action{
    flex:0 0 56px;
    width:56px;
    min-width:56px;
  }

  .opportunity-board-dropdown__label{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .opportunity-hero__aside-label{
    flex:0 0 auto;
    font-size:10px;
    letter-spacing:.03em;
    white-space:nowrap;
  }

  .opportunity-badge{
    flex:0 0 auto;
    max-width:none;
    overflow:visible;
    text-overflow:clip;
    white-space:nowrap;
  }

  .opportunity-badge,
  .opportunity-board-pill{
    padding:3px 7px;
    font-size:11px;
    line-height:15px;
  }

  .opportunity-form-grid,
  .opportunity-tabs .tab-panel{
    padding-left:8px;
    padding-right:8px;
  }

  .opportunity-workspace .type-toggle,
  .opportunity-property-type-options{
    max-width:100%;
    min-width:0;
    flex-wrap:wrap;
    overflow-x:clip;
  }

  .opportunity-workspace .type-btn{
    flex:1 1 130px;
    min-width:0;
    max-width:100%;
    white-space:normal;
  }

  .opportunity-property-type-option{
    flex:1 1 min(100%, 150px) !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }
}

@media (max-width: 420px){
  .opportunity-hero__actions{
    max-width:calc(100% - 88px);
    gap:4px;
  }

  .opportunity-hero__actions .entity-quick-actions,
  .opportunity-hero__actions .opportunity-quick-actions{
    gap:3px;
  }

  .opportunity-hero__actions .entity-quick-action__btn{
    width:34px;
    min-width:34px;
    height:34px;
    min-height:34px;
    border-radius:11px;
  }

  .opportunity-hero__actions .btn-primary{
    max-width:92px;
    min-height:34px;
    padding-inline:8px;
    font-size:12px;
  }

  .opportunity-hero__meta{
    gap:5px;
  }

  .opportunity-hero__badges,
  .opportunity-board-tags,
  .opportunity-board-dropdown,
  .opportunity-hero__aside{
    gap:4px;
  }

  .opportunity-hero__aside{
    max-width:44%;
  }

  .opportunity-badge,
  .opportunity-board-pill{
    padding:2px 5px;
    font-size:10px;
    line-height:14px;
  }

  .opportunity-hero__aside-label{
    font-size:9px;
  }
}

@media (max-width: 768px){
  .opportunity-hero{
    padding:12px 14px 10px;
    gap:6px;
    margin-bottom:10px;
  }

  .opportunity-hero .muted{
    display:none;
  }

  .opportunity-workspace .page-header h1{
    margin-bottom:6px;
    line-height:1.05;
  }

  .opportunity-hero__eyebrow{
    margin-bottom:2px;
  }

  .opportunity-hero__meta{
    margin-top:6px;
    gap:8px;
    align-items:flex-end;
  }

  .opportunity-hero__badges,
  .opportunity-board-tags,
  .opportunity-board-dropdown,
  .opportunity-hero__aside{
    gap:5px;
  }

  .opportunity-hero__actions{
    top:12px;
    right:14px;
    gap:6px;
  }

  .opportunity-hero__actions .entity-quick-actions,
  .opportunity-hero__actions .opportunity-quick-actions{
    gap:6px;
  }

  .opportunity-hero__actions .entity-quick-action__btn{
    width:44px;
    min-width:44px;
    height:44px;
    min-height:44px;
    border-radius:14px;
  }

  .opportunity-hero__actions .btn-primary{
    width:auto;
    max-width:none;
    min-height:44px;
    padding-inline:14px;
    border-radius:14px;
    white-space:nowrap;
  }
}

/* =====================================================
   CRM mobile bottom navigation safe area
   Reserve enough scrollable space so fixed mobile nav never covers content.
   Keep this after mobile layout rules so padding shorthands above do not win.
   ===================================================== */
@media (max-width: 768px){
  :root{
    --mobile-bottom-nav-height:96px;
    --mobile-bottom-nav-gap:24px;
    --mobile-bottom-nav-safe-area:calc(
      var(--mobile-bottom-nav-height)
      + var(--mobile-bottom-nav-gap)
      + env(safe-area-inset-bottom)
    );
    --mobile-bottom-nav-overlay-gap:24px;
  }

  body.has-mobile-bottom-nav,
  body.crm-layout,
  body:has(.crm-mobile-footer){
    padding-bottom:var(--mobile-bottom-nav-safe-area);
  }

  body.has-mobile-bottom-nav .content,
  body.has-mobile-bottom-nav .content-full,
  body.has-mobile-bottom-nav .content-inner,
  body.crm-layout .content,
  body.crm-layout .content-full,
  body.crm-layout .content-inner,
  body:has(.crm-mobile-footer) .content,
  body:has(.crm-mobile-footer) .content-full,
  body:has(.crm-mobile-footer) .content-inner,
  body.has-mobile-bottom-nav main,
  body.has-mobile-bottom-nav .crm-main,
  body.has-mobile-bottom-nav .page-content,
  body.has-mobile-bottom-nav .settings-page,
  body.has-mobile-bottom-nav .page:not(.crm-dashboard),
  body.has-mobile-bottom-nav .opportunity-workspace,
  body.has-mobile-bottom-nav .contact-workspace,
  body.has-mobile-bottom-nav .property-workspace,
  body.has-mobile-bottom-nav .opportunity-form,
  body.has-mobile-bottom-nav .contact-form,
  body.has-mobile-bottom-nav .property-dialog-form,
  body.crm-layout main,
  body.crm-layout .crm-main,
  body.crm-layout .page-content,
  body.crm-layout .settings-page,
  body.crm-layout .page:not(.crm-dashboard),
  body.crm-layout .opportunity-workspace,
  body.crm-layout .contact-workspace,
  body.crm-layout .property-workspace,
  body.crm-layout .opportunity-form,
  body.crm-layout .contact-form,
  body.crm-layout .property-dialog-form,
  body:has(.crm-mobile-footer) main,
  body:has(.crm-mobile-footer) .crm-main,
  body:has(.crm-mobile-footer) .page-content,
  body:has(.crm-mobile-footer) .settings-page,
  body:has(.crm-mobile-footer) .page:not(.crm-dashboard),
  body:has(.crm-mobile-footer) .opportunity-workspace,
  body:has(.crm-mobile-footer) .contact-workspace,
  body:has(.crm-mobile-footer) .property-workspace,
  body:has(.crm-mobile-footer) .opportunity-form,
  body:has(.crm-mobile-footer) .contact-form,
  body:has(.crm-mobile-footer) .property-dialog-form{
    padding-bottom:var(--mobile-bottom-nav-safe-area);
  }

  body.has-mobile-bottom-nav .opportunity-form > .actions,
  body.has-mobile-bottom-nav .contact-actions,
  body.has-mobile-bottom-nav .dialog-actions,
  body.has-mobile-bottom-nav .modal-footer,
  body.crm-layout .opportunity-form > .actions,
  body.crm-layout .contact-actions,
  body.crm-layout .dialog-actions,
  body.crm-layout .modal-footer,
  body:has(.crm-mobile-footer) .opportunity-form > .actions,
  body:has(.crm-mobile-footer) .contact-actions,
  body:has(.crm-mobile-footer) .dialog-actions,
  body:has(.crm-mobile-footer) .modal-footer{
    padding-bottom:calc(var(--mobile-bottom-nav-gap) + env(safe-area-inset-bottom));
  }

  body.has-mobile-bottom-nav .modal,
  body.has-mobile-bottom-nav .dialog[open],
  body.crm-layout .modal,
  body.crm-layout .dialog[open],
  body:has(.crm-mobile-footer) .modal,
  body:has(.crm-mobile-footer) .dialog[open]{
    padding-bottom:var(--mobile-bottom-nav-safe-area);
  }

  body.has-mobile-bottom-nav .modal-card,
  body.has-mobile-bottom-nav .dialog-card,
  body.crm-layout .modal-card,
  body.crm-layout .dialog-card,
  body:has(.crm-mobile-footer) .modal-card,
  body:has(.crm-mobile-footer) .dialog-card{
    max-height:calc(
      100dvh
      - var(--mobile-bottom-nav-height)
      - var(--mobile-bottom-nav-overlay-gap)
      - env(safe-area-inset-bottom)
    );
  }

  body.has-mobile-bottom-nav .modal-body,
  body.has-mobile-bottom-nav .dialog-body,
  body.has-mobile-bottom-nav .dialog-content,
  body.has-mobile-bottom-nav .scrollable-modal-body,
  body.crm-layout .modal-body,
  body.crm-layout .dialog-body,
  body.crm-layout .dialog-content,
  body.crm-layout .scrollable-modal-body,
  body:has(.crm-mobile-footer) .modal-body,
  body:has(.crm-mobile-footer) .dialog-body,
  body:has(.crm-mobile-footer) .dialog-content,
  body:has(.crm-mobile-footer) .scrollable-modal-body{
    padding-bottom:var(--mobile-bottom-nav-safe-area);
    scroll-padding-bottom:var(--mobile-bottom-nav-safe-area);
  }
}
.public-open-house-body {
  min-height: 100dvh;
  margin: 0;
  background: #f6f7f9;
}

.public-open-house-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.public-open-house {
  width: min(880px, 100%);
  margin: 0 auto;
  min-width: 0;
}

.public-open-house__card {
  width: 100%;
  max-width: 100%;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 18px;
  box-sizing: border-box;
}

.public-open-house-hero {
  --public-hero-ink: #0f172a;
  --public-hero-muted: #64748b;
  --public-hero-border: rgba(148, 163, 184, 0.30);
  --public-hero-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: visible;
  border: 1px solid var(--public-hero-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.82)),
    #ffffff;
  box-shadow: var(--public-hero-shadow);
}

.public-open-house-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 18px 0 0 18px;
  background: linear-gradient(180deg, #2563eb, #14b8a6);
}

.public-open-house-hero__main {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  padding-left: 6px;
}

.public-open-house-hero__eyebrow,
.public-open-house-hero__date {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  border-radius: 999px;
  line-height: 1.2;
  box-sizing: border-box;
}

.public-open-house-hero__eyebrow {
  margin-bottom: 12px;
  padding: 0.45rem 0.76rem;
  background: #ecfeff;
  border: 1px solid rgba(20, 184, 166, 0.25);
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.public-open-house-hero__date {
  margin-top: 14px;
  padding: 0.5rem 0.78rem;
  background: rgba(255, 255, 255, 0.82);
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.30);
  font-size: 0.9rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.public-open-house-hero h1 {
  max-width: 100%;
  margin: 0;
  color: var(--public-hero-ink);
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.public-open-house-hero__address {
  max-width: 100%;
  margin-top: 8px;
  color: #2563eb;
  font-size: clamp(1.18rem, 3vw, 1.72rem);
  font-weight: 850;
  line-height: 1.16;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.public-open-house-hero__lead {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--public-hero-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.public-open-house-documents {
  max-width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.70);
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.public-open-house-documents__list {
  display: grid;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-open-house-documents__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(226, 232, 240, 0.90);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-sizing: border-box;
}

.public-open-house-documents__icon {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 0.38rem;
  border-radius: 999px;
  background: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.public-open-house-documents__filename {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--public-hero-muted, #64748b);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.public-open-house-documents__empty {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.public-open-house-form-card {
  margin-top: 18px;
}

.public-open-house--feedback {
  width: min(960px, 100%);
}

.public-feedback-hero {
  padding-top: clamp(30px, 5vw, 46px);
  padding-bottom: clamp(30px, 5vw, 46px);
}

.public-feedback-documents {
  margin-top: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.public-feedback-section-header {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.public-feedback-section-header__eyebrow {
  margin: 0;
  color: #0f766e;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.public-feedback-section-header h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.public-feedback-documents__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  min-width: 0;
}

.public-feedback-document-card {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: min(100%, 260px);
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.public-feedback-document-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.13);
  transform: translateY(-1px);
}

.public-feedback-document-card__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.14));
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.public-feedback-document-card__icon img {
  width: 18px;
  height: 18px;
}

.public-feedback-document-card__text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.public-feedback-document-card__text strong,
.public-feedback-document-card__text span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.public-feedback-document-card__text strong {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.3;
}

.public-feedback-document-card__text span,
.public-feedback-documents__empty {
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.3;
}

.public-feedback-documents__empty {
  margin: 14px 0 0;
}

.public-feedback-form-card {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.08);
}

.public-open-house-form-card__header h2 {
  margin: 0;
  color: #111827;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.public-open-house__form {
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-open-house__form .field input[type="text"],
.public-open-house__form .field input[type="email"],
.public-open-house__form .field input[type="tel"],
.public-open-house__form .field input[type="url"],
.public-open-house__form .field input[type="search"],
.public-open-house__form .field input[type="number"],
.public-open-house__form .field input[type="date"],
.public-open-house__form .field input[type="time"],
.public-open-house__form .field input[type="datetime-local"],
.public-open-house__form .field select {
  width: 100%;
  height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background-color: #ffffff;
  color: #111827;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
  outline: none;
  box-sizing: border-box;
}

.public-open-house__form .field select {
  padding-right: 2.4rem;
}

.public-open-house__form .field textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 0.85rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background-color: #ffffff;
  color: #111827;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
  box-sizing: border-box;
}

.public-open-house__form .field input:focus,
.public-open-house__form .field select:focus,
.public-open-house__form .field textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

.public-feedback-form {
  gap: 18px;
}

.public-feedback-form .field {
  min-width: 0;
}

.public-feedback-form .field label {
  color: #334155;
  font-size: 0.92rem;
  font-weight: 750;
}

.public-feedback-form .field select {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.public-star-rating-field {
  display: grid;
  min-width: 0;
}

.public-star-rating {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 13px 14px 14px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
}

.public-star-rating legend {
  padding: 0;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.2;
}

.public-star-rating__control {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
}

.public-star-rating__control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.public-feedback-form .public-star-rating__control label {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 12px;
  color: #cbd5e1;
  cursor: pointer;
  line-height: 1;
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.public-feedback-form .public-star-rating__control label span {
  font-size: 2rem;
  line-height: 1;
}

.public-feedback-form .public-star-rating__control label:hover,
.public-feedback-form .public-star-rating__control label:hover ~ label,
.public-feedback-form .public-star-rating__control input:checked ~ label {
  color: #f59e0b;
}

.public-feedback-form .public-star-rating__control label:hover {
  background: rgba(245, 158, 11, 0.10);
  transform: translateY(-1px);
}

.public-feedback-form .public-star-rating__control input:focus-visible + label {
  outline: 3px solid rgba(96, 165, 250, 0.45);
  outline-offset: 2px;
  background: rgba(239, 246, 255, 0.9);
}

.public-feedback-form__actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.public-feedback-form__actions .btn-primary {
  min-height: 50px;
  padding-inline: 1.35rem;
  border-radius: 14px;
  font-weight: 850;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  font-weight: 500;
}

.choice-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
}

.choice-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.open-house-doc-list {
  display: grid;
  gap: 10px;
}

.open-house-detail {
  display: grid;
  gap: 14px;
}

.open-house-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.open-house-detail__header h1,
.open-house-detail__grid h3 {
  margin-top: 0;
}

.open-house-detail__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.open-house-detail__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 320px minmax(0, 1fr);
}

.open-house-detail__wide {
  grid-column: 1 / -1;
}

.open-house-detail__schedule {
  align-self: start;
}

.open-house-schedule-grid {
  align-items: end;
}

.open-house-schedule-form {
  display: grid;
  gap: 12px;
}

.open-house-schedule-form__actions,
.open-house-detail__form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.open-house-detail__create-form {
  display: grid;
  gap: 14px;
}

.open-house-detail--create .open-house-detail__documents {
  min-width: 0;
}

.open-house-detail--create .open-house-schedule-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.open-house-detail__qr img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
}

.open-house-detail__qr .input,
.open-house-detail__qr .kv,
.open-house-detail__documents .btn {
  margin-top: 12px;
}

.open-house-detail__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.open-house-detail__opportunity-pill {
  max-width: 100%;
}

.open-house-detail__opportunity-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open-house-detail__registrations .list-widget {
  border-radius: 10px;
  box-shadow: none;
}

.open-house-detail__registrations .list-table {
  min-width: 560px;
}

.open-house-detail__registrations .list-footer {
  padding-block: 10px;
}

.open-house-detail--dialog {
  gap: 12px;
}

.open-house-detail--dialog .open-house-detail__header h1 {
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.open-house-detail--dialog .open-house-detail__grid {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.open-house-detail--dialog .card {
  border-radius: 10px;
}

.open-house-detail--dialog .card h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.open-house-detail--dialog .open-house-detail__qr img {
  max-width: 220px;
}

@media (max-width: 720px) {
  .open-house-detail__header,
  .open-house-detail__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .open-house-detail__grid,
  .open-house-detail--dialog .open-house-detail__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .open-house-detail__wide {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .public-open-house-shell {
    align-items: start;
    padding: 16px 12px;
  }

  .public-open-house__card {
    padding: 20px 16px;
  }

  .public-open-house-hero__main {
    padding-left: 4px;
  }

  .public-open-house-hero h1 {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
  }

  .public-open-house-hero__address {
    font-size: clamp(1.08rem, 6vw, 1.45rem);
  }

  .public-open-house-hero__lead {
    font-size: 1rem;
  }

  .public-open-house-documents {
    padding: 10px;
  }

  .public-feedback-documents__list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-feedback-document-card {
    width: 100%;
    min-width: 0;
  }

  .public-star-rating {
    padding: 12px;
  }

  .public-star-rating__control {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }

  .public-star-rating__control label {
    width: 44px;
    height: 44px;
  }

  .public-open-house__form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .public-open-house__form .field,
  .public-open-house__form .span-2 {
    grid-column: 1 / -1;
    width: 100%;
  }

  .public-open-house__form .actions {
    justify-content: stretch !important;
  }

  .public-open-house__form .actions .btn {
    width: 100%;
  }
}

.board-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
  font-size: 13px;
  line-height: 1.35;
}

/* CRM rolling 5-day dashboard calendar */
.crm-week-calendar.field-card{
  border-color:rgba(37,99,235,.22);
}

.crm-week-calendar .field-card__header{
  align-items:flex-start;
  gap:12px;
  background:linear-gradient(135deg, rgba(239,246,255,.92), rgba(240,253,250,.78));
}

.crm-week-calendar .field-card__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.crm-week-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:nowrap;
  max-width:100%;
  margin-bottom:12px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}

.crm-week-nav-btn.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  gap:7px;
  min-height:40px;
  padding:7px 10px;
  border-radius:11px;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
}

.crm-week-nav-btn--icon.btn{
  width:40px;
  min-width:40px;
  padding:0;
}

.crm-week-nav-icon{
  display:block;
  width:16px;
  height:16px;
  flex:0 0 auto;
}

.crm-week-scroll{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:visible;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}

.crm-week-grid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:10px;
  min-width:0;
  align-items:stretch;
}

.crm-day-column{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:260px;
  padding:10px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
  border:1px solid rgba(203,213,225,.82);
  border-radius:15px;
  box-shadow:0 10px 22px rgba(15,23,42,.045);
}

.crm-day-column--today{
  background:linear-gradient(180deg, rgba(219,234,254,.98), rgba(239,246,255,.94));
  border-color:rgba(37,99,235,.62);
  box-shadow:0 18px 42px rgba(37,99,235,.18);
}

.crm-day-column--past{
  color:#64748b;
  background:linear-gradient(180deg, rgba(248,250,252,.9), rgba(241,245,249,.72));
  border-color:rgba(203,213,225,.58);
  box-shadow:none;
  opacity:.72;
}

.crm-day-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  margin-bottom:10px;
  padding-bottom:9px;
  border-bottom:1px solid rgba(148,163,184,.22);
}

.crm-day-label{
  color:#0f172a;
  font-size:13px;
  font-weight:900;
  line-height:1.15;
}

.crm-day-state{
  margin-top:3px;
  color:#64748b;
  font-size:10px;
  font-weight:850;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.crm-day-column--today .crm-day-label,
.crm-day-column--today .crm-day-state{
  color:#1d4ed8;
}

.crm-day-column--past .crm-day-label,
.crm-day-column--past .crm-day-state{
  color:#64748b;
}

.crm-day-count-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:26px;
  padding:0 8px;
  color:#1e3a8a;
  font-size:11px;
  font-weight:900;
  background:#eff6ff;
  border:1px solid #dbeafe;
  border-radius:999px;
  flex:0 0 auto;
}

.crm-day-column--today .crm-day-count-pill{
  color:#ffffff;
  background:#2563eb;
  border-color:#2563eb;
}

.crm-day-events{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  min-width:0;
}

.crm-empty-day{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:96px;
  padding:14px 8px;
  text-align:center;
  font-size:13px;
  border:1px dashed rgba(148,163,184,.34);
  border-radius:12px;
  background:rgba(255,255,255,.48);
}

.crm-week-events-table.tabs-table{
  width:100%;
  border-spacing:0 8px;
}

.crm-week-events-table.tabs-table tr{
  grid-template-columns:minmax(0, 1fr);
  padding:9px;
}

.crm-week-events-table .crm-event-time-cell{
  grid-column:1;
}

.crm-week-events-table .crm-event-content-cell{
  grid-column:1;
}

.crm-week-events-table .crm-event-top-row{
  flex-direction:column;
  gap:8px;
}

.crm-week-events-table .crm-event-title-line{
  width:100%;
}

.crm-week-events-table .crm-event-actions{
  align-self:flex-start;
  margin-left:0;
}

.crm-week-events-table .crm-event-actions--cols-3{
  grid-template-columns:repeat(3, 34px);
  width:114px;
}

.crm-week-events-table .crm-event-actions--cols-4{
  grid-template-columns:repeat(4, 34px);
  width:154px;
}

.crm-week-events-table .crm-event-action-btn.icon-btn{
  width:34px;
  height:34px;
}

.crm-event-external-link.icon-btn{
  width:22px;
  height:22px;
  flex:0 0 auto;
}

@media (max-width: 1180px){
  .crm-week-grid{
    grid-template-columns:repeat(5, minmax(170px, 1fr));
    min-width:900px;
  }
}

@media (max-width: 720px){
  .crm-week-calendar .field-card__header{
    align-items:stretch;
  }

  .crm-week-calendar .field-card__actions{
    justify-content:flex-start;
  }

  .crm-week-toolbar{
    width:100%;
  }

  .crm-week-nav-btn.btn{
    min-height:44px;
    padding-inline:10px;
  }

  .crm-week-nav-btn--icon.btn{
    width:44px;
    min-width:44px;
    padding:0;
  }

  .crm-week-scroll{
    margin-inline:-4px;
    padding:0 4px 8px;
  }

  .crm-week-grid{
    display:flex;
    gap:12px;
    min-width:0;
    width:max-content;
  }

  .crm-day-column{
    width:min(82vw, 360px);
    min-width:min(82vw, 360px);
    min-height:320px;
  }

  .crm-day-column--today{
    box-shadow:0 14px 34px rgba(37,99,235,.20);
  }

  .crm-week-events-table.tabs-table tr{
    padding:10px;
  }
}

@media (max-width: 720px){
  .crm-week-events-table .crm-event-actions--cols-3{
    grid-template-columns:repeat(3, 40px);
    width:132px;
  }

  .crm-week-events-table .crm-event-actions--cols-4{
    grid-template-columns:repeat(4, 40px);
    width:172px;
  }

  .crm-week-events-table .crm-event-action-btn.icon-btn{
    width:40px;
    height:40px;
  }
}

/* ---------- Campaign Management ---------- */
.campaign-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
  margin:0 0 18px;
}
.crm-kpi-card{
  padding:16px;
  border:1px solid var(--border, rgba(148,163,184,.28));
  border-radius:14px;
  background:#fff;
  box-shadow:var(--shadow-sm, 0 10px 24px rgba(15,23,42,.06));
}
.crm-kpi-card__label{
  color:var(--muted, #64748b);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}
.crm-kpi-card__value{
  margin-top:6px;
  color:var(--text, #0f172a);
  font-size:28px;
  font-weight:900;
}
.campaign-filter-form,
.campaign-url-row,
.campaign-media-actions,
.page-actions{
  display:flex;
  align-items:end;
  flex-wrap:wrap;
  gap:10px;
}
.campaign-filter-form label,
.campaign-url-row input{
  flex:1 1 220px;
}
.campaign-detail .crm-form-grid{
  display:grid;
  grid-template-columns:minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  gap:14px;
  align-items:start;
  margin-bottom:18px;
}
.campaign-detail .crm-form-grid > .field-card{
  min-width:0;
}
.campaign-basic-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
}
.campaign-basic-column{
  display:grid;
  gap:12px;
  min-width:0;
}
.campaign-basic-column .kv-row{
  min-width:0;
}
.campaign-url-qr{
  display:grid;
  gap:14px;
}
.campaign-url-row{
  align-items:flex-end;
}
.campaign-url-field{
  flex:1 1 360px;
  min-width:0;
}
.campaign-url-field input{
  overflow:hidden;
  text-overflow:ellipsis;
}
.campaign-qr-download{
  flex:0 0 auto;
}
.campaign-media-picker{
  display:block;
}
.campaign-media-field{
  min-width:0;
}
.check-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.form-grid-2{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}
.form-grid-2 label,
.form-grid-2 .field,
.form-grid-2 .span-2,
.span-2{
  min-width:0;
}
.form-grid-2 .span-2{
  grid-column:1 / -1;
}
.campaign-form .field input[type="file"]{
  width:100%;
  display:block;
  box-sizing:border-box;
  min-height:48px;
  padding:0.55rem 0.8rem;
  border:1px solid #d1d5db;
  border-radius:12px;
  background:#fff;
  color:#111827;
  font:inherit;
}
.campaign-form .field input[type="file"]:focus{
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(96, 165, 250, 0.25);
  outline:none;
}
.campaign-submission-group{
  display:grid;
  gap:10px;
  margin-top:14px;
}
.campaign-submission-group h3{
  margin:0;
  font-size:15px;
}
.campaign-submission-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  color:inherit;
  text-decoration:none;
  border:1px solid rgba(226,232,240,.9);
  border-radius:12px;
  background:#fff;
}
.campaign-submission-row__meta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted, #64748b);
  font-size:13px;
}
.campaign-public-page{
  margin:0;
  min-height:100vh;
  background:#f8fafc;
  color:#0f172a;
}
.campaign-landing{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0, 760px);
  grid-template-rows:auto 1fr;
  align-items:start;
  align-content:start;
  justify-content:center;
  column-gap:24px;
  row-gap:20px;
  padding:32px;
  background-size:auto 100vh !important;
  background-repeat:no-repeat !important;
}
.campaign-landing__panel{
  grid-column:1;
  grid-row:2;
  width:min(760px, 100%);
  padding:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.campaign-landing__header,
.campaign-landing__brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.campaign-landing__brand{
  justify-content:flex-start;
}
.campaign-landing__brand img{
  width:48px;
  height:48px;
  border-radius:12px;
  object-fit:cover;
}
.campaign-landing__workspace{
  font-weight:900;
}
.campaign-landing__broker,
.campaign-landing__copy p{
  color:#475569;
}
.campaign-lang-switch{
  color:var(--campaign-accent);
  font-weight:850;
}
.campaign-landing__copy h1{
  margin:0 0 10px;
  font-family:"Playfair Display", Georgia, "Times New Roman", serif;
  font-size:clamp(32px, 5vw, 56px);
  font-weight:800;
  line-height:1.02;
  text-align:center;
}
.campaign-landing__copy{
  grid-column:1 / -1;
  grid-row:1;
  justify-self:center;
  width:min(760px, 100%);
  text-align:center;
}
.campaign-landing__subheadline{
  font-size:20px;
  font-weight:750;
  text-align:center;
}
.campaign-public-form{
  display:grid;
  gap:16px;
  width:min(560px, 100%);
  margin:0 auto;
  padding:22px;
  border:1px solid rgba(255,255,255,.46);
  border-radius:16px;
  background:rgba(255,255,255,.5);
  backdrop-filter:blur(8px);
  box-shadow:0 16px 48px rgba(15,23,42,.14);
}
.campaign-public-form fieldset{
  display:grid;
  gap:12px;
  margin:0;
  padding:0;
  border:0;
}
.campaign-public-form legend{
  margin-bottom:4px;
  font-size:14px;
  font-weight:900;
}
.campaign-public-form label{
  display:grid;
  gap:6px;
  font-size:13px;
  font-weight:800;
}
.campaign-public-form input,
.campaign-public-form textarea,
.campaign-public-form select{
  min-height:44px;
  padding:10px 12px;
  border:1px solid rgba(148,163,184,.45);
  border-radius:12px;
  font:inherit;
}
.campaign-field-row{
  display:grid;
  gap:12px;
}
.campaign-field-row--two{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
.campaign-checkbox-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}
.campaign-checkbox-grid label,
.campaign-public-form label.campaign-consent{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:8px;
}
.campaign-checkbox-grid label{
  align-items:center;
  min-width:0;
}
.campaign-checkbox-grid span{
  min-width:0;
  overflow-wrap:anywhere;
}
.campaign-public-form input[type="checkbox"]{
  flex:0 0 auto;
  width:16px;
  height:16px;
  min-width:16px;
  min-height:0;
  padding:0;
  margin-top:2px;
  accent-color:var(--campaign-accent);
}
.campaign-form-broker{
  display:flex;
  align-items:center;
  gap:12px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(148,163,184,.34);
}
.campaign-form-broker img{
  width:64px;
  height:64px;
  flex:0 0 auto;
  border-radius:50%;
  object-fit:cover;
}
.campaign-form-workspace img.campaign-form-workspace__logo,
.campaign-form-workspace__fallback{
  width:76px;
  height:76px;
  flex:0 0 auto;
  border-radius:12px;
}
.campaign-form-workspace img.campaign-form-workspace__logo{
  object-fit:contain;
}
.campaign-form-workspace__fallback{
  display:grid;
  place-items:center;
  background:rgba(15,23,42,.08);
  color:#0f172a;
  font-size:24px;
  font-weight:900;
}
.campaign-form-broker div{
  display:grid;
  gap:3px;
  min-width:0;
}
.campaign-form-broker strong,
.campaign-form-broker span{
  overflow-wrap:anywhere;
}
.campaign-form-broker strong{
  font-weight:900;
}
.campaign-submit{
  background:var(--campaign-accent);
  border-color:var(--campaign-accent);
}
.campaign-honeypot{
  position:absolute;
  left:-10000px;
}
.campaign-success{
  margin-top:24px;
  padding:18px;
  border-radius:14px;
  background:#dcfce7;
  color:#166534;
  font-weight:850;
}
.campaign-unavailable{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:linear-gradient(135deg, #f8fafc, #eef2ff);
}
.campaign-unavailable__panel{
  width:min(520px, 100%);
  padding:28px;
  text-align:center;
  border:1px solid rgba(148,163,184,.28);
  border-radius:16px;
  background:#fff;
  box-shadow:0 24px 70px rgba(15,23,42,.12);
}
@media (max-width: 780px){
  .campaign-kpi-grid,
  .campaign-detail .crm-form-grid,
  .form-grid-2,
  .campaign-landing,
  .campaign-field-row--two,
  .campaign-checkbox-grid{
    grid-template-columns:1fr;
  }
  .campaign-landing{
    align-items:start;
    padding:16px;
  }
  .campaign-landing__copy{
    box-sizing:border-box;
    padding:16px;
    border-radius:18px;
    background:rgba(255,255,255,.82);
    -webkit-backdrop-filter:blur(6px);
    backdrop-filter:blur(6px);
  }
  .campaign-landing__panel{
    padding:20px;
  }
  .campaign-submission-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .campaign-filter-form,
  .campaign-url-row,
  .campaign-media-actions,
  .page-actions{
    align-items:stretch;
    flex-direction:column;
  }
  .campaign-basic-grid{
    grid-template-columns:1fr;
  }
  .campaign-qr-download{
    width:100%;
  }
}
