:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #657382;
  --line: #dfe4ea;
  --brand: #0f766e;
  --brand-strong: #0b5f59;
  --warn: #a15c00;
  --danger: #b42318;
  --ok: #14804a;
  --chip: #eef2f6;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.privacy-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .58);
}

.privacy-modal {
  width: min(680px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 22px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .3);
}

.privacy-modal .panel-head button[data-close-privacy] {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 25px;
}

.privacy-warning {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #f5b8b3;
  border-radius: 10px;
  color: #8f1d16;
  background: #fff4f3;
}

.privacy-confirm {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.privacy-confirm input { width: 17px; height: 17px; }
.privacy-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #176b55; background: #e8f7f1; }
.privacy-badge.danger { color: #9c2118; background: #fff0ef; }

.privacy-evidence-modal {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  height: 40dvh;
  min-height: 260px;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .3);
}

.privacy-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.privacy-evidence-head h2 { margin: 0; font-size: 18px; }
.privacy-evidence-head button { width: 36px; min-height: 34px; padding: 0; font-size: 24px; }
.privacy-evidence-viewer { flex: 1; min-height: 0; overflow: auto; background: #f3f5f7; }
.privacy-evidence-viewer img { display: block; width: 100%; height: 100%; object-fit: contain; }
.privacy-evidence-viewer iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 7px;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}

button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

button.primary:hover {
  background: var(--brand-strong);
}

.settings-app-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.sml-zero-cell {
  text-align: center;
}

.sml-zero-cell[data-sml-zero-entry] {
  cursor: context-menu;
}

.sml-zero-check {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #86d5a6;
  border-radius: 50%;
  background: #eaf9ef;
  color: #15803d;
  font-weight: 800;
}

.sml-zero-context-menu {
  position: fixed;
  z-index: 1400;
  width: 200px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sml-zero-context-menu button {
  width: 100%;
  border: 0;
  text-align: left;
}

.sml-zero-context-menu button:hover {
  background: var(--chip);
}

.compact-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.danger-button {
  background: #fff5f5;
  border-color: #f3b8b5;
  color: var(--danger);
  font-weight: 800;
}

.danger-button:hover {
  background: #fee4e2;
}

.link-button {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  text-align: left;
}

.link-button:hover {
  background: transparent;
  text-decoration: underline;
}

button.icon {
  width: 36px;
  padding: 0;
  font-size: 17px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.is-busy {
  position: relative;
  opacity: 0.75;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  background: white;
  color: var(--ink);
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-color: white;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

textarea {
  min-height: 82px;
  resize: vertical;
}

.login-page {
  min-height: 100svh;
  max-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vh, 36px);
  background: #070707;
  overflow-y: auto;
}

.login-frame {
  width: min(890px, 100%);
  min-height: min(456px, calc(100svh - 72px));
  display: grid;
  grid-template-columns: 1.15fr 0.9fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #090909;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.48);
}

.login-splash {
  display: none;
}

.login-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(28px, 4vw, 44px);
  color: white;
  background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.07), transparent 36%), #070707;
}

.login-intro img {
  width: min(216px, 72%);
  height: auto;
  object-fit: contain;
  margin-bottom: 12px;
}

.login-intro span,
.eyebrow {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-intro h1 {
  max-width: 430px;
  margin: 0;
  font-size: clamp(29px, 3.1vw, 43px);
  line-height: 1.06;
}

.login-intro p {
  max-width: 400px;
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.6;
}

.login-intro small {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(24px, 3.2vw, 42px);
  background: #ffffff;
}

.login-box {
  width: min(330px, 100%);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.login-box h1,
.view-title h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.login-box h2 {
  margin: 10px 0 0;
  font-size: clamp(29px, 2.6vw, 36px);
  line-height: 1.05;
}

.login-box p,
.view-title p {
  color: var(--muted);
  margin: 8px 0 0;
}

.login-box p {
  margin-bottom: 22px;
  font-size: 13px;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.required-mark {
  color: var(--danger);
}

.error {
  color: var(--danger);
  margin-top: 12px;
}

.success {
  color: var(--ok);
  margin-top: 12px;
  font-weight: 700;
}

.settings-notice {
  background: #f0fbf5;
  border: 1px solid #bce8cd;
  border-radius: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
}

.legacy-data-notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-weight: 800;
  margin: 0 0 12px;
  padding: 10px 12px;
}

.state-load-notice {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.state-load-notice button {
  background: transparent;
  border: 1px solid #fdba74;
  border-radius: 8px;
  color: #9a3412;
  cursor: pointer;
  font-weight: 800;
  padding: 8px 10px;
}

.integration-help {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.inbox-setup-panel { padding: 0; overflow: hidden; }
.inbox-setup-head { min-height: 76px; display: flex; align-items: center; gap: 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.inbox-setup-head > button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 750; }
.inbox-setup-head h2 { margin: 0; font-size: 22px; }
.inbox-setup-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.inbox-setup-layout { min-height: 620px; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.inbox-setup-steps { padding: 36px 26px; border-right: 1px solid var(--line); background: #fbfcfd; }
.inbox-setup-step { position: relative; min-height: 142px; display: grid; grid-template-columns: 40px 1fr; gap: 14px; color: #98a2b3; }
.inbox-setup-step:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: #eaecf0; }
.inbox-setup-step i { position: relative; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #eaecf0; border-radius: 50%; background: #f7f8fa; color: #667085; font-size: 12px; font-style: normal; font-weight: 850; }
.inbox-setup-step span { display: grid; align-content: start; gap: 9px; padding-top: 7px; }
.inbox-setup-step strong { color: #344054; font-size: 13px; }
.inbox-setup-step small { max-width: 165px; color: #7b8493; font-size: 11px; line-height: 1.45; }
.inbox-setup-step.active i { border-color: #d8e9ff; background: #eef5ff; color: #2675dc; }
.inbox-setup-step.active strong { color: #2675dc; }
.inbox-setup-step.complete i { border-color: #d1fadf; background: #ecfdf3; color: #087443; }
.inbox-setup-content { padding: 38px 42px 46px; }
.inbox-setup-copy { margin-bottom: 28px; }
.inbox-setup-copy h3 { margin: 0 0 8px; font-size: 20px; }
.inbox-setup-copy p { max-width: 780px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.inbox-channel-grid { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 18px; }
.inbox-channel-grid.provider-grid { grid-template-columns: repeat(2, minmax(220px, 360px)); }
.inbox-channel-card { position: relative; min-height: 190px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 26px; border: 1px solid #e1e5ea; border-radius: 15px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 1px 2px rgba(16,24,40,.02); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.inbox-channel-card.enabled { cursor: pointer; }
.inbox-channel-card.enabled:hover { border-color: #9fc3f4; box-shadow: 0 10px 25px rgba(16,24,40,.08); transform: translateY(-1px); }
.inbox-channel-card.locked { cursor: not-allowed; opacity: .58; }
.inbox-channel-card strong { margin-top: 8px; font-size: 15px; }
.inbox-channel-card small { max-width: 210px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.inbox-channel-card em { margin-top: auto; color: #087443; font-size: 9px; font-style: normal; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.inbox-channel-card.locked em { color: #667085; }
.inbox-channel-icon { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #f2f4f7; color: #667085; }
.inbox-channel-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inbox-channel-card.enabled .inbox-channel-icon { background: #edf7f5; color: #187f6a; }
.inbox-channel-icon b { position: absolute; right: -5px; bottom: -4px; width: 19px; height: 19px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #667085; font-size: 9px; line-height: 1; filter: grayscale(1); }
.evolution-provision-form { max-width: 650px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.evolution-provision-form label { display: grid; gap: 7px; }
.evolution-provision-form label > span { font-size: 12px; font-weight: 800; }
.evolution-provision-form label > small { color: var(--muted); font-size: 10px; }
.evolution-provision-form input { width: 100%; }
.evolution-provision-form > button { width: max-content; }
.evolution-provision-note { grid-column: 1 / -1; display: grid; gap: 5px; padding: 14px 16px; border: 1px solid #cfe8e2; border-radius: 10px; background: #f3faf8; color: #315f56; font-size: 11px; line-height: 1.45; }
.evolution-connect-card { max-width: 720px; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: center; padding: 28px; border: 1px solid #e1e5ea; border-radius: 16px; background: #fff; }
.evolution-connect-card.connected { border-color: #b7e4d2; background: #f8fdfa; }
.evolution-qr-wrap { min-height: 250px; display: grid; place-items: center; border: 1px solid #eaecf0; border-radius: 14px; background: #fff; }
.evolution-qr-image { width: 230px; height: 230px; object-fit: contain; }
.evolution-qr-placeholder { display: grid; justify-items: center; gap: 10px; color: var(--muted); }
.evolution-qr-placeholder span { width: 80px; height: 80px; display: grid; place-items: center; border: 2px dashed #98a2b3; border-radius: 12px; font-size: 24px; font-weight: 900; }
.evolution-connected-mark { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; background: #dcfae6; color: #087443; font-size: 46px; font-weight: 900; }
.evolution-connect-copy { display: grid; justify-items: start; gap: 10px; }
.evolution-connect-copy h4 { margin: 5px 0 0; font-size: 19px; }
.evolution-connect-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.evolution-connect-copy code { color: #344054; }

@media (max-width: 1050px) {
  .inbox-setup-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .inbox-setup-content { padding: 30px 26px; }
  .inbox-channel-grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
}

@media (max-width: 720px) {
  .inbox-setup-head { align-items: flex-start; }
  .inbox-setup-layout { display: block; min-height: 0; }
  .inbox-setup-steps { display: flex; gap: 8px; overflow-x: auto; padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .inbox-setup-step { min-width: 42px; min-height: 42px; display: block; }
  .inbox-setup-step::after, .inbox-setup-step span { display: none; }
  .inbox-setup-content { padding: 24px 16px; }
  .inbox-channel-grid, .inbox-channel-grid.provider-grid { grid-template-columns: 1fr; }
  .inbox-channel-card { min-height: 160px; }
  .evolution-provision-form { grid-template-columns: 1fr; }
  .evolution-connect-card { grid-template-columns: 1fr; padding: 18px; }
  .evolution-qr-wrap { min-height: 230px; }
}

.integration-log {
  margin-bottom: 14px;
}

.compact-form {
  margin-bottom: 12px;
}

.mapping-table {
  min-width: 640px;
}

.muted-copy {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.info-card strong {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
}

.info-card span {
  font-weight: 800;
}

.info-card small {
  color: var(--danger);
  font-weight: 700;
}

.structured-run-date,
.structured-run-error {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.structured-run-error {
  color: var(--danger);
}

.settings-subhead {
  margin: 18px 0 8px;
  font-size: 15px;
}

.base-access-table {
  min-width: 980px;
}

.base-access-table small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.source-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.source-checks .checkline {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.permission-matrix-wrap {
  max-height: 68vh;
}

.permission-matrix {
  min-width: 1120px;
}

.permission-matrix th {
  vertical-align: top;
}

.permission-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}

.permission-matrix thead th:first-child,
.permission-row-head {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f8fafc;
}

.permission-matrix thead th small,
.permission-row-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.permission-matrix td,
.permission-matrix th {
  padding-top: 5px;
  padding-bottom: 5px;
}

.permission-cell {
  display: grid;
  gap: 0;
  min-width: 88px;
}

.permission-cell label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.permission-cell input {
  width: 14px;
  height: 14px;
}

.settings-search {
  max-width: 360px;
}

.diagnostic-grid {
  display: grid;
  gap: 12px;
}

[data-chatwoot-inboxes] input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #147d70;
  vertical-align: middle;
}

.diagnostic-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.diagnostic-pill.ok {
  background: #e6f7eb;
  color: #087443;
}

.diagnostic-pill.warning {
  background: #fff4e5;
  color: #b54708;
}

.diagnostic-pill.error {
  background: #fee4e2;
  color: #b42318;
}

.log-tabs {
  margin-bottom: 12px;
}

.log-table-wrap table {
  min-width: 980px;
}

.password-rules {
  margin: -8px 0 8px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}

.login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  background: #070707;
  border-color: #070707;
  font-weight: 800;
}

.shell {
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.side {
  height: 100vh;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  background: #101820;
  color: white;
  padding: 14px 12px;
}

.side-head {
  display: grid;
}

.brand {
  display: grid;
  gap: 5px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 8px;
}

.brand img {
  width: 118px;
  height: auto;
  object-fit: contain;
}

.brand div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand strong {
  font-size: 18px;
  line-height: 1.05;
}

.brand span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.mobile-menu-button {
  display: none;
}

.mobile-quick-nav,
.mobile-filter-toggle,
.mobile-filter-panel-head {
  display: none;
}

.mobile-filter-popover {
  display: contents;
}

.nav {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-main {
  display: grid;
  gap: 1px;
}

.nav button,
.nav .nav-external {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  min-height: 28px;
  padding: 4px 9px;
  text-decoration: none;
  cursor: pointer;
}

.nav button.active,
.nav button:hover,
.nav .nav-external:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.nav .logout-nav {
  width: auto;
  justify-content: center;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  padding: 6px 14px;
  color: white;
  background: transparent;
}

.nav .logout-nav:hover {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
}

.side-presence {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.side-presence-list {
  max-height: 36vh;
  display: grid;
  gap: 2px;
  overflow: visible;
}

.presence-user {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr 7px;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 2px 5px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
}

.presence-user.offline {
  opacity: 0.46;
}

.presence-user:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.presence-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: #ecfdf5;
  color: var(--primary);
  font-size: 9px;
  font-weight: 900;
}

.presence-avatar img,
.presence-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.presence-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

.presence-dot,
.presence-card-status {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #98a2b3;
}

.presence-dot {
  justify-self: end;
}

.presence-dot[aria-label="Online"],
.presence-card-status.online {
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.14);
}

.presence-popover {
  position: absolute;
  left: calc(100% + 12px);
  bottom: -18px;
  z-index: 20;
  width: 230px;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.13);
  border-radius: 8px;
  background: #fff;
  color: #172033;
  box-shadow: 0 22px 50px rgba(16, 24, 40, 0.26);
}

.presence-user:hover .presence-popover {
  display: grid;
}

.presence-card-hero {
  position: relative;
  width: 100%;
  height: 108px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(8, 20, 28, 0.08), rgba(8, 20, 28, 0.08)),
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.95) 0 22%, rgba(230, 244, 241, 0.94) 23% 100%);
  border-bottom: 1px solid #e4e7ec;
}

.presence-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #106b5d;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.12);
}

.presence-card-avatar {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.98);
  background: linear-gradient(135deg, #d1fadf, #f0fdf4);
  color: #106b5d;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 12px 22px rgba(16, 24, 40, 0.18);
}

.presence-card-body {
  display: grid;
  gap: 3px;
  padding: 13px 14px 11px;
}

.presence-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.presence-card-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #3f8f2f;
  font-size: 14px;
  line-height: 1.15;
  text-transform: none;
  letter-spacing: 0;
}

.presence-card-body > span {
  color: #667085;
  font-size: 11px;
  font-weight: 750;
}

.presence-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 14px;
  padding: 12px 0;
  border-top: 1px solid #e4e7ec;
  border-bottom: 1px solid #e4e7ec;
}

.presence-card-stats div {
  display: grid;
  gap: 2px;
}

.presence-card-stats small {
  color: #667085;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.1;
}

.presence-card-stats b {
  min-width: 0;
  color: #3f8f2f;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.mode-switch { width: auto; display: flex; align-items: center; gap: 10px; margin-left: auto; margin-right: 18px; padding: 4px; border: 0; border-radius: 999px; background: transparent; color: #475467; cursor: pointer; }
.mode-switch:hover { background: #f2f4f7; }
.mode-switch-label { color: #98a2b3; font-size: 11px; font-weight: 750; line-height: 1; transition: color .16s ease; }
.mode-switch-label.is-active { color: #344054; }
.mode-switch-track { position: relative; width: 42px; height: 24px; display: block; flex: 0 0 auto; border-radius: 999px; background: #d0d5dd; box-shadow: inset 0 0 0 1px rgba(16,24,40,.08); transition: background .18s ease; }
.mode-switch-track i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(16,24,40,.25); transition: transform .18s ease; }
.mode-switch.is-attendance .mode-switch-track { background: #187f6a; }
.mode-switch.is-attendance .mode-switch-track i { transform: translateX(18px); }

.user-pill {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  color: var(--muted);
  line-height: 1.15;
}

.user-pill-button {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.user-pill strong {
  color: var(--muted);
}

.user-pill span,
.user-pill em {
  color: var(--muted);
  font-size: 13px;
}

.user-pill-text {
  display: grid;
  gap: 2px;
  text-align: right;
}

.user-pill-text em {
  font-style: normal;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ecfdf5;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content {
  min-width: 0;
  min-height: 0;
  padding: 22px;
  overflow-x: hidden;
  overflow-y: auto;
}

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

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

.knowledge-view-head {
  margin-right: 374px;
}

.page-filters {
  width: min(980px, 100%);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.page-filters.with-add-lead {
  width: auto;
}

.page-filters input#pageSearch {
  order: 2;
  width: 174px;
}

.pipeline-filter-row {
  order: 1;
  display: contents;
}

.pipeline-filter-row.secondary {
  order: 5;
  flex-basis: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.page-filters button {
  min-height: 36px;
  padding: 0;
  font-size: 17px;
}

#pageFavoriteToggle {
  order: 3;
  min-width: 58px;
  padding: 0 14px;
}

.page-filters .add-lead-button {
  order: 4;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.date-filter {
  position: relative;
}

.date-filter summary {
  min-height: 36px;
  min-width: 154px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 800;
}

.date-filter summary::-webkit-details-marker {
  display: none;
}

.date-filter summary strong {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.date-filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: 250px;
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.date-filter-menu label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.date-filter input {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12px;
}

.date-filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.date-filter-actions button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}

.multi-filter {
  position: relative;
}

.multi-filter summary {
  min-height: 36px;
  min-width: 154px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  font-size: 13px;
}

.multi-filter summary::-webkit-details-marker {
  display: none;
}

.multi-filter summary strong {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.multi-filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: 240px;
  max-height: 260px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.multi-filter-options {
  max-height: 198px;
  overflow: auto;
}

.multi-filter-all {
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.multi-filter-menu label {
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.multi-filter-menu label span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.multi-filter-menu label em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.multi-filter-menu input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 0;
  margin: 0;
  accent-color: var(--primary);
}

.multi-filter-menu label:hover {
  background: var(--soft);
}

.multi-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.multi-filter-actions button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}

.multi-filter-actions .tiny {
  min-height: 30px;
}

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

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.segmented button {
  border: 0;
  border-radius: 0;
}

.segmented button.active {
  background: var(--brand);
  color: white;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric,
.panel,
.login-box {
  background: var(--panel);
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
}

.metric em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.column {
  min-height: 65vh;
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  cursor: grab;
}

.column-head:active {
  cursor: grabbing;
}

.dragging-column {
  opacity: 0.55;
}

.column-head strong {
  font-size: 13px;
}

.count {
  min-width: 26px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 12px;
}

.cards {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  min-height: 120px;
}

.card {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 42px 9px 10px;
  display: grid;
  gap: 5px;
  cursor: grab;
}

.card:active {
  cursor: grabbing;
}

.card-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
  line-height: 1.15;
}

.card-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.opportunity-badge {
  position: relative;
  display: inline-flex;
  margin-left: 4px;
  color: #d97706;
  font-size: 11px;
  font-weight: 900;
  vertical-align: top;
}

.opportunity-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 12;
  width: 250px;
  display: none;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: left;
}

.opportunity-badge:hover .opportunity-popover,
.opportunity-badge:focus .opportunity-popover {
  display: grid;
}

.opportunity-popover > strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.opportunity-popover span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.opportunity-popover span.current {
  padding: 6px;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
}

.opportunity-popover b {
  color: var(--ink);
}

.card-right-actions {
  position: absolute;
  top: 5px;
  right: 8px;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.favorite-inline {
  width: auto;
  min-width: 0;
  min-height: 0;
  height: 1.25em;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.25em;
  line-height: 1.25;
}

.favorite-inline:hover,
.favorite-inline.primary,
.favorite-inline.primary:hover {
  background: transparent;
  border-color: transparent;
  color: var(--brand);
}

.card .meta {
  gap: 3px;
}

.card-project {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.broker-menu {
  position: relative;
  margin-top: -6px;
}

.broker-menu-button {
  width: 32px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.broker-menu-button:hover,
.broker-menu.open .broker-menu-button {
  background: #eef7f6;
  color: var(--brand);
}

.broker-menu-list,
.tag-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  width: 210px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.broker-menu.open .broker-menu-list,
.tag-menu.open .tag-menu-list {
  display: grid;
  gap: 3px;
}

.broker-menu-list button,
.tag-menu-list button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.broker-menu-list button:hover:not(:disabled),
.tag-menu-list button:hover:not(:disabled) {
  background: #eef7f6;
  color: var(--brand-strong);
}

.broker-menu-list button:disabled,
.tag-menu-list button:disabled {
  background: #f5f7f9;
  color: #a0aab6;
}

.card-info-actions {
  display: grid;
  gap: 0;
  justify-items: center;
}

.card-info-action {
  position: relative;
  width: 32px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  cursor: default;
}

.card-whatsapp-action { color: #279d5b; }
.card-whatsapp-action { padding: 0; border: 0; background: transparent; cursor: pointer; }
.card-whatsapp-action svg { fill: currentColor; stroke: none; opacity: .72; }
.chatwoot-card-preview { width: 300px; }
.chatwoot-card-preview-message { display: grid; gap: 2px; margin-top: 7px; padding: 7px 8px; border-radius: 8px; background: #f1f5f9; }
.chatwoot-card-preview-message.outgoing { background: #dcfce7; }
.chatwoot-card-preview-message b { color: #64748b; font-size: 9px; }
.chatwoot-card-preview-message span { display: -webkit-box; overflow: hidden; color: #334155; font-size: 10px; font-weight: 500; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.lead-chatwoot-readonly-body { min-height: 110px; }
.lead-chatwoot-start { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; }
.lead-chatwoot-start h2 { margin: 0 0 4px; }
.lead-chatwoot-start p { margin: 0; }
.whatsapp-start-button { border-color: #1ba766; background: #25d366; color: #073d24; font-weight: 850; }
.whatsapp-start-button:hover { border-color: #159556; background: #20c45d; }
.whatsapp-start-button.compact { min-height: 30px; padding: 0 9px; font-size: 11px; }
.lead-chatwoot-readonly-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.lead-chatwoot-readonly-timeline { max-height: 360px; display: flex; flex-direction: column; gap: 7px; overflow-y: auto; padding: 10px; border-radius: 10px; background: #f8fafc; }
.lead-chatwoot-readonly-timeline .chatwoot-card-preview-message { max-width: 82%; margin: 0; }
.lead-chatwoot-readonly-timeline .chatwoot-card-preview-message.outgoing { align-self: flex-end; }

.card-info-action svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-info-action[data-card-info="message"] {
  color: #3b82f6;
}

.card-info-action[data-card-info="document"] {
  color: #f59e0b;
}

.card-info-action:hover,
.card-info-action:focus {
  background: #eef7f6;
  outline: 0;
}

.card-info-popover {
  position: absolute;
  top: 0;
  right: calc(100% + 8px);
  z-index: 9;
  width: 260px;
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: left;
}

.column:first-child .card-info-popover,
.column:nth-child(2) .card-info-popover {
  right: auto;
  left: calc(100% + 8px);
}

.card-info-action:hover .card-info-popover,
.card-info-action:focus .card-info-popover {
  display: grid;
  gap: 8px;
}

.card-info-popover > strong {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.card-info-popover p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.card-info-popover em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.card-info-preview-item {
  display: grid;
  gap: 2px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.card-info-preview-item:last-of-type {
  border-bottom: 0;
}

.card-info-preview-item strong {
  font-size: 12px;
}

.card-info-preview-item span {
  color: var(--muted);
  font-size: 11px;
}

.opportunity-list {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.opportunity-row {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.opportunity-row.implicit {
  border-style: dashed;
}

.opportunity-row.selected {
  border-color: #fb923c;
  background: #fff7ed;
  box-shadow: 0 10px 24px rgba(251, 146, 60, 0.16);
}

.opportunity-row strong {
  color: var(--ink);
  font-size: 13px;
}

.opportunity-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.opportunity-save-icon {
  flex: 0 0 auto;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  line-height: 1;
}

.opportunity-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  margin-right: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fed7aa;
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
}

.opportunity-row span,
.opportunity-row small {
  color: var(--muted);
  font-size: 12px;
}

.opportunity-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.opportunity-fields .field {
  display: grid;
  grid-template-rows: auto 34px;
  gap: 3px;
  margin: 0;
}

.opportunity-fields .field label {
  font-size: 10px;
}

.opportunity-fields .field input {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
}

.opportunity-row.selected .opportunity-fields .field input {
  border-color: #fed7aa;
  background: #fffaf5;
}

.unit-management-title,
.unit-management-head,
.table-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unit-management-title h2 { margin: 0; }
.unit-management-table { margin-top: 10px; }
.unit-management-table table { min-width: 1900px; }
.unit-management-table th { white-space: nowrap; }
.unit-management-table td { vertical-align: middle; }
.unit-management-table input,
.unit-management-table select { min-width: 110px; height: 34px; padding: 5px 7px; }
.unit-management-table tr.selected-row { background: #fff7ed; }

.inline-table-select { position: relative; min-width: 110px; }
.inline-table-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.inline-table-select-trigger i {
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 5px solid #64748b;
  transition: transform .15s ease;
}
.inline-table-select.open .inline-table-select-trigger i { transform: rotate(180deg); }
.inline-table-select-menu {
  display: none;
  position: fixed;
  z-index: 10050;
  min-width: 140px;
  max-height: 220px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .18);
}
.inline-table-select.open .inline-table-select-menu { display: grid; gap: 2px; }
.inline-table-select-menu button { min-height: 30px; padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; white-space: nowrap; }
.inline-table-select-menu button:hover,
.inline-table-select-menu button.selected { background: #e8f5f2; color: var(--primary); }

.table-pagination {
  justify-content: flex-end;
  flex-wrap: wrap;
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}
.table-pagination label { display: inline-flex; align-items: center; gap: 6px; }
.table-pagination select { min-height: 32px; padding: 4px 28px 4px 8px; }

.menu-file-action { display: block; width: 100%; padding: 9px 12px; cursor: pointer; }
.menu-file-action input { display: none; }

.availability-unit-context {
  position: fixed;
  z-index: 10020;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .2);
}
.availability-unit-context button { display: block; width: 100%; border: 0; background: transparent; text-align: left; }
.availability-unit-context button:hover { background: #f1f5f9; }

@media (max-width: 720px) {
  .unit-management-head { align-items: flex-start; }
  .unit-management-head, .unit-management-title { flex-wrap: wrap; }
  .table-pagination { justify-content: flex-start; }
}

.card[data-open-lead],
tr[data-open-lead] {
  cursor: pointer;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 3px;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: 12px;
}

.chip-warning {
  background: #fff7e6;
  color: var(--warn);
}

.danger-chip {
  background: #fee2e2;
  color: var(--danger);
}

.chip-info {
  background: #e0f2fe;
  color: #075985;
}

.compact-row-actions {
  gap: 6px;
  flex-wrap: nowrap;
}

.compact-row-actions button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.capi-response-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.capi-response-grid .full {
  grid-column: 1 / -1;
}

.json-preview {
  max-height: 300px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notification-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notification-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.notification-icon.whatsapp {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #128c7e;
}

.notification-icon.email {
  font-size: 21px;
}

.notification-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.muted-cell {
  color: var(--muted);
}

.lead-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  min-height: 24px;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--tag-color, #475467) 46%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color, #475467) 14%, white);
  color: color-mix(in srgb, var(--tag-color, #475467) 78%, #111827);
  font-size: 12px;
  font-weight: 700;
}

.static-tag {
  pointer-events: none;
}

.tag-menu {
  position: relative;
}

.tag-menu-button {
  width: auto;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tag-menu-button:hover,
.tag-menu.open .tag-menu-button {
  border-color: var(--brand);
  background: #eef7f6;
  color: var(--brand-strong);
}

.tag-menu-list {
  right: auto;
  left: 0;
  width: 190px;
}

.tag-menu-list button {
  min-height: 34px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.38);
}

.modal {
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.profile-modal {
  width: min(680px, 100%);
}

.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-photo-preview {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ecfdf5;
  color: var(--primary);
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-photo-actions input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.file-choice {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.file-choice:hover {
  border-color: rgba(17, 128, 117, 0.36);
  background: #f8fffd;
}

.profile-photo-actions small {
  color: var(--muted);
  font-weight: 750;
}

.wide-modal {
  width: min(1040px, 100%);
}

.modal-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.duplicate-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.compare-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.compare-card h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.compare-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.compare-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.compare-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.modal-actions {
  margin-top: 14px;
}

.color-swatch {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -4px;
  margin-right: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  margin: 2px 3px 2px 0;
  border-radius: 999px;
  background: #eef3f7;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-ok {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.inline-subtle-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.inline-subtle-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--green);
}

.availability-map-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.availability-map-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
}

.availability-map-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--green);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.access-table {
  min-width: 980px;
}

.leads-table {
  table-layout: fixed;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-pagination label,
.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-pagination select {
  min-height: 34px;
  padding: 0 30px 0 10px;
  font-size: 13px;
}

.pagination-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.pagination-actions span {
  color: var(--ink);
}

.lead-col-favorite {
  width: 58px;
}

.lead-col-name {
  width: 22%;
}

.lead-col-phone {
  width: 15%;
}

.lead-col-email {
  width: 18%;
}

.lead-col-status {
  width: 13%;
}

.lead-col-broker {
  width: 12%;
}

.lead-col-source {
  width: 8%;
}

.lead-col-tags {
  width: 10%;
}

.lead-col-action {
  width: 110px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 5px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fafb;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.table-sort {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: inherit;
}

.table-sort:hover,
.table-sort.active {
  background: transparent;
  color: var(--brand);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.dashboard-controls,
.report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-select {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 800;
}

.compact-select span {
  color: var(--text);
}

.compact-select select,
.compact-select input {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  outline: none;
}

.sales-chart-panel {
  margin-bottom: 14px;
}

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

.panel-title-row h2,
.panel-title-row p {
  margin: 0;
}

.panel-title-row span {
  color: var(--muted);
  font-weight: 800;
}

.sales-chart {
  position: relative;
  min-height: 260px;
  display: grid;
  grid-template-columns: repeat(12, minmax(64px, 1fr));
  align-items: end;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 4px 4px;
}

.sales-month {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  min-width: 64px;
  text-align: center;
}

.sales-line-svg {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 8px;
  width: calc(100% - 8px);
  height: 170px;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(56, 217, 255, 0.76)) drop-shadow(0 4px 10px rgba(14, 165, 233, 0.26));
}

.sales-line-svg polyline {
  fill: none;
  stroke: #38d9ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.sales-bars {
  position: relative;
  height: 170px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
}

.sales-bars span {
  width: 12px;
  height: var(--bar-height);
  border-radius: 4px 4px 0 0;
  background: var(--bar-color);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
}

.sales-line-dot {
  position: absolute;
  left: 50%;
  z-index: 3;
  width: 8px;
  height: 8px;
  border: 2px solid #38d9ff;
  border-radius: 999px;
  background: white;
  box-shadow: 0 0 0 3px rgba(56, 217, 255, 0.22), 0 0 14px rgba(56, 217, 255, 0.82);
  transform: translateX(-50%);
}

.sales-month strong {
  font-size: 12px;
  text-transform: uppercase;
}

.sales-month em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.wide-modal {
  width: min(920px, calc(100vw - 32px));
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.report-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.report-bar-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.report-bar-card {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.report-bars {
  display: grid;
  gap: 8px;
}

.report-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.report-bar-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-bar-row strong {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.report-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.report-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.report-view-tabs {
  margin-top: 14px;
}

.report-bars-vertical {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 190px;
}

.report-vertical-item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: end;
  gap: 6px;
  min-height: 170px;
  text-align: center;
}

.report-vertical-item strong,
.report-vertical-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.report-vertical-bar {
  position: relative;
  height: 125px;
  overflow: hidden;
  border-radius: 7px 7px 4px 4px;
  background: #eef2f7;
}

.report-vertical-bar i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  border-radius: 7px 7px 0 0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

.nested-panel {
  background: #fbfcfd;
}

.nested-panel h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.nested-panel.wide {
  grid-column: 1 / -1;
}

.compact-table table {
  min-width: 0;
}

.compact-table th,
.compact-table td {
  padding: 7px 10px;
}

.broker-ranking {
  display: grid;
  gap: 8px;
}

.broker-rank-row {
  display: grid;
  grid-template-columns: 24px 36px 1fr auto;
  align-items: center;
  gap: 8px;
}

.broker-rank-row img,
.broker-rank-row i {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f3f0;
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
  object-fit: cover;
}

.broker-rank-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

@media print {
  .side,
  .topbar,
  .view-head-actions,
  .legacy-data-notice {
    display: none !important;
  }

  .shell,
  .main,
  .content {
    display: block;
    margin: 0;
    padding: 0;
    background: white;
  }

  .panel {
    break-inside: avoid;
  }
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-width: 0;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

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

.panel-head h2 {
  margin: 0;
}

.compact-head {
  align-items: center;
  margin-bottom: 10px;
}

.compact-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.compact-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-table {
  margin-top: 8px;
}

.lev-schedule-table input[type="date"] {
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.lev-schedule-table th,
.lev-schedule-table td {
  padding-top: 5px;
  padding-bottom: 5px;
}

.email-template-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.email-template-editor-pane,
.email-template-preview-pane {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.email-template-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.email-template-toolbar select,
.email-template-toolbar input[type="color"],
.email-template-toolbar button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.email-template-toolbar select {
  padding: 0 8px;
  min-width: 100px;
}

.email-template-toolbar .toolbar-separator {
  width: 1px;
  height: 28px;
  background: var(--line);
  margin: 0 2px;
}

#levEmailLineHeight {
  min-width: 88px;
}

.email-template-toolbar input[type="color"] {
  width: 42px;
  padding: 3px;
}

.email-template-toolbar button {
  min-width: 34px;
  padding: 0 9px;
}

.capture-email-toolbar {
  display: grid;
  gap: 5px;
}

.capture-toolbar-row {
  display: flex;
  gap: 5px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 2px;
}

.capture-align-row {
  justify-content: flex-start;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.capture-email-toolbar select {
  width: auto;
  min-width: 0;
}

#captureEmailFontFamily { width: 140px; }
#captureEmailFontSize { width: 76px; }
#captureEmailLineHeight { width: 88px; }
#levEmailFontFamily { width: 140px; }
#levEmailFontSize { width: 76px; }
#levEmailLineHeight { width: 88px; }

.capture-email-toolbar button {
  display: inline-grid;
  width: 34px;
  min-width: 34px;
  padding: 0;
  place-items: center;
  font-size: 15px;
}

.capture-email-toolbar button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.capture-email-toolbar .toolbar-separator {
  margin: 3px 0;
}

.template-variable-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 0;
}

.template-variable-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.template-variable-button {
  border: 1px dashed var(--brand);
  border-radius: 999px;
  background: #ecfdf8;
  color: var(--brand);
  padding: 6px 10px;
  font-weight: 800;
  cursor: pointer;
}

.rich-email-editor {
  min-height: 280px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  line-height: 1.5;
  outline: none;
  overflow: auto;
}

.rich-email-editor:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 128, 116, 0.12);
}

.temperature-funnel-panel {
  margin-top: 14px;
}

.temperature-funnel {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 8px 0 2px;
}

.temperature-stage {
  width: var(--temperature-width);
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--temperature-color);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16), 0 0 18px rgba(0, 168, 255, 0.12);
}

.temperature-stage span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.temperature-stage strong {
  font-size: 16px;
}

.temperature-stage em {
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.availability-masterplan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.availability-masterplan-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.availability-masterplan-head h2 {
  margin: 0;
}

.availability-masterplan-head small {
  color: var(--muted);
  font-weight: 800;
}

.availability-masterplan-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.masterplan-zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.masterplan-zoom-button,
.masterplan-zoom-reset {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.masterplan-zoom-button {
  width: 30px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.masterplan-zoom-reset {
  min-width: 58px;
  padding: 0 9px;
  font-size: 12px;
}

.masterplan-zoom-range {
  width: 126px;
  accent-color: var(--green);
}

.availability-masterplan-viewport {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: #f8fafc;
  max-height: 640px;
  cursor: grab;
  overscroll-behavior: contain;
}

.availability-masterplan-viewport.dragging {
  cursor: grabbing;
  user-select: none;
}

.availability-masterplan-canvas {
  position: relative;
  min-width: 100%;
  background: #fff;
}

.availability-masterplan-image {
  display: block;
  width: 100%;
  max-height: none;
  object-fit: contain;
}

.visual-map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.visual-map-hotspot-shape {
  fill: color-mix(in srgb, var(--unit-status-color) 28%, transparent);
  stroke: var(--unit-status-color);
  stroke-width: 0.22;
  vector-effect: non-scaling-stroke;
  opacity: 0.84;
  cursor: pointer;
  pointer-events: auto;
}

.visual-map-hotspot-shape.active {
  fill: rgba(251, 146, 60, 0.32);
  stroke: #f97316;
  stroke-width: 0.36;
}

.visual-map-hotspot-dot {
  fill: var(--unit-status-color);
  stroke: #fff;
  stroke-width: 0.32;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.24));
  opacity: 0.78;
  cursor: pointer;
  pointer-events: auto;
  animation: visual-map-pulse 1.8s ease-in-out infinite;
}

.visual-map-hotspot-dot.active {
  fill: #f97316;
  opacity: 0.95;
}

.visual-map-hotspot-point {
  fill: #fff;
  stroke: #111827;
  stroke-width: 0.22;
  filter: drop-shadow(0 2px 5px rgba(15, 23, 42, 0.26));
  cursor: pointer;
  pointer-events: auto;
}

.visual-map-hotspot-point.active {
  fill: #fed7aa;
  stroke: #f97316;
}

.visual-map-editor-panel {
  overflow: visible;
}

.visual-map-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.visual-map-editor-main,
.visual-map-editor-side {
  min-width: 0;
}

.visual-map-editor-main {
  display: grid;
  gap: 12px;
}

.visual-map-editor-canvas {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: crosshair;
}

.visual-map-editor-layer {
  z-index: 2;
}

.visual-map-editor-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.visual-map-editor-side h3 {
  margin: 0;
}

.visual-map-editor-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
}

.compact-grid {
  gap: 8px;
}

.compact-table-wrap table th,
.compact-table-wrap table td {
  padding: 5px 8px;
}

.selected-row {
  background: #fff7ed;
}

.full-width {
  width: 100%;
}

@keyframes visual-map-pulse {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 0.95;
  }
}

@media (max-width: 1100px) {
  .visual-map-editor-layout {
    grid-template-columns: 1fr;
  }
}

.masterplan-unit-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.masterplan-unit-pin {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  max-width: 68px;
  min-width: 38px;
  height: 26px;
  padding: 0 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--unit-status-color);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: auto;
}

.masterplan-unit-pin:hover {
  z-index: 6;
  transform: translate(-50%, -50%) scale(1.12);
}

.masterplan-unit-pin.active {
  z-index: 7;
  outline: 3px solid rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 0 5px rgba(255, 237, 213, 0.9), 0 12px 26px rgba(15, 23, 42, 0.25);
}

.masterplan-unit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.masterplan-unit-chip {
  border: 1px solid var(--line);
  border-left: 5px solid var(--unit-status-color);
  border-radius: 8px;
  background: #fff;
  padding: 7px 10px;
  display: grid;
  gap: 2px;
  min-width: 104px;
  text-align: left;
  cursor: pointer;
}

.masterplan-unit-chip.active {
  outline: 2px solid var(--green);
  background: #ecfdf5;
}

.masterplan-unit-chip strong {
  font-size: 13px;
  color: var(--ink);
}

.masterplan-unit-chip span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
}

.preview-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.template-preview-body {
  max-height: 390px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: auto;
}

@media (max-width: 900px) {
  .email-template-builder {
    grid-template-columns: 1fr;
  }
}

.lead-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.lead-detail .field {
  gap: 4px;
  margin-top: 8px;
}

.lead-main-panels,
.lead-side-panels {
  display: grid;
  gap: 14px;
}

.lead-data-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.interest-grid {
  display: grid;
  gap: 10px;
}

.meta-detail-panel {
  margin-top: 0;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.meta-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-grid strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.answers-table {
  min-width: 620px;
}

.answers-table th,
.answers-table td {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.answers-list {
  display: grid;
  gap: 10px;
}

.answer-item {
  display: grid;
  gap: 5px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.answer-item:last-child {
  border-bottom: 0;
}

.answer-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.answer-item strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.meta-ad-link {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.meta-ad-link a,
.meta-ad-link strong {
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: normal;
}

.comment-form {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}

.comment-composer-panel textarea {
  min-height: 88px;
}

.comment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.checkline input {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
}

.field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chat-timeline {
  display: grid;
  gap: 10px;
}

.chat-message {
  display: flex;
}

.chat-message.outgoing {
  justify-content: flex-end;
}

.chat-message.incoming {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(100%, 420px);
  min-width: 190px;
  display: grid;
  gap: 5px;
  padding: 9px 11px;
  border: 1px solid #bce8cd;
  border-radius: 8px 8px 2px 8px;
  background: #e6f7eb;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.chat-message.incoming .chat-bubble {
  border-color: var(--line);
  border-radius: 8px 8px 8px 2px;
  background: white;
}

.chat-message.deleted .chat-bubble {
  border-style: dashed;
  color: var(--muted);
}

.chat-bubble.clickable {
  cursor: pointer;
}

.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.chat-meta strong {
  color: var(--ink);
  font-size: 13px;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-bubble small {
  color: var(--muted);
  font-size: 11px;
}

.chat-meta .action-menu-button {
  width: 24px;
  min-height: 24px;
  font-size: 18px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tabs button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.compact-tabs {
  margin: 2px 0 10px;
}

.editor {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-icon {
  width: 32px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.action-icon:hover {
  background: #eef7f6;
  color: var(--brand);
}

.action-menu {
  display: inline-grid;
  place-items: center;
}

.action-menu-button {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.action-menu-button.menu-label-button {
  width: auto;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.action-menu-button:hover,
.action-menu.open .action-menu-button {
  background: #eef7f6;
  color: var(--brand);
}

.action-menu-list {
  position: fixed;
  top: var(--menu-top, 0);
  bottom: var(--menu-bottom, auto);
  right: var(--menu-right, 12px);
  z-index: 30;
  width: 190px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.email-preview-modal {
  width: min(1040px, 100%);
}

.email-preview-window {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.email-preview-toolbar,
.email-preview-fields,
.email-preview-body {
  padding: 16px 18px;
}

.email-preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.email-preview-toolbar h2 {
  margin: 6px 0 0;
}

.email-chip {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--brand);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
}

.email-preview-fields {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.email-preview-fields div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
}

.email-preview-fields span {
  color: var(--muted);
  font-weight: 800;
}

.email-preview-body {
  max-height: 56vh;
  overflow: auto;
  line-height: 1.5;
}

.email-preview-project {
  margin-top: 22px;
}

.email-preview-table {
  width: 100%;
}

.action-menu.measuring .action-menu-list {
  display: grid;
  gap: 3px;
  visibility: hidden;
  pointer-events: none;
}

.action-menu.open .action-menu-list {
  display: grid;
  gap: 3px;
}

.action-menu-list button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.action-menu-list button:hover:not(:disabled) {
  background: #eef7f6;
  color: var(--brand-strong);
}

.action-menu-list .danger-menu-item {
  color: var(--danger);
}

.modal-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 190px 1fr 56px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: #e6eaef;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--brand);
}

.funnel-panel {
  margin-bottom: 14px;
}

.funnel-visual {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 8px 0 2px;
}

.funnel-stage {
  width: min(760px, 100%);
  display: grid;
  justify-items: center;
  gap: 4px;
}

.funnel-bar {
  width: var(--funnel-width);
  min-height: 58px;
  min-width: 170px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 34px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--funnel-color), color-mix(in srgb, var(--funnel-color) 76%, #111827));
  color: white;
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18), 0 0 20px color-mix(in srgb, var(--funnel-color) 22%, transparent);
  border: 0;
  cursor: pointer;
  font: inherit;
}

.funnel-bar:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.funnel-bar span {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.funnel-bar strong {
  font-size: 20px;
}

.funnel-conversion {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .tag {
    border-color: var(--tag-color, #475467);
    background: white;
    color: var(--tag-color, #475467);
  }

  .funnel-bar {
    background: var(--funnel-color);
  }
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
}

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

.muted-text {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.knowledge-panel {
  display: grid;
  gap: 12px;
  margin-right: 374px;
  padding: 14px;
}

.knowledge-tools {
  max-width: none;
}

.knowledge-categories {
  margin-bottom: 0;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

.knowledge-layout::after {
  display: none;
}

.knowledge-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.knowledge-chat {
  position: fixed;
  top: 86px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  width: 360px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  max-height: none;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 18px 48px rgba(16, 24, 32, 0.08);
}

.knowledge-chat-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.knowledge-chat-menu {
  position: relative;
}

.knowledge-chat-menu .settings-action-menu {
  right: 0;
  left: auto;
  width: 260px;
  max-height: 360px;
  overflow-y: auto;
}

.knowledge-chat-history {
  display: grid;
  gap: 2px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.knowledge-chat-history button {
  display: grid;
  gap: 2px;
  justify-items: start;
  min-height: auto;
  padding: 8px;
  text-align: left;
}

.knowledge-chat-history button span {
  color: var(--muted);
  font-size: 11px;
}

.knowledge-chat h3 {
  margin: 0 0 3px;
  font-size: 18px;
}

.knowledge-chat p {
  margin: 0;
}

.knowledge-chat-scroll {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 2px;
  overflow-y: auto;
}

.knowledge-chat-empty {
  margin: auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.knowledge-chat-message {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.knowledge-chat-message.is-user {
  justify-items: end;
}

.knowledge-chat-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.knowledge-chat-message.is-user .knowledge-chat-bubble {
  border-color: #b7e4d8;
  background: #effcf8;
}

.knowledge-typing-cursor {
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--brand);
  vertical-align: -2px;
  animation: knowledgeCursorBlink 0.85s infinite;
}

@keyframes knowledgeCursorBlink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.knowledge-chat-sources {
  max-width: 92%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.knowledge-chat-sources span {
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.knowledge-chat-sources button {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: white;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-chat-form {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.knowledge-chat-form textarea {
  font-family: inherit;
  resize: vertical;
}

.knowledge-chat-form button {
  width: 100%;
}

.knowledge-article-modal {
  width: min(860px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow-y: auto;
}

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

.knowledge-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.knowledge-card.is-draft {
  background: #fffaf0;
}

.knowledge-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.knowledge-card-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.knowledge-card h3 {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 1.25;
}

.knowledge-card p {
  margin: 0;
  color: var(--muted);
}

.knowledge-card details {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.knowledge-card summary {
  color: var(--brand);
  cursor: pointer;
  font-weight: 800;
}

.knowledge-article-body {
  margin-top: 10px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.knowledge-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.knowledge-keywords span {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.knowledge-card small {
  color: var(--muted);
  font-size: 11px;
}

.knowledge-editor {
  display: grid;
  gap: 12px;
}

.knowledge-role-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-check {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 700;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.compact-help {
  margin-top: 0;
}

.full {
  grid-column: 1 / -1;
}

.status-active {
  color: var(--ok);
  font-weight: 700;
}

.status-inactive {
  color: var(--warn);
  font-weight: 700;
}

.empty {
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

@media (max-width: 920px) {
  html,
  body {
    min-height: 100%;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .login-page {
    min-height: 100dvh;
    max-height: none;
    display: block;
    padding: 0;
    background: radial-gradient(circle at 50% 4%, rgba(255, 255, 255, 0.1), transparent 34%), #070707;
  }

  .login-frame {
    width: 100%;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(230px, 36dvh) minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .login-intro {
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: max(28px, env(safe-area-inset-top)) 24px 26px;
    text-align: center;
    background: transparent;
  }

  .login-intro img {
    width: min(210px, 62vw);
    margin: 0;
    filter: drop-shadow(0 12px 26px rgba(255, 255, 255, 0.08));
  }

  .login-splash {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 44%, rgba(255, 255, 255, .09), transparent 32%), #070707;
    pointer-events: none;
    animation: mobile-login-splash-out 1.55s ease both;
  }

  .login-splash img {
    width: min(230px, 64vw);
    height: auto;
    animation: mobile-login-splash-logo 1.12s cubic-bezier(.2, .8, .2, 1) both;
    filter: drop-shadow(0 0 22px rgba(255, 255, 255, .13));
  }

  .login-intro span {
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    letter-spacing: .14em;
  }

  .login-intro h1,
  .login-intro p,
  .login-intro small {
    display: none;
  }

  .login-panel {
    min-height: 64dvh;
    align-items: start;
    padding: 30px 24px max(32px, env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
    background: #fff;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.22);
  }

  .login-page:has(.login-splash) .login-panel {
    animation: mobile-login-panel-in .58s 1.15s cubic-bezier(.2, .8, .2, 1) both;
  }

  .login-box {
    width: min(420px, 100%);
  }

  .login-box h2 {
    margin-top: 7px;
    font-size: 30px;
  }

  .login-box p {
    margin-bottom: 22px;
    font-size: 14px;
  }

  .login-box .eyebrow {
    color: var(--brand);
  }

  .login-box .field {
    margin-top: 16px;
  }

  .login-box input {
    min-height: 52px;
    padding: 10px 13px;
    border-radius: 12px;
    background: #f8fafb;
    font-size: 16px;
  }

  .login-submit {
    min-height: 54px;
    margin-top: 10px;
    border-radius: 13px;
    font-size: 16px;
  }

  @keyframes mobile-login-splash-logo {
    from {
      opacity: 0;
      transform: scale(.82);
      filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    }
    45% {
      opacity: 1;
      transform: scale(1.035);
      filter: drop-shadow(0 0 20px rgba(255, 255, 255, .18));
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes mobile-login-splash-out {
    0%, 72% {
      opacity: 1;
      visibility: visible;
    }
    100% {
      opacity: 0;
      visibility: hidden;
    }
  }

  @keyframes mobile-login-panel-in {
    from {
      opacity: 0;
      transform: translateY(34px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .login-splash {
      display: none;
    }

    .login-panel {
      animation: none;
    }
  }

  .shell {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .side {
    position: relative;
    z-index: 3;
    height: auto;
    overflow: visible;
    padding: 10px 12px;
  }

  .side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    padding: 0;
    border-bottom: 0;
    margin-bottom: 0;
  }

  .brand strong,
  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-weight: 800;
  }

  .nav {
    position: absolute;
    top: calc(100% + 6px);
    right: 12px;
    left: 12px;
    display: none;
    gap: 2px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: #101820;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    max-height: calc(100dvh - 88px - env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .nav.open {
    display: grid;
  }

  .nav button {
    min-height: 27px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .main {
    display: block;
  }

  .topbar {
    display: none;
  }

  .metrics,
  .dashboard-grid,
  .report-charts,
  .report-grid,
  .lead-detail,
  .duplicate-compare,
  .meta-grid,
  .settings-grid,
  .logs-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .view-head,
  .topbar {
    align-items: stretch;
    flex-direction: column;
    height: auto;
    padding: 14px;
  }

  .view-head-actions {
    justify-content: stretch;
  }

  .view-head-actions button {
    width: 100%;
  }

  .content {
    min-height: auto;
    padding: 14px 14px 88px;
    overflow: visible;
  }

  .view-head {
    position: relative;
    gap: 12px;
    padding: 0;
  }

  .view-head:has(.mobile-filter-toggle) .view-title {
    padding-right: 58px;
  }

  .mobile-quick-nav {
    position: fixed;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 50;
    min-height: 62px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: center;
    padding: 6px;
    border: 1px solid rgba(16, 24, 32, 0.14);
    border-radius: 18px;
    background: rgba(16, 24, 32, 0.96);
    box-shadow: 0 14px 36px rgba(16, 24, 40, 0.34);
    backdrop-filter: blur(14px);
  }

  .mobile-quick-nav.mobile-quick-full {
    right: 0;
    bottom: 0;
    left: 0;
    min-height: calc(72px + env(safe-area-inset-bottom));
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
  }

  .mobile-quick-nav.mobile-quick-light {
    border-color: rgba(16, 24, 40, 0.14);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 30px rgba(16, 24, 40, 0.14);
  }

  .mobile-quick-nav button {
    position: relative;
    min-width: 0;
    min-height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: rgba(255, 255, 255, 0.74);
    font-size: 25px;
  }

  .mobile-quick-nav button + button::before {
    content: "";
    position: absolute;
    top: 24%;
    bottom: 24%;
    left: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.16);
  }

  .mobile-quick-nav button.active {
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
  }

  .mobile-quick-nav.mobile-quick-light button {
    color: #667085;
  }

  .mobile-quick-nav.mobile-quick-light button.active {
    background: #e9f4ef;
    color: var(--brand-strong);
  }

  .mobile-quick-nav.mobile-quick-light button + button::before {
    background: rgba(16, 24, 40, 0.12);
  }

  .mobile-quick-avatar {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: #ecfdf5;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
  }

  .mobile-quick-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-filter-toggle {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 46px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-size: 22px;
  }

  .mobile-filter-toggle strong {
    font-size: 11px;
  }

  .mobile-filter-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .mobile-filter-popover.mobile-collapsed {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: flex-end;
    padding: 12px 12px max(12px, env(safe-area-inset-bottom));
    background: rgba(15, 23, 42, 0.48);
  }

  .mobile-filter-popover.mobile-collapsed.open {
    display: flex;
  }

  .mobile-filter-popover.mobile-collapsed .page-filters {
    max-height: min(72vh, 680px);
    overflow-y: auto;
    padding: 12px;
    border-radius: 0 0 16px 16px;
    background: #fff;
  }

  .mobile-filter-popover.mobile-collapsed .mobile-filter-action-content {
    width: 100%;
    display: grid;
    max-height: min(72vh, 680px);
    overflow-y: auto;
    padding: 12px;
    border-radius: 0 0 16px 16px;
    background: #fff;
  }

  .mobile-filter-popover.mobile-collapsed .dashboard-controls,
  .mobile-filter-popover.mobile-collapsed .report-actions {
    width: 100%;
    display: grid;
  }

  .mobile-filter-popover.mobile-collapsed .date-filter-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  .mobile-filter-popover.mobile-collapsed .date-filter,
  .mobile-filter-popover.mobile-collapsed .multi-filter {
    flex-basis: 100%;
  }

  .mobile-filter-popover.mobile-collapsed .date-filter-menu,
  .mobile-filter-popover.mobile-collapsed .multi-filter-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  .mobile-filter-popover.mobile-collapsed .mobile-filter-panel-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    background: #fff;
  }

  .mobile-filter-popover.mobile-collapsed .mobile-filter-panel-head button {
    width: 34px;
    min-height: 34px;
    padding: 0;
    font-size: 22px;
  }

  .mobile-filter-popover.mobile-collapsed {
    flex-direction: column;
    justify-content: flex-end;
  }

  .mobile-filter-popover.mobile-expanded {
    display: contents;
  }

  .view-head:has(.mobile-filter-popover.mobile-expanded) .mobile-filter-toggle {
    display: none;
  }

  .view-head:has(.mobile-filter-popover.mobile-expanded) .view-title {
    padding-right: 0;
  }

  .page-filters {
    width: 100%;
    justify-content: stretch;
  }

  .pipeline-filter-row,
  .pipeline-filter-row.secondary {
    display: contents;
  }

  .page-filters.with-add-lead {
    width: 100%;
  }

  .page-filters .add-lead-button {
    width: 100%;
  }

  .page-filters input#pageSearch {
    flex: 1 1 180px;
    width: auto;
  }

  #pageFavoriteToggle {
    flex: 0 0 58px;
  }

  .date-filter {
    flex: 1 1 160px;
  }

  .date-filter summary {
    min-width: 0;
  }

  .date-filter-menu {
    right: auto;
    left: 0;
    width: min(250px, calc(100vw - 24px));
  }

  .multi-filter {
    flex: 1 1 160px;
  }

  .multi-filter summary {
    width: 100%;
    min-width: 0;
  }

  .multi-filter-menu {
    left: 0;
    right: auto;
    width: min(280px, calc(100vw - 32px));
  }

  .metrics {
    gap: 10px;
  }

  .metrics.compact-mobile-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .compact-mobile-metrics .metric {
    min-width: 0;
    padding: 9px 6px;
    text-align: center;
  }

  .compact-mobile-metrics .metric span {
    display: block;
    min-height: 30px;
    font-size: 9px;
    line-height: 1.15;
  }

  .compact-mobile-metrics .metric strong {
    margin-top: 2px;
    font-size: clamp(20px, 7vw, 30px);
  }

  .metric {
    padding: 12px;
  }

  .kanban {
    grid-auto-columns: minmax(248px, 84vw);
  }

  .table-wrap {
    max-width: 100%;
  }

  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .table-pagination label,
  .pagination-actions {
    flex-wrap: wrap;
  }

  .pagination-actions button {
    flex: 1 1 96px;
  }

  table {
    min-width: 680px;
  }

  .access-table {
    min-width: 860px;
  }

  .mapping-table,
  .answers-table {
    min-width: 560px;
  }

  .funnel-bar {
    min-width: 132px;
    min-height: 50px;
    padding: 10px 18px;
  }

  .funnel-bar strong {
    font-size: 17px;
  }
}

@media (max-width: 760px) {
  .knowledge-view-head,
  .knowledge-panel {
    margin-right: 0;
  }

  .knowledge-layout {
    grid-template-columns: 1fr;
  }

  .knowledge-layout::after {
    display: none;
  }

  .knowledge-chat {
    position: static;
    width: auto;
    grid-template-rows: auto minmax(280px, 46vh) auto;
    min-height: 420px;
    max-height: none;
    box-shadow: none;
  }
}

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

.backup-status-grid > div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.backup-status-grid strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.backup-status-grid span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.backup-delivery-list {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.backup-delivery-list p {
  margin: 0;
}

.mono-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

@media (max-width: 900px) {
  .backup-status-grid {
    grid-template-columns: 1fr;
  }
}

.availability-projects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.availability-project-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  display: grid;
  align-content: space-between;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.availability-project-card:hover,
.availability-project-card.active {
  border-color: var(--green);
  box-shadow: 0 12px 30px rgba(15, 118, 110, .14);
  transform: translateY(-1px);
}

.availability-project-card strong {
  color: var(--ink);
  font-size: 18px;
}

.availability-project-card span,
.availability-project-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.availability-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
}

.availability-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.availability-block,
.availability-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.availability-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.availability-block-head h2 {
  margin: 0;
  font-size: 18px;
}

.availability-status-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.availability-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--chip-color, #e5e7eb) 45%, #d7dee8);
  border-radius: 999px;
  background: color-mix(in srgb, var(--chip-color, #e5e7eb) 13%, white);
  color: #334155;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.availability-status-chip i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--chip-color, #e5e7eb);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--chip-color, #e5e7eb) 18%, white);
}

.availability-status-chip strong {
  color: var(--ink);
  font-size: 12px;
}

.availability-grid-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.availability-house-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(68px, 1fr));
  gap: 8px;
  min-width: 904px;
  padding: 12px;
}

.availability-grid {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.availability-grid th,
.availability-grid td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.availability-grid thead th,
.availability-grid tbody th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.availability-unit-cell {
  width: 100%;
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--unit-status-color, #e5e7eb) 72%, #334155);
  border-radius: 6px;
  background: color-mix(in srgb, var(--unit-status-color, #e5e7eb) 82%, white);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 -10px 18px rgba(15, 23, 42, 0.1), 0 4px 10px rgba(15, 23, 42, 0.08);
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.28);
}

.availability-unit-cell.active {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.availability-unit-cell.virtual {
  border-style: dashed;
  color: #64748b;
  background: #f8fafc;
  box-shadow: none;
  text-shadow: none;
}

.availability-detail {
  position: sticky;
  top: 96px;
  padding: 16px;
}

.availability-detail h2 {
  margin: 0 0 4px;
}

.availability-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.availability-detail-title button,
.availability-mobile-backdrop {
  display: none;
}

.unit-detail-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.unit-detail-list div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.unit-detail-list dt {
  color: var(--muted);
  font-weight: 900;
}

.unit-detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.unit-plan-link,
.full-width {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  margin-top: 10px;
}

.compact-editor textarea {
  min-height: 104px;
}

.front-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.front-choice-grid label {
  position: relative;
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.front-choice-grid label:has(input:checked) {
  border-color: var(--brand);
  background: #ecf8f4;
  box-shadow: 0 0 0 1px var(--brand);
}

.front-choice-grid input {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  min-height: 16px;
  margin: -8px 0 0;
  accent-color: var(--brand);
}

.front-choice-grid span {
  color: var(--ink);
  font-weight: 850;
}

.front-choice-grid small {
  color: var(--muted);
  font-size: 11px;
}

.mock-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #f5cf7a;
  border-radius: 9px;
  background: #fff8e7;
  color: #7a4b00;
}

.mock-banner span {
  color: #8a6119;
}

.mock-chip {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1cc;
  color: #855200;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.marketing-tabs {
  margin-bottom: 14px;
}

.marketing-panel,
.marketing-action-detail {
  padding: 16px;
}

.marketing-cashflow table {
  min-width: 1360px;
}

.marketing-cashflow th,
.marketing-cashflow td {
  white-space: nowrap;
  text-align: right;
}

.marketing-cashflow th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: #fff;
}

.marketing-month-value {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  white-space: nowrap;
  cursor: pointer;
}

.marketing-month-value:hover {
  color: var(--primary, #0f766e);
  text-decoration: underline;
}

.marketing-budget-forms {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.5fr);
  gap: 18px;
  margin-bottom: 18px;
}

.marketing-budget-forms form {
  align-content: start;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 12px;
  padding: 14px;
}

.marketing-expenses-table td:nth-child(6) {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-expenses-table .money,
.marketing-panel td.money {
  text-align: right;
  white-space: nowrap;
}

.marketing-table-limit {
  margin: 10px 0 0;
}

.marketing-month-timeline {
  margin: 4px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--border, #d8dee8);
  border-radius: 12px;
  background: #fbfcfe;
}

.marketing-timeline-track {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 28px 6px 14px;
}

.marketing-timeline-track button {
  position: relative;
  width: 30px;
  height: 22px;
  flex: 0 0 30px;
  border: 0;
  border-top: 2px solid #cbd5e1;
  border-radius: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.marketing-timeline-track button i {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}

.marketing-timeline-track button:nth-child(3n + 1) i {
  width: 16px;
  height: 16px;
  top: -9px;
}

.marketing-timeline-track button span {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 27px;
  z-index: 5;
  transform: translateX(-50%);
  padding: 5px 8px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.marketing-timeline-track button:hover span {
  display: block;
}

.marketing-timeline-track button.selected {
  border-top-color: #0f766e;
}

.marketing-timeline-track button.selected i {
  border-color: #0f766e;
  background: #0f766e;
}

.marketing-timeline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
}

.marketing-budget-alerts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.marketing-budget-alerts span {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.marketing-budget-alerts .attention { background: #fff7cc; color: #765b00; }
.marketing-budget-alerts .warning { background: #ffedd5; color: #9a3412; }
.marketing-budget-alerts .critical { background: #fee2e2; color: #b91c1c; }
.marketing-budget-alerts .danger { background: #b91c1c; color: #fff; }

.marketing-tree-parent th:first-child {
  white-space: nowrap;
}

.marketing-tree-parent th button {
  width: 24px;
  height: 24px;
  margin-right: 7px;
  padding: 0;
  border-radius: 5px;
  font-weight: 700;
}

.marketing-tree-child th:first-child {
  padding-left: 42px;
  color: #64748b;
  font-weight: 500;
}

.marketing-balance-row th,
.marketing-balance-row td {
  border-top: 2px solid #cbd5e1;
  background: #f8fafc;
  font-weight: 600;
}

.marketing-balance-row.accumulated th,
.marketing-balance-row.accumulated td {
  background: #eef6f4;
  color: #115e59;
}

.marketing-month-timeline.is-transparent {
  margin: 2px 0 16px;
  padding: 8px 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.marketing-month-timeline.is-transparent .marketing-timeline-track {
  display: grid;
  grid-template-columns: repeat(var(--timeline-count, 58), minmax(0, 1fr));
  width: 100%;
  height: 58px;
  padding: 8px 2px 24px;
  overflow: hidden;
}

.marketing-month-timeline.is-transparent .marketing-timeline-track button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 22px;
  min-width: 0;
  border: 0;
  background: transparent;
}

.marketing-month-timeline.is-transparent .marketing-timeline-track button small {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  color: #84918e;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.marketing-month-timeline.is-transparent .marketing-timeline-track button i {
  position: static;
  display: block;
  width: 2px;
  height: 5px;
  border: 0;
  border-radius: 0;
  background: #cbd5d1;
  transform: none;
  transition: height 120ms ease, background 120ms ease;
}

.marketing-month-timeline.is-transparent .marketing-timeline-track button.size-1 i { height: 7px; }
.marketing-month-timeline.is-transparent .marketing-timeline-track button.size-2 i { height: 10px; }
.marketing-month-timeline.is-transparent .marketing-timeline-track button.size-3 i { height: 14px; }
.marketing-month-timeline.is-transparent .marketing-timeline-track button.size-4 i { height: 8px; }
.marketing-month-timeline.is-transparent .marketing-timeline-track button.selected i { background: #6b7f7a; }
.marketing-month-timeline.is-transparent .marketing-timeline-track button:hover i,
.marketing-month-timeline.is-transparent .marketing-timeline-track button:focus-visible i { height: 20px; background: #111827; }

.marketing-cashflow-filters {
  justify-content: flex-end;
}

.marketing-date-choice {
  min-height: 36px;
  display: inline-flex;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.marketing-date-choice strong {
  color: var(--muted);
  font-size: 11px;
}

.marketing-kanban-filter {
  min-height: 36px;
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.marketing-kanban-filter select {
  min-width: 72px;
  max-width: 150px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  outline: none;
}

.marketing-date-picker {
  position: relative;
}

.marketing-month-calendar {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  width: 246px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.marketing-calendar-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  text-align: center;
}

.marketing-calendar-head button {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: var(--soft);
  font-size: 20px;
}

.marketing-calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.marketing-calendar-grid button {
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
}

.marketing-calendar-grid button:hover { background: var(--soft); }
.marketing-calendar-grid button.selected { background: var(--brand); color: #fff; }

.marketing-timeline-tooltip {
  position: fixed;
  z-index: 1000;
  padding: 7px 9px;
  border-radius: 7px;
  background: #111827;
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .2);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
}

.marketing-cashflow-cell {
  min-height: 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
}

.marketing-cashflow-cell:hover { background: transparent; text-decoration-color: currentColor; }

.marketing-tree-toggle {
  width: auto !important;
  height: auto !important;
  margin-right: 7px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit;
  box-shadow: none !important;
  font-size: 15px;
  line-height: 1;
}

.marketing-tree-spacer {
  display: inline-block;
  width: 15px;
  margin-right: 7px;
}

.marketing-tree-entry th:first-child {
  max-width: 320px;
  padding-left: 66px;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-cashflow tbody tr:nth-child(even):not(.marketing-balance-row) th,
.marketing-cashflow tbody tr:nth-child(even):not(.marketing-balance-row) td {
  background: #f7f9fb;
}

.marketing-launch-tabs {
  margin-bottom: 14px;
}

.marketing-fund-preview {
  padding: 14px;
  border-radius: 10px;
  background: #eef6f4;
}

.marketing-fund-preview span,
.marketing-fund-preview strong {
  display: block;
}

.marketing-fund-preview strong {
  margin-top: 4px;
  color: #115e59;
  font-size: 24px;
}

.marketing-consumption {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
}

.marketing-consumption > span {
  width: 76px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.marketing-consumption i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
}

.marketing-funds-table .negative {
  color: #b91c1c;
  font-weight: 600;
}

.marketing-action-layout {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.8fr);
  gap: 14px;
  align-items: start;
}

.marketing-action-list {
  display: grid;
  gap: 8px;
}

.marketing-action-card {
  min-height: 104px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 5px;
  padding: 13px;
  text-align: left;
}

.marketing-action-card.active {
  border-color: var(--brand);
  background: #edf8f4;
  box-shadow: 0 0 0 1px var(--brand);
}

.marketing-action-card span,
.marketing-action-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.marketing-action-card em {
  color: var(--brand);
  font-weight: 850;
}

.marketing-action-detail h3 {
  margin: 18px 0 8px;
}

.marketing-approval-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 9px;
  background: #f6f8fa;
}

.marketing-approval-bar div {
  display: grid;
  gap: 2px;
}

.marketing-approval-bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.marketing-provision-list {
  display: grid;
  gap: 10px;
}

.marketing-provision-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(230px, .8fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.marketing-provision-card h3,
.marketing-provision-card p {
  margin: 3px 0;
}

.marketing-provision-card > div > span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.marketing-provision-card dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
}

.marketing-provision-card dl div {
  display: grid;
}

.marketing-provision-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.marketing-provision-card dd {
  margin: 0;
  font-weight: 850;
}

.marketing-email-modal {
  width: min(820px, 100%);
}

.marketing-events-table {
  min-width: 900px;
}

.marketing-back-button {
  margin-bottom: 10px;
}

.marketing-event-editor,
.marketing-event-workspace {
  padding: 16px;
}

.marketing-event-workspace {
  margin-top: 14px;
}

.marketing-event-tabbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.marketing-event-tabbar .tabs {
  margin: 0;
}

.marketing-event-fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
  align-items: end;
}

.marketing-event-fields .event-name,
.marketing-event-fields .event-location {
  grid-column: span 2;
}

.marketing-event-fields .event-project,
.marketing-event-fields .event-contact-email,
.marketing-event-fields .event-attachments {
  grid-column: span 2;
}

.marketing-event-fields .event-assets {
  grid-column: span 3;
}

.marketing-event-fields .field {
  gap: 3px;
  margin-top: 0;
  min-width: 0;
}

.marketing-event-fields input,
.marketing-event-fields select {
  min-height: 36px;
  padding: 7px 9px;
}

.marketing-event-fields label {
  display: flex;
  align-items: flex-end;
  min-height: 20px;
  margin-bottom: 3px;
  font-size: 10px;
  line-height: 1.1;
}

.marketing-attachments {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.marketing-attachments span {
  max-width: 150px;
  overflow: hidden;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-event-workspace > .panel-head {
  margin-top: 14px;
}

.marketing-gantt-scroll {
  width: 100%;
  overflow-x: scroll;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.marketing-gantt {
  width: calc(250px + var(--timeline-width));
  min-width: 760px;
  overflow: hidden;
}

.marketing-gantt-head,
.marketing-gantt-row {
  display: grid;
  grid-template-columns: 250px var(--timeline-width);
}

.marketing-gantt-head {
  background: #f3f6f8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.marketing-gantt-head > *,
.marketing-gantt-row > * {
  padding: 10px 12px;
}

.marketing-gantt-head > .marketing-gantt-days {
  padding: 0;
}

.marketing-gantt-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 44px;
  border-left: 1px solid var(--line);
}

.marketing-gantt-days span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  border-right: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.marketing-gantt-days span.weekend {
  background: #e8edf1;
}

.marketing-gantt-days small {
  color: var(--muted);
  font-size: 8px;
}

.marketing-gantt-row {
  border-top: 1px solid var(--line);
}

.marketing-gantt-row > * {
  padding-top: 5px;
  padding-bottom: 5px;
}

.marketing-gantt-row > div:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.marketing-gantt-row > div:first-child span {
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-gantt-track {
  position: relative;
  min-height: 24px;
  padding-top: 0;
  padding-bottom: 0;
  border-left: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, transparent 0, transparent 43px, #edf0f3 43px, #edf0f3 44px);
}

.marketing-gantt-row[data-marketing-activity-row] > div:first-child {
  cursor: context-menu;
}

.marketing-gantt-row.is-payment {
  background: #fffaf0;
}

.marketing-gantt-row.is-payment .marketing-gantt-track i {
  background: linear-gradient(90deg, #f59e0b, #f97316);
  box-shadow: 0 4px 12px rgba(245, 158, 11, .22);
}

.marketing-gantt-row.is-milestone .marketing-gantt-track i {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin-left: 9px;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 3px;
  background: #334155;
  box-shadow: none;
}

.marketing-item-editor {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.marketing-item-modal {
  width: min(960px, 100%);
  max-height: min(88vh, 820px);
  overflow-y: auto;
}

.marketing-quote-modal {
  width: min(680px, 100%);
}

.marketing-items-qc-wrap {
  overflow: visible;
}

.marketing-items-qc {
  min-width: 1050px;
}

.marketing-items-qc td {
  padding-top: 5px;
  padding-bottom: 5px;
}

.marketing-event-provisions-table td {
  padding-top: 5px;
  padding-bottom: 5px;
  font-weight: 400;
}

.marketing-items-qc th:nth-child(n+4):nth-child(-n+6),
.marketing-items-qc td:nth-child(n+4):nth-child(-n+6) {
  width: 180px;
}

.marketing-quote-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 145px;
  cursor: context-menu;
}

.marketing-quote-page-menu {
  position: fixed;
  z-index: 1200;
  width: 190px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .2);
}

.marketing-quote-page-menu button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  text-align: left;
}

.marketing-quote-page-menu button:hover {
  background: #f0f5f8;
}

.marketing-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 400;
  white-space: nowrap;
}

.marketing-price[class*="rank-"]::before {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  content: "";
}

.marketing-price.rank-low::before {
  background: #22c55e;
}

.marketing-price.rank-middle::before {
  background: #f59e0b;
}

.marketing-price.rank-high::before {
  background: #ef4444;
}

.marketing-quote-cell.is-winner .marketing-price {
  border-color: #47be75;
  background: #eaf9ef;
  color: #176835;
}

.marketing-quote-actions {
  position: relative;
}

.marketing-quote-actions summary {
  display: grid;
  width: 25px;
  height: 25px;
  place-content: center;
  border-radius: 6px;
  color: #1671d9;
  cursor: pointer;
  font-size: 16px;
  list-style: none;
}

.marketing-quote-edit {
  display: grid;
  width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 0;
  place-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1671d9;
  font-size: 16px;
}

.marketing-quote-edit:hover {
  background: #e8f2ff;
}

.marketing-quote-actions summary::-webkit-details-marker {
  display: none;
}

.marketing-quote-actions summary:hover,
.marketing-quote-actions[open] summary {
  background: #e8f2ff;
}

.marketing-quote-actions > div {
  position: absolute;
  z-index: 35;
  top: calc(100% + 4px);
  right: 0;
  width: 190px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .18);
}

.marketing-quote-actions > div button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  text-align: left;
}

.marketing-supplier-hover {
  position: absolute;
  z-index: 30;
  bottom: 100%;
  left: 0;
  display: none;
  width: 260px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .2);
}

.marketing-activity-context {
  position: fixed;
  z-index: 1000;
  width: 160px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .2);
}

.marketing-activity-context button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  text-align: left;
}

.marketing-activity-context button:hover {
  background: #f0f5f8;
}

.marketing-quote-cell:hover .marketing-supplier-hover {
  display: block;
}

.marketing-supplier-hover p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.marketing-supplier-hover button {
  min-height: 30px;
  color: #1671d9;
}

.marketing-supplier-popover {
  position: fixed;
  z-index: 1100;
  width: 270px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .2);
}

.marketing-supplier-popover p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.marketing-supplier-popover button {
  min-height: 30px;
  color: #1671d9;
}

.marketing-quote-empty {
  color: var(--muted);
}

.sml-import-modal {
  width: min(1180px, 96vw);
  max-height: 90vh;
  overflow: auto;
}

.sml-duplicate-box {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e5a900;
  border-radius: 10px;
  background: #fff9e8;
}

.sml-duplicate-box.is-blocked {
  border-color: #e57373;
  background: #fff1f1;
}

.sml-duplicate-box h3 {
  margin: 0;
}

.sml-duplicate-box > div,
.sml-duplicate-box fieldset {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(100, 116, 139, .25);
  border-radius: 8px;
}

.sml-duplicate-box label {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.sml-public-page {
  position: fixed;
  inset: 0;
  overflow: auto;
  min-height: 100vh;
  padding: 32px;
  background: #f2f5f7;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sml-public-login,
.sml-public-success {
  width: min(460px, 100%);
  margin: 10vh auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .1);
}

.sml-public-content {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.sml-public-title {
  margin-bottom: 18px;
}

.sml-public-title h1,
.sml-public-login h1,
.sml-public-success h1 {
  margin: 0 0 8px;
}

.sml-public-totals {
  position: sticky;
  z-index: 5;
  top: 0;
  padding: 10px 0;
  background: #f2f5f7;
}

.sml-public-confirm {
  width: 100%;
  margin-top: 16px;
}

.sml-public-select-all {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 2px 0 10px;
  cursor: pointer;
  font-weight: 700;
}

.sml-public-select-all input,
.sml-public-checkbox {
  width: 15px;
  min-width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  padding: 0;
  border-radius: 3px;
}

.lead-comment-audio {
  width: min(420px, 100%);
  margin-top: 8px;
}

.event-capture-page {
  position: fixed;
  inset: 0;
  overflow: auto;
  padding: 24px;
  background: radial-gradient(circle at top, #eef8f2 0, #f6f7f9 52%);
  -webkit-overflow-scrolling: touch;
}

.event-capture-card {
  width: min(540px, 100%);
  margin: 5vh auto;
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

.event-capture-brand {
  margin-bottom: 18px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.event-capture-card h1,
.event-capture-success h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.08;
}

.event-capture-card form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.event-capture-main-button {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
  font-weight: 800;
}

.event-capture-session {
  display: grid;
  grid-template-columns: 1fr auto;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.event-capture-session span { color: var(--muted); font-size: 12px; }
.event-capture-session strong { grid-column: 1; }
.event-capture-session button { grid-column: 2; grid-row: 1 / span 2; }

.event-capture-mic {
  display: grid;
  grid-template-columns: 48px 1fr;
  min-height: 72px;
  padding: 10px 14px;
  text-align: left;
}

.event-capture-mic > span { grid-row: 1 / span 2; align-self: center; font-size: 30px; }
.event-capture-mic strong { align-self: end; }
.event-capture-mic small { align-self: start; color: var(--muted); }
.event-capture-mic.is-recording { border-color: #dc2626; background: #fff1f2; color: #b91c1c; }
.event-capture-audio-status { min-height: 20px; color: var(--muted); font-size: 12px; }

.event-capture-success {
  display: grid;
  place-items: center;
  text-align: center;
}

.event-capture-success > section {
  display: flex;
  width: min(760px, 100%);
  min-height: calc(100vh - 48px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.event-capture-qr {
  display: flex;
  width: 75vh;
  max-width: 75vw;
  margin: 18px auto;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.event-capture-qr img {
  width: 100%;
  max-height: 68vh;
  border-radius: 16px;
  object-fit: contain;
}

@media (max-width: 720px) {
  .event-capture-page { padding: 14px; }
  .event-capture-card { margin: 0 auto; border-radius: 16px; }
  .event-capture-success { padding: 20px; }
  .event-capture-success > section { width: 100%; }
  .event-capture-qr { width: 100%; max-width: min(75vh, 100%); }
  .event-capture-success > section { min-height: calc(100vh - 40px); }
}

@media (max-width: 720px) {
  .sml-public-page {
    padding: 16px;
  }
}

.marketing-provision-tabs {
  display: flex;
  margin-bottom: 12px;
  overflow-x: auto;
}

.marketing-provision-tabs button {
  flex: 0 0 auto;
}

.marketing-qc-head {
  margin: 4px 0 -8px;
}

.marketing-qc-table {
  min-width: 650px;
}

.marketing-qc-table tr.is-winner {
  background: #edf9f5;
}

.marketing-quote-form {
  display: grid;
  grid-template-columns: 1fr 180px 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #f8fafb;
}

.marketing-provision-note {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 11px 13px;
  border-radius: 9px;
  background: #fff7e6;
  color: #7a4a00;
  font-size: 12px;
}

.marketing-gantt-track i {
  position: absolute;
  top: 50%;
  left: var(--gantt-left);
  width: var(--gantt-width);
  height: 16px;
  min-width: 8px;
  transform: translateY(-50%);
  border-radius: 5px;
  background: linear-gradient(90deg, var(--brand), #23a089);
  box-shadow: 0 4px 12px rgba(15, 118, 110, .2);
}

.marketing-activity-modal {
  width: min(720px, 100%);
}

@media (max-width: 920px) {
  .mock-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .marketing-action-layout,
  .marketing-provision-card {
    grid-template-columns: 1fr;
  }

  .marketing-budget-forms {
    grid-template-columns: 1fr;
  }

  .marketing-action-list .panel-head,
  .marketing-approval-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .marketing-tabs {
    display: flex;
    overflow-x: auto;
  }

  .marketing-tabs button {
    flex: 0 0 auto;
  }

  .marketing-event-editor .panel-head,
  .marketing-event-workspace .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .marketing-event-workspace {
    overflow-x: auto;
  }

  .marketing-event-tabbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .marketing-event-fields .event-name,
  .marketing-event-fields .event-location,
  .marketing-event-fields .event-project,
  .marketing-event-fields .event-contact-email,
  .marketing-event-fields .event-assets,
  .marketing-event-fields .event-attachments {
    grid-column: span 2;
  }

  .marketing-quote-form {
    grid-template-columns: 1fr;
  }

  .marketing-provision-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

.unit-editor small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

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

  .availability-layout {
    grid-template-columns: 1fr;
  }

  .availability-detail {
    position: static;
  }
}

@media (max-width: 680px) {
  .availability-projects {
    grid-template-columns: 1fr;
  }

  .availability-grid {
    width: max-content;
    min-width: 720px;
  }

  .availability-block {
    min-width: 0;
    overflow: hidden;
  }

  .availability-detail {
    display: none;
  }

  .availability-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    background: rgba(15, 23, 42, 0.48);
    touch-action: none;
  }

  .availability-detail.has-unit {
    position: fixed;
    top: 50%;
    right: 12px;
    left: 12px;
    z-index: 81;
    display: block;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-50%);
    border-radius: 16px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
    -webkit-overflow-scrolling: touch;
  }

  .availability-detail-title button {
    width: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 999px;
    font-size: 22px;
  }

  .availability-block-head {
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .availability-status-summary {
    width: auto;
    max-width: none;
    min-width: 0;
    flex: 1;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0;
  }

  .availability-status-chip {
    min-width: 0;
    flex: 0 1 38px;
    min-height: 28px;
    justify-content: center;
    gap: 3px;
    padding: 2px 3px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  .availability-status-chip i {
    width: 11px;
    height: 11px;
  }

  .availability-status-chip .availability-status-label {
    display: none;
  }

  .availability-status-chip.expanded {
    padding-right: 8px;
    border-color: color-mix(in srgb, var(--chip-color, #e5e7eb) 45%, #d7dee8);
    background: color-mix(in srgb, var(--chip-color, #e5e7eb) 13%, white);
  }

  .availability-status-chip.expanded .availability-status-label {
    display: inline;
  }
}

.user-menu-wrap { position: relative; }
.user-account-menu { position: absolute; z-index: 80; top: calc(100% + 8px); right: 0; width: 210px; padding: 6px; border: 1px solid #dfe5e7; border-radius: 12px; background: #fff; box-shadow: 0 14px 38px rgba(15, 23, 42, .18); }
.user-account-menu button { width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: #17212b; text-align: left; font-weight: 650; }
.user-account-menu button:hover { background: #f1f5f5; }
.chatline-devices-modal { width: min(860px, calc(100vw - 32px)); }
.chatline-devices-modal .row-actions { margin: 16px 0; }
.chatline-pairing { display: flex; align-items: center; gap: 22px; margin: 16px 0; padding: 18px; border: 1px solid #bfe3da; border-radius: 14px; background: #f2faf8; }
.chatline-pairing img { width: 210px; height: 210px; border-radius: 8px; }
.chatline-pairing p { margin: 6px 0 0; color: #667085; }
.chatline-pairing.expired { justify-content: center; min-height: 210px; }
.chatline-pairing-refresh { width: 76px; height: 76px; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 50%; background: #168278; color: #fff; font-size: 48px; line-height: 1; }
.chatline-pairing-refresh:hover { background: #116b63; transform: rotate(18deg); }
.device-trash { color: #d92d20 !important; }
.mobile-icon-field { grid-column: span 1; }
.mobile-icon-upload { display: flex; align-items: center; gap: 16px; }
.mobile-icon-upload img { width: 88px; height: 88px; flex: 0 0 auto; object-fit: cover; border: 1px solid #d8dee4; border-radius: 20px; background: #101820; }
.mobile-icon-upload>div { display: grid; gap: 8px; }
.mobile-guide-upload { display: grid; grid-template-columns: minmax(280px, 520px) 1fr; gap: 18px; align-items: center; }
.mobile-guide-upload img { width: 100%; max-height: 260px; object-fit: contain; border: 1px solid #d8dee4; border-radius: 14px; background: #f7f9fa; }
@media (max-width: 760px) { .mobile-guide-upload { grid-template-columns: 1fr; } }
.compact-checkbox { width: 18px !important; height: 18px !important; min-width: 18px; accent-color: #168278; }
[data-inbox-users] { min-width: 210px; padding: 5px; border: 1px solid #d8dee4; border-radius: 8px; }
@media (max-width: 680px) { .chatline-pairing { flex-direction: column; text-align: center; } }

.inbox-standalone .inbox-mock { height: 100dvh; }
.text-link {
  display: block;
  width: fit-content;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 13px;
  text-decoration: underline;
}

/* Protótipo da central de atendimento */
.inbox-standalone-body { overflow: hidden; background: #f8fafc; }
.inbox-standalone { width: 100%; min-height: 100dvh; }
.inbox-standalone .inbox-mock { width: 100%; height: 100dvh; min-height: 0; margin: 0; }
.inbox-mode-shell { height: 100dvh; min-height: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; background: #f8fafc; }
.inbox-mode-topbar { grid-row: 1; display: flex; border-color: rgba(255,255,255,.12); background: #101820; }
.chat-line-header-brand { display: grid; align-content: center; gap: 1px; margin-right: auto; color: #fff; }
.chat-line-header-brand img { width: 112px; height: auto; display: block; }
.chat-line-header-brand span { color: rgba(255,255,255,.7); font-size: 9px; font-weight: 400; line-height: 1; }
.inbox-mode-topbar .mode-switch { margin-left: 0; }
.inbox-mode-topbar .mode-switch:hover { background: rgba(255,255,255,.08); }
.inbox-mode-topbar .mode-switch-label { color: rgba(255,255,255,.5); }
.inbox-mode-topbar .mode-switch-label.is-active { color: #fff; }
.inbox-mode-topbar .user-pill strong,
.inbox-mode-topbar .user-pill em { color: rgba(255,255,255,.82); }
.inbox-mode-main { grid-row: 2; min-width: 0; min-height: 0; overflow: hidden; }
.inbox-mode-main .inbox-mock { width: 100%; height: 100%; min-height: 0; margin: 0; }
.management-menu-trigger { position: fixed; left: 18px; bottom: 18px; z-index: 72; width: 48px; height: 48px; display: grid; align-content: center; justify-items: center; gap: 4px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: #101820; box-shadow: 0 12px 30px rgba(16,24,32,.28); cursor: pointer; }
.management-menu-trigger i { width: 19px; height: 2px; display: block; border-radius: 99px; background: #fff; transition: transform .18s ease, opacity .18s ease; }
.management-menu-trigger.open i:first-child { transform: translateY(6px) rotate(45deg); }
.management-menu-trigger.open i:nth-child(2) { opacity: 0; }
.management-menu-trigger.open i:last-child { transform: translateY(-6px) rotate(-45deg); }
.management-floating-menu { position: fixed; left: 18px; bottom: 78px; z-index: 71; width: 238px; max-height: calc(100dvh - 160px); overflow-y: auto; padding: 13px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 15px; background: #101820; color: #fff; box-shadow: 0 22px 55px rgba(16,24,32,.32); opacity: 0; pointer-events: none; transform: translateY(10px) scale(.97); transform-origin: bottom left; transition: opacity .16s ease, transform .16s ease; }
.management-floating-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.management-floating-menu .brand { margin-bottom: 8px; }
.management-floating-menu .brand img { width: 100px; }
.management-floating-menu .brand strong { font-size: 15px; }
.management-floating-menu .nav { display: block; }
.inbox-mock {
  width: calc(100% + 44px);
  height: calc(100dvh - 64px);
  min-height: 560px;
  margin: -22px;
  display: grid;
  grid-template-columns: 210px 300px minmax(420px, 1fr) 300px;
  overflow: hidden;
  background: #f8fafc;
  color: var(--ink);
}
.inbox-mock-chat { position: relative; }
.inbox-mock.is-draft-drop-target .inbox-mock-chat::after { content: "Solte para editar"; position: absolute; inset: 12px; z-index: 30; display: grid; place-items: center; border: 1px dashed rgba(24,127,106,.55); border-radius: 12px; background: rgba(248,250,252,.78); color: #527069; font-size: 12px; font-weight: 800; letter-spacing: .01em; pointer-events: none; backdrop-filter: blur(1px); }

.inbox-mock button { font: inherit; }

.inbox-mock-queues,
.inbox-mock-list,
.inbox-mock-chat,
.inbox-assistant {
  min-width: 0;
  min-height: 0;
  background: #fff;
  border-right: 1px solid var(--line);
}
.inbox-assistant { overflow-y: auto; padding: 16px 13px; border-right: 0; background: #fff; }
.inbox-assistant-head { margin-bottom: 14px; }
.inbox-assistant-head span { color: var(--muted); font-size: 10px; font-weight: 700; }
.inbox-assistant-head h2 { margin: 2px 0 0; font-size: 17px; }
.inbox-assistant section { padding: 12px 0; border-top: 1px solid var(--line); }
.inbox-assistant h3 { margin: 0 0 8px; font-size: 12px; }
.inbox-assistant .panel-head { margin-bottom: 8px; }
.inbox-assistant .panel-head button { padding: 5px 8px; font-size: 9px; }
.inbox-analysis { display: grid; gap: 4px; }
.inbox-analysis label { margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.inbox-analysis p, .inbox-analysis ul { margin: 0; color: #475569; font-size: 10px; line-height: 1.45; }
.inbox-analysis ul { padding-left: 16px; }
.inbox-suggestion-list { display: grid; gap: 7px; }
.inbox-suggestion-list button { display: grid; gap: 4px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; color: #334155; text-align: left; cursor: grab; }
.inbox-suggestion-list button:hover { border-color: #9bd1c6; background: #edf7f5; }
.inbox-suggestion-list strong { font-size: 10px; }
.inbox-suggestion-list span { font-size: 10px; line-height: 1.4; }
.inbox-suggestion-list small { color: var(--muted); font-size: 8px; }

.inbox-mock-queues {
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  overflow-y: auto;
}
.attendance-presence { margin-top: auto; padding: 12px 4px 58px; border-top-color: var(--line); }
.attendance-presence .side-presence-title { display: flex; align-items: center; justify-content: space-between; margin: 0 5px 7px; color: #667085; font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.attendance-presence .side-presence-title b { min-width: 19px; padding: 2px 5px; border-radius: 999px; background: #e7f3f0; color: #187f6a; font-size: 9px; text-align: center; }
.attendance-presence > p { margin: 8px 5px; color: #98a2b3; font-size: 9px; }
.attendance-presence .presence-user { color: #475467; }
.attendance-presence .presence-user:hover { background: #f2f4f7; }
.attendance-presence .presence-popover { left: 100%; right: auto; margin-left: 8px; }

.inbox-mock-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin: 0 4px 18px;
}

.inbox-mock-title div { display: grid; gap: 2px; }
.inbox-mock-title span { color: var(--muted); font-size: 11px; font-weight: 700; }
.inbox-mock-title h1 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.inbox-mock-title .inbox-mock-prototype { padding: 4px 7px; border-radius: 999px; background: #ecfdf5; color: var(--brand); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }

.inbox-mock-search {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.inbox-mock-search span { color: var(--muted); font-size: 20px; }
.inbox-mock-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; font-size: 12px; }
.inbox-mock-queue-list { display: grid; gap: 4px; margin: 16px 0 22px; }
.inbox-mock-queue-list button,
.inbox-mock-team,
.inbox-mock-channel {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  text-align: left;
  cursor: pointer;
}

.inbox-mock-queue-list button:hover,
.inbox-mock-queue-list button.active,
.inbox-mock-channel.active { background: #edf7f5; color: var(--brand-strong); }
.inbox-mock-queue-list b,
.inbox-mock-channel b { min-width: 21px; padding: 2px 6px; border-radius: 999px; background: #eef2f6; color: #64748b; font-size: 10px; text-align: center; }
.inbox-mock-section-label { margin: 16px 10px 7px; color: #94a3b8; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.inbox-mock-channel { justify-content: flex-start; }
.inbox-mock-channel > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 2px; }
.inbox-mock-channel strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.inbox-mock-channel small { color: #82909f; font-size: 9px; }
.inbox-mock-whatsapp { color: #159c73; font-size: 18px; }
.inbox-mock-team b { color: var(--ok); font-size: 10px; }

.inbox-mock-list { display: grid; grid-template-rows: auto auto 1fr; }
.inbox-mock-list > header,
.inbox-mock-chat-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.inbox-mock-list > header div:first-child { min-width: 0; display: grid; gap: 2px; }
.inbox-mock-list h2 { overflow: hidden; margin: 0; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.inbox-mock-list header span { color: var(--muted); font-size: 10px; }
.inbox-mock-list-actions,
.inbox-mock-chat-actions { display: flex; gap: 5px; }
.inbox-mock-list-actions button,
.inbox-mock-chat-actions button,
.inbox-mock-compose-footer button,
.inbox-mock-compose-tabs button {
  min-width: 31px;
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #526170;
  cursor: pointer;
}
.inbox-mock-tabs { display: flex; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.inbox-mock-tabs button { min-height: 39px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.inbox-mock-tabs button.active { border-color: var(--brand); color: var(--brand); font-weight: 800; }
.inbox-mock-conversations { min-height: 0; overflow-y: auto; }
.inbox-mock-conversation {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 39px 1fr;
  gap: 10px;
  padding: 14px 15px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.inbox-mock-conversation:hover { background: #f8fafc; }
.inbox-mock-conversation.active { background: #edf7f5; box-shadow: inset 3px 0 var(--brand); }
.inbox-mock-avatar { width: 39px; height: 39px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 999px; background: #d9eeea; color: var(--brand-strong); font-size: 11px; font-weight: 900; }
.inbox-mock-conversation-copy { min-width: 0; display: grid; gap: 4px; }
.inbox-mock-conversation-copy > span { display: flex; justify-content: space-between; gap: 8px; }
.inbox-mock-conversation-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.inbox-mock-conversation-copy time { color: #94a3b8; font-size: 9px; }
.inbox-mock-conversation-copy em { overflow: hidden; color: #64748b; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.inbox-mock-conversation-copy small { width: fit-content; padding: 2px 6px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 8px; }
.inbox-mock-unread { position: absolute; right: 14px; bottom: 14px; min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 999px; background: var(--brand); color: #fff; font-size: 9px; }
.inbox-mock-empty { padding: 36px 18px; color: var(--muted); font-size: 12px; text-align: center; }

.inbox-mock-chat { display: grid; grid-template-rows: auto 1fr auto; border-right: 0; background: #f8fafc; }
.inbox-mock-contact { min-width: 0; display: flex; align-items: center; gap: 10px; }
.inbox-mock-contact > span:last-child { min-width: 0; display: grid; gap: 3px; }
.inbox-mock-contact strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.inbox-mock-contact small { color: var(--muted); font-size: 9px; }
.inbox-mock-chat-actions .inbox-mock-status { min-width: 76px; color: var(--brand-strong); font-size: 10px; font-weight: 800; }
.inbox-mock-timeline { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 16px; background-color: #f6f8fa; background-image: radial-gradient(#dbe4e8 0.7px, transparent 0.7px); background-size: 14px 14px; }
.inbox-mock-day { align-self: center; margin-bottom: 5px; padding: 4px 9px; border: 1px solid #e3e8ed; border-radius: 999px; background: rgba(255,255,255,.92); color: #7b8794; font-size: 9px; }
.inbox-mock-message { max-width: min(66%, 570px); padding: 10px 12px 7px; border: 1px solid #e1e6eb; border-radius: 12px 12px 12px 3px; background: #fff; box-shadow: 0 2px 7px rgba(15,23,42,.04); }
.inbox-mock-message.outgoing { align-self: flex-end; border-color: #cce4df; border-radius: 12px 12px 3px 12px; background: #dff3ee; }
.inbox-mock-message p { margin: 0; color: #273442; font-size: 12px; line-height: 1.45; white-space: pre-wrap; }
.inbox-mock-message footer { display: flex; justify-content: flex-end; gap: 4px; margin-top: 4px; color: #85929f; font-size: 8px; }
.inbox-mock-message footer span { color: var(--brand); }
.inbox-mock-composer { margin: 8px 12px 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 7px 24px rgba(15,23,42,.06); }
.inbox-mock-compose-tabs { display: flex; gap: 4px; }
.inbox-mock-compose-tabs button { min-height: 27px; border: 0; background: transparent; font-size: 10px; }
.inbox-mock-compose-tabs button.active { background: #edf7f5; color: var(--brand-strong); font-weight: 800; }
.inbox-mock-composer textarea { width: 100%; height: 34px; min-height: 34px; max-height: 140px; overflow-y: auto; resize: none; padding: 8px 4px; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 11px; line-height: 18px; }
.inbox-mock-compose-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.inbox-mock-compose-footer > div { display: flex; gap: 4px; }
.inbox-mock-compose-footer .primary { min-width: 76px; border-color: var(--brand); background: var(--brand); color: #fff; }
.inbox-mock-no-selection { display: grid; place-content: center; gap: 5px; color: var(--muted); text-align: center; }

@media (max-width: 1180px) {
  .inbox-mock { grid-template-columns: 180px 270px minmax(380px, 1fr) 270px; }
}

@media (max-width: 900px) {
  .inbox-mock { width: 100%; height: calc(100dvh - 128px); min-height: 0; margin: 0; grid-template-columns: minmax(230px, 32%) 1fr 260px; }
  .inbox-mock-queues { display: none; }
}

@media (max-width: 680px) {
  .inbox-mode-topbar { padding: 0 12px; }
  .chat-line-header-brand { gap: 1px; }
  .chat-line-header-brand img { width: 86px; }
  .chat-line-header-brand span { display: none; }
  .inbox-mode-topbar .user-pill-text { display: none; }
  .inbox-mock { grid-template-columns: 1fr; }
  .inbox-mock-list { display: none; }
  .inbox-assistant { display: none; }
  .inbox-mock-message { max-width: 86%; }
}
