:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --surface-strong: #e7eef7;
  --line: #d6e0ec;
  --line-strong: #b8c8dc;
  --ink: #152437;
  --muted: #5e6f84;
  --muted-strong: #3b4e66;
  --sidebar: #163a63;
  --sidebar-dark: #102a4a;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --warning: #bf7a24;
  --danger: #b84a4a;
  --blue: #2563eb;
  --shadow: 0 18px 55px rgba(21, 36, 55, 0.14);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 860px) {
  .profile-permissions header {
    display: none;
  }

  .permission-row,
  .user-permission-row {
    grid-template-columns: 1fr;
  }

  .user-form-modal {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    max-height: calc(100vh - 20px);
    transform: translateY(104%);
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .user-form-modal.is-open {
    transform: translateY(0);
  }
}

.login-screen {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.login-card {
  display: grid;
  width: min(420px, 100%);
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand {
  padding: 0 0 18px;
  border-bottom-color: var(--line);
  color: var(--ink);
}

.login-brand .brand-text span:last-child,
.login-kicker {
  color: var(--muted);
}

.login-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 0;
  font-size: 26px;
}

.login-card label,
.permission-editor label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-card input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

.session-user {
  max-width: 190px;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-layout {
  display: grid;
  gap: 18px;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.data-tools-panel {
  padding: 16px;
}

.data-tools-panel .panel-title-row {
  align-items: center;
}

.data-tools-panel p {
  margin-top: 4px;
  color: var(--muted);
}

.data-tools-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.data-tools-separator {
  width: 1px;
  min-height: 34px;
  margin: 0 4px;
  background: var(--line-strong);
}

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

.profile-permissions {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.profile-permissions header,
.permission-row,
.user-permission-row {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: minmax(150px, 1fr) repeat(5, minmax(92px, 110px));
}

.profile-permissions header {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.permission-row,
.user-permission-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.permission-row strong,
.user-permission-row strong {
  color: var(--ink);
}

.permission-row label,
.user-permission-row label,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

.permission-row select,
.user-permission-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
}

.users-table-shell {
  max-height: min(54vh, 560px);
}

.permission-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.permission-pill,
.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface-strong);
  font-size: 11px;
  font-weight: 800;
}

.permission-pill.is-on,
.status-pill {
  color: #173b72;
  background: #dbeafe;
}

.status-pill.is-off {
  color: var(--danger);
  background: #f3d8d8;
}

.user-action-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: #ffffff;
  font-weight: 800;
}

.permission-editor {
  display: grid;
  gap: 10px;
}

.permission-editor h3 {
  margin: 0;
  font-size: 14px;
}

.user-form-backdrop {
  position: fixed;
  inset: 0;
  z-index: 38;
  background: rgba(21, 36, 55, 0.28);
}

.user-form-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 39;
  width: min(720px, calc(100vw - 32px));
  max-height: min(86vh, 820px);
  transform: translate(-50%, -48%) scale(0.98);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.user-form-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.user-form-modal form {
  display: grid;
  max-height: min(86vh, 820px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.import-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(21, 36, 55, 0.44);
}

.import-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 80;
  display: grid;
  width: min(1240px, calc(100vw - 32px));
  max-height: min(86vh, 860px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  transform: translate(-50%, -48%) scale(0.98);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 0;
  background: #ffffff;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.data-view-modal {
  height: min(86vh, 860px);
  min-height: 520px;
}

.import-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.import-modal-body {
  display: grid;
  min-height: 0;
  gap: 12px;
  padding: 16px 20px 20px;
  overflow: hidden;
  background: var(--surface-soft);
}

.data-view-modal .import-modal-body {
  grid-template-rows: minmax(0, 1fr);
}

.import-duplicate-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-summary-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.import-summary-pill.warning {
  color: #8b5518;
  background: #f8ecd9;
}

.import-preview-shell {
  max-height: min(58vh, 620px);
  overflow: auto;
}

.import-preview-shell table {
  min-width: 1480px;
}

.current-data-shell {
  height: calc(min(86vh, 860px) - 190px);
  max-height: none;
  min-height: 0;
  overflow: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.current-data-shell table {
  min-width: 3200px;
}

.import-preview-shell th,
.import-preview-shell td {
  padding: 9px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.current-data-shell thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px;
  background: var(--surface-soft);
}

.current-data-header-cell {
  display: grid;
  min-width: 126px;
  gap: 6px;
}

.current-data-sort-button {
  display: flex;
  width: 100%;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.current-data-sort-button b {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 12px;
}

.current-data-header-cell input {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 11px;
}

.import-preview-shell tbody tr.is-duplicate td {
  background: #fff8eb;
}

.import-preview-shell tbody tr.is-new td {
  background: #f8fbff;
}

.import-row-status {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #eaf2ff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.import-row-status.is-duplicate {
  color: #8b5518;
  background: #f8ecd9;
}

.import-modal-footer {
  align-items: center;
  justify-content: space-between;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.app-shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  height: 100vh;
  height: 100svh;
  min-height: 0;
  transition: grid-template-columns 180ms ease;
}

.app-shell.is-sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 18px 16px;
  color: #edf5ff;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-dark));
}

.sidebar-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  gap: 4px;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: #dbeafe;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #0f2d56;
  background: #bfdbfe;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 17px;
}

.brand span:last-child {
  display: block;
  margin-top: 2px;
  color: #bfd4ee;
  font-size: 12px;
}

.brand-text,
.nav-label,
.sidebar-meta {
  transition: opacity 140ms ease, width 140ms ease;
}

.app-shell.is-sidebar-collapsed .sidebar {
  align-items: center;
  padding-right: 10px;
  padding-left: 10px;
}

.app-shell.is-sidebar-collapsed .brand {
  justify-content: center;
  width: 100%;
  padding: 4px 0 12px;
}

.app-shell.is-sidebar-collapsed .brand-text,
.app-shell.is-sidebar-collapsed .nav-label,
.app-shell.is-sidebar-collapsed .sidebar-meta {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.app-shell.is-sidebar-collapsed .main-nav {
  width: 100%;
  justify-items: center;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  color: #dbeafe;
  background: transparent;
  text-align: left;
}

.app-shell.is-sidebar-collapsed .nav-item {
  justify-content: center;
  width: 44px;
  padding: 0;
}

.nav-item:hover,
.nav-item.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  color: #0f2d56;
  background: #93c5fd;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-meta {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-meta span {
  display: block;
  color: #bfd4ee;
  font-size: 12px;
}

.sidebar-meta strong {
  display: block;
  margin-top: 4px;
}

.sidebar-meta.has-error {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.28);
}

.sidebar-meta.is-saving {
  border-color: rgba(147, 197, 253, 0.55);
}

.sync-alert {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 29, 48, 0.54);
}

.sync-alert[hidden] {
  display: none;
}

.sync-alert-panel {
  display: grid;
  width: min(560px, 100%);
  gap: 14px;
  padding: 24px;
  border: 1px solid #f1b2a8;
  border-radius: var(--radius);
  background: #fffafa;
  box-shadow: var(--shadow);
}

.sync-alert-kicker {
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sync-alert-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}

.sync-alert-panel p {
  margin: 0;
  color: var(--muted-strong);
  font-weight: 700;
  line-height: 1.45;
}

.sync-alert-details {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #f5c8c1;
  border-radius: var(--radius);
  background: #fff5f3;
  color: #6f2727;
  font-size: 13px;
  font-weight: 800;
}

.sync-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.activation-processing-alert {
  position: fixed;
  z-index: 90;
  top: 96px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(340px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid #cfe0f5;
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(21, 36, 55, 0.16);
  pointer-events: none;
  transform: translateX(-50%);
}

.activation-processing-alert[hidden] {
  display: none;
}

.activation-processing-alert strong,
.activation-processing-alert p {
  margin: 0;
}

.activation-processing-alert strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.activation-processing-alert p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.activation-processing-spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid #dbe8f6;
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: activationProcessingSpin 760ms linear infinite;
}

@keyframes activationProcessingSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .activation-processing-spinner {
    animation: none;
  }
}

.workspace {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.topbar-title-main {
  flex: 0 0 auto;
}

.pipeline-switcher {
  display: flex;
  position: relative;
  gap: 8px;
  min-width: 0;
}

.topbar-context-card {
  display: grid;
  min-width: 178px;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.pipeline-switch {
  color: var(--ink);
  text-align: left;
  opacity: 0.45;
  cursor: pointer;
}

.pipeline-switch.is-active {
  border-color: var(--line-strong);
  background: #ffffff;
  opacity: 1;
  box-shadow: 0 8px 24px rgba(21, 36, 55, 0.08);
}

.pipeline-switch:hover,
.pipeline-switch:focus-visible {
  opacity: 1;
}

.topbar-context-card h2 {
  font-size: 15px;
  line-height: 1.15;
}

.topbar-context-card p {
  font-size: 12px;
  line-height: 1.25;
}

.topbar-title span,
.drawer-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 2px;
  font-size: 22px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 15px;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(42vw, 420px);
  min-width: 300px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.button,
.icon-button,
.session-user-button,
.session-menu-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.button {
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

.button:hover,
.icon-button:hover,
.quote-card:hover {
  transform: translateY(-1px);
}

.button-primary {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.button-primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button-ghost {
  color: var(--muted-strong);
  background: #ffffff;
}

.button-ghost:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface-soft);
}

.button-ghost.danger {
  color: var(--danger);
}

.session-menu-wrap {
  position: relative;
}

.session-user-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted-strong);
  background: transparent;
  font-weight: 800;
}

.session-user-button:hover,
.session-user-button[aria-expanded="true"] {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface-soft);
}

.session-user-caret {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.session-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 25;
  display: grid;
  width: 180px;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(21, 36, 55, 0.16);
}

.session-menu-item {
  min-height: 36px;
  padding: 0 10px;
  color: var(--muted-strong);
  background: transparent;
  font-weight: 800;
  text-align: left;
}

.session-menu-item:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface-soft);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.view {
  display: none;
  min-height: 0;
  padding: 22px;
  overflow: hidden;
}

.view.is-active {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.pipeline-toolbar,
.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.pipeline-toolbar {
  justify-content: flex-end;
}

.section-heading {
  justify-content: space-between;
}

.pipeline-toolbar h2,
.section-heading h2 {
  margin-bottom: 4px;
}

.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-filters label {
  min-width: 156px;
}

.dashboard-filters .dashboard-hotel-filter {
  min-width: 170px;
}

.dashboard-filters .button {
  align-self: end;
}

.pipeline-toolbar-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 14px;
}

.pipeline-date-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pipeline-date-filter label {
  min-width: 138px;
}

.pipeline-date-filter .pipeline-hotel-filter {
  min-width: 170px;
}

.pipeline-date-filter .button {
  align-self: end;
}

.pipeline-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-left: 14px;
  border-left: 3px solid var(--line-strong);
}

.stat-pill {
  min-width: 112px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.stat-pill span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-pill strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
}

.kanban-wrap {
  display: grid;
  flex: 1;
  grid-auto-columns: minmax(260px, 300px);
  grid-auto-flow: column;
  gap: 14px;
  min-height: 0;
  overflow-x: auto;
  padding-bottom: 12px;
}

.stage-column {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  border: 1px solid #e9eef5;
  border-radius: var(--radius);
  background: #f7faff;
}

.stage-column.is-drop-target {
  border-color: #c7d7ee;
  background: #eff6ff;
}

.stage-header {
  padding: 10px 10px 8px;
  border-bottom: 0;
  background: transparent;
}

.stage-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
}

.stage-header h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-header h3 span {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  padding: 3px 9px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-strong);
  background: #e7eef7;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.stage-add-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--accent);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transition: background 140ms ease, transform 140ms ease;
}

.stage-add-button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

.stage-header p {
  margin-top: 7px;
  padding-left: 2px;
  font-size: 12px;
}

.stage-list {
  --pipeline-card-height: 196px;
  display: grid;
  flex: 1;
  grid-auto-rows: var(--pipeline-card-height);
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px 10px;
}

.empty-stage {
  padding: 22px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  text-align: center;
}

.quote-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 10px;
  width: 100%;
  height: var(--pipeline-card-height, 196px);
  min-height: var(--pipeline-card-height, 196px);
  padding: 13px 12px;
  border: 1px solid #dce5f1;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(21, 36, 55, 0.03);
  overflow: hidden;
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.quote-card > * {
  position: relative;
  z-index: 1;
}

.quote-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(21, 36, 55, 0.1);
}

.quote-card-overdue {
  --quote-card-border-angle: 0deg;
  border: 2px solid transparent;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    conic-gradient(
      from var(--quote-card-border-angle),
      rgba(250, 204, 21, 0.14) 0deg,
      rgba(250, 204, 21, 0.9) 58deg,
      rgba(239, 68, 68, 0.95) 118deg,
      rgba(239, 68, 68, 0.16) 178deg,
      rgba(250, 204, 21, 0.12) 238deg,
      rgba(250, 204, 21, 0.82) 302deg,
      rgba(250, 204, 21, 0.14) 360deg
    )
    border-box;
  animation: quote-card-stroke-fade 3s linear infinite;
}

.quote-card-overdue:hover {
  border-color: transparent;
}

@property --quote-card-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes quote-card-stroke-fade {
  to {
    --quote-card-border-angle: 1turn;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quote-card-overdue {
    animation: none;
  }
}

.quote-card.dragging {
  opacity: 0.46;
}

.activation-card .badge {
  max-width: 56%;
}

.activation-card .fact-row {
  grid-template-columns: 62px minmax(0, 1fr);
}

.quote-card .card-title,
.quote-card .fact-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-card .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.card-code-block {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.card-code {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-date {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-date.is-empty {
  color: #9d3838;
}

.quote-card .badge {
  flex: 0 0 auto;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-card .card-title {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.quote-card .card-facts {
  display: grid;
  gap: 9px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.3;
}

.fact-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fact-row > span {
  color: #8a9690;
  font-size: 12px;
  font-weight: 700;
}

.fact-row strong {
  min-width: 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.hotel-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: calc(var(--radius) - 2px);
  color: #234f7f;
  background: #eef6ff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hotel-sem-hotel {
  color: #4f5d58;
  background: #eef1ef;
}

.hotel-floripa {
  color: #1e4f8f;
  background: #e8f1ff;
}

.hotel-tuba-matriz {
  color: #735016;
  background: #f8edd8;
}

.hotel-tuba-express {
  color: #8a4a16;
  background: #fae7d8;
}

.hotel-you-hotel {
  color: #285f8d;
  background: #e3f0fa;
}

.hotel-criciuma-express {
  color: #6f3f88;
  background: #f0e6f7;
}

.hotel-criciuma-centro {
  color: #7a343f;
  background: #f8e4e7;
}

.hotel-atlantico-sul {
  color: #246472;
  background: #e1f2f4;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-strong);
  background: var(--surface-strong);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge.success {
  color: #1d4ed8;
  background: #dbeafe;
}

.badge.danger {
  color: #9d3838;
  background: #f9e3e3;
}

.badge.warning {
  color: #8b5518;
  background: #f8ecd9;
}

.table-shell,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.table-shell {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

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

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: var(--muted-strong);
}

td strong {
  display: block;
  color: var(--ink);
}

tr:last-child td {
  border-bottom: 0;
}

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

.contact-quotes button {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 12px;
}

.contact-open-button {
  display: inline-grid;
  max-width: 220px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.contact-open-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  white-space: nowrap;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

.contact-open-button:hover strong,
.contact-open-button:focus-visible strong {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  min-width: 0;
}

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

.metric strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(20px, 1.55vw, 24px);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.metric small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.dashboard-tabs {
  display: flex;
  gap: 6px;
  min-height: 37px;
  align-items: stretch;
  margin: -4px 0 12px;
  border-bottom: 1px solid var(--line);
}

.dashboard-tab {
  display: inline-flex;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-tab:hover,
.dashboard-tab:focus-visible {
  color: var(--ink);
}

.dashboard-tab.is-active {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.dashboard-tab-panel {
  display: none;
  min-width: 0;
  max-width: 100%;
}

.dashboard-tab-panel.is-active {
  display: grid;
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.78fr) minmax(320px, 0.78fr);
  gap: 12px;
}

.view-contacts {
  overflow: hidden;
}

.view-contacts .table-shell {
  overflow: auto;
}

.view-contacts table {
  min-width: 1420px;
}

.contacts-sort-button {
  display: flex;
  width: 100%;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.contacts-sort-button b {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 14px;
  line-height: 1;
}

.contacts-sort-button:hover,
.contacts-sort-button:focus-visible {
  color: var(--accent-strong);
}

.view-dashboard {
  overflow-x: hidden;
  overflow-y: auto;
}

.view-dashboard .dashboard-grid {
  padding-bottom: 2px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

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

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

.panel-title-row h3 {
  margin-bottom: 0;
}

.panel-title-row strong {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: calc(var(--radius) - 2px);
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 13px;
}

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

.sales-funnel {
  display: grid;
  justify-items: center;
  padding: 4px 0 2px;
}

.funnel-subtitle {
  margin: -2px 0 16px;
  text-align: center;
  color: #2563eb;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.funnel-scale {
  display: grid;
  width: min(680px, 100%);
  gap: 6px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 44px minmax(150px, 178px) minmax(34px, 80px) minmax(0, 390px);
  align-items: center;
  gap: 12px;
  min-height: 46px;
}

.funnel-icon {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #dce8ff;
  border-radius: 50%;
  color: #2563eb;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.funnel-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.funnel-label {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.funnel-leader {
  position: relative;
  display: block;
  min-width: 0;
  height: 2px;
  border-top: 2px dotted #a8a8a8;
}

.funnel-leader::after {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9a9a9a;
  content: "";
  transform: translateY(-58%);
}

.funnel-bar {
  grid-column: 4;
  grid-row: 1;
  display: grid;
  justify-self: center;
  width: min(var(--funnel-width), 100%);
  height: 43px;
  overflow: hidden;
  place-items: center;
  border-radius: 5px;
  background: linear-gradient(115deg, #f1f2f6 0%, #d9dce3 100%);
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 8px 16px rgba(15, 23, 42, 0.06);
}

.funnel-row.is-won .funnel-bar {
  background: linear-gradient(135deg, #0b5cff 0%, #2563eb 58%, #0656d8 100%);
}

.funnel-divider {
  height: 1px;
  margin: 12px 2px 10px;
  background: var(--line);
}

.funnel-row strong {
  grid-column: 4;
  grid-row: 1;
  justify-self: center;
  color: #020617;
  font-size: 25px;
  font-weight: 900;
  z-index: 1;
}

.funnel-row.is-won strong {
  color: #ffffff;
}

.funnel-loss-row {
  display: grid;
  grid-template-columns: 44px minmax(150px, 178px) minmax(34px, 80px) minmax(0, 390px);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid #f0caca;
  border-radius: 8px;
  background: linear-gradient(90deg, #ffffff 0%, #fff3f3 100%);
}

.funnel-icon-danger {
  border-color: #fde1e1;
  color: #dc2626;
}

.funnel-loss-row strong {
  grid-column: 4;
  justify-self: center;
  color: #dc2626;
  font-size: 31px;
  font-weight: 900;
}

.monthly-sales-panel {
  grid-column: 1 / span 2;
  min-width: 0;
}

.monthly-outcome-panel {
  grid-column: 3;
}

.dashboard-activity-panel {
  grid-column: 1 / -1;
}

.hotel-pie-panel {
  min-height: 0;
}

.hotel-pie-chart {
  display: grid;
  align-items: start;
  overflow: visible;
}

.hotel-pie-map {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 14px;
  width: 100%;
}

.hotel-pie-visual {
  display: grid;
  width: 150px;
  aspect-ratio: 1;
  justify-self: center;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 22px #ffffff, 0 10px 24px rgba(15, 23, 42, 0.08);
}

.hotel-pie-visual span {
  display: grid;
  width: 66px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line);
  font-size: 21px;
  font-weight: 900;
}

.hotel-pie-breakdown {
  display: grid;
  align-content: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.hotel-pie-breakdown-item {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hotel-pie-breakdown-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.hotel-pie-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--hotel-pie-color);
}

.hotel-pie-breakdown-row strong {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.hotel-pie-breakdown-row small {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.hotel-pie-bar {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.hotel-pie-bar::before {
  display: block;
  width: calc(var(--hotel-pie-share) * 1%);
  height: 100%;
  border-radius: inherit;
  background: var(--hotel-pie-color);
  content: "";
}

.hotel-pie-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.hotel-pie-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hotel-pie-legend-item span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.hotel-pie-legend-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hotel-pie-legend-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.stacked-month-chart {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: clamp(6px, 1vw, 14px);
  width: 100%;
  min-height: 286px;
  overflow-x: hidden;
  padding: 8px 2px 4px;
}

.month-stack-item {
  display: grid;
  flex: 1 1 0;
  grid-template-rows: 24px 220px 24px;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 72px;
}

.month-stack-total {
  color: var(--ink);
  font-size: 13px;
}

.month-stack-bar {
  display: flex;
  width: clamp(24px, 66%, 44px);
  height: 220px;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.month-stack-fill {
  display: flex;
  width: 100%;
  min-height: 0;
  flex-direction: column-reverse;
  overflow: hidden;
  border-radius: inherit;
}

.month-stack-segment {
  display: block;
  width: 100%;
  min-height: 2px;
}

.month-stack-label {
  align-self: start;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.hotel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  min-width: 0;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.legend-item span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.monthly-outcome-chart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 1.2vw, 18px);
  width: 100%;
  min-height: 300px;
  overflow-x: hidden;
  padding: 12px 2px 4px;
}

.monthly-outcome-item {
  display: grid;
  flex: 1 1 0;
  grid-template-rows: 24px 206px 24px 24px;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 82px;
}

.outcome-count {
  min-height: 18px;
  color: var(--ink);
  font-size: 13px;
}

.outcome-count-lost {
  color: var(--danger);
}

.outcome-column {
  position: relative;
  display: grid;
  width: clamp(34px, 70%, 52px);
  height: 206px;
  grid-template-rows: 1fr 1fr;
}

.outcome-zero-axis {
  position: absolute;
  top: 50%;
  left: -9px;
  width: calc(100% + 18px);
  height: 1px;
  background: var(--line-strong);
}

.outcome-half {
  display: flex;
  justify-content: center;
  min-height: 0;
}

.outcome-half-up {
  align-items: flex-end;
}

.outcome-half-down {
  align-items: flex-start;
}

.outcome-bar {
  display: block;
  width: clamp(28px, 80%, 42px);
  min-height: 0;
}

.outcome-bar-won {
  border-radius: 6px 6px 0 0;
  background: var(--accent);
}

.outcome-bar-lost {
  border-radius: 0 0 6px 6px;
  background: var(--danger);
}

.outcome-month-label {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.monthly-outcome-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
}

.outcome-legend-won {
  background: var(--accent);
}

.outcome-legend-lost {
  background: var(--danger);
}

.hotel-performance-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hotel-performance-toolbar h3 {
  margin: 0;
}

.hotel-performance-heading {
  display: grid;
  gap: 4px;
}

.hotel-performance-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.hotel-performance-view-tabs {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-height: 30px;
}

.hotel-performance-view-tabs .dashboard-tab {
  min-height: 30px;
  padding-inline: 8px;
  font-size: 11px;
}

.hotel-performance-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.hotel-performance-filters label {
  min-width: 170px;
}

.hotel-performance-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.hotel-performance-list.is-table-view {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hotel-performance-card {
  display: grid;
  gap: 14px;
}

.hotel-performance-card-header {
  display: grid;
  align-items: flex-start;
  gap: 10px;
}

.hotel-performance-card-header h3 {
  margin-bottom: 4px;
}

.hotel-performance-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hotel-series-controls {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.hotel-series-button {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--series-color, var(--line));
  border-radius: calc(var(--radius) - 2px);
  color: var(--series-color, var(--muted-strong));
  background: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hotel-series-button-quotes {
  --series-color: #d8741f;
  --series-active-bg: #d8741f;
}

.hotel-series-button-won {
  --series-color: var(--hotel-color);
  --series-active-bg: var(--hotel-color);
}

.hotel-series-button-lost {
  --series-color: rgba(111, 122, 117, 0.72);
  --series-active-bg: rgba(111, 122, 117, 0.72);
}

.hotel-series-button.is-active {
  border-color: var(--series-active-bg);
  color: #ffffff;
  background: var(--series-active-bg);
}

.hotel-series-button:not(.is-active) {
  opacity: 0.78;
}

.hotel-combo-chart {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  padding-bottom: 4px;
}

.hotel-chart-labels {
  box-sizing: border-box;
  display: grid;
  grid-auto-rows: var(--hotel-row-height, 34px);
  align-items: center;
  height: var(--hotel-chart-height);
  padding-block: var(--hotel-chart-padding-y, 0);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 900;
}

.hotel-chart-plot {
  position: relative;
  min-width: 0;
  height: var(--hotel-chart-height);
  overflow: hidden;
}

.hotel-chart-grid,
.hotel-sales-layer {
  position: absolute;
  inset: var(--hotel-chart-padding-y, 0) 0;
  display: grid;
  grid-template-rows: repeat(var(--hotel-row-count), minmax(0, 1fr));
}

.hotel-chart-grid span {
  border-bottom: 1px solid var(--line);
}

.hotel-sales-layer.is-hidden {
  display: none;
}

.hotel-sales-row {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.hotel-sales-bar {
  display: block;
  height: 18px;
  min-width: 2px;
  border-radius: 0 6px 6px 0;
  opacity: 0.72;
  background: var(--hotel-color);
}

.hotel-sales-row strong {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translate(3px, -50%);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 900;
}

.hotel-lines-layer,
.hotel-series-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hotel-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.hotel-line-quotes {
  stroke: #d8741f;
}

.hotel-line-lost {
  opacity: 0.5;
  stroke: #6f7a75;
}

.hotel-point {
  vector-effect: non-scaling-stroke;
}

.hotel-point-node {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.hotel-point-quotes {
  fill: #ffffff;
  stroke: #d8741f;
  stroke-width: 1.8;
}

.hotel-point-lost {
  opacity: 0.5;
  fill: #6f7a75;
  stroke: #6f7a75;
}

.hotel-series-labels-lost {
  z-index: 1;
}

.hotel-series-labels-quotes {
  z-index: 4;
}

.hotel-series-labels-quotes .hotel-point-node {
  border: 2px solid #d8741f;
  background: rgba(255, 255, 255, 0.92);
}

.hotel-series-labels-lost .hotel-point-node {
  width: 7px;
  height: 7px;
  background: #6f7a75;
  opacity: 0.5;
}

.hotel-point-label {
  position: absolute;
  transform: translate(-50%, -115%);
  padding: 1px 4px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.hotel-series-labels-quotes .hotel-point-label {
  color: #8d430c;
  background: rgba(255, 255, 255, 0.86);
}

.hotel-series-labels-lost .hotel-point-label {
  transform: translate(-50%, 20%);
  color: #59635f;
  background: rgba(255, 255, 255, 0.54);
  font-size: 9px;
  opacity: 0.5;
}

.hotel-performance-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.hotel-performance-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 12px;
}

.hotel-performance-table th,
.hotel-performance-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.hotel-performance-table th:first-child,
.hotel-performance-table td:first-child {
  text-align: left;
}

.hotel-performance-table thead th {
  color: var(--muted-strong);
  background: #eef4fb;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.hotel-performance-table tbody th {
  color: var(--muted-strong);
  font-weight: 800;
}

.hotel-performance-table tbody td {
  font-weight: 800;
}

.hotel-performance-table tfoot th,
.hotel-performance-table tfoot td {
  border-bottom: 0;
  color: var(--ink);
  background: #ffffff;
  font-weight: 900;
}

.daily-quotes-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.daily-quotes-toolbar h3 {
  margin-bottom: 4px;
}

.daily-quotes-list {
  display: grid;
  gap: 12px;
}

.daily-quote-divider {
  height: 1px;
  margin: 6px 0;
  background: var(--line-strong);
}

.daily-quote-card {
  display: grid;
  gap: 12px;
}

.daily-quote-card-total {
  border-left: 4px solid var(--accent);
}

.daily-quote-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.daily-quote-card-header h3 {
  margin-bottom: 4px;
}

.daily-quote-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.daily-series-legend {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
}

.daily-legend-quotes {
  background: #d8741f;
}

.daily-legend-won {
  background: var(--daily-color);
}

.daily-legend-lost {
  background: #6f7a75;
}

.daily-combo-chart {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.daily-chart-scroll {
  min-width: var(--daily-min-width);
}

.daily-chart-plot {
  position: relative;
  height: var(--daily-plot-height);
  overflow: hidden;
  border-bottom: 1px solid var(--line-strong);
  background:
    linear-gradient(to bottom, transparent calc(25% - 1px), var(--line) 25%, transparent calc(25% + 1px)),
    linear-gradient(to bottom, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)),
    linear-gradient(to bottom, transparent calc(75% - 1px), var(--line) 75%, transparent calc(75% + 1px));
}

.daily-bars-layer {
  position: absolute;
  inset: 42px 0 14px;
  display: grid;
  grid-template-columns: repeat(var(--daily-day-count), minmax(0, 1fr));
  align-items: end;
  pointer-events: none;
}

.daily-bar-column {
  display: flex;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  position: relative;
}

.daily-bar-column strong {
  position: absolute;
  bottom: calc(var(--daily-bar-height, 0%) + 3px);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 900;
}

.daily-won-bar {
  display: block;
  width: clamp(12px, 42%, 20px);
  min-height: 3px;
  border-radius: 6px 6px 0 0;
  opacity: 0.74;
  background: var(--daily-color);
}

.daily-lines-layer,
.daily-series-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.daily-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.daily-line-quotes {
  stroke: #d8741f;
}

.daily-line-lost {
  opacity: 0.52;
  stroke: #6f7a75;
}

.daily-series-labels-lost {
  z-index: 1;
}

.daily-series-labels-quotes {
  z-index: 4;
}

.daily-point-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.daily-series-labels-quotes .daily-point-node {
  border: 2px solid #d8741f;
  background: rgba(255, 255, 255, 0.94);
}

.daily-series-labels-lost .daily-point-node {
  width: 7px;
  height: 7px;
  background: #6f7a75;
  opacity: 0.56;
}

.daily-point-label {
  position: absolute;
  transform: translate(-50%, 8px);
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  color: #8d430c;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.daily-series-labels-lost .daily-point-label {
  transform: translate(-50%, 8px);
  color: #59635f;
  background: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  opacity: 0.62;
}

.daily-axis-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-date-axis {
  display: grid;
  grid-template-columns: repeat(var(--daily-day-count), minmax(0, 1fr));
  gap: 0;
  padding-top: 4px;
}

.daily-date-axis span {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 0;
  padding: 0 2px;
  border-left: 1px solid var(--line);
  color: var(--muted-strong);
  line-height: 1.1;
}

.daily-date-axis span:first-child {
  border-left: 0;
}

.daily-date-axis b {
  font-size: 11px;
  font-weight: 900;
}

.daily-date-axis small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.rfv-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.rfv-toolbar h3 {
  margin-bottom: 4px;
}

.rfv-mode-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}

.rfv-hotel-filter {
  display: grid;
  flex: 0 0 220px;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.rfv-hotel-filter select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
}

.rfv-chart-panel {
  min-height: 380px;
}

.rfv-treemap {
  display: flex;
  min-height: 320px;
  flex-wrap: wrap;
  align-content: stretch;
  gap: 8px;
}

.rfv-segment {
  display: grid;
  position: relative;
  flex: 1 1 calc(var(--segment-share) * 1%);
  min-width: 190px;
  min-height: 116px;
  align-content: start;
  gap: 10px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--segment-color), #ffffff 48%);
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--segment-color);
  text-align: left;
  transition: filter 140ms ease, outline-color 140ms ease, transform 140ms ease;
}

.rfv-segment:hover,
.rfv-segment:focus-visible {
  filter: saturate(1.08) brightness(0.98);
  transform: translateY(-1px);
}

.rfv-segment.is-active {
  outline: 3px solid color-mix(in srgb, var(--segment-color), #17231f 38%);
  outline-offset: 2px;
}

.rfv-segment span,
.rfv-segment strong,
.rfv-segment small {
  position: relative;
  z-index: 1;
}

.rfv-segment span {
  max-width: 280px;
  font-size: 14px;
  font-weight: 900;
}

.rfv-segment strong {
  font-size: 30px;
  line-height: 1;
}

.rfv-segment small {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.9;
}

.rfv-table-panel {
  min-height: 0;
}

.rfv-table-shell {
  max-height: min(44vh, 520px);
  overflow: auto;
}

.rfv-table-shell table {
  min-width: 1240px;
}

.rfv-activation-button {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

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

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

.activity-item strong {
  font-size: 13px;
}

.activity-item span {
  color: var(--muted);
  font-size: 12px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(21, 36, 55, 0.38);
}

.activation-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(21, 36, 55, 0.34);
}

.quote-drawer,
.activation-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  display: flex;
  transform: translate(-50%, -48%) scale(0.98);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 0;
  background: #ffffff;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.quote-drawer {
  z-index: 40;
  width: min(980px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 32px));
}

.activation-drawer {
  z-index: 42;
  width: min(620px, calc(100vw - 32px));
  max-height: min(790px, calc(100vh - 48px));
  overflow: visible;
}

.quote-drawer.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.activation-drawer.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.activation-drawer.is-split {
  --split-gap: 30px;
  --split-activation-width: min(390px, calc(42vw - 34px));
  --split-quote-width: min(940px, calc(58vw - 64px));
  --split-group-left: max(22px, calc((100vw - var(--split-activation-width) - var(--split-gap) - var(--split-quote-width)) / 2));

  left: var(--split-group-left);
  width: var(--split-activation-width);
  max-height: min(750px, calc(100vh - 48px));
  transform: translate(0, -50%) scale(1);
}

.quote-drawer.is-split {
  --split-gap: 30px;
  --split-activation-width: min(390px, calc(42vw - 34px));
  --split-quote-width: min(940px, calc(58vw - 64px));
  --split-group-left: max(22px, calc((100vw - var(--split-activation-width) - var(--split-gap) - var(--split-quote-width)) / 2));

  left: calc(var(--split-group-left) + var(--split-activation-width) + var(--split-gap));
  right: auto;
  width: var(--split-quote-width);
  height: min(820px, calc(100vh - 48px));
  transform: translate(0, -50%) scale(1);
}

.quote-drawer form,
.activation-drawer form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.activation-drawer form {
  flex: 0 1 auto;
  max-height: inherit;
  overflow: hidden;
  border-radius: inherit;
  background: #ffffff;
}

.drawer-header,
.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin-top: 3px;
}

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

.drawer-body {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow-y: auto;
  padding: 18px 20px 24px;
  background: var(--surface-soft);
}

.activation-drawer-body {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  padding: 18px 20px 24px;
  background: var(--surface-soft);
}

.activation-contact-panel,
.activation-field-grid,
.activation-drawer-body > .related-panel {
  min-width: 0;
}

.activation-contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.activation-contact-panel h3 {
  margin-bottom: 3px;
}

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

.activation-field-grid .activation-status-field,
.activation-field-grid .activation-notes-field {
  grid-column: 1 / -1;
}

.activation-notes-field textarea {
  min-height: 92px;
  resize: vertical;
}

.activation-footer {
  flex: 0 0 auto;
}

.activation-generate-button {
  position: absolute;
  top: 50%;
  left: calc(100% + 100px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px 10px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  transform: translateY(-50%);
  white-space: nowrap;
}

.activation-generate-button::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #073b25;
  background: #35e28d;
  content: "+";
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.activation-generate-button[data-has-quote="true"]::before {
  color: #173d8d;
  background: #dce8ff;
  content: ">";
  font-size: 18px;
}

.activation-drawer.is-split .activation-field-grid {
  grid-template-columns: 1fr;
}

.activation-drawer.is-split .activation-generate-button {
  display: none;
}

.drawer-body > label,
.drawer-body > .form-grid,
.drawer-body > .quote-field-grid,
.drawer-body > .contact-association,
.drawer-body > .related-panel,
.drawer-body > .quote-history-panel {
  min-width: 0;
}

.drawer-body > label,
.drawer-body > .quote-field-grid,
.drawer-body > .contact-association,
.drawer-body > .related-panel,
.drawer-body > .quote-history-panel {
  grid-column: 1 / -1;
}

.drawer-footer {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: #ffffff;
}

.drawer-footer > div {
  display: flex;
  gap: 8px;
}

.quote-footer-actions {
  align-items: center;
  justify-content: flex-start;
}

.quote-outcome-actions {
  align-items: center;
  justify-content: center;
}

.quote-save-actions {
  align-items: center;
  justify-content: flex-end;
}

.quote-drawer.is-view-mode input,
.quote-drawer.is-view-mode select,
.quote-drawer.is-view-mode textarea {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
  opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: default;
  opacity: 1;
}

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

.quote-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
}

input,
select {
  height: 40px;
  padding: 0 10px;
}

textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px;
  line-height: 1.45;
}

.auto-grow-textarea {
  min-height: 40px;
  overflow: hidden;
  resize: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  border-color: var(--accent);
}

input[readonly],
textarea[readonly] {
  color: var(--muted);
  background: var(--surface-soft);
}

.contact-association {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

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

.association-head h3 {
  margin-bottom: 4px;
  font-size: 13px;
  text-transform: uppercase;
}

.association-head p {
  font-size: 13px;
}

.association-edit-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.association-edit-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.association-summary {
  display: none;
}

.contact-association.is-locked .association-summary {
  display: grid;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.association-summary strong,
.association-summary span {
  display: block;
}

.association-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.association-contact-card {
  min-width: 0;
}

.association-related-quotes,
.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-association.is-locked .association-tabs,
.contact-association.is-locked .association-panel {
  display: none;
}

.association-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.association-tab {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.association-tab.is-active {
  color: #ffffff;
  background: var(--accent);
}

.association-panel {
  display: none;
}

.association-panel.is-active {
  display: grid;
  gap: 10px;
}

.association-actions {
  display: flex;
  justify-content: flex-end;
}

.contact-results {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
}

.contact-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.contact-result:hover,
.contact-result.is-selected {
  border-color: var(--accent);
  background: #eff6ff;
}

.contact-result strong,
.contact-result span {
  display: block;
}

.contact-result span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.contact-result .badge {
  flex: 0 0 auto;
}

.related-panel,
.quote-history-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.related-panel h3,
.quote-history-panel h3 {
  font-size: 13px;
  text-transform: uppercase;
}

.quote-history-list {
  display: grid;
  gap: 8px;
}

.quote-history-item {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.quote-history-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.quote-history-item header strong {
  color: var(--muted-strong);
}

.quote-history-item ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.quote-history-item li strong {
  color: var(--ink);
}

.related-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.related-item .related-quote-chip {
  flex: 1 1 240px;
}

.related-quote-chip {
  display: grid;
  flex: 0 1 188px;
  min-width: 166px;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: calc(var(--radius) - 2px);
  background: #ffffff;
}

.related-quote-chip.success {
  border-left-color: var(--accent);
}

.related-quote-chip.danger {
  border-left-color: var(--danger);
}

.related-quote-chip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.related-quote-chip strong,
.related-quote-chip small,
.related-quote-chip b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-quote-chip strong {
  color: var(--ink);
  font-size: 11px;
  text-transform: uppercase;
}

.related-quote-chip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.related-quote-chip b {
  color: var(--muted-strong);
  font-size: 11px;
}

.related-item button {
  border: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 800;
}

.muted-note {
  color: var(--muted);
  font-size: 13px;
}

.button-danger-solid {
  border-color: var(--danger);
  color: #ffffff;
  background: var(--danger);
}

.button-danger-solid:hover {
  border-color: #943535;
  background: #943535;
}

.button-success-solid {
  border-color: #238d4d;
  color: #ffffff;
  background: #238d4d;
}

.button-success-solid:hover {
  border-color: #176c39;
  background: #176c39;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(21, 36, 55, 0.44);
}

.confirm-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 80;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  gap: 16px;
  padding: 20px;
  transform: translate(-50%, -48%) scale(0.98);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 0;
  background: #ffffff;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.confirm-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.confirm-modal h2 {
  font-size: 18px;
}

.confirm-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.contact-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(21, 36, 55, 0.34);
}

.contact-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 60;
  display: flex;
  width: min(760px, calc(100vw - 32px));
  height: min(910px, calc(100vh - 32px));
  max-height: min(910px, calc(100vh - 32px));
  transform: translate(-50%, -48%) scale(0.98);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 0;
  background: #ffffff;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.contact-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.contact-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

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

.contact-modal-header h2 {
  margin-top: 3px;
}

.contact-modal-header p {
  margin-top: 4px;
}

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

.contact-modal-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.contact-modal-summary div {
  min-width: 0;
  padding: 13px 16px;
  background: var(--surface-soft);
}

.contact-modal-summary span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.contact-modal-summary strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 5px;
  color: var(--ink);
  font-size: 16px;
}

.contact-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 20px 0;
  background: #ffffff;
}

.contact-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--muted-strong);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-tab:hover {
  color: var(--accent-strong);
}

.contact-tab.is-active {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface-soft);
}

.contact-modal-body {
  flex: 1;
  min-height: 280px;
  overflow-y: auto;
  padding: 18px 20px 20px;
  background: var(--surface-soft);
}

.contact-tab-panel {
  display: none;
}

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

.contact-tab-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.contact-timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 0 0 18px 22px;
  border-left: 2px solid var(--line);
}

.timeline-item::before {
  position: absolute;
  top: 2px;
  left: -6px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: #ffffff;
  content: "";
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-item h3 {
  font-size: 14px;
}

.timeline-item p {
  color: var(--muted-strong);
}

.timeline-item button,
.contact-quote-item button {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 800;
}

.contact-quote-list {
  display: grid;
  gap: 8px;
}

.contact-quote-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.contact-quote-item strong,
.contact-quote-item span {
  display: block;
}

.contact-quote-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.contact-quote-stay {
  display: block;
  margin-top: 5px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.activation-note-preview {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.contact-quote-item > div:last-child {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.contact-status-groups {
  display: grid;
  gap: 18px;
}

.contact-status-group {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.contact-status-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.contact-status-group-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-status-group-header strong {
  color: var(--ink);
  font-size: 14px;
}

.contact-status-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(120px, 1fr) 40px minmax(90px, auto);
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.contact-status-row:last-child {
  border-bottom: 0;
}

.contact-status-row > span {
  overflow: hidden;
  color: var(--muted-strong);
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.status-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.contact-status-row small {
  color: var(--muted);
  text-align: right;
}

.contact-form-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(21, 36, 55, 0.34);
}

.contact-form-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 60;
  display: flex;
  width: min(440px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 32px));
  transform: translate(-50%, -48%) scale(0.98);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 0;
  background: #ffffff;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.contact-form-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.contact-form-modal form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.contact-form-header,
.contact-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

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

.contact-form-header h2 {
  margin-top: 3px;
}

.contact-form-body {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 18px 20px 24px;
}

.contact-form-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.contact-form-footer > div {
  display: flex;
  gap: 8px;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .app-shell.is-sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .monthly-sales-panel,
  .monthly-outcome-panel {
    grid-column: auto;
  }

  .hotel-performance-list {
    grid-template-columns: 1fr;
  }

  .hotel-performance-list.is-table-view {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1700px) and (min-width: 1241px) {
  .hotel-performance-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1800px) {
  .hotel-performance-list.is-table-view {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell,
  .app-shell.is-sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
  }

  .app-shell.is-sidebar-collapsed .sidebar {
    align-items: center;
    padding: 10px;
  }

  .sidebar-toggle {
    flex: 0 0 auto;
  }

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

  .app-shell.is-sidebar-collapsed .brand {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .main-nav {
    display: flex;
    gap: 6px;
  }

  .nav-item {
    width: auto;
    white-space: nowrap;
  }

  .app-shell.is-sidebar-collapsed .nav-item {
    width: 42px;
  }

  .sidebar-meta {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: auto;
    padding: 14px;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-field {
    flex: 1 1 240px;
    width: auto;
    min-width: 0;
  }

  .view {
    padding: 14px;
  }

  .pipeline-toolbar,
  .section-heading {
    display: grid;
  }

  .dashboard-filters {
    justify-content: flex-start;
  }

  .dashboard-filters label {
    flex: 1 1 150px;
    min-width: 0;
  }

  .dashboard-tabs,
  .rfv-mode-tabs,
  .hotel-series-controls {
    overflow-x: auto;
  }

  .hotel-performance-toolbar,
  .daily-quotes-toolbar,
  .daily-quote-card-header,
  .rfv-toolbar {
    display: grid;
  }

  .daily-series-legend {
    justify-content: flex-start;
  }

  .hotel-performance-filters {
    justify-content: flex-start;
  }

  .hotel-performance-filters label {
    flex: 1 1 150px;
    min-width: 0;
  }

  .hotel-pie-chart {
    overflow: visible;
  }

  .hotel-pie-map {
    grid-template-columns: 1fr;
    width: 100%;
    justify-items: center;
    gap: 12px;
  }

  .hotel-pie-visual {
    width: min(176px, 72vw);
  }

  .hotel-pie-breakdown {
    width: 100%;
  }

  .pipeline-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .pipeline-switcher {
    width: 100%;
    overflow-x: auto;
  }

  .pipeline-switch {
    min-width: 170px;
  }

  .pipeline-date-filter {
    justify-content: flex-start;
  }

  .pipeline-date-filter label {
    flex: 1 1 150px;
    min-width: 0;
  }

  .pipeline-date-filter .button {
    flex: 1 1 150px;
  }

  .pipeline-stats {
    justify-content: flex-start;
    padding-top: 12px;
    padding-left: 0;
    border-top: 3px solid var(--line-strong);
    border-left: 0;
  }

  .stat-pill {
    min-width: 130px;
  }

  .kanban-wrap {
    grid-auto-columns: minmax(230px, 82vw);
  }

  .stage-column {
    min-height: 0;
  }

  .metric-grid,
  .form-grid,
  .quote-field-grid {
    grid-template-columns: 1fr;
  }

  .sales-funnel {
    justify-items: stretch;
  }

  .funnel-row {
    grid-template-columns: 38px minmax(104px, 0.9fr) minmax(22px, 46px) minmax(0, 1fr);
    gap: 8px;
  }

  .funnel-label {
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
  }

  .funnel-icon {
    width: 34px;
  }

  .funnel-icon svg {
    width: 19px;
    height: 19px;
  }

  .funnel-bar {
    height: 34px;
  }

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

  .funnel-loss-row {
    grid-template-columns: 38px minmax(104px, 0.9fr) minmax(22px, 46px) minmax(0, 1fr);
    gap: 8px;
    padding: 9px 10px;
  }

  .funnel-loss-row strong {
    font-size: 24px;
  }

  .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .stacked-month-chart {
    min-height: 250px;
  }

  .month-stack-item {
    grid-template-rows: 22px 190px 22px;
    max-width: 62px;
  }

  .month-stack-bar {
    width: clamp(22px, 66%, 38px);
    height: 190px;
  }

  .monthly-outcome-chart {
    min-height: 252px;
  }

  .monthly-outcome-item {
    grid-template-rows: 22px 170px 22px 22px;
    max-width: 68px;
  }

  .outcome-column {
    width: clamp(32px, 70%, 44px);
    height: 170px;
  }

  .outcome-bar {
    width: clamp(24px, 80%, 34px);
  }

  .hotel-performance-card-header {
    display: grid;
  }

  .hotel-series-controls {
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .hotel-combo-chart {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .hotel-chart-labels {
    font-size: 11px;
  }

  .hotel-chart-plot {
    min-width: 0;
  }

  .rfv-chart-panel {
    min-height: auto;
  }

  .rfv-treemap {
    min-height: 0;
  }

  .rfv-segment {
    min-width: min(100%, 230px);
    min-height: 104px;
  }

  .table-shell {
    overflow-x: auto;
  }

  table {
    min-width: 760px;
  }

  .quote-drawer,
  .activation-drawer,
  .quote-drawer.is-split,
  .activation-drawer.is-split {
    top: 8px;
    right: 8px;
    left: 8px;
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    overflow: hidden;
    transform: translate(0, 0) scale(0.98);
  }

  .quote-drawer.is-open,
  .activation-drawer.is-open,
  .quote-drawer.is-split,
  .activation-drawer.is-split {
    transform: translate(0, 0) scale(1);
  }

  .activation-field-grid {
    grid-template-columns: 1fr;
  }

  .activation-generate-button {
    top: 16px;
    left: auto;
    right: 64px;
    min-height: 40px;
    padding: 7px 12px 7px 8px;
    transform: none;
  }

  .activation-generate-button::before {
    width: 26px;
    height: 26px;
    font-size: 18px;
  }

  .contact-modal {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    transform: translateY(104%);
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .contact-modal.is-open {
    transform: translateY(0);
  }

  .contact-modal-header {
    flex-wrap: wrap;
  }

  .contact-modal-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .import-modal {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    max-height: calc(100vh - 20px);
    transform: translateY(104%);
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .import-modal.is-open {
    transform: translateY(0);
  }

  .import-modal-footer,
  .import-modal-footer > div {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .contact-modal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-tabs {
    overflow-x: auto;
  }

  .contact-status-row {
    grid-template-columns: 1fr 40px;
  }

  .contact-status-row .status-track,
  .contact-status-row small {
    grid-column: 1 / -1;
  }

  .drawer-footer {
    display: flex;
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .drawer-body {
    grid-template-columns: 1fr;
  }

  .drawer-footer > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .drawer-footer > .quote-outcome-actions {
    grid-template-columns: 1fr 1fr;
  }

  .quote-header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
